All configuration for the Discord Ticket Bot lives at the top ofDocumentation 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.
main/main.py. There is no separate config file or environment-variable system — you edit four variables directly in the source before running the bot. This page explains what each variable controls, how to find the Discord IDs you need, and how to supply your bot token and choose a command prefix.
Configuration Block
Openmain/main.py and locate the following lines near the top of the file:
Configuration Variables
The ID of the Discord category under which the bot will create new ticket channels. Every time a user opens a ticket, a text channel is created inside this category. Make sure the bot has permission to manage channels within it.
The ID of the text channel where the bot posts a summary embed whenever a ticket is closed. The embed records the ticket channel name, the timestamp, and the staff member who closed it. The bot must have permission to send messages and embed links in this channel.
The ID of the staff role. This role is used in two ways: its members are granted read and write access to every ticket channel that is created, and it is mentioned (pinged) inside the ticket when a user presses the 🔔 Call Staff button.
A hexadecimal color value applied to every embed the bot sends — ticket creation messages, call-staff notifications, close confirmations, and log entries. Change this to match your server’s branding. The default is a golden yellow (
0xfcd005).How to Find Discord IDs
Discord IDs are large integers that uniquely identify servers, channels, categories, roles, and users. To copy them you must first enable Developer Mode:- Open Discord and go to User Settings (the gear icon near your username).
- Navigate to Advanced under the App Settings section.
- Toggle Developer Mode on.
- Category ID — right-click the category name in your server’s channel list and select Copy Channel ID.
- Channel ID — right-click any text channel and select Copy Channel ID.
- Role ID — go to Server Settings → Roles, right-click the role you want, and select Copy Role ID.
main.py.
Bot Token
At the very bottom ofmain/main.py you will find:
Changing the Bot Prefix
The command prefix is set on this line near the top ofmain/main.py:
tb!, meaning users invoke the ticket panel setup with tb!ticket. Change 'tb!' to any string you prefer:
With configuration complete, you can head back to review bot registration or move on to running the bot:
Bot Registration
Register your application on the Discord Developer Portal and generate a token.
Running the Bot
Start the bot and use the
tb!ticket command to deploy the ticket panel.