mirror of
https://github.com/Xtao-Labs/sticker-captcha-bot.git
synced 2024-11-22 07:07:51 +00:00
fix a bug
This commit is contained in:
parent
ed4e63d678
commit
c9a5ea0266
@ -21,6 +21,13 @@ async def chat_members_handle(client: Client, message: Message):
|
|||||||
return
|
return
|
||||||
chat = message.chat
|
chat = message.chat
|
||||||
user = message.from_user
|
user = message.from_user
|
||||||
|
if message.new_chat_members:
|
||||||
|
for i in message.new_chat_members:
|
||||||
|
if i.is_self:
|
||||||
|
with contextlib.suppress(Exception):
|
||||||
|
await log(chat, user, "NEW_GROUP")
|
||||||
|
return
|
||||||
|
user = message.new_chat_members[0] if message.new_chat_members else message.from_user
|
||||||
if user.is_self or user.is_verified or user.is_bot or user.is_deleted or user.is_support:
|
if user.is_self or user.is_verified or user.is_bot or user.is_deleted or user.is_support:
|
||||||
return
|
return
|
||||||
try:
|
try:
|
||||||
|
Loading…
Reference in New Issue
Block a user