A template for creating a discord bot that can roll dice.
Server: Python 3.12+
Libraries:
-
Py-cord: The library used to interact with the discord API -
python-dotenv: Library used to load environment variables from a.envfile -
Mypy: Static type checker for python -
ruff: Library used to lint the codebase
To run this project you will need to:
- Copy the
.env-samplefile and rename it to.env - Populate the following environment variable to your
.envfile
DISCORD_TOKEN: The token of your discord bot. This can be found in the discord developer portal in the bot section of your application.
-
Create a new repository from this template, using the button in the top-right corner
-
Clone your new project
git clone https://github.com/<YOUR_USERNAME>/discord-dice-bot-template
-
Go to the project directory
cd discord-dice-bot-template -
Install dependencies
pip install -r requirements.txt
-
Run the bot
python main.py