Dragon Bot is a multi-purpose Discord bot designed with a primary focus on providing a robust and user-friendly ticket management system. This project is a complete, from-scratch rewrite of the original DragonBot_host repository, built with modern discord.py features, a scalable architecture, and a strong emphasis on developer and user experience.
This project reflects my journey in software design, moving from a monolithic script to a structured, maintainable application.
I am a solo dev, so please be patient with the development progress.
- 🎟️ Ticket System: A comprehensive ticket management system allowing users to create, manage, and close support tickets through dedicated channels.
- 👑 Role Requesting System: A configurable system for users to request roles, with an approval workflow for administrators.
- 🔑 Keyword System: An automated response system that replies to user-defined keywords and triggers.
- ...and more utilities designed to improve server management (To be added).
This guide is for developers who wish to self-host the bot.
Note: I am using Arch linux myself, so if you are using a different OS, some commands may vary slightly. If you encounter issues, please open an issue on the GitHub repository.
-
Clone the repository
git clone https://github.com/xDDoubleTea/DragonBot.git cd DragonBot -
Create and activate a virtual environment
Prefered using astral-sh/uv: An extremely fast Python package and project manager, written in Rust., the python virtual environment manager, but you can use any virtual environment tool you prefer. After git cloning, run the following commands to set up the virtual environment:
uv sync source .venv/bin/activateOr, if you are using vscode, you have to select the virtual environment as your interpreter. If you are using a different virtual environment tool, the command may vary. For example, if you are using
venv, you can run:python -m venv .venv source .venv/bin/activateIf you are using
virtualenv, you can run:virtualenv .venv source .venv/bin/activate -
Install dependencies If you are using
uv, then theuv synccommand will automatically install the dependencies for you. If you are using a different virtual environment tool, you can run the following command to install the dependencies:pip install -r requirements.txt
-
Configure the environment Copy the example environment file. This file contains all the necessary environment variables you need to configure.
cp .env.example .env
Next, edit the
.envfile with your own values, including your bot token and database URL. Remember to change the configuration inconfig/to match your server's configuration, such as the guild ID, support role ID, and other settings. Or the bot won't work -
Run the bot
python main.py
Please ensure that you have the necessary permissions to run the bot in your Discord server, and that you have invited the bot with the correct scopes and permissions.
- Language: Python 3.10+
- Core Library:
discord.py - Database: PostgreSQL with
asyncpg - ORM: SQLAlchemy
- Documentation: MkDocs
The project's documentation is built with MkDocs, which is also hosted using github pages Documentation.
For now, I am not accepting contributions, as this bot is not intended to be used outside of my own server.
There will be another repository for the public version of the bot, which will be open for contributions, though I am not sure when I will create it.