A project of redoing the Discord bot made in JavaScript used at my school.
Be sure to have Python 3.12 or higher installed.
Clone the project and install uv:
git clone https://github.com/ungdev/EtuUTT-Discord-Bot.git
cd EtuUTT-Discord-Bot/
uv syncTip
The uv sync command creates a virtual environment and installs the dependencies inside.
By default, it installs the project dependencies and the dependencies of the dev group.
In this project, it is configured to also install the dependencies of the docs group.
To only install the project dependencies, use the --no-default-groups flag.
Before launching the bot, you need to fill in the two configuration files (.env and
discord.toml) (using the .env.example and
the discord.example.toml I provide in the repo).
You can copy them like this and edit the copied files:
cp .env.example .env
cp data/discord.example.toml data/discord.tomlYou need a Discord bot token, 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 also have to enable all the Privileged Gateway Intents as I assume they're enabled in the code.
After having done all this you can launch the bot:
uv run -m etuutt_botUse ruff to lint and format the code before making a pull
request.
I also use pre-commit to run ruff before each commit.
Thanks to Ivann who did the original Discord bot.
It can be found here.