Skip to content

Commit

Permalink
Fix : User ID Belongs To A User.
Browse files Browse the repository at this point in the history
  • Loading branch information
StarkGang authored May 16, 2021
1 parent b706256 commit 732d647
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions plugins/gtools.py
Original file line number Diff line number Diff line change
Expand Up @@ -198,29 +198,29 @@ async def ungbun_him(client, message):


@listen(filters.incoming & ~filters.me & ~filters.user(Config.AFS))
async def delete_user_msgs(client, message):
async def watch(client, message):
if not message:

return
if not message.from_user:

return
user = message.from_user.id
if await is_gmuted(user):
try:
await message.delete()
except:

return
if await gban_info(user):
me_ = await message.chat.get_member(int(client.me.id))
if message.chat.type != "supergroup":
return
try:
me_ = await message.chat.get_member(int(client.me.id))
except:
return
if not me_.can_restrict_members:

return
try:
await client.kick_chat_member(message.chat.id, int(user))
except:

return
await client.send_message(
message.chat.id,
Expand Down

0 comments on commit 732d647

Please sign in to comment.