mirror of
https://github.com/zhenxun-org/zhenxun_bot.git
synced 2025-12-15 14:22:55 +08:00
commit
182f93d618
@ -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
|
||||
|
||||
@ -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
|
||||
|
||||
Loading…
Reference in New Issue
Block a user