Variable Category

Nodes in the Variable response category.

Variables are important tools in creating a useful Discord bot. Variables in Discord Bot Studio can be leveraged in a similar way to traditional programming. Use the nodes in this category to interact with variables. You can also insert a variable value into most fields using the Insert Variable button next to the field.

There are three types of variables: temporary, server, and global.

Temporary variables are stored for the duration that the bot is running. They are not saved to file and will be deleted when the bot goes offline. They are per-server.

Server variables operate exactly like temporary variables, but they are saved to file and thus persist even if the bot is restarted.

Global variables are also saved to file and are persistent. They differ from server variables because they are not specific to a certain server; i.e. they can be used by the bot across all servers that it's in.

Last updated