menu

BBTag feature five different types of variables, each with a different scope. These types are distinguished from each other with prefixes. These variables can be used for numerous operations and functions.

Variable Classification

Consider that anyone interacting with the variables know their type and names and have the permissions to use ccommand and tag commands.

Variable type Prefix Persistent Access Information
Temporary ~ check_box_outline_blank

check_box_outline_blank Author

check_box_outline_blank Anyone

All the other variable types are immediately stored to a database for data persistence. Temporary variables, however, do not. As such, they are faster and have the smallest scope.

Use these variables if you don't need to reuse them between executions.

Local none

check_box

check_box_outline_blank Author

check_box_outline_blank Anyone

Local variables are your classic variables. They are unique per-tag, and not shared by anything.

Guild _

check_box

check_box Author

check_box Anyone

Unlike local variables, guild variables are unique per-guild (server). They are intended for allowing separate tags to communicate with each other and other tags on the same guild.

Additionally, there are actually two separate pools of guild variables - one for tags, and another for custom commands. This means that public tags don't share the same variables as custom commands, even on the same guild.

Author @

check_box

check_box Author

check_box_outline_blank Anyone

Author variables are similar to guild variables, in that they allow tags to communicate with each other. However, they are unique per-author. This means that it is a set of variables that only you can ever touch.

Other than global variables, author variables are the only type that allow for tags and custom commands to communicate.

Global *

check_box

check_box Author

check_box Anyone

These variables are in a public pool, meaning that anybody is able to access or modify them. As a general rule of thumb, if you don't want somebody using your variables, don't use global ones!

Commit ! none none

This is an additional prefix for {set} and {get}. This prefix can be combined with the other prefixes and will act the same as if you have called {set} and then {commit} immediately after. More at https://blargbot.xyz/tags#commit.