create data

This commit is contained in:
levina 2022-02-07 22:37:44 +07:00 committed by GitHub
parent 3036333bc9
commit edc1692f31
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -5,6 +5,7 @@ from driver.database.dbpunish import is_gbanned_user
from pyrogram import Client, filters
from program.utils.inline import menu_markup
from pyrogram.types import CallbackQuery, InlineKeyboardButton, InlineKeyboardMarkup
from config import (
ASSISTANT_NAME,
BOT_NAME,
@ -238,3 +239,12 @@ async def close(_, query: CallbackQuery):
if not a.can_manage_voice_chats:
return await query.answer("💡 Only admin with manage video chat permission that can tap this button !", show_alert=True)
await query.message.delete()
@Client.on_callback_query(filters.regex("close_panel"))
async def close(_, query: CallbackQuery):
user_id = query.from_user.id
if await is_gbanned_user(user_id):
await query.answer("❗️ You've blocked from using this bot!", show_alert=True)
return
await query.message.delete()