MCPcopy Create free account
hub / github.com/eternnoir/pyTelegramBotAPI / name_get

Function name_get

examples/custom_states.py:45–51  ·  view source on GitHub ↗
(message: types.Message, state: StateContext)

Source from the content-addressed store, hash-verified

43# Handler for name input
44@bot.message_handler(state=MyStates.name)
45def name_get(message: types.Message, state: StateContext):
46 state.set(MyStates.age)
47 bot.send_message(
48 message.chat.id, "How old are you?",
49 reply_parameters=ReplyParameters(message_id=message.message_id),
50 )
51 state.add_data(name=message.text)
52
53
54# Handler for age input

Callers

nothing calls this directly

Calls 4

ReplyParametersClass · 0.90
setMethod · 0.45
send_messageMethod · 0.45
add_dataMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…