Notifications implementation for Telegram
- Create a telegram group in Which you will receive Elena related messages
- Set up the telegram Bot:
- Search
BotFather
chat in Telegram - Send
/newbot
command and give it a name and username - Store the HTTP API token
- Search
- Get the chat ID of the group:
- Add the bot to the group you created in step 1
- Send this message to the group:
/my_id <@your_bot_username>
- Go to
https://api.telegram.org/bot<YourBOTToken>/getUpdates
and get the chat ID from the response. - If you didn't receive any message, send again the step 3.2. message to the group and try again.
- Copy the chat ID and store it from field
result.message.chat.id
- Edit your
secrets.yaml
file inELENA_HOME
directory with the values you got in steps 2 and 3:NotificationsManager: class: elena_notifications_telegram.adapters.notifications_manager.telegram_notifications_manager.TelegramNotificationsManager http_api_token: PUT_HERE_YOUR_TELEGRAM_BOT_API_TOKEN chat_id: PUT_HERE_YOUR_TELEGRAM_CHAT_ID
- On Pycharm clone elena and elena_notifications_telegram.
- Create a virtual env on elena_notifications_telegram and from the Pycharm terminal (making sure that the venv is active) run
make install
- To run integration test, on
/test/integration/test_home
copy the sample filesecrets-sample.yaml
tosecrets.yaml
and configure your Telegram access configuration as explained before (it doesn't need real exchange info)