Creating Telegram Bot

  1. Search for @BotFather in Telegram to create a new bot.

  2. Type command /newbot to create a new bot.

  3. Choose a name for your new bot.

  4. Choose a username for your new bot.

  5. After you have successfully created a new bot, go to /mybots to edit your newly created bot.

  6. Select the new bot from the list.

  7. Select API Token then copy/paste the token to telegram.token inside the application.properties.

  8. Return to previous menu > Edit Bot > Edit Commands. Copy/Paste the following to create new commands:

balance - Check balance  
settings - Change active settings from user defined settings  
pause - Pause bot after all positions are closed  
resume - Resume bot  
status - Check the status of the bot    

9. Open application.properties and change the following values:

  • telegram.bot - Name of the bot you created

  • telegram.username - List of allowed telegram user's usernames to have access on your bot. Bots created in Telegram are public, this is to ensure that only you can see your commands. Do not include '@' from your username.

  • telegram.enable - Set to true to enable the bot. Otherwise, telegram bot will not run.

Last updated

Was this helpful?