Bot Variables

Create and manage custom data variables to store useful information on your bot to use all over BotWiz!

The Bot Variables page allows you to create custom variables which can be used in any command, event or timed event on your bot.

BotWiz allows you to create multiple different types of variables each having its own unique purpose and plus points. Creating a variable is super easy, on the Bot Variables page, the first section on the page will allow you to create a custom variable.

Here you can customize the following options for the new custom variable:

  • Name

  • Type

  • Default Value

  • Scope

Below you can find detailed information on what each setting means and the options that comes with them.

Name

This input will allow you to pick a custom name for the variable which you will use to reference the variable to retrieve data from it. This can be done by entering: {custom_[name here]} into any text input block on any command or event for the bot. Ensure you replace [name here] with the name you entered for the custom variable when creating it.

Type

OptionInformation

Text

Sets the variable to be a text variable, allowing it to accept any value, from numbers, letters or symbols. This is the most dynamic type of variable you can choose from.

Number

Channel

Sets the variable to be a channel variable, this allows you to store data for a specific channel, rather than for the entire server like the number and text types.

User

Sets the variable to be a user variable, this allows you to store data for a specific user, rather than for the entire server like the number and text types.

Array

Sets the variable to be an array, this allows you to store multiple values in separate positions. Specifically useful if you wish to store multiple bits of information without making multiple variables.

When you select a channel, user or array type. It will then allow you to again specify if it is a user, or channel specific variable.

Default Value

Setting a default value will make the variable start with the value specified in this input rather than starting as null. This is super useful for a warning system (as on example). By setting it to 0 it would mean the users start off without a single warning and it will display 0 rather than blank.

Scope

OptionInformation

Guild

Sets the variable to store data on a guild by guild basis. Meaning the data stored will be different for each guild the bot is in. This means you are only able to update that guilds data in said variable by using a command or event in that specific guild.

Global

Sets the variable to store data on a global basis. Meaning anytime the variable is updated, the changes will be reflected in all guilds the bot is in.

Viewing existing variables

You can view all your existing custom variables at the bottom of the bot variables page.

Clicking on one of the variables will allow you to edit or delete the variable. When editing, you can change everything about the variable as if you were re-making it. This includes all options listed above as well as the ability to delete the variable if you no longer need it.

Once the variable is deleted, there is no way to get it or its data back. They are removed from our systems too.

Got too many variables and need a fast way to find the one you need? Use the search bar and enter the variables name!

Last updated