Skip to main content
A variable is {object.property}. When the script runs, it’s swapped for the real value.
Which variables exist depends on where the script runs. A welcome message knows about the member who joined; a ticket message knows about the ticket. The common ones below are available almost everywhere.
If a variable doesn’t exist in the current context, it’s left in the output as literal text. Seeing {user.rank} in your message means that variable isn’t available there — not that it’s spelled wrong.

Member

{user} on its own renders as a mention.
user, member, author, u and m are interchangeable. {member.name} and {u.name} are the same as {user.name} — use whichever reads better to you.

Server

Aliases: guild, server, sv, g, s. {server.name} works.

Channel

Aliases: channel, ch, c.

Context-specific variables

Available in welcome, goodbye and rejoin messages: who invited the member, and through which invite.When the join wasn’t from a person’s invite — someone came in through your vanity URL, or mira couldn’t tell which invite was used — there’s no inviter to describe, so the inviter variables fall back to the server: the name and mention read as your vanity link, the avatar is the server icon, and every count is 0. Nothing is left as a raw {inviter.mention}, so a template never breaks; use {inviter.is_vanity} to word it differently:
{inv.*} and {invited_by.*} work as aliases for {inviter.*}, and {invite_url} for {invite}.
Invite tracking needs mira to be able to see invites (Manage Server). Without it, every join counts as unknown and gets the server fallback above.
Available in !level message:
Available in !invoke responses, which override what moderation commands reply with:
!invoke variables lists them in Discord.
Available in ticket option messages:{case}, {panel}, {option}, {creator}, {claimer}, {reason}, plus {user} for whoever triggered the action.
In !vanity message and !tag message, {user} is the member who was awarded a role and {role} is the role they got.
Counter channel names use a different, flatter variable set — no user. or guild. prefix. {members}, {boosters}, {online}, {messages_today}, {voice_week} and so on. See Counters for the full list, or run !counter variables.
Available in !lastfm mode and !lastfm reskin username. Four objects, each rendering as its name on its own:{old_track}, {old_artist} and {old_album} hold whatever played before the current track.
See Now playing for every property, the crown and whoknows aliases, and the .lower / .upper / .hyperlink suffixes.
!voicemaster default name accepts {user.name}, and defaults to something like {user.name}'s channel.

Timestamps and durations

Any date variable renders as a raw Unix timestamp, which you can drop straight into Discord’s timestamp markdown:
Renders as account made 3 years ago. Every date also takes a named suffix — {user.created_at.relative} does the same thing without the markup — and every duration takes .short, .seconds, .hours and friends. See timestamps & durations for the full set, which works identically on every date and duration in the bot.

Finding what’s available

Most modules have a variables subcommand that lists exactly what that context supports:
Variables compose with operators. {guild.members|comma} gives 1,247, {user.name|upper} shouts, and {if: {user.bot}==True && beep boop && welcome} branches on a value.