Setting up the Discord Ticket Bot is straightforward once the three configuration IDs are in place, but a handful of issues come up repeatedly. The questions below cover the most common problems encountered during setup, as well as customization options and hosting tips. If you are hitting an error not covered here, double-check that all three IDs (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.
id_category, id_channel_ticket_logs, id_staff_role) are set correctly and that discord_components is installed from the GitHub source.
The bot is online but tb!ticket does nothing
The bot is online but tb!ticket does nothing
The
tb!ticket command is guarded by @commands.has_permissions(administrator=True). If the user invoking the command does not have the Administrator permission in that server, Discord silently drops the command — no error is shown.Fix: Ensure the user running tb!ticket holds the Administrator permission in the server where they are invoking it. You can verify this in Server Settings → Members → (user) → Roles, then checking the role’s permissions.The select menu doesn't create a channel
The select menu doesn't create a channel
The staff role isn't pinged by Call Staff
The staff role isn't pinged by Call Staff
When the 🔔 Call staff button is pressed, the bot sends
<@&{id_staff_role}> as a text message in the ticket channel. Pinging fails if:id_staff_roleis not set to the correct role ID.- The bot lacks permission to mention roles in the ticket channel.
id_staff_role is set to the correct role’s integer ID (right-click the role name in the members list → Copy ID). Also confirm the bot’s role has Mention @everyone, @here, and All Roles enabled at the server level.Ticket logs aren't appearing
Ticket logs aren't appearing
After a ticket channel is deleted via the Yes button,
on_button_click fetches canal_logs with interaction.guild.get_channel(id_channel_ticket_logs) and sends the log embed there. If id_channel_ticket_logs is wrong, canal_logs will be None and the await canal_logs.send(...) call will raise an AttributeError.Fix: Make sure id_channel_ticket_logs is set to the integer ID of an existing text channel the bot can send messages in. The bot needs Send Messages and Embed Links in that channel.I get an error about discord_components
I get an error about discord_components
The If you already have a PyPI version installed, uninstall it first:
discord_components package on PyPI may be outdated and incompatible with the current version of discord.py. The correct installation is from the GitHub source.Fix: Install directly from GitHub:Can I add more ticket categories?
Can I add more ticket categories?
Yes. The category list is defined in two places in
main.py and both must be updated together:- In
on_button_click— add a newSelectOptionto theSelectcomponent inside the"Ticket"branch. - In
on_select_option— add a matchingelif interaction.values[0] == 'your_value':branch that creates the channel, sets permissions, and sends the welcome embed.
question, help, and report blocks as a template. See Customizing the Bot for a full walkthrough.How do I change the bot's prefix?
How do I change the bot's prefix?
The prefix is set in the Replace
ComponentsBot constructor at the top of main.py:'tb!' with any string you prefer, then restart the bot. For example, to use !:Can multiple tickets be open at the same time?
Can multiple tickets be open at the same time?
Yes. Each ticket creates its own dedicated text channel, and the channels are independent of one another. There is no concurrency limit or single-ticket-per-user enforcement in the current code. If you need to restrict users to one open ticket at a time, you would need to add a check in
on_select_option that scans the category for a channel whose name contains the user’s username before creating a new one.The bot shows 'Ready to support ✅' but doesn't respond to buttons
The bot shows 'Ready to support ✅' but doesn't respond to buttons
How do I keep the bot running 24/7?
How do I keep the bot running 24/7?
The bot is a standard Python process and will stop whenever the host machine shuts down or the terminal session ends. Common approaches for continuous operation:Using pm2 (Node.js process manager, works for Python too):Using screen:Using tmux:Using supervisord — create a config file that points to
main.py and set autostart=true and autorestart=true.