Configure ScPBot
Here you find a step-by-step tutorial on how to create your own Telegram Bot and connect ScPrime status Bot with your own private Telegram group.
Configuration tutorial
Step 1
Install Chrome
Install Chrome on to your machine. You can download Chrome on:
https://www.google.com/chrome/
Step 2
Create Telegram Bot
Create a Telegram Bot with BotFather
Open the following link to directly go to BotFather:
https://t.me/botfather
Step 3
Create new Telegram Bot
In BotFather type the following commands:
- Create a new Bot:
/newbot - BotFather will ask you to give the Bot a name, mine will be ‘ScPTestBot’.
- BotFather will ask you to choose a username, mine will be ‘scptest_bot’.
If the name and username are accepted you will get a HTTP API access token. Write down/save the access token. This is needed to access the Bot!
Open the URL of your Bot, mine is ‘t.me/scptest_bot’ and click ‘Start’ in the bottom of the chat screen.
Step 4
Add access token to botSetup.ini
Go to your ‘scpStatusBot’ folder and open the botSetup.ini.
Tip: open botSetup.ini in Notepad++, will be more easy to read.
If you did not download ScP status Bot, you can download it here!
In botSetup.ini put your access token after telegramHTTPAPI = . So replace botXXX:YYYY with your HTTP API access token from step 3.
Step 5
Configure the Telegram Bot
Go back to BotFather and type the following command:
- Show all your Bots:
/mybots - BotFather will ask you to select your bot, mine will be ‘@scptest_bot’.
- BotFather will ask you what to do with the bot, select ‘Bot Settings’.
- BotFather shows settings for your Bot, select ‘Allow Groups?’
If you get the message:
“Groups are currently enabled for bot ScPTestBot @scptest_bot”
All the settings are correct and you can close BotFather. Otherwise Enable Groups, Select the button ‘Turn groups on’.
Also check if your Group privacy is turned off:
Select ‘Back to Settings’ -> select ‘Group Privacy’ -> select ‘Turn off’
Step 6
Add Telegram Bot to a new Group
Add your Telegram Bot to a new Telegram group.
- Go to your created Telegram Bot and add the Bot to your contacts
- Create a new message in Telegram and select ‘New group’
- Search the Bot by typing ‘@your_bot_name’ for me is that ScPTestBot. Select the bot and click next.
- Give your group a name, for me it will be ‘ScPtestGroup’.
Step 7
Add chat id to botSetup.ini
Get your chat_id and put the id in botSetup.ini.
1. In the new made group you will send the follow message:
/my_id @your_bot_username
(For me that will be: /my_id @scptest_bot)
2. Go with your favorite webbrowser to the following URL:
https://api.telegram.org/botXXX:YYYY/getUpdates
And replace XXX:YYYY with your HTTP API access token from step 3.
If the the result is empty like: “{“ok”:true,”result”:[{}}]}”, send a extra message in the group like ‘test’ to trigger an update.
3. On the page search for ‘ “chat”:{“id”:-zzzzzzzzzz, ‘. Your chat_id is -zzzzzzzzzz.
4. In botSetup.ini put your chat id after chat_id = . So replace -000000000 with your chat id from 3..
Step 8
Add your grafana.scpri.me URL to botSetup.ini and run the Bot
Set your URL from grafana.scpri.me and you can start ScPrime Status Bot!
1. Go to you detail page on grafana.scpri.me.
2. In botSetup.ini put your grafana.scpri.me URL after grafanaUrl =.
3. Save your botSetup.ini and close your editor.
4. Start ‘SCPStatusBot.exe’ & your Telegram will give you 24/7 updates about your storage provider!