no need
This commit is contained in:
parent
9d1f3ccc30
commit
a8b9fbeed5
@ -1,5 +1,6 @@
|
|||||||
""" global banned and un-global banned module """
|
""" global banned and un-global banned module """
|
||||||
|
|
||||||
|
|
||||||
import asyncio
|
import asyncio
|
||||||
|
|
||||||
from pyrogram import Client, filters
|
from pyrogram import Client, filters
|
||||||
@ -10,12 +11,13 @@ from driver.decorators import bot_creator
|
|||||||
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
|
||||||
|
|
||||||
from config import BOT_NAME, SUDO_USERS, BOT_USERNAME as bn
|
from config import SUDO_USERS, BOT_USERNAME as bn
|
||||||
|
|
||||||
|
|
||||||
@Client.on_message(command(["gban", f"gban@{bn}"]) & other_filters)
|
@Client.on_message(command(["gban", f"gban@{bn}"]) & other_filters)
|
||||||
@bot_creator
|
@bot_creator
|
||||||
async def global_banned(c: Client, message: Message):
|
async def global_banned(c: Client, message: Message):
|
||||||
|
BOT_NAME = (await c.get_me()).first_name
|
||||||
if not message.reply_to_message:
|
if not message.reply_to_message:
|
||||||
if len(message.command) < 2:
|
if len(message.command) < 2:
|
||||||
await message.reply_text("**usage:**\n\n/gban [username | user_id]")
|
await message.reply_text("**usage:**\n\n/gban [username | user_id]")
|
||||||
|
Loading…
Reference in New Issue
Block a user