Telegram engine for the Axion conversation framework.
Sends messages and option menus to Telegram via the Bot API (requests).
Inherits from ObjConversationEngine.ConversationInterface.
Config section: telegram
| Key | Description |
|---|---|
bottoken |
Telegram bot token from BotFather |
Methods:
_init_client() — loads token from config_api(method, payload) — internal helper; POSTs to api.telegram.orgtransmit_message(message, chat_id="") — sends sendMessage; truncates at 4 096 charsdisplay_context(opts) — sends clipboard-prefixed context summarydisplay_options(opts) — sends ReplyKeyboardMarkup for command options, plain text for prompts; returns (first_key, first_prompt)Supports both webhook and long-polling receive modes.
Methods:
handle_update(update) — processes an Update dict; routes to ObjConversation.read_conversation(); called by FastAPI webhook endpointrun() — long-polling loop using getUpdates; retries on exception with 5-second back-offconfig.yaml:telegram:
bottoken: ""
handle_update()broker.run() directly