MCPcopy Index your code
hub / github.com/python-telegram-bot/python-telegram-bot / start

Function start

examples/echobot.py:35–41  ·  view source on GitHub ↗

Send a message when the command /start is issued.

(update: Update, context: ContextTypes.DEFAULT_TYPE)

Source from the content-addressed store, hash-verified

33# Define a few command handlers. These usually take the two arguments update and
34# context.
35async def start(update: Update, context: ContextTypes.DEFAULT_TYPE) -> None:
36 """Send a message when the command /start is issued."""
37 user = update.effective_user
38 await update.message.reply_html(
39 rf"Hi {user.mention_html()}!",
40 reply_markup=ForceReply(selective=True),
41 )
42
43
44async def help_command(update: Update, context: ContextTypes.DEFAULT_TYPE) -> None:

Callers

nothing calls this directly

Calls 3

ForceReplyClass · 0.90
reply_htmlMethod · 0.80
mention_htmlMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…