GimCommandsDocsStatusDiscord
Dashboard

Conditionals

Show part of a message only when something is true: thank boosters, greet bots differently, hide empty values.

If

{if CONDITION} … {/if} keeps the text between them only when the condition is true. The condition is usually a variable:

Only when something is true
Welcome {user.mention}!{if {user.boost}} Thanks for boosting! 💜{/if}

Else and else-if

Add {else} for the other case, and {elseif CONDITION} for more cases in between. The first one that's true wins.

One thing or another
{if {user.bot}}A new bot: {user.name}{else}Welcome {user.mention}!{/if}

Comparing

Use == (equal) or != (not equal). Both sides can be variables or text; case and spaces at the ends don't matter.

Comparing values
{if {guild.boost_tier} == Level 3}Max boost level reached!{elseif {guild.boost_tier} == No Level}Help us get our first boost level!{else}We're at {guild.boost_tier}.{/if}

What counts as false

A condition without a comparison is false when the variable is empty or one of these (any case):

0falsen/anononenull

Anything else is true, so yes/no variables like {user.boost} work without a comparison.

Good to know

  • Conditionals work in plain text and in any part of an embed, and are applied before the embed is built.
  • A misspelled variable, or one that doesn't exist in that message, stays as typed, so it counts as true. Check the names on the Variables page if a block always shows.
  • Blocks can't be nested (no {if} inside another {if}), but you can use as many separate blocks as you like.
If nothing is left after the conditionals (every block false and no other text), the bot can't send an empty message, so leave something outside the blocks.