Mintlayer's Telegram bot is a powerful tool designed to interact with Mintlayer directly from Telegram. It allows users to manage pools, check balances, and receive notifications on balance changes.
/pool_add <poolID>- Add a pool/pool_remove <poolID>- Remove a pool/pool_list- List your pools/balance- Get the total balance of your pools/notify_start- Notify on balance change/notify_stop- Stop balance change notifications
To set up the Mintlayer Telegram Bot, follow these steps:
- Clone the repository to your local machine.
- Ensure you have Go installed on your system. You can download it from https://golang.org/dl/.
- Navigate to the cloned repository directory.
- Run
go buildto compile the bot executable. - Create a
config.jsonfile in the same directory as the executable with the following content:
{
"bot_token": "<TELEGRAM_TOKEN_ID>",
"api_base_url": "https://api-server.mintlayer.org",
"admin_user": "<TELEGRAM_USER_ID>"
}
Replace <TELEGRAM_TOKEN_ID> with your actual bot token from Telegram. Set api_base_url if you run a local api-server, otherwise keep the default. Set admin_user to your Telegram numeric user ID to enable admin-only commands like /broadcast.
To generate a Telegram bot token:
- Open Telegram and search for the
BotFather. - Send
/newbotcommand and follow the instructions to create your bot. - Once created,
BotFatherwill give you a token. Use this token in yourconfig.json.
Ensure your config.json is properly secured and not accessible by unauthorized individuals. Never share your bot token.
This project is licensed under the MIT License - see the LICENSE file for details.