This is a quick and dirty telegram sample bot in python, it just an example and the code is quite dirty. The program uses an in memory datastore for sessions data, of course would be better to use a database.
- python3
- docker
Follow instructions on https://getjenny.github.io/starchat-doc/
Create a new index:
curl -v -H "Content-Type: application/json" -X POST "http://localhost:8888/index_management/create"
pip install python-telegram-bot --upgrade
pip install urllib3
curl -v --form "csv=@<FILE_PATH>" http://localhost:8888/decisiontable_upload_csv
e.g.
curl -v --form "csv=@starchat_configuration_sample.csv" http://localhost:8888/decisiontable_upload_csv
Apply the modifications:
curl -v -H "Content-Type: application/json" -X POST "http://localhost:${PORT}/decisiontable_analyzer"
- go on [https://web.telegram.org/#/im?p=@BotFather]
- type the command "/newbot" to create a new bot, follow the instructions
- collect the unique token access which is something like this: ```Use this token to access the HTTP API: XXXXXXX:YYYYYYYYYYYYYYYYYYYYYYYYYYYY`````
- edit the file telegram_starchat.py and replace the token access into the main function