Ticket variables
Every variable of the ticket messages, what it shows and the messages it works in, and the tokens of ticket channel names.
Write a variable between braces in a ticket message, such as {opener}. The bot replaces it with its value when it sends the message. A variable that a message doesn't fill stays exactly as typed. On the dashboard, the editor of each message suggests only the variables that work in it.
Where they work#
| Message | Set in | Variables |
|---|---|---|
| Panel message | Panels → Message | {server} only |
| Opening message | Templates → Messages | Every message variable |
| Closing DM (Premium) | Templates → Messages | Every message variable |
| Escalation message (Premium) | Templates → Escalation | Every message variable |
| Message of a send a message automation | Templates → Automations | Every message variable |
A panel is posted once for everyone, before any ticket exists: only the server's name can fill it. The other ticket texts, such as the survey question, the closed message of a panel or a close reason, are sent as written.
Message variables#
In this table, ticket messages are the opening message, the closing DM, the escalation message and the automation messages.
| Variable | Shows | Example | Works in |
|---|---|---|---|
{opener} | Mention of the member who opened the ticket | @Alex | Ticket messages |
{opener_name} | Their display name; their ID if they have left the server | Alex | Ticket messages |
{opener_id} | Their Discord ID | 123456789012345678 | Ticket messages |
{channel} | Mention of the ticket channel | #ticket-0042 | Ticket messages |
{number} | The ticket number | 42 | Ticket messages |
{template} | The name of the ticket's template; in the escalation message, the template the ticket moves to | Support | Ticket messages |
{panel} | The name of the panel the ticket was opened from; empty when it wasn't opened from a panel | Help desk | Ticket messages |
{support} | Mentions of the template's support roles; in the escalation message, those of the template the ticket moves to | @Staff @Moderators | Ticket messages |
{server} | The server's name | Gaming Hub | Ticket messages and the panel message |
{answers} | Every answer of the form, each under its question in bold; empty without a form | **What is your issue?** then I can't join the voice channel | Ticket messages |
{answer_1} … {answer_5} | The answer to the 1st … 5th question of the form; empty without a form or without that answer | I can't join the voice channel | Ticket messages |
For example, this opening message:
Hi {opener}, thanks for opening ticket #{number}.
The {template} team ({support}) will answer you here.is sent as Hi @Alex, thanks for opening ticket #42. The Support team (@Staff @Moderators) will answer you here.
Mentions#
{opener} and {support} notify the member and the roles when they are in the text of the opening message or of an automation message. In an embed, in the escalation message and in the closing DM, mentions are shown without notifying anyone.
In the closing DM, prefer {number} and {template} to mentions: a direct message can't always show a role or a channel of your server, and the ticket channel is deleted a few seconds after the DM is sent.
Form answers#
{answers} lists the answers in the order of the form: each question in bold, its answer on the next line, and an empty line between two questions. An optional question left empty shows -.
{answer_1} to {answer_5} give one answer each, for a message that needs a single one, such as Order number: {answer_1}. They are empty when the ticket has no form, when the form has fewer questions, or when an optional question was left empty.
The opening message already shows the form answers under it, so {answers} is most useful in the other messages, for example in a reminder sent by an automation.
Channel name tokens#
Channel names take tokens of their own, not the message variables:
| Token | Shows | Example |
|---|---|---|
{counter} | The ticket number | 42 |
{counter:04} | The ticket number with zeros in front: the digit after 0 sets the width, from 1 to 10 ({counter:03} gives 042) | 0042 |
{username} | The username of the member who opened the ticket | alex |
{user_id} | Their Discord ID | 123456789012345678 |
{template} | The name of the template | support |
{claimer} | The username of the member who claimed the ticket | mira |
| Name | Tokens |
|---|---|
Channel name of a template (Premium; free servers use ticket-{counter:04}) | {counter}, {counter:04}, {username}, {user_id}, {template} |
| Rename while claimed (Premium) | The same, and {claimer} |
| Rename on escalation (Premium) | The channel name of the template the ticket moves to, with the same number |
/ticket rename <name> | {counter}, {counter:04} and {user_id} (the opener's ID). There, {username} is the username of the member who renames the channel, and {template} and {claimer} are empty. |
The result follows Discord's rules for channel names: it is lowercased, spaces become dashes, characters other than letters (of any alphabet), digits, - and _ are removed, repeated dashes become one, dashes and underscores are trimmed from both ends, and the name is cut to 100 characters. A name that ends up empty becomes ticket-<number>.
With the pattern {template}-{counter:04}-{username}, ticket 42 of the Support template opened by alex is named support-0042-alex.
Other messages#
The variables of join, leave and level-up messages, of the verification panel and of giveaways are listed on the Variables page.