Delete Variable
Last updated
Was this helpful?
Last updated
Was this helpful?
The Delete Variable action when triggered resets the value of any custom variable to the base value defined in its settings. It can be referenced in any action or condition throughout your bot's commands and events.
In this section, you can manage which variable the bot will reset. You can select from a dropdown that will display the bot's variables. Variables on this list can be added, edited, and removed using the Data Storage module.
When using the Delete Variable action on a user or channel variable, a Targets section will be displayed. This will allow you to set the user or channel to reset the variable for.
The Delete Variable action has three options that change to whom the variable of the action is stored. Below you can find detailed information about each option and how it can be used.
By selecting this option your variable will be stored to the user who used the most recent interaction; for example, the most recent button press, select menu choice, command run or the user who triggered the custom event.
The Delete Variable action has two options that change to which channel the variable of the action is stored. Below you can find detailed information about each option and how it can be used.
By selecting this option your variable will be stored to the channel the most recent interaction was used in; for example, the most recent button press, select menu choice, command run or the channel of the custom event.
Here you can set the ID of the user to set a variable for. You can do this by pasting an ID directly from Discord (learn how ) or using a variable that returns a user ID. These can be easily added through the variable selector by clicking the Clipboard button.
Here you can set the ID of the channel to set a variable for. You can do this by pasting an ID directly from Discord (learn how ) or using a variable that returns a channel ID. These can be easily added through the variable selector by clicking the Clipboard button.
Likewise to other variable actions, for the delete variable action will target a specific key or all keys to delete a value from.
This field only accepts the name of the key that was made in data storage. See the page for more info.
This selection will delete all the values from all the keys of the .