Modify banned_users function to correctly filter messages from banned users (#44)

This commit is contained in:
methneviebyvaet 2023-04-12 11:16:31 +07:00 committed by GitHub
parent 0304645b73
commit 58d093b51e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -9,7 +9,7 @@ from utils import temp
async def banned_users(_, client, message: Message): async def banned_users(_, client, message: Message):
return (message.from_user is not None or not message.sender_chat) and message.from_user.id in temp.BANNED_USERS return message.from_user and message.from_user.id in temp.BANNED_USERS
banned_user = filters.create(banned_users) banned_user = filters.create(banned_users)