From 7c2832bcca61c9c66d1bbbc928cb0a817ba119ca Mon Sep 17 00:00:00 2001 From: xtaodada Date: Sat, 27 Aug 2022 20:27:35 +0800 Subject: [PATCH] clean_member fix a bug --- clean_member/main.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/clean_member/main.py b/clean_member/main.py index 82f63cd..5ab431e 100644 --- a/clean_member/main.py +++ b/clean_member/main.py @@ -17,10 +17,10 @@ async def check_self_and_from(message: Message): data = await bot.get_chat_member(cid, (await bot.get_me()).id) if data.status not in [ChatMemberStatus.ADMINISTRATOR, ChatMemberStatus.OWNER]: return False - if message.outgoing: - return True if not message.from_user: return False + if message.outgoing: + return True data = await bot.get_chat_member(cid, message.from_user.id) return data.status in [ChatMemberStatus.ADMINISTRATOR, ChatMemberStatus.OWNER]