Skip to main content

Module application

Module application 

Source
Expand description

The core Application that dispatches updates to registered handlers. The core Application that dispatches updates to registered handlers.

Ported from python-telegram-bot/src/telegram/ext/_application.py.

§Lifecycle

initialize  ->  start  ->  idle (run_polling / run_webhook)  ->  stop  ->  shutdown

§Handler dispatch

Handlers are organised into groups (a BTreeMap<i32, Vec<Handler>>). Groups are iterated in ascending numeric order. Within each group, the first handler whose check_update returns true wins – at most one handler per group fires.

Structs§

Application
The main entry point for a PTB-style Telegram bot application.
Handler
A registered handler: the check_update predicate + callback + blocking flag.
PollingBuilder
Builder for configuring and starting the polling loop.

Enums§

ApplicationError
Errors from the Application itself.
HandlerError
Errors that can occur during update processing.

Constants§

DEFAULT_GROUP
The default handler dispatch group (group 0).

Type Aliases§

ErrorHandlerCallback
A boxed, type-erased async error handler callback.
HandlerCallback
A boxed, type-erased async handler callback.
LifecycleHook
Post-lifecycle hook signature.