🐛 修复ban检测

This commit is contained in:
HibiKier 2025-04-16 10:52:55 +08:00
parent 3054fddaf3
commit 2f0402b89e
2 changed files with 2 additions and 6 deletions

View File

@ -30,11 +30,7 @@ async def is_ban(user_id: str | None, group_id: str | None) -> int:
if not results:
return 0
for result in results:
if result.group_id == group_id and (
result.duration > 0 or result.duration == -1
):
return await BanConsole.check_ban_time(user_id, group_id)
if not result.group_id and result.duration == -1:
if result.duration > 0 or result.duration == -1:
return await BanConsole.check_ban_time(user_id, group_id)
return 0

View File

@ -151,9 +151,9 @@ async def auth(
raise PermissionExemption("Matcher插件名称不存在...")
plugin, user = await get_plugin_and_user(module, entity.user_id)
cost_gold = await get_plugin_cost(bot, user, plugin, session)
bot_filter(session)
await asyncio.gather(
*[
bot_filter(session),
auth_ban(matcher, bot, session),
auth_bot(plugin, bot.self_id),
auth_group(plugin, entity, message),