Bot Variables
Create and manage custom data variables to store useful information on your bot to use all over BotWiz!
Last updated
Create and manage custom data variables to store useful information on your bot to use all over BotWiz!
Last updated
The 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.
You can customize the following options for the new custom variable:
Name
Type
Default Value
Scope
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]}
into any text input block on any command or event for the bot. Ensure you replace [name]
with the name you entered for the custom variable when creating it.
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.
Setting a default value will make the variable start with the value specified in this input rather than starting as null
. By setting it to 0 it would mean the users start off without a single warning and it will display 0 rather than blank
.
You can view all your existing custom variables at the bottom of the 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.
Once the variable is deleted, there is no way to get it or its data back. They are removed from our systems too.
Option | Information |
---|---|
Option | Information |
---|---|
Text
Sets the variable to store a string, allowing it to accept any value, from numbers, letters or symbols.
Number
Sets the variable to store a number, allowing only numbers to be stored. This also allows the variable to be used in the Calculate variable block.
Channel
Sets the variable to work in a specific channel, this allows you to store data for a specific channel, rather than for the entire server.
User
Sets the variable to store values for a specific user.
Array
Sets the variable to store an array / list of values, this allows you to store multiple values in separate positions.
Guild
Sets the variable to store data in 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.