Security
Server Configuration
Miscellaneous
Utilities
Resources

Embed Variables

Variables you can use in embeds, messages, and invoke templates.

Use these variables anywhere Mist parses a template — stored embeds, createembed, embed create, greet/goodbye messages, moderation invokes, and more. They are replaced with live values when the message is sent.

User variables

{user.*}, {author.*}, {target.*}, and {target_user.*} all refer to the target user. Available fields:

VariableValue
{user.id}User ID
{user.mention}User mention
{user.name}Username
{user.nickname}Server nickname
{user.tag}Full tag (username#0000 or just username)
{user.avatar}Avatar URL
{user.guild_avatar}Server-specific avatar URL
{user.display_avatar}Display avatar URL
{user.display_name}Server display name
{user.created_at}Account creation date
{user.created_at_timestamp}Account creation timestamp
{user.joined_at}Server join date
{user.joined_at_timestamp}Server join timestamp
{user.boost}Whether the user is boosting (Yes/No)
{user.boost_since}Boost start date
{user.color}Top role color hex
{user.bot}Whether the user is a bot (Yes/No)
{user.top_role}Highest role name
{user.role_list}List of role mentions

Guild variables

VariableValue
{guild.name}Server name
{guild.id}Server ID
{guild.count}Member count
{guild.member_count}Member count
{guild.owner_id}Owner ID
{guild.created_at}Server creation date
{guild.created_at_timestamp}Server creation timestamp
{guild.emoji_count}Emoji count
{guild.role_count}Role count
{guild.boost_count}Boost count
{guild.boost_tier}Boost tier
{guild.icon}Icon URL
{guild.banner}Banner URL
{guild.afk_timeout}AFK timeout in seconds
{guild.preferred_locale}Server locale
{guild.channels_count}Total channel count
{guild.text_channels_count}Text channel count
{guild.voice_channels_count}Voice channel count
{guild.vanity}Vanity invite code

Server shortcuts

{server.*} is a shorter alias for the same server values as {guild.*}:

VariableValue
{server.name}Server name
{server.id}Server ID
{server.icon}Icon URL
{server.members}Member count
{server.member_count}Member count
{server.bots}Bot count
{server.humans}Human count
{server.roles}Role count
{server.channels}Channel count
{server.boosts}Boost count
{server.boost_tier}Boost tier

Channel variables

VariableValue
{channel.name}Channel name
{channel.id}Channel ID
{channel.mention}Channel mention
{channel.topic}Channel topic
{channel.category_name}Parent category name
{channel.type}Channel type (text, voice, forum, etc.)
{channel.position}Channel position
{channel.slowmode_delay}Slowmode in seconds

Moderator and case variables

VariableValue
{moderator.*}Same fields as {user.*} for the acting moderator
{reason}Case or command reason (invoke templates)
{duration} / {time}Punishment duration, such as 1 hour
{duration_seconds}Punishment duration in seconds
{duration_minutes}Punishment duration in minutes
{duration_hours}Punishment duration in hours
{duration_days}Punishment duration in days
{history}Prior actions on the member (hardban)
{warning_count}Total warnings for the member (warn)
{appeal.link}Appeal page for the case, empty until appeals are set up
{appeal.server_link}Appeal page for the server, empty until appeals are set up
{appeal.open}yes when appeals are open, no when configured but closed, empty when not configured
{invite_url}Invite URL: the context invite when supplied, otherwise the server vanity
{id} / {caseId}The moderation case id (invoke templates)

Giveaway variables

VariableValue
{prize}Giveaway prize
{host}Giveaway host
{winners}Winner mention list

Other placeholders

VariableValue
{tag}Custom tag value from the invoking context
{date.now}Current date and time
{date.now_proper}Current date formatted neatly
{date.now_short}Short date
{date.now_shorter}Month and day only
{date.utc_now}Current UTC date and time
{date.utc_timestamp}Current UTC timestamp
{time.now}Current time
{time.now_military}Current time in 24-hour format
{time.utc_now}Current UTC time
{time.utc_now_military}Current UTC time in 24-hour format

Functions

Wrap any variable to change its output:

FunctionExampleResult
{lower(...)}{lower(guild.name)}All lowercase
{upper(...)}{upper(fm.artist)}ALL UPPERCASE
{proper(...)}{proper(fm.track)}Title Case Words

Functions nest the normal lookup, so {lower(track.name)} and {proper(fm.user.scrobbles)} work anywhere the inner variable does.

Now playing variables

Custom now playing templates resolve these on top of the member, server, and date variables. They work in normal embeds and Components V2 templates.

VariableValue
{fm.track}Track name
{fm.artist}Track artists
{fm.album}Album name
{fm.url}Link to the track
{fm.image}Album art URL
{fm.progress}Position in the track, as m:ss
{fm.duration}Track length, as m:ss
{fm.progress_bar}Ten-step text progress bar
{fm.playing}yes when the track is playing now, else no
{fm.now_playing}Same as {fm.playing}
{fm.loved}yes when the linked account loved this track, else no
{fm.platform}Last.fm or Stats.fm
{fm.username}The linked username
{fm.user}The member display name
{fm.dominant}The album art color, as a hex code
{fm.last_played}When the last track played, as a relative timestamp
{fm.last_played_absolute}When the last track played, as an absolute timestamp
{fm.last_played_timestamp}When the last track played, as a unix timestamp

The track, artist, album, and user fields have deeper forms:

VariableValue
{fm.track.name}Track name
{fm.track.url}Last.fm link to the track
{fm.track.image}Album art URL
{fm.track.plays}Your scrobbles of this track
{fm.track.scrobbles}Same as {fm.track.plays}
{fm.track.loved}Same as {fm.loved}
{fm.track.spotify_url}Spotify link for the track
{fm.track.hyperlink}Track as a markdown link
{fm.artist.name}Artist name
{fm.artist.url}Last.fm artist page
{fm.artist.plays}Your scrobbles of this artist
{fm.artist.scrobbles}Same as {fm.artist.plays}
{fm.artist.image}Last.fm artist image URL
{fm.artist.hyperlink}Artist as a markdown link
{fm.album.name}Album name
{fm.album.url}Last.fm album page
{fm.album.cover}Album art URL
{fm.album.image}Same as {fm.album.cover}
{fm.album.plays}Your scrobbles of this album
{fm.album.scrobbles}Same as {fm.album.plays}
{fm.album.hyperlink}Album as a markdown link
{fm.user.name}The linked username
{fm.user.scrobbles}Total scrobbles on the linked account
{fm.user.plays}Same as {fm.user.scrobbles}
{fm.scrobbles}Same as {fm.user.scrobbles}

Every {fm.*} variable also works with the lastfm. prefix. {lastfm.track.name}, {lastfm.track.scrobbles}, {lastfm.artist.plays}, {lastfm.album.cover}, {lastfm.loved}, and {lastfm.user.scrobbles} return the same values as their {fm.*} forms.

Bare {track.name}, {artist.name}, {album.name}, and {scrobbles} work too. Play counts, scrobbles, loved state, the artist image, and the last played times come from Last.fm. On Stats.fm-linked accounts, loved shows no and the rest stay blank.

Image color

Any embed can take its color from its own image. Set the color to {dominant} and Mist reads the image or thumbnail color at send time:

{embed}
$v{color: {dominant}}
$v{image: https://example.com/photo.jpg}

On the dashboard's Embeds page, the Image colour switch adds this for you. {fm.dominant} does the same for the current track's album art in now playing templates.

Buttons

Two buttons work in now playing templates: a live preview and a track link.

{button: label: Preview && id: np-preview}
{button: label: Listen && url: {fm.url}}

The preview button plays a short audio preview of the current track. The link button opens the track on the linked platform. Both work at the end of a normal embed and inside a Components V2 {actionrow} node.

Example

{embed}
$v{title: {fm.track}}
$v{description: **{fm.artist}** — *{fm.album}*
{fm.progress_bar} {fm.progress} / {fm.duration}}
$v{thumbnail: {fm.image}}
$v{footer: {fm.platform} · @{fm.username}}
$v{button: label: Preview && id: np-preview}
$v{button: label: Listen && url: {fm.url}}

Components V2 version:

{cv2}
$v{container: accent: #5865f2 && {text: ## {fm.track}} && {text: **{fm.artist}** — *{fm.album}*} && {actionrow: {button: label: Preview && id: np-preview} && {button: label: Listen && url: {fm.url}}}}
Custom now playing templates need premium. Set one with /fm template, then check it with the Preview button.

Notes

  • Variables are case-sensitive.
  • If a value is missing from the context, the variable is left unchanged. Invoke action variables are the exception: {reason}, {duration}, {time}, the duration breakdowns, {history}, {warning_count}, and {appeal.*} render empty when they do not apply.
  • Bare {user}, {server}, {guild}, and {channel} also work, and render the user tag, server name, and channel mention.
  • Context variables only resolve where the flow supplies them: {moderator.*}, {reason}, {duration}, {time}, {history}, {warning_count}, {appeal.*}, and {id} in moderation invokes, and {prize}, {host}, and {winners} in giveaways.
  • Use the variables command in Discord for quick links to this page and the giveaway reference.
The legacy [user.mention], [server.name], and [channel.id] bracket syntax also works in supported templates.