forked from CodeXBotz/File-Sharing-Bot
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathcbb.py
28 lines (26 loc) · 1022 Bytes
/
cbb.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#(©)Codexbotz
from pyrogram import __version__
from bot import Bot
from config import OWNER_ID
from pyrogram.types import Message, InlineKeyboardMarkup, InlineKeyboardButton, CallbackQuery
@Bot.on_callback_query()
async def cb_handler(client: Bot, query: CallbackQuery):
data = query.data
if data == "about":
await query.message.edit_text(
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>",
disable_web_page_preview = True,
reply_markup = InlineKeyboardMarkup(
[
[
InlineKeyboardButton("🔒 Close", callback_data = "close")
]
]
)
)
elif data == "close":
await query.message.delete()
try:
await query.message.reply_to_message.delete()
except:
pass