Variables
Dynamic placeholders that fill in when templates and ticket names are sent.
Variables are placeholders written as ${path} that Assistance replaces with
real values when a message is sent or a ticket channel is created. Use them in
library templates, ticket name templates, and
anywhere else the editor offers a variable picker.
Syntax
The basic form is a dotted path inside curly braces:
${triggeredBy.username}Some variables accept a #argument for extra configuration:
${guild.emojis#Bell}
${ticket.status#Open:Claimed:Closed}
${random.number#0:99}Arguments are configured in the library editor when you insert a variable — you don't have to memorize the format.
Where variables work
Variables can appear in:
- Message text and embed fields
- Button labels and select option labels
- Image, thumbnail, and media URLs (including partial URLs like
https://cdn.example.com/${guild.id}.png) - Ticket panel name templates
Both traditional and Components V2 templates support the same variable set.
Scopes
Not every variable is available in every context. Variables are grouped into scopes — a scope controls when its variables resolve.
| Scope | When it's available |
|---|---|
| Assistance | Always — bot version, template name, built-in emojis, and more. |
| Server | When sent in a server channel. Not available in DMs. |
| Triggered by | The member who triggered the message — button click, command, ticket open, etc. |
| Ticket | While a ticket exists — panel info, ticket channel, creator, and claimer. |
| Random | Generated fresh on each send — UUIDs, nanoids, and random numbers. |
The library editor shows only variables valid for the template you're editing. Ticket-scoped variables appear on ticket panel creation templates and in ticket name templates.
Assistance
| Variable | Description |
|---|---|
assistance.version | The current Assistance version. |
assistance.templateId | The ID of this template. |
assistance.templateName | The name of this template. |
assistance.isDMs#Yes:No | Different text in DMs vs. server channels. |
assistance.emojis#EmojiName | A built-in Assistance emoji by name. |
Server
| Variable | Description |
|---|---|
guild.id | The server's Discord ID. |
guild.assistanceId | The internal Assistance ID for this server. |
guild.slug | The server's Assistance slug. |
guild.memberCount | Total members, including bots. |
guild.botCount | Number of bots in the server. |
guild.userCount | Number of humans (non-bots) in the server. |
guild.icon | The server icon URL. |
guild.emojis#EmojiName | A custom server emoji by name. |
Triggered by
These refer to the member who triggered the message — for example, whoever clicked a button or ran a command.
| Variable | Description |
|---|---|
triggeredBy.userId | Their Discord user ID. |
triggeredBy.ping | Mentions them (<@id>). |
triggeredBy.profilePicture | Their avatar URL. |
triggeredBy.username | Their account username. |
triggeredBy.nickname | Their server nickname. |
triggeredBy.displayName | Their Discord display name. |
triggeredBy.highestRole | The name of their highest role. |
triggeredBy.highestRole.ping | Mentions their highest role. |
triggeredBy.roleCount | The number of roles they have. |
Ticket
Available when a ticket exists — on creation templates, inside ticket channels, and in ticket name templates.
Ticket info
| Variable | Description |
|---|---|
ticket.id | The ticket's ID. |
ticket.status#Open:Claimed:Closed | Different text per ticket status. |
ticket.createdAt#f | When the ticket was created (Discord timestamp). |
ticket.channel | Mentions the ticket's channel. |
Panel
| Variable | Description |
|---|---|
ticket.panel.id | The ticket panel's ID. |
ticket.panel.name | The ticket panel's name. |
ticket.panel.category | Mentions the panel's category channel. |
ticket.panel.categoryId | The panel's category channel ID. |
ticket.panel.archiveChannel | Mentions the panel's archive channel. |
ticket.panel.archiveChannelId | The panel's archive channel ID. |
ticket.panel.supportRoles | Support roles as a list of mentions. |
Creator and claimer
ticket.createdBy.* and ticket.claimedBy.* expose the same member fields as
Triggered by — user ID, mention, username, nickname, display
name, avatar, highest role, and role count — prefixed with ticket.createdBy
or ticket.claimedBy.
Random
Each send generates a new value.
| Variable | Description |
|---|---|
random.uuid | A random UUID v4. |
random.nanoid#24 | A random URL-safe ID. Optional length (default 24, max 100). |
random.number#0:99 | A random integer. Default range 0–99, or a custom min–max. |
Preview
The library editor includes a variable picker with every available token and a live preview that fills in sample values so you can see the result before saving.
How is this guide?