Skip to main content
The Discord Ticket Bot exposes a single text command that administrators use to post the support panel, plus a set of button and select-menu interactions that drive the entire ticket lifecycle. Understanding each interaction’s custom_id, trigger, and effect makes it straightforward to trace exactly what the bot will do at every step.

Text Commands

tb!ticket

Posting this command in any server channel causes the bot to:
  1. Delete the message that triggered the command, keeping the channel tidy.
  2. Send an embed titled Tickets with the description “Welcome to tickets system.” and a banner image.
  3. Attach a single green button — 🔧 Create a ticket — that members click to open a ticket.
Because the bot is initialised with help_command=None, there is no tb!help command. The only text command exposed to users is tb!ticket.

Button Interactions

All button interactions are handled inside the on_button_click event. Each button is identified by its custom_id.

Ticket — Create a ticket

This button appears on the panel posted by tb!ticket. Clicking it does not yet create a channel; instead it shows the category select menu so the member can describe the nature of their request.

call_staff — Call staff

The notification embed contains the text 🔔 {member mention} has called the staff. and pings the configured staff role so members of that role receive a notification.

close_ticket — Close ticket

The confirmation embed reads “⚠️ Are you sure you want to close the ticket?” and requires an explicit confirmation before any channel is deleted.

close_yes — Confirm closure

This is the destructive action — the current ticket channel is permanently deleted. Immediately after deletion the bot posts a structured embed to id_channel_ticket_logs recording which ticket was closed and who closed it.

close_no — Cancel closure

No channel is affected — only the confirmation message itself is removed, leaving the ticket channel intact.

Select Menu

The select menu (custom_id="menu") is shown in response to the Ticket button click. It presents three options under the placeholder text “How can we help you?”. Selecting an option triggers the on_select_option event, which creates a private ticket channel. After the channel is created the bot sends a confirmation message (auto-deleted after 3 seconds) to the member confirming the channel was created, then posts a welcome embed inside the new channel. Every ticket channel gets the same two action buttons: 🔐 Close ticket (red) and 🔔 Call staff (blue).
The channel name embeds the selecting member’s Discord username, making it easy to identify who owns a ticket at a glance from the channel list.