From 58d093b51e104326b68c504269a72424601e3dd7 Mon Sep 17 00:00:00 2001 From: methneviebyvaet <77743895+meth1337@users.noreply.github.com> Date: Wed, 12 Apr 2023 11:16:31 +0700 Subject: [PATCH] Modify banned_users function to correctly filter messages from banned users (#44) --- misskaty/plugins/banned.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/misskaty/plugins/banned.py b/misskaty/plugins/banned.py index c987ce1e..091b191a 100644 --- a/misskaty/plugins/banned.py +++ b/misskaty/plugins/banned.py @@ -9,7 +9,7 @@ from utils import temp 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)