Commands & Handlers
Register listeners for any Telegram update type using the bot global.
Commands
Text matching
Callback actions
Fallback handlers
If you want a last-resort text response, add a general text handler after your command and pattern-specific handlers.
Place broad text fallbacks near the end of your handler setup. If they come too early, more specific text handlers may never run.
How did this page feel?
Quick feedback helps improve the docs.
Last updated March 22, 2026