From 89b0972cd28866d72e7636e3766ab7bb6f158a87 Mon Sep 17 00:00:00 2001 From: Kyomotoi <1172294279@qq.com> Date: Fri, 16 Apr 2021 14:10:33 +0800 Subject: =?UTF-8?q?=F0=9F=8E=A8=E2=9A=A1=EF=B8=8F=E2=99=BB=EF=B8=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 新增:休眠操作(期间不回应任何信息) 更改:近乎所有命令格式 重构:重构帮助部分代码 --- ATRI/plugins/essential.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'ATRI/plugins/essential.py') diff --git a/ATRI/plugins/essential.py b/ATRI/plugins/essential.py index 833ce01..686d87b 100644 --- a/ATRI/plugins/essential.py +++ b/ATRI/plugins/essential.py @@ -93,11 +93,13 @@ async def _check_block(matcher: Matcher, event: MessageEvent, state: T_State) -> None: user = str(event.user_id) + msg = str(event.message) if not sv.BlockSystem.auth_user(user): raise IgnoredException(f'Block user: {user}') if not sv.Dormant.is_dormant(): - raise IgnoredException('Bot has been dormant.') + if "/dormant" not in msg: + raise IgnoredException('Bot has been dormant.') if isinstance(event, GroupMessageEvent): group = str(event.group_id) @@ -266,7 +268,7 @@ async def _gro(bot: Bot, event: GroupDecreaseNoticeEvent) -> None: message=msg ) else: - await group_member_event.finish(f"{event.user_id} 离开了我们...") + await group_member_event.finish(f"阿!有人离开了我们...") # 处理群管理事件 -- cgit v1.2.3