Template variables
Put these in custom commands, welcome and leave messages, autoresponders, level-up messages and anywhere else the dashboard shows a variable picker. Kovu fills them in when the message is sent.
On this page
BasicLink to this section
Work in every message Kovu sends for you.
| Variable | What it does |
|---|---|
{user} | Mentions the user |
{server} | The server name |
{channel} | The channel name |
{prefix} | The server's command prefix |
MentionsLink to this section
| Variable | What it does |
|---|---|
{everyone} | Pings @everyone |
{here} | Pings @here |
{@name} | Mentions a user by usernameExample: {@kovu} |
{&role} | Mentions a role by nameExample: {&Gamers} |
{#channel} | Links a channel by nameExample: {#rules} |
| Variable | What it does |
|---|---|
{user.id} | The user's ID |
{user.name} | The user's username |
{user.username} | The user's username |
{user.displayname} | Server nickname, global display name or username |
{user.globalname} | The user's global display name |
{user.nick} | The user's server nickname (or display name) |
{user.tag} | username (or name#1234 for legacy accounts) |
{user.idname} | username (ID) |
{user.discrim} | The user's legacy discriminator |
{user.mention} | Mentions the user |
{user.avatar} | URL of the user's avatar |
{user.createdat} | When the account was created |
{user.joinedat} | When the user joined the server |
{user.bot} | "true" if the user is a bot |
ServerLink to this section
| Variable | What it does |
|---|---|
{server.id} | The server's ID |
{server.name} | The server's name |
{server.icon} | URL of the server's icon |
{server.membercount} | Number of members |
{server.ownerid} | The owner's ID |
{server.owner} | Mentions the owner |
{server.createdat} | When the server was created |
{server.boosts} | Number of boosts |
{server.boostlevel} | Boost level (0-3) |
ChannelLink to this section
| Variable | What it does |
|---|---|
{channel.id} | The channel's ID |
{channel.name} | The channel's name |
{channel.mention} | Links the channel |
{channel.topic} | The channel's topic |
| Variable | What it does |
|---|---|
{role} | The role name (where a role is in context) |
{role.id} | The role's ID |
{role.name} | The role's name |
{role.mention} | Mentions the role |
{role.color} | The role's color as hex |
{role.membercount} | Members with the role |
| Variable | What it does |
|---|---|
{time} | Current time (24 hour) |
{time12} | Current time (12 hour) |
{date} | Current date |
{datetime} | Current date and 24 hour time |
{datetime12} | Current date and 12 hour time |
{timestamp} | Current Unix timestamp (seconds) |
ArgumentsLink to this section
What members type after a custom command, like `?hug @kovu`.
| Variable | What it does |
|---|---|
$N | Argument N (1-based)Custom commandsExample: You chose $1 |
$N+ | Argument N and everything after itCustom commandsExample: Reason: $2+ |
ActionsLink to this section
Change what happens when a custom command runs.
| Variable | What it does |
|---|---|
{delete} | Delete the message that triggered the commandCustom commands |
{silent} | Suppress the bot's normal responseCustom commands |
{noeveryone} | Never ping @everyone/@here |
{!command} | Run another bot commandCustom commandsExample: {!role $1 Regulars} |
RestrictionsLink to this section
Decide who and where a custom command works.
| Variable | What it does |
|---|---|
{require:role} | Only members with this role may use it (or serverMod)Custom commandsExample: {require:Staff} |
{require:#channel} | Only usable in this channelCustom commands |
{not:role} | Members with this role may not use itCustom commands |
{not:#channel} | Not usable in this channelCustom commands |
OutputLink to this section
Send the reply somewhere else.
| Variable | What it does |
|---|---|
{respond:#channel} | Send the response to another channelCustom commands |
{dm} | DM the response to the user |
{dm:user} | DM the response to a specific userCustom commands |
RandomLink to this section
Pick something at random each time.
| Variable | What it does |
|---|---|
{choose:a;b;c} | Pick one option at randomExample: {choose:pie;cake;ice cream} |
{choice} | Where the {choose} result is placed |
{chooseN:a;b} | Numbered choose for several independent picksExample: {choose2:red;blue} ... {choice2} |
{choiceN} | Where {chooseN} is placed |
Message blocksLink to this section
Messages you write for Kovu are built from blocks you stack in the message designer, the way Discord lays out messages from apps. Variables work in every text, link and image of every block.
| Block | What it does |
|---|---|
| Text | Markdown text: headings, lists, quotes, masked links and variables. |
| Card | A box with a colored bar on its left that holds other blocks. Use the server’s embed color, pick one, or leave the bar off. |
| Section | One to three texts with a thumbnail image or a link button beside them. |
| Gallery | One to ten images in a grid, each with alt text, and optionally hidden as a spoiler. |
| Separator | Space between blocks, small or large, with or without a line. |
| Buttons | A row of up to five link buttons. In the Message Embedder, a row can also hold the buttons and menus you set up as actions. |
| Module part | Where a module puts its own pieces, like a ticket panel’s buttons, a reaction role menu’s roles or the welcome card. Leave it out and Kovu puts them in their usual place. |
- A new message starts as one text, which you can put in a card with a color. Adding a block offers ready-made layouts first, like a card with an image.
- One message holds up to 40 components (blocks, buttons and rows all count, and so do a module’s own buttons) and about 4,000 characters of text. The designer counts both as you edit.
- A message that is only text, with or without link buttons, still goes out as a plain message, so its links keep their previews.
Messages you saved before