Skip to content

Client Telegram

Keith Sterling edited this page Feb 26, 2019 · 3 revisions

The Telegram Client provides a way for a Telegram Messenger to interact with a bot client.

To begin, you'll need an Access Token. Read and follow the Introduction to the API on the Telegram Developer website. When you are ready you then need to create an Access Token, which do by talking to the @BotFather via Telegram Messenger and follow a few simple steps.

Once you have your access token, you need to add an entry into the license.kets file

TELEGRAM_TOKEN = XXXXXXX

Other than this, Telegram client needs little configuration apart from which message to return if you send it an unknown command. This can be configured by adding the following client configuration to config.yaml

telegram:
  unknown_command: Sorry, that is not a command I have been taught yet!

To run the Facebook client, you can use the shell script in Y-Bot scripts folder

./y-bot-telegram.sh

Or you can use the command line

python3 -m programy.clients.polling.telegram.client --config <PATH TO CONFIG> --cformat yaml --logging <PATH TO LOGGING>
Clone this wiki locally