GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing github.com — PyrogramBot/PyrogramBot/modules/start.py at Alpha · TheCodents/PyrogramBot Expand file tree/ Copy pathstart.pyMore file actions 43 lines (32 loc) · 1.29 KB / Copy pathstart.pyFile metadata and controls43 lines (32 loc) · 1.29 KB 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 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 from PyrogramBot import app from PyrogramBot.__main__ import BOT_NAME from PyrogramBot.config import OWNER_ID from PyrogramBot.utils.errors import capture_err from pyrogram import filters from pyrogram.types import InlineKeyboardMarkup, InlineKeyboardButton __MODULE__ = "Basic" __HELP__ = """/start - Start the bot with Inline Buttons /help - Help Menu """ keyboard = InlineKeyboardMarkup( [ [ InlineKeyboardButton( text="Example Inline Link Button", url=f"https://github.com/swatv3nub/PyrogramBot", ), InlineKeyboardButton( text="Example Inline Query Button", callback_data="example", ) ] #Start @app.on_message(filters.command("start")) @capture_err async def start(_, message): start_text=f"Hello {message.from_user.mention}, I am {BOT_NAME}\n\nMy Onwer is [{OWNER_ID}](tg://user?id={OWNER_ID})" await message.reply_text(start_text, reply_markup=keyboard, parse_mode="markdown") @app.on_callback_query(filters.regex("example")) async def example(_, CallBackQuery): await app.answer_callback_query(CallbackQuery.id, "Surprise!", show_alert=True) #Help { in __main__.py } |
| You are visitor 01402520 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |