Snippets

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:

  1. Run /modmail snippet preview inside an open ticket channel.
  2. Choose your saved reply in snippet.
  3. Check the filled-in names and ticket details.
  4. 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.

VariableBecomes
{{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.

VariableBecomes
{{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.

VariableBecomes
{{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.

VariableBecomes
{{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.

VariableBecomes
{{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.

VariableBecomes
{{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

Save the reply in your library, or send it in a ticket.

Last updated on