Variables
Placeholders like {user.mention} that fill themselves in when a message is sent.
#Overview
Messages you write for Utilities can contain variables: words in braces that are replaced when the message is sent. {user.mention} becomes a mention of the member, and {guild.name} becomes your server's name.
So Welcome {user.mention} to {guild.name}! is sent as "Welcome @Sam to My Server!".
Run /variables to browse them in Discord, with a menu for each category below.
#Where they work
Welcome, leave and boost messages, autoresponders, sticky messages, embeds, buttons, panels, ticket messages, messages the bot sends for you, and your own reply styles from /customize feedback.
Ticket channel names are different: they only take {ticket}, {user} and {dropdown}. See Tickets.
#How they are written
- Dates: a variable ending in
_atbecomes a Discord timestamp that shows in each reader's own time. Add.rawfor the UNIX number, or.shortfor a date-only stamp, like{user.joined_at.short}. - People have
.id,.name,.mention,.display_nameand.avatar. - Something that is not set, like the banner of a server that has none, becomes
N/A. - Older spellings from earlier versions of the bot still work.
#Server
| Variable | Becomes |
|---|---|
{guild} or {guild.name} | Server name |
{guild.id} | Server ID |
{guild.count} | Member count |
{guild.owner} | Owner mention |
{guild.owner_id} | Owner ID |
{guild.created_at} | When the server was made (also .raw and .short) |
{guild.icon} | Icon URL, or N/A |
{guild.banner} | Banner URL, or N/A |
{guild.emoji_count} | Emoji count |
{guild.role_count} | Role count |
{guild.boost_count} | Boost count |
{guild.boost_tier} | Boost level, Level 0 to Level 3 |
{guild.locale} | Preferred language |
{guild.vanity} | Vanity URL code, or N/A |
{guild.channels_count} | Total channel count |
{guild.text_channels_count} | Text channel count |
{guild.voice_channels_count} | Voice channel count |
{guild.category_channels_count} | Category count |
{guild.afk_channel} | AFK channel mention, or N/A |
{guild.afk_timeout} | AFK timeout in seconds |
{guild.max_members} | Most members the server can hold |
#User
The member the message is about: the person joining, the one who triggered an autoresponder, and so on.
| Variable | Becomes |
|---|---|
{user} or {user.name} | Username |
{user.id} | User ID |
{user.mention} | User mention |
{user.display_name} | Display name |
{user.avatar} | Avatar URL |
{user.banner} | Banner URL, or N/A |
{user.joined_at} | When they joined the server (also .raw and .short) |
{user.created_at} | When the account was made (also .raw and .short) |
{user.boost} | Yes or No, whether they boost the server |
{user.boost_since} | When they started boosting (also .raw and .short) |
{user.color} | Hex colour of their top role, or N/A |
{user.top_role} | Name of their top role, or N/A |
{user.role_list} | Their roles as mentions, or N/A |
{user.role_text_list} | Their role names, or N/A |
{user.bot} | Yes or No, whether they are a bot |
{user.badges} | Profile badges, or N/A |
#Channel
| Variable | Becomes |
|---|---|
{channel} or {channel.name} | Channel name |
{channel.id} | Channel ID |
{channel.mention} | Channel mention |
{channel.topic} | Channel topic, or N/A |
{channel.type} | text, voice, announcement, forum or thread |
{channel.category_id} | Category ID, or N/A outside one |
{channel.category_name} | Category name, or N/A outside one |
{channel.position} | Position in the channel list |
{channel.slowmode_delay} | Slowmode delay in seconds |
#Date and time
| Variable | Becomes |
|---|---|
{date.now} | Today's date, Pacific time |
{time.now} | The time now, Pacific time (12-hour) |
{date.utc_now} | Today's date in UTC |
{time.utc_now} | The time now in UTC (12-hour) |
{date.utc_timestamp} | The current UNIX timestamp |
#Ticket
For ticket messages, such as the greeting and the notices the bot posts in a ticket.
| Variable | Becomes |
|---|---|
{ticket}, {ticket.case} or {ticket.id} | The ticket's number |
{ticket.open} | true or false, whether it is open |
{ticket.deleted} | true or false, whether it is deleted |
{ticket.name} | The new channel name, in the rename notice |
{ticket.channel.id} | Ticket channel ID |
{ticket.channel.mention} | Ticket channel mention |
{ticket.opened_at} | When it was opened (also .raw and .short) |
{ticket.author} or {ticket.creator} | Whoever opened it |
{ticket.claimer}, {ticket.closer}, {ticket.reopener}, {ticket.deleter} | Whoever did it, in that notice |
{ticket.target} | Whoever was added, removed or claimed for |
{ticket.transcript.channel} | Transcript channel mention |
{panel} | The panel's name |
{dropdown} | The option the opener picked |
{question:1} and {answer:1} | A question from the form and its answer, by number, starting at 1 |
The people in this list are mentions on their own, and take the same endings as any person, like {ticket.author.name}.
#Other
| Variable | Becomes |
|---|---|
{prefix} | Your server's prefix |
{newline} | A line break |
#Commands
/variablesAnyoneView all available variables for embeds and autoresponders