Skip to main content
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.
Never share your bot token publicly or commit it to a public repository. Anyone who has your token can take full control of your bot. If your token is ever exposed, regenerate it immediately from the Discord Developer Portal.
1

Prerequisites

Before you begin, confirm the following are available on your system:
  • Python 3.8 or higher — check with python --version or python3 --version
  • pip — usually bundled with Python; check with pip --version
  • A Discord account with access to a server where you have Administrator permissions
You will also need a Discord bot token. If you have not created a bot application yet, follow the bot registration guide to create an application, add a bot account, and copy your token before continuing.
2

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.
3

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, and SelectOption classes used throughout the bot.
pip will resolve and install both packages along with any transitive dependencies automatically.
4

Configure the bot

Open 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:
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.
5

Add your bot token

At the very bottom of main/main.py you will find:
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.
6

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.
Once online, the bot automatically sets its status to “Watching N members”, where N is the total member count across all servers the bot has joined. This updates every time the bot starts.
7

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.