Download plugins/cbb.py from hf-electricianinsomniac/CodeXBotz: direct link, hf CLI and curl.
- Browser
- Download file 1.17 kB
-
https://huggingface.co/spaces/hf-electricianinsomniac/CodeXBotz/resolve/main/plugins/cbb.py
- Command line
-
hf download hf://spaces/hf-electricianinsomniac/CodeXBotz/plugins/cbb.py
-
curl -L -o cbb.py https://huggingface.co/spaces/hf-electricianinsomniac/CodeXBotz/resolve/main/plugins/cbb.py
1.17 kB
| #(©)Codexbotz | |
| from pyrogram import __version__ | |
| from bot import Bot | |
| from config import OWNER_ID | |
| from pyrogram.types import InlineKeyboardMarkup, InlineKeyboardButton, CallbackQuery | |
| 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>\n○ Source Code : <a href='https://github.com/CodeXBotz/File-Sharing-Bot'>Click here</a>\n○ Channel : @CodeXBotz\n○ Support Group : @CodeXBotzSupport</b>", | |
| 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 |