From e01b1ed882a01d03b763e9b06b8b5d0608fc5f21 Mon Sep 17 00:00:00 2001 From: Kyomotoi <1172294279@qq.com> Date: Sat, 24 Apr 2021 16:20:19 +0800 Subject: =?UTF-8?q?=E2=9C=A8=F0=9F=94=A5=F0=9F=8E=A8=F0=9F=90=9B=E2=99=BB?= =?UTF-8?q?=EF=B8=8F=F0=9F=93=9D=20=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 新增:开发工具中ub paste,再也不怕长消息了。 新增:错误处理两项`ReadFileError`、`FormatError` 修复:bot退群显示被自己踢出群 删除:Service部分内容 删除:hitokoto本地库,改用请求 优化:b站小程序抓取 重构:bot管理部分,对命令进行简化 --- ATRI/plugins/essential.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'ATRI/plugins/essential.py') diff --git a/ATRI/plugins/essential.py b/ATRI/plugins/essential.py index 9304279..3ebaa36 100644 --- a/ATRI/plugins/essential.py +++ b/ATRI/plugins/essential.py @@ -261,6 +261,8 @@ async def _group_member_event(bot: Bot, event: GroupIncreaseNoticeEvent) -> None @group_member_event.handle() async def _gro(bot: Bot, event: GroupDecreaseNoticeEvent) -> None: if event.is_tome(): + if event.user_id != event.self_id: + return msg = ( "呜呜呜,主人" f"咱被群 {event.group_id} 里的 {event.operator_id} 扔出来了..." @@ -279,7 +281,7 @@ group_admin_event = sv.on_notice() @group_admin_event.handle() async def _group_admin_event(bot: Bot, event: GroupAdminNoticeEvent) -> None: - if event.is_tome(): + if not event.is_tome(): return for superuser in Config.BotSelfConfig.superusers: -- cgit v1.2.3