Template Variables
DocsResources

Template Variables

Insert member, server, channel, ticket, level, voice, and music data into supported templates.

How variables render

Appear replaces registered {name} placeholders in supported message contexts. Rendering is single-pass, mass mentions are sanitized by default, and a variable that is unknown or unavailable may resolve to an empty value or its documented fallback depending on the caller.

Member variables

VariableValue
{user.name}Username
{user.display_name}Server display name
{user.mention}Member mention
{user.display_avatar}Display avatar URL
{user.created}Account creation date
{user.joined}Server join date
{user.join_position}Join position when available
{user.roles}Role list excluding everyone

Server and channel variables

VariableValue
{server.name}Server name
{server.id}Server ID
{server.icon}Server icon URL
{server.members}Total member count
{server.boosts}Boost count
{channel.name}Channel name
{channel.mention}Channel mention
{timestamp.relative}Current relative Discord timestamp

Context-specific variables

Ticket templates can use ticket ID, channel, panel, and option values. Leveling templates expose old and new rank plus XP values. Voice and music contexts expose their own leaderboard, Last.fm, track, artist, album, and cover fields. A context-specific variable only works where the calling feature supplies its data.

Example

Welcome description
Welcome {user.mention} to **{server.name}**!
You are member #{user.join_position}.