Warning
This bot is still a work in progress and issues are expected. If you self-host our bot please join our support server here for announcements and support.
Tux is an all in one Discord bot originally designed for the All Things Linux Discord server.
It is designed to provide a variety of features to the server, including moderation, support, utility, and various fun commands.
- Python 3.13 alongside the Discord.py library
- Poetry for dependency management
- Docker and Docker Compose for development and deployment
- Strict typing with Pyright and type hints
- Type safe ORM using Prisma
- Linting and formatting via Ruff and Pre-commit
- Justfile for easy CLI commands
- Beautiful logging with Loguru
- Exception handling with Sentry
- Request handling with HTTPX
- Asynchronous codebase
- Hybrid command system with both slash commands and traditional commands
- Cog loading system with hot reloading
- Branded embeds and messages
- Robust error handling
- Activity rotation
- Custom help command
- Configuration system
- Dynamic role-based (access level) permission system
- Python 3.13
- Poetry
- Supabase or any PostgreSQL database
- Optional: Docker
- Optional: Docker Compose (see the development notes for more information)
- Optional: Just
Assuming you have the prerequisites installed, follow these steps to get started with the development of the project:
Further detailed instructions can be found in the development guide.
-
Clone the repository
git clone https://github.com/allthingslinux/tux && cd tux
-
Install the project's dependencies and set up the virtual environment
poetry install poetry env use 3.13
-
Install the pre-commit hooks (optional unless you are contributing)
pre-commit install
-
Generate the prisma client and push the database schema
prisma generate prisma db push
Currently, you will need to have a Supabase database set up and the URL set in the
DATABASE_URL
environment variable.In the future, we will provide a way to use a local database. We can provide a dev database on request.
-
Copy the
.env.example
file to.env
and fill in the required values.cp .env.example .env
You'll need to fill in your Discord bot token here, as well as the Sentry DSN if you want to use Sentry for error tracking.
We offer dev tokens on request in our Discord server.
-
Copy the
config/settings.yml.example
file toconfig/settings.yml
and fill in the required values.cp config/settings.yml.example config/settings.yml
Be sure to add your Discord user ID to the
BOT_OWNER
key in the settings file.You can also add your custom prefix here.
-
Start the bot!
poetry run python tux/main.py
-
Run the clear tree command in the server to sync the slash command tree.
{prefix}dev ct
Note
Make sure to add your Discord User ID to the sys admin list if you are testing locally.
Note
Make sure to set the Prisma schema database ENV variable to the DEV database URL.
Note
If you want to develop Tux using Docker Compose, we recommend using docker compose up --watch
for hot reloading.
This project is licensed under the terms of the The GNU General Public License v3.0.
See LICENSE for details.
Made with Repobeats.
Made with contrib.rocks.