Merge pull request #1185 from LambdaYH/patch-3

fix switch_rule
This commit is contained in:
HibiKier
2022-11-22 20:14:10 +08:00
committed by GitHub
3 changed files with 3 additions and 3 deletions
+2 -1
View File
@@ -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
-1
View File
@@ -453,7 +453,6 @@ class AuthChecker:
:param bot: bot
:param event: event
"""
ban = await BanUser.is_ban(event.user_id)
try:
if (
(
@@ -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