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

Function any_state

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

Source from the content-addressed store, hash-verified

32# Cancel command handler
33@bot.message_handler(state="*", commands=["cancel"])
34def any_state(message: types.Message, state: StateContext):
35 state.delete()
36 bot.send_message(
37 message.chat.id,
38 "Your information has been cleared. Type /start to begin again.",
39 reply_parameters=ReplyParameters(message_id=message.message_id),
40 )
41
42
43# Handler for name input

Callers

nothing calls this directly

Calls 3

ReplyParametersClass · 0.90
deleteMethod · 0.45
send_messageMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…