Back to blog
2026-04-062 min read

Custom Commands built-in variables

Variables that come with the bot

This post details the built-in variables available for custom commands. These variables can be used anywhere in your command responses to provide dynamic information.

Functions

Random

Returns a random number within the range from x to y for example {random<0-10>}

Static Random

Works same as Random but for the same range it returns same value everywhere for example {staticRandom<0-10>}

Random Text

Returns a random text from a list of texts {randomText<Text 1 | Text 2 | Text 3>} or {staticRandomText<Text 1 | Text 2 | Text 3>}

Math

Calculate numbers using math {math<5 - 1 + 2>}

Variables

  • Get server variable - {getServerVar<name_here>}
  • Get member variable - {getMemberVar<name_here>}
  • Set server variable - {setServerVar<name_here,new_value>}
  • Set member variable - {setMemberVar<name_here,new_value>}

User

Information of the user who ran the command:

  • {user} - User's mention
  • {user_id} - User's ID
  • {user_avatar} - Avatar URL
  • {user_name} - Display Name
  • {user_nick} - Nickname
  • {roles} - Role list

Mentioned User

If any user is mentioned, these variables will refer to them; otherwise, they fall back to the command executor:

  • {mentioned_user} - User's mention
  • {mentioned_user_id} - User's ID
  • {mentioned_user_avatar} - Avatar URL
  • {mentioned_user_name} - Display Name
  • {mentioned_user_nick} - Nickname
  • {mentioned_roles} - Role list

Server

Information about the server where the command was run:

  • {server} - Server Name
  • {server_id} - ID of the server
  • {server_logo} - Server Icon URL
  • {server_owner} - Mention of server owner

Role Command Exclusive

These variables are only available when a role is added, removed, or toggled:

  • {role_given} - List of the role(s) that were given
  • {role_removed} - List of the role(s) that were removed