This is a Telegram bot for playing Dungeons and Dragons
Download main.py
, monsters.py
, dice.py
, help.py
files from main
folder
The bot uses the Python Telegram Bot
Install it with pip install python-telegram-bot
main.py
,monsters.py
,dice.py
,help.py
in themain
folder are all required to be run individually to work- Get your own bot and token from Telegram
- Replace
TOKEN
in all 4 files with your own token - Add your bot to a group with your players
- Run all 4 files for the whole game to work
Command | Action |
---|---|
/start | starts the DnD bot |
/createcharacter [character name] | Use this command and follow the prompts to create a new character |
/printcharacterstats [character name] | Prints a character's stats, add the name of the chharacter after the command |
/help | Open this help message |
/roll[int] | Rolls a dice with the customisable maximum value |
Command | Action |
---|---|
/createmonster [monster name] [health points] | Creates a monster. |
/attackmonster [monster name] [damage] | Reduces health of the monster by a given number. |
/changexp [character name] +/- X | Adds or subtracts a certain amount of health from a character. |
/changegold [character name] +/- X | Adds or subtracts a certain amount of gold from a character. |
/changehealth [character name] +/- X | Adds or subtacts a certain amount of health from a character. |
/inventoryupdate [character name] add/remove [item] [no. of item] | Adds or removes a certain amount of a specific item from a character's inventory. |
/printinventory | Current state of the inventory. |