From 6e68ef03fd0b9136f1fb0304a2a64d526c99b948 Mon Sep 17 00:00:00 2001 From: levina <82658782+levina-lab@users.noreply.github.com> Date: Tue, 8 Feb 2022 09:42:04 +0700 Subject: [PATCH] use in group --- program/punishment.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/program/punishment.py b/program/punishment.py index 85fe946..0eaa39f 100644 --- a/program/punishment.py +++ b/program/punishment.py @@ -5,7 +5,7 @@ import asyncio from pyrogram import Client, filters from pyrogram.types import Message from pyrogram.errors import FloodWait -from driver.filters import command +from driver.filters import command, other_filters from driver.decorators import sudo_users_only from driver.database.dbchat import get_served_chats from driver.database.dbpunish import add_gban_user, is_gbanned_user, remove_gban_user @@ -13,7 +13,7 @@ from driver.database.dbpunish import add_gban_user, is_gbanned_user, remove_gban from config import BOT_NAME, SUDO_USERS, BOT_USERNAME as bn -@Client.on_message(command(["gban", f"gban@{bn}"]) & ~filters.edited) +@Client.on_message(command(["gban", f"gban@{bn}"]) & other_filters) @sudo_users_only async def global_banned(c: Client, message: Message): if not message.reply_to_message: @@ -123,7 +123,7 @@ async def global_banned(c: Client, message: Message): return -@Client.on_message(command(["ungban", f"ungban@{bn}"]) & ~filters.edited) +@Client.on_message(command(["ungban", f"ungban@{bn}"]) & other_filters) @sudo_users_only async def ungban_global(c: Client, message: Message): chat_id = message.chat.id