Behaviour for organizing bot handlers into separate modules.
Routers are tried before the main bot module and can define message handlers, callback handlers, FSM states, and commands. See Routers.
Summary
Callbacks
Callback invoked when a callback query is received.
Callback invoked when a message is received.
Callbacks
@callback handle_callback(callback :: TelegramEx.Types.CallbackQuery.t(), ctx :: map()) :: any()
Callback invoked when a callback query is received.
Should return a TelegramEx.handler_result() or :pass to skip to the next handler.
@callback handle_message(message :: TelegramEx.Types.Message.t(), ctx :: map()) :: any()
Callback invoked when a message is received.
Should return a TelegramEx.handler_result() or :pass to skip to the next handler.