This guide walks you through everything required to get Discord Ticket Bot running on your machine from scratch. By the end you will have cloned the repository, installed all dependencies, filled in the four required configuration values, connected your bot token, started the bot, and posted the ticket panel in your Discord server.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/astrxnomo/discord-ticket-bot-py/llms.txt
Use this file to discover all available pages before exploring further.
Prerequisites
Before you begin, confirm the following are available on your system:
- Python 3.8 or higher — check with
python --versionorpython3 --version - pip — usually bundled with Python; check with
pip --version - A Discord account with access to a server where you have Administrator permissions
Clone the repository
Clone the project from GitHub and move into the project directory:The repository contains a single
main/ directory with main.py and a req.txt file at the root.Install dependencies
Install both required packages with one command:The
req.txt file pins exactly two dependencies:- discord.py 2.0.0 — the core Discord API wrapper the bot is built on.
- discord-components — installed directly from its GitHub repository; provides the
ComponentsBot,Button,Select, andSelectOptionclasses used throughout the bot.
Configure the bot
Open Replace each comment with the appropriate integer ID or value for your server:
To copy a Discord ID, enable Developer Mode in Discord’s settings (App Settings → Advanced → Developer Mode), then right-click any category, channel, or role and select Copy ID.For a full breakdown of each variable and advanced customization options, see the configuration guide.
main/main.py in your editor. Near the top of the file, just below the bot instantiation line, you will find four configuration variables that must be filled in before the bot will work correctly:| Variable | What to put here |
|---|---|
id_category | The integer ID of the Discord category where ticket channels will be created |
id_channel_ticket_logs | The integer ID of the channel where closed-ticket log embeds will be posted |
id_staff_role | The integer ID of the role that staff members hold (granted access to all ticket channels) |
embed_color | A hex color integer (e.g. 0xfcd005) applied to every embed the bot sends |
Add your bot token
At the very bottom of Place your bot token between the single quotes:This is the token you copied from the Discord Developer Portal when creating your bot account. Keep this value private — see the warning at the top of this page.
main/main.py you will find:Run the bot
Start the bot from the project root directory:If everything is configured correctly, the terminal will print:This confirms the bot has authenticated with Discord and is listening for events.
Post the ticket panel
In your Discord server, navigate to any channel where the bot has permission to read and send messages, then type:This command requires the Administrator permission. The bot will delete your command message and post a
Tickets embed with a green 🔧 Create a ticket button. Members can now click the button to open a support ticket.