A ticket bot gives the members of your Discord server a button that opens a private channel with your team. Questions no longer get lost in general chat: every request gets its own channel, someone on your team picks it up and the ticket is closed cleanly afterwards. This post covers what such a bot does, how to set it up with us and why it runs better on a host than on your own PC.
What does a Discord ticket bot do?
A ticket is a channel where a member talks privately with your staff. The bot creates that channel when someone clicks a button, adds the right staff roles and cleans the channel up once the ticket is closed.
Our ticket bot plan runs Discord Tickets, an open-source ticket bot that has been around since 2019. This is what it does:
- Categories: for example support, ban appeals, staff applications and billing. Each category has its own staff roles, its own opening message and optional questions a member answers first.
- Panels: a message with buttons (1 to 5 categories) or a select menu (2 to 25 categories) that members use to open a ticket. Members can also open a ticket with
/new. - Claiming, moving and closing: staff claim a ticket with
/claimonce you turn claiming on, move it to another category with/moveand request a close with/close. - Archive: messages, attachments and avatars are stored encrypted, so you can look back at what was agreed.
- Working hours and limits: when someone opens a ticket outside your working hours, the bot tells them a reply may take longer. Per category you set how many open tickets a member may have and how long they wait before opening another one.
- Log channel: ticket activity, settings changes and edited or deleted messages in tickets end up in a log channel.
You manage the settings in the bot's web portal, so your server does not fill up with admin commands.
Two kinds of bot hosting at EliteStarHosting
- Ticket bot hosting from €2.00 per month: Discord Tickets is ready on your server in the game panel. You fill in your bot's token and a few settings. 1GB RAM with 2 CPU cores for €2.00, 2GB with a database for €4.00, or 3GB with 3 CPU cores, a database and 2 backups for €6.00.
- Discord bot hosting from €0.50 per month: for your own bot code in Node.js, Python, Java, Go and more. 512MB for €0.50, 1GB for €1.00 and 2GB for €2.00, each with 1 port and 2 or 3 backups. From 1GB up, a database is included.
Both run in the Netherlands on NVMe storage and restart automatically when the bot crashes. Each plan is one bot: for two bots you order two plans.
Step 1: create a Discord application
Every bot needs its own application at Discord. Create a new one for your ticket bot, even if you already have a bot: Discord Tickets advises against using an existing application. You do this in the Discord Developer Portal.
- Click New Application, name your bot, accept the terms and click Create.
- Go to Bot and click Reset Token under Token. Copy the token straight away: you will not see it again.
- On the same page, under Privileged Gateway Intents, switch on all three intents: presence, server members and message content. Discord Tickets needs all three.
- Go to OAuth2 and click Reset Secret. Copy this secret too.
- Switch Public Bot off, as Discord Tickets recommends. This only works after you set Install Link to None on the Installation page.
Never share your token and never put it in a Git repository. Whoever has your token controls your bot.
Step 2: set up the ticket bot in the game panel
Open your server in the game panel and go to Startup.
- Paste your token in Discord Bot Token and the secret in Discord 0Auth2 Secret. That really is the field's name, with a zero.
- Put your own Discord user ID in Owner IDs: the long string of digits that belongs to your account. Anyone listed here can manage the bot's settings in every server, whatever their roles. By default the field holds an ID from Discord Tickets' default settings, and it is not yours. Replace it with your own ID. Separate several IDs with a comma.
- Leave Auto-publish commands? on
true. The bot then registers its slash commands with Discord by itself. - On the 1GB plan, leave Database Provider on
sqlite. If your plan has a database, follow the steps below first.
Using a MySQL database (2GB and 3GB)
Create a database under Databases in the menu, as described in Create a MySQL database. Then set Database Provider to mysql and enter this line in Database URL, with your own details:
mysql://USERNAME:PASSWORD@ENDPOINT/DATABASENAME
Endpoint holds the address and the port. You see the password under Database Details. Does your password contain @, #, / or :? Then replace that character in the line with %40, %23, %2F or %3A.
If you use the archive in a large server, Discord Tickets recommends a MySQL database over SQLite.
The address of the settings portal
The bot has its own web portal for its settings. It runs on your server's port.
- Go to Files and open
.env(see the File Manager). AfterHTTP_EXTERNAL=put your server address with its port as shown on the Console page, withhttp://in front. For examplehttp://gnode1.elitestarhosting.com:25500. Click Save Content. - Go back to the Developer Portal, open OAuth2, click Add Redirect and enter the same address followed by
/auth/callback. Save the change. - Click Start. Wait in the console until you see the message
Connected to Discord.
Step 3: add the bot to your server and configure it
- Type
settingsin the console. The bot gives you a link to its settings page. - Log in there with Discord, pick your server and authorise the bot. That adds it to your server. Then refresh the page and open your server's settings.
- Under the general settings, pick a log channel. Set your working hours too: by default every hour counts as a working hour.
- Create a category. Fill in at least Name, Description, Emoji, Opening message and Staff roles. The staff roles are added to every ticket channel. If you want staff to claim tickets, turn on Claiming, which is off by default. The bot creates a Discord category for the ticket channels itself.
- Create a panel: choose your categories, a channel and a title. With one category, members see a Create a ticket button. With more categories they get a button or a select menu with an option per category.
Test your first ticket yourself: open one through the panel and check that your staff roles are in the channel. With /close you request a close. If staff send that request, the ticket's creator has to accept it.
Hosting your own Discord bot
Writing a bot yourself? Then pick Discord bot hosting. You work in the same game panel, but with your own code.
- Upload your files through Files or SFTP. Is your code on GitHub? Then fill in Git Repo Address and the branch under Startup (Install Branch for Node.js, Git Branch for Python) and reinstall your server, so it fetches your repository. For a private repository, also fill in Git Username and Git Access Token.
- With Auto Update set to
1, the server pulls the latest version of your repository at every start. - Pick your Node.js or Python version under Docker Image.
- Put your start file in Main file, for example
index.js. This field takes 16 characters at most. For Python it is called App py file. If there is apackage.jsonorrequirements.txtin your folder, the server installs your packages at every start. - Keep your token in a
.envor config file on the server, not in your code. - Add the bot to your server through the Developer Portal. Go to Installation, pick Guild Install, set Install Link to Discord Provided Link and choose the scopes
botandapplications.commandsunder Default Install Settings. Under Permissions, tick only what your bot really needs. Open the link and choose Add to server.
Only someone who is allowed to manage the server (Manage Server) can add a bot.
Why not just run it on your own PC?
A Discord bot keeps a permanent connection to Discord open and sends a heartbeat at regular intervals. When that connection drops, your bot shows as offline and nobody can open a ticket. On a PC that happens with every sleep mode, Windows update and Wi-Fi hiccup. A bot that keeps reconnecting can also hit a Discord limit: after more than 1000 new logins in 24 hours, Discord ends all of your bot's sessions and resets its token.
With us the bot runs in its own container that restarts automatically when it crashes. Your PC no longer has to stay on, from €0.50 per month.
Frequently asked questions
What does ticket bot hosting cost? From €2.00 per month for 1GB. Pay 3 months, 6 months or a year up front and you get 5%, 10% or 15% off.
Do I need my own Discord account? Yes. The bot runs under an application in your Discord account, so you stay the owner of the bot, its name and its token.
Does the ticket bot work for my FiveM or Minecraft community? Yes. The bot is separate from your game server and works in any Discord server, including next to a FiveM server for your RP community.
How much RAM does a ticket bot need? Discord Tickets itself uses around 120MB, so the 1GB plan is plenty. Pick 2GB if you want a MySQL database, or 3GB if you also want backups.
Can I customise the bot? Yes. Categories, opening messages, working hours and panels are set in the bot's portal. You manage the files on your server yourself through Files or SFTP.
Can I run several bots on one plan? No, each plan is one bot. For a second bot, order an extra plan.
