diff --git a/basic_plugins/admin_bot_manage/rule.py b/basic_plugins/admin_bot_manage/rule.py index 72dcbc66..bdce468b 100755 --- a/basic_plugins/admin_bot_manage/rule.py +++ b/basic_plugins/admin_bot_manage/rule.py @@ -16,7 +16,7 @@ def switch_rule(event: Event) -> bool: 参数: :param event: pass """ - global cmd + global cmd, v try: if not cmd or time.time() - v > 60 * 60: cmd = ["关闭全部被动", "开启全部被动", "开启全部功能", "关闭全部功能"] @@ -42,6 +42,7 @@ def switch_rule(event: Event) -> bool: cmd.append(f"关闭 {key}") except KeyError: pass + v = time.time() msg = get_message_text(event.json()).split() msg = msg[0] if msg else "" return msg in cmd diff --git a/basic_plugins/hooks/_utils.py b/basic_plugins/hooks/_utils.py index b115c2f6..5f30fd60 100644 --- a/basic_plugins/hooks/_utils.py +++ b/basic_plugins/hooks/_utils.py @@ -453,7 +453,6 @@ class AuthChecker: :param bot: bot :param event: event """ - ban = await BanUser.is_ban(event.user_id) try: if ( ( diff --git a/basic_plugins/init_plugin_config/check_plugin_status.py b/basic_plugins/init_plugin_config/check_plugin_status.py index 35355fdd..5f61e0c2 100755 --- a/basic_plugins/init_plugin_config/check_plugin_status.py +++ b/basic_plugins/init_plugin_config/check_plugin_status.py @@ -9,7 +9,7 @@ async def check_plugin_status(bot: Bot): msg = "" for plugin in plugins_manager.keys(): data = plugins_manager.get(plugin) - if not data.error: + if data.error: msg += f'{plugin}:{data.plugin_name}\n' if msg and bot.config.superusers: msg = "以下插件加载失败..\n" + msg