mirror of
https://github.com/zhenxun-org/zhenxun_bot.git
synced 2026-10-04 19:29:59 +08:00
feat(ban): 在调用ban列表时主动删除过期数据
- 除了接收到被ban用户的信息外,现在主动调用`ban列表`命令也会删除过期数据 - 修复 unban 返回信息错误
This commit is contained in:
@@ -110,7 +110,7 @@ class BanConsole(Model):
|
||||
return -1
|
||||
_time = time.time() - (user.ban_time + user.duration)
|
||||
if _time < 0:
|
||||
return int(time.time() - user.ban_time - user.duration)
|
||||
return int(abs(_time))
|
||||
await user.delete()
|
||||
return 0
|
||||
|
||||
|
||||
Reference in New Issue
Block a user