/ChouetteBot-discord

Discord bot project using discord.py with fun and useful commands

Primary LanguagePythonMIT LicenseMIT

ChouetteBot-discord

Ruff status pre-commit.ci status

Just some random project of doing a Discord bot using discord.py.
You need to have Python 3.9 or higher installed!

Clone the projet and install the requirements (preferably in a venv):

git clone git@github.com:Zalk0/ChouetteBot-discord.git
cd ChouetteBot-discord
pip install -r requirements.txt

Before launching the bot, you need to fill in a .env file (using the template I provide in the repo) and put a Discord bot token inside.
To have one, go to the Discord Developer Portal and create a new application.
Go to the Bot section and click the Reset Token button, you can now claim the token.
You need to enable the message content and members Privileged Gateway Intents as I assume they're enabled in the code (or change them).
You also have to fill the other fields in your .env file or else you're going to have errors.


After having done all this you can launch the bot :

python -m chouette

Contribution

To contribute, you can install the dev requirements after having cloned the repository:

pip install -r requirements-dev.txt

I have set up some pre-commit hooks mainly to run ruff automatically and to format project files. You can also run ruff manually with the commands ruff check and ruff format.


Docker

Docker Image

You can use a Docker image to deploy the bot. It's currently supporting amd64, armv6 and armv7 architectures. We provide deployment information on the Docker Hub repository.

You can build it from source with:

docker build .
# or
docker build --build-arg version=tag -t app:tag .

(see Docker Build CLI Options to get more info)