async def eliminate_user(_, message):
if not message.from_user:
return
chat=message.chat
chat_id=message.chat.id
user=message.from_user
uid=user.id
first=user.first_name
last=""
if user.last_name:
last+=user.last_name
if not await network_status(chat_id):
return
if first or last in network_names:
await message.delete()
await chat.ban_member(uid)
await zbot.send_message(text=f"Banned `{uid}`: **{user.mention}** for Network Tag in name.", chat_id=message.chat.id)
else:
return
Am trying to create a simple module to check the name of the user and if they have something which is restricted in their names, for instance some network's tag, they get banned. But in here, the bot is unable to read the messages of the users, much less check if they have some network tag in their