DiceMaster is a Telegram bot designed to make your Dungeons & Dragons (D&D) games easier and more fun by automating dice rolls. No more searching for physical dice — just type your commands and let DiceMaster do the rolling for you!
- Roll standard D&D dice:
d4,d6,d8,d10,d12,d20 - Roll multiple dice at once, e.g.,
3d6 - Support for modifiers, e.g.,
2d8 + 3 - Automatic critical hits and fumbles detection (for
d20) - Quick access to common rolls and custom macros
- Lightweight and fast — perfect for Telegram chats
- Add DiceMaster to your Telegram: @DiceMasterBot
- Start the bot with
/start - Roll dice using simple commands:
/roll d20
/roll 3d6
/roll 2d8 + 3
- DiceMaster will return the results instantly in the chat.
| Command | Description |
|---|---|
/start |
Start the bot and see basic instructions |
/roll |
Roll dice, e.g., /roll d20 or /roll 2d6+1 |
/help |
Display help and command usage |
/about |
Information about DiceMaster |
- Clone the repository:
git clone https://github.com/yourusername/DiceMaster.git
cd DiceMaster- Install dependencies:
pip install -r requirements.txt- Set your Telegram bot token as an environment variable:
export TOKEN="YOUR_BOT_TOKEN_HERE" # Linux / Mac
$env:TOKEN="YOUR_BOT_TOKEN_HERE" # Windows PowerShellOptional log level:
export LOG_LEVEL="INFO" # DEBUG, INFO, WARNING, ERROR- Run the bot:
python app.py- Create
.envin the project root:
TOKEN=YOUR_BOT_TOKEN_HERE
LOG_LEVEL=INFO- Build and start the bot:
docker compose -f docker_compose.yaml up -d --build- View logs:
docker compose -f docker_compose.yaml logs -f bot- Stop the bot:
docker compose -f docker_compose.yaml downContributions are welcome!
- Fork the repository
- Create a new branch for your feature
- Submit a pull request