Setting up Telegram Bot / DONE
Setting up Telegram Bot
In your account you need to write to the contact @BotFather
Click the Start button if the bot has not been launched yet.
Write the command
/newbot
and follow the instructions in the bot to get the token
Install the received token
Connect to your server via SSH or FTP
Initiate a project
cd /var/www/exchanger-bot
git pull
npm i
npm run configure
You need to configure token and username in the file
/var/www/exchanger-bot/config/app_config.json
...
"bot": {
"username": "usernamebot",
"token": "12345567:TOKEN"
}
...
4. Set up the domain in the configuration /var/www/exchanger-bot/config/app_config.json
Example of how to fill out the config:
"http": {
...
"baseUrl": "https://www.exchanger.domain/tg",
...
},
"exchanger": {
"baseUrl": "https://www.exchanger.domain",
"exchangerUrl": "https://www.exchanger.domain",
...
},
...
5. MongoDB Access:
Specify in the configuration file/var/www/exchanger-bot/config/app_config.json
MongoDB database accesses
...
"mongodb": {
"uri": "mongodb://localhost:27017/exchanger-bot"
},
...
6. Apply configuration changes (restart the service)
npm run start
Last updated