This is a Dutch Drone Squad - Discord bot, that can interact with people in a our server.
The bot responds to the !
commands below:
!hallo
- Just to say hello!track
- Gives information about the track!inspire
- Inspiration quote
Or slash commands like:
/race training
- Gives a link with information about our training days/race track
- Gives information about the track/race results
- Gives a link where you can find the results of training
The bot also has a Twitch integration, where it will post a message in a specific channel when DutchDroneSquad goes live. It needs a Twitch API client ID and secret to work.
/twitch shoutout
- Gives a shoutout to a streamer
!version
- Shows the version of the bot!roles
- Gives the option to add or remove roles for users
It's advisable to test the bot during development in a separate server and use
a separate token for a production or development. In this project it was
decided to make a production.yaml
for production stack deploy and
docker-compose.yml
for development.
Follow the steps below to set up the project on your environment.
Click to expand!
This Python project relies on Poetry as its dependency manager, providing comprehensive management and control over project dependencies.
You need at least:
- Python 3.11+
- Poetry
Install all packages, including all development requirements:
poetry install
Poetry creates by default an virtual environment where it installs all necessary pip packages, to enter or exit the venv run the following commands:
poetry shell
exit
Create an .env
file and enter the missing details (token from
developers portal and ID's).
cp .env.example .env
To run it on your development setup, you can either run the python file (main.py), run it as single docker container by building and running the container with docker compose.
The simplest is to run the python file directly with:
python main.py
Use docker compose to build and run the container:
docker-compose up -d --build
Run in production mode:
docker compose -f prod/production.yml up -d