Snippet template variables
Personalize saved replies with member, staff, server, and ticket details.
Personalize a saved reply with placeholders such as {{user.display}} or
{{ticket.id}}. Open Snippets and select a saved reply.
Use Add variable in the editor, or type the
placeholder into Content. Values fill in when the reply is sent.
Try a personalized reply
Use double braces and the exact spelling shown in the reference below.
Hi {{user.display}}, thanks for contacting {{server.name}}!
Your ticket number is #{{ticket.id}}.
{{agent.display}} is helping you today.Before sending to a member, check it in a real ticket:
- Run
/modmail snippet previewinside an open ticket channel. - Choose your saved reply in snippet.
- Check the filled-in names and ticket details.
- Edit the snippet in the dashboard if anything reads incorrectly.
Choose variables for the right message
The tables below describe snippet variables. Other Modmail messages don't have all the same information available. A posted panel can use server, bot, and general details, but can't personalize for a ticket that hasn't opened yet. Use the variables offered by that message's composer.
The ticket member
These describe the member whose ticket you're answering.
| Variable | Becomes |
|---|---|
{{user.id}} | The member's Discord ID. |
{{user.username}} | Their Discord username. |
{{user.nickname}} | Their server nickname, when they have one. |
{{user.display}} | Their best available display name, nickname first. |
{{user.mention}} | A mention that notifies them. |
{{user.ticketsCount}} | How many tickets they've created with this bot. |
The replying staff member
Agent variables fill in with the staff member sending the reply, so a single template works for your whole team.
| Variable | Becomes |
|---|---|
{{agent.id}} | The replying staff member's Discord ID. |
{{agent.username}} | Their username. |
{{agent.nickname}} | Their server nickname. |
{{agent.display}} | Their display name. |
{{agent.mention}} | A mention that notifies them. |
Your bot
These variables identify the bot sending the reply.
| Variable | Becomes |
|---|---|
{{bot.id}} | Your bot's Discord ID. |
{{bot.username}} | Your bot's username. |
{{bot.display}} | The bot's display name in the server. |
{{bot.mention}} | A mention of your bot. |
Your server
Server stats cover both identity and workload, including how quickly your team closes tickets.
| Variable | Becomes |
|---|---|
{{server.id}} | The Discord server's ID. |
{{server.name}} | The Discord server's name. |
{{server.memberCount}} | The server's current member count. |
{{server.totalTickets}} | Total tickets handled by this bot. |
{{server.openedTickets}} | Tickets currently open. |
{{server.averageResolutionTime}} | Average time to close tickets over the last 30 days. |
{{server.fastestResolutionTime}} | Quickest resolution in the last 30 days. |
{{server.slowestResolutionTime}} | Longest resolution in the last 30 days. |
This ticket
Ticket variables resolve against the conversation the snippet is sent into, which is why they work even though the same snippet text is shared everywhere.
| Variable | Becomes |
|---|---|
{{ticket.id}} | The ticket's number in your server. |
{{ticket.globalId}} | The ticket's platform-wide ID. |
{{ticket.channelId}} | The ticket channel's Discord ID. |
{{ticket.channelMention}} | A link-style mention of the ticket channel. |
{{ticket.category}} | The ticket's selected category name. |
{{ticket.createdAt}} | When the ticket was created, formatted by Discord. |
Date and time
General variables stamp the moment of delivery, localized by Discord for each reader.
| Variable | Becomes |
|---|---|
{{general.date}} | Today's date. |
{{general.time}} | The current time. |
{{general.dateTime}} | The current date and time together. |
If a placeholder stays visible
Unknown variables and unavailable values stay as written instead of blocking delivery. Check spelling, capitalization, and whether the information exists for that message. For example, don't rely on a nickname if the member hasn't set one. Invite variables from join messages don't apply to snippets.
Preview again after changing a placeholder so members receive a readable answer.
Update an older snippet
Snippets still accept legacy single braces, such as {user.username}, and
the older {input.user.username} form. Use double braces for new content.
Other Modmail messages don't support the snippet-only legacy syntax.
Next steps
Last updated on