use in group

This commit is contained in:
levina 2022-02-08 09:42:04 +07:00 committed by GitHub
parent a8d2632183
commit 6e68ef03fd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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