Variables
Variables are placeholders you type inside a message. Risk swaps each one for the real value when the message is sent. They work in welcome and leave messages, level-up messages, auto-replies, custom commands and more. The message templates page explains where each one works.
There are 57 variables. Type !variables in Discord for the same list, !variables Server for one group, and !testvars <message> to see a message with the values filled in.
How to use them#
- Wrap the name in curly braces:
{server}. - They are not case sensitive.
- An unknown variable is left as typed.
- Variables with a colon take a value after it:
{random:1-100} and {choose:red|green|blue}. - Times marked "shown in each reader's own time zone" use Discord's time display, so everyone sees their own local time.
Member#
| Variable | What it does | Looks like |
{user} | Mentions the member in a normal message, and shows their bold name inside an {embed}. | @Sam |
{name} | The member's display name, without a mention. | Sam |
{username} | The member's account name, not their server nickname. | sam |
{user.id} | The member's Discord ID. | 123456789012345678 |
{user.mention} | Always a mention, even inside an embed. | @Sam |
{user.avatar} | A link to the member's profile picture. | https://cdn.discordapp.com/… |
{user.created} | The date the account was made, shown in each reader's own time zone. | March 4, 2021 |
{user.age} | How old the account is. | 3 years |
{user.joined} | The date the member joined this server. | June 1, 2026 |
{user.toprole} | The name of the member's highest role. | Moderator |
{user.rolecount} | How many roles the member has. | 4 |
{ordinal} | The member's join position with its ending: 1st, 2nd, 3rd... | 1,204th |
{position} | The member's join position as a plain number. | 1204 |
Server#
| Variable | What it does | Looks like |
{server} | The server's name. | Risk HQ |
{server.id} | The server's ID. | 987654321098765432 |
{server.owner} | The server owner's display name. | Alex |
{server.members} | How many members the server has, bots included. | 1,204 |
{server.humans} | How many members are people, not bots. | 1,190 |
{server.bots} | How many members are bots. | 14 |
{server.channels} | How many channels the server has. | 32 |
{server.roles} | How many roles the server has. | 18 |
{server.boosts} | How many boosts the server has. | 9 |
{server.boostlevel} | The server's boost level, 0 to 3. | 2 |
{server.created} | The date the server was made. | January 9, 2020 |
{server.icon} | A link to the server's icon. | https://cdn.discordapp.com/… |
{server.description} | The server's community description. | A friendly place to chat |
{server.emojis} | How many custom emojis the server has. | 25 |
Layout#
| Variable | What it does | Looks like |
{embed} | Put it at the very start and very end of a message to send the whole message as an embed. | {embed}Hello!{embed} |
{newline} | A line break. Useful in places that only take one line, like the dashboard's text boxes. | (a new line) |
Channel#
| Variable | What it does | Looks like |
{channel} | The name of the channel the message is sent in. | general |
{channel.mention} | A clickable link to the channel. | #general |
{bot} | The bot's name. | Risk |
Time#
| Variable | What it does | Looks like |
{date} | Today's date in UTC. | 8 November 2026 |
{time} | The current time in UTC. | 14:05 UTC |
{day} | The day of the week in UTC. | Sunday |
{month} | The month name in UTC. | November |
{year} | The year in UTC. | 2026 |
{timestamp} | The current Unix timestamp, in seconds. | 1794233100 |
{now} | The current date and time, shown in each reader's own time zone. | November 8, 2026 2:05 PM |
{now.relative} | 'just now' that keeps counting for readers. Best for a message that stays on screen. | a few seconds ago |
Random#
| Variable | What it does | Looks like |
{random:1-100} | A random whole number between the two you give. Use any range, such as {random:1-6}. | 42 |
{choose:a|b|c} | One of your options, picked at random. Separate them with |. | b |
{coin} | Heads or tails. | Heads |
{dice} | A six-sided dice roll. | 4 |
Emoji#
| Variable | What it does | Looks like |
{check} | The check emoji. | ✅ |
{cross} | The cross emoji. | ❌ |
{star} | The star emoji. | ⭐ |
{party} | The party emoji. | 🎉 |
{wave} | The wave emoji. | 👋 |
{heart} | The heart emoji. | ❤️ |
{fire} | The fire emoji. | 🔥 |
{crown} | The crown emoji. | 👑 |
{sparkles} | The sparkles emoji. | ✨ |
Levels#
| Variable | What it does | Looks like |
{level} | The level the member just reached. Level-up messages only. | 7 |
{xp} | The member's total XP. Level-up messages only. | 1,540 |
{nextlevel} | The next level to reach. Level-up messages only. | 8 |
{messages} | How many messages the member has sent. Level-up messages only. | 412 |