Every visible and behavioral aspect of the bot — from its command prefix to the welcome message inside each ticket channel — is controlled by a small set of variables and code blocks near 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. No separate config file is needed; open that file, make your changes, and restart the bot to see them take effect.
The
custom_id values used for interactive components — 'Ticket', 'call_staff', 'close_ticket', 'close_yes', 'close_no', and 'menu' — are internal interaction identifiers that Discord uses to route button clicks and select-menu choices to the correct handler. Do not change these values. All other strings (labels, descriptions, embed text, emojis) are purely cosmetic and safe to edit freely.Bot Prefix
The bot is initialized with the prefixtb!, which means every command is invoked as tb!ticket, tb!help, and so on.
'tb!' with any string you like:
Ticket Panel Embed
When an administrator runs the ticket command, the bot posts an embed panel in the current channel. This panel is the entry point for all ticket interactions.title— The bold heading displayed at the top of the embed. Change'Tickets'to anything you want, such as'Support'or'Open a Ticket'.description— The body text shown below the title. Replace'Welcome to tickets system.'with a custom welcome or instruction message.embed.set_image(url=...)— A large banner image shown inside the embed. Replace the Imgur URL with any publicly accessible image URL. To remove the image entirely, delete theembed.set_image(...)line.
Create Ticket Button
Below the panel embed, the bot renders a single button that users click to begin creating a ticket.-
label— The text on the button face. Replace"Create a ticket"with any short string. -
emoji— The emoji displayed alongside the label. Swap'🔧'for any standard Unicode or server emoji. -
style— Controls the button’s color. The available styles are:Style Appearance ButtonStyle.greenGreen ButtonStyle.blueBlurple (Discord blue) ButtonStyle.redRed ButtonStyle.greyGrey
Do not modify
custom_id='Ticket'. The on_button_click event handler checks for this exact value to trigger the select menu response.Select Menu Options
Once a user clicks the Create Ticket button, the bot responds with a dropdown select menu. The three options are defined asSelectOption entries:
SelectOption you can safely change:
label— The option name shown in the dropdown.description— The short subtitle displayed beneath the label.emoji— The emoji icon to the left of the label.placeholder— The grey hint text shown before the user makes a selection.
Ticket Channel Names
When a user selects a ticket type, the bot creates a private text channel. Each type uses a distinct emoji prefix in the channel name:{interaction.author.name} portion is always replaced at runtime with the Discord username of the person who opened the ticket, so channel names look like ❔┃john-ticket.
To change the naming format, edit the f-string:
Inside-Ticket Embed Messages
After the private channel is created, the bot posts a welcome embed inside it. Each ticket type has its own embed with a distinct title and description:title and description strings are fully editable. The {interaction.author.name} placeholder is replaced at runtime and should be kept if you want to greet the user by name. You can use \n to add line breaks within the description.
Adding a New Ticket Type
To add a fourth (or fifth, etc.) ticket type, you need to make three coordinated edits inmain/main.py.
Add a new SelectOption
Insert a new
SelectOption in the Select component inside on_button_click. Choose a unique value — this is the key that links the option to its handler.Add a matching elif branch in on_select_option
In the
on_select_option handler, add an elif block whose condition matches the value you chose above. Copy the structure of an existing branch and adjust the channel name, confirmation message, and embed text.