Telegram for notifications
Keep up-to-date with what your bot is currently doing
Setting up Telegram for notifications consists of multiple steps:
- Creating a new Telegram bot with 'Botfather'
- Placing the new bot's API token in StalexBot
- Connecting the Telegram chat(s) you want to receive notifications in
In Telegram, look for the bot called 'Botfather'. This is the Telegram bot that allows you to create new bots yourself.

Botfather in Telegram
Talk to the Botfather, starting off with the command: /newbot. The bot will ask you a few questions to set it up.

Once you complete the steps, you will receive the HTTP API token.
You received an API token like this from the Botfather:
12345678:AAHcjXvyTx-4FiMazWEBJSno1agMg1V_yV8
Copy the code the Botfather gave you and paste it in the 'Telegram bot token' input on StalexBot.

After pasting it in, hit 'Save token'

Your Telegram bot will now be connected to StalexBot. There is one more step to go.
After connecting the Telegram bot, you still need to decide which Telegram chats can receive notifications from your bot. You can connect the bot to private chats, but also to Telegram groups.

Click on this link to enter a chat with the bot you just created. Don't forget to hit 'Start' afterwards.
Now say something to the bot, it doesn't matter what, as long as you still have the 'Telegram Notifications' page open on StalexBot.
On StalexBot, click on 'Add chat':

You should see your account here. Click add to connect this chat.
After adding the chat, you can send a test message by clicking the 'Test message' button. This confirms the connection is set up. You will now receive notifications from the bot and can execute the commands like /positions, /monitor and /balance.
When creating a new group, choose to add the bot immediately, like so:

Click on the bot, it will be added to the group immediately
Next, we have to promote the bot the admin, so the bot can access messages in this group.

Promote the bot the admin
After promoting the bot to admin, type something in the group. Again, it does not matter what you type, as long as you have the 'Telegram Notifications' page open on your StalexBot.
Last modified 1yr ago