From b9e3b7684321e9f5ab4253bdeaa8a8645bb501f2 Mon Sep 17 00:00:00 2001 From: levina <82658782+levina-lab@users.noreply.github.com> Date: Tue, 8 Feb 2022 09:32:24 +0700 Subject: [PATCH] handler filters --- program/blockchat.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/program/blockchat.py b/program/blockchat.py index 609b555..ec3f386 100644 --- a/program/blockchat.py +++ b/program/blockchat.py @@ -12,7 +12,7 @@ from driver.database.dblockchat import ( ) -@Client.on_message(command(["block", f"block@{BOT_USERNAME}", "blacklist"]) & other_filters) +@Client.on_message(command(["block", f"block@{BOT_USERNAME}", "blacklist"]) & ~filters.edited) @sudo_users_only async def blacklist_chat_func(_, message: Message): if len(message.command) != 2: @@ -30,7 +30,7 @@ async def blacklist_chat_func(_, message: Message): await message.reply_text("❗️ something wrong happened, check logs!") -@Client.on_message(command(["unblock", f"unblock@{BOT_USERNAME}", "whitelist"]) & other_filters) +@Client.on_message(command(["unblock", f"unblock@{BOT_USERNAME}", "whitelist"]) & ~filters.edited) @sudo_users_only async def whitelist_chat_func(_, message: Message): if len(message.command) != 2: @@ -48,7 +48,7 @@ async def whitelist_chat_func(_, message: Message): await message.reply_text("❗️ something wrong happened, check logs!") -@Client.on_message(command(["blocklist", f"blocklist@{BOT_USERNAME}", "blacklisted"]) & other_filters) +@Client.on_message(command(["blocklist", f"blocklist@{BOT_USERNAME}", "blacklisted"]) & ~filters.edited) @sudo_users_only async def blacklisted_chats_func(_, message: Message): text = "📵 » Blocked Chat list:\n\n"