Discord ticket bot with transcripts
A button opens a private channel for the member and your support role. When it closes, a transcript lands in your log channel.
- Plan
- Free, always on
- Setup
- A token, then /ticket-setup
- Privileged intents
- Message Content, for transcripts
- Keeps
- Settings and open tickets
What the ticket bot does
A button opens a ticket
Members press Open a ticket and get a channel of their own, ticket-0001 and up, that only they and your support role can see.
A transcript when it closes
Closing posts the conversation to your log channel as a text file, with who opened the ticket, who closed it and how many messages it had.
Bring someone in
/ticket-add lets another member into a ticket: a moderator, or the person a report is about.
One ticket each, kept across restarts
A member has one open ticket at a time, and the button points them back to it. Settings and open tickets survive a redeploy.
Set it up
- 1
Create the bot
At discord.com/developers, New Application, then Bot and Reset Token. Copy the token.
- 2
Turn on Message Content
Under Bot, Privileged Gateway Intents. Discord leaves the text out of members' messages for a bot without it, and their lines in the transcript come out blank.
- 3
Invite it
With the
botandapplications.commandsscopes and Manage Channels, Manage Roles, Send Messages, Read Message History and Attach Files. - 4
Deploy it
Press Deploy free, pick the Ticket Bot template and paste the token.
- 5
Set up tickets
Run
/ticket-setupwith the category tickets open in, your support role and the log channel, then/ticket-panelin the channel where members should find the button.
Commands
- /ticket-setup category role [log] [message]
- Where tickets open, who sees them, where transcripts go and the first message in a ticket.
- /ticket-panel [text]
- Posts the Open a ticket button in the current channel.
- /ticket-add user
- Lets someone else see the current ticket.
- /ticket-close
- Closes the current ticket. The button in the ticket does the same.
Environment variables
They live in the table on the bot's page in the panel, values masked once saved. The template's form asks for the ones it needs when you deploy.
| Variable | Needed | What it is |
|---|---|---|
| DISCORD_TOKEN | Required | Your bot token. |
| TICKET_CATEGORY_ID | Optional | The category tickets open in, if you would rather not use /ticket-setup. |
| SUPPORT_ROLE_ID | Optional | The role that sees every ticket. |
| LOG_CHANNEL_ID | Optional | Where transcripts go. |
| TICKET_MESSAGE | Optional | The first message in every ticket. Unless you set one, it thanks the member and asks what they need. |
Which plan it needs
The free plan runs it, always on. Tickets are channels on Discord's side, so a busy support queue costs the bot very little.
Free
Recommended$0
No card
- 256 MB and a quarter of a CPU, always on
- No card: one free bot or app per person
- No renewals. Only a bot with no network traffic for 7 days is stopped
Starter
$2/mo
or $20 a year
- 1 GB of memory and a full vCPU
- Never stopped for being quiet
- You pick the region it runs in
Running more than one? Standard carries two bots or apps for $3 a month and Pro four for $6, on one bill with your game servers. Every plan
Frequently asked questions
Can a member open more than one ticket?
One at a time. Pressing the button again tells them where their open ticket is.
What is in the transcript?
The last 100 messages of the ticket, oldest first, each with its time and author and links to anything attached. It is posted to the log channel as a text file named after the ticket when the ticket closes.
Who can see a ticket?
The member who opened it, your support role, anyone added with /ticket-add, and the server's administrators. Nobody else sees the channel.
Is the ticket bot free?
Yes. It runs on the free plan, always on, with no card. One bot or app is free per person; a second one needs a paid plan, from $2 a month for one or $3 for two.
More ready-made bots
Bringing your own code instead? How a bot deploys from GitHub
Open tickets in your server
Your first bot is free, with no card. It logs in within a minute.