UsesTelegram
Reaches the Telegram client from inside an action.
An action is handed a Context, which knows the bot but deliberately not the network — that is what lets the same catalogue serve every chat. A Telegram action does need the Telegram client, so it asks the bot for the connector by name.
It can genuinely be absent: the connector is installed only when the
environment carries a Telegram token, and it can fail to start while the rest
of the bot runs on. Saying so is better than a TypeError two frames down.
Tags
Table of Contents
Methods
Methods
telegram()
private
telegram(Context $context) : TelegramConnector
Parameters
- $context : Context