clean_member fix a bug

This commit is contained in:
xtaodada 2022-08-27 20:27:35 +08:00
parent 01af45ae73
commit 7c2832bcca
Signed by: xtaodada
GPG Key ID: 4CBB3F4FA8C85659

View File

@ -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]