diff --git a/program/punishment.py b/program/punishment.py index 1fa64aa..d8d964f 100644 --- a/program/punishment.py +++ b/program/punishment.py @@ -1,5 +1,6 @@ """ global banned and un-global banned module """ + import asyncio 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.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) @bot_creator async def global_banned(c: Client, message: Message): + BOT_NAME = (await c.get_me()).first_name if not message.reply_to_message: if len(message.command) < 2: await message.reply_text("**usage:**\n\n/gban [username | user_id]")