File tree Expand file tree Collapse file tree 1 file changed +28
-0
lines changed
Expand file tree Collapse file tree 1 file changed +28
-0
lines changed Original file line number Diff line number Diff line change 1+ #(©)Codexbotz
2+
3+ from pyrogram import __version__
4+ from bot import Bot
5+ from config import OWNER_ID
6+ from pyrogram .types import Message , InlineKeyboardMarkup , InlineKeyboardButton , CallbackQuery
7+
8+ @Bot .on_callback_query ()
9+ async def cb_handler (client : Bot , query : CallbackQuery ):
10+ data = query .data
11+ if data == "about" :
12+ await query .message .edit_text (
13+ text = f"<b>○ Creator : <a href='tg://user?id={ OWNER_ID } '>This Person</a>\n ○ Language : <code>Python3</code>\n ○ Library : <a href='https://docs.pyrogram.org/'>Pyrogram asyncio { __version__ } </a>\n ○ Source Code : <a href='https://github.com/CodeXBotz/File-Sharing-Bot'>Click here</a>\n ○ Channel : @CodeXBotz\n ○ Support Group : @CodeXBotzSupport</b>" ,
14+ disable_web_page_preview = True ,
15+ reply_markup = InlineKeyboardMarkup (
16+ [
17+ [
18+ InlineKeyboardButton ("🔒 Close" , callback_data = "close" )
19+ ]
20+ ]
21+ )
22+ )
23+ elif data == "close" :
24+ await query .message .delete ()
25+ try :
26+ await query .message .reply_to_message .delete ()
27+ except :
28+ pass
You can’t perform that action at this time.
0 commit comments