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

Function any_state

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

Source from the content-addressed store, hash-verified

31# Cancel command handler
32@bot.message_handler(state="*", commands=["cancel"])
33async def any_state(message: types.Message, state: StateContext):
34 await state.delete()
35 await bot.send_message(
36 message.chat.id,
37 "Your information has been cleared. Type /start to begin again.",
38 reply_parameters=ReplyParameters(message_id=message.message_id),
39 )
40
41
42# 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…