From 2f0402b89e88d55a3457c5a3bfc5bd9a760fd1b1 Mon Sep 17 00:00:00 2001 From: HibiKier <775757368@qq.com> Date: Wed, 16 Apr 2025 10:52:55 +0800 Subject: [PATCH] =?UTF-8?q?:bug:=20=E4=BF=AE=E5=A4=8Dban=E6=A3=80=E6=B5=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- zhenxun/builtin_plugins/hooks/auth/auth_ban.py | 6 +----- zhenxun/builtin_plugins/hooks/auth_checker.py | 2 +- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/zhenxun/builtin_plugins/hooks/auth/auth_ban.py b/zhenxun/builtin_plugins/hooks/auth/auth_ban.py index ed141371..4121d8ff 100644 --- a/zhenxun/builtin_plugins/hooks/auth/auth_ban.py +++ b/zhenxun/builtin_plugins/hooks/auth/auth_ban.py @@ -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 diff --git a/zhenxun/builtin_plugins/hooks/auth_checker.py b/zhenxun/builtin_plugins/hooks/auth_checker.py index dcf914d8..554ec29e 100644 --- a/zhenxun/builtin_plugins/hooks/auth_checker.py +++ b/zhenxun/builtin_plugins/hooks/auth_checker.py @@ -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),