use in group
This commit is contained in:
parent
a8d2632183
commit
6e68ef03fd
@ -5,7 +5,7 @@ import asyncio
|
|||||||
from pyrogram import Client, filters
|
from pyrogram import Client, filters
|
||||||
from pyrogram.types import Message
|
from pyrogram.types import Message
|
||||||
from pyrogram.errors import FloodWait
|
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.decorators import sudo_users_only
|
||||||
from driver.database.dbchat import get_served_chats
|
from driver.database.dbchat import get_served_chats
|
||||||
from driver.database.dbpunish import add_gban_user, is_gbanned_user, remove_gban_user
|
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
|
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
|
@sudo_users_only
|
||||||
async def global_banned(c: Client, message: Message):
|
async def global_banned(c: Client, message: Message):
|
||||||
if not message.reply_to_message:
|
if not message.reply_to_message:
|
||||||
@ -123,7 +123,7 @@ async def global_banned(c: Client, message: Message):
|
|||||||
return
|
return
|
||||||
|
|
||||||
|
|
||||||
@Client.on_message(command(["ungban", f"ungban@{bn}"]) & ~filters.edited)
|
@Client.on_message(command(["ungban", f"ungban@{bn}"]) & other_filters)
|
||||||
@sudo_users_only
|
@sudo_users_only
|
||||||
async def ungban_global(c: Client, message: Message):
|
async def ungban_global(c: Client, message: Message):
|
||||||
chat_id = message.chat.id
|
chat_id = message.chat.id
|
||||||
|
Loading…
Reference in New Issue
Block a user