GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — PyrogramBot/PyrogramBot/modules/start.py at Alpha · TheCodents/PyrogramBot

Expand file tree

/

start.py

Copy path
More file actions
More file actions

Latest commit

 

History

History
History
43 lines (32 loc) · 1.29 KB
/

start.py

Copy path

File metadata and controls

43 lines (32 loc) · 1.29 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
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.