BuildcordDocs

Set variable

Store a value in a variable.

data.set stores a value in one of your variables.

Settings

SettingWhat it does
VariableThe variable to change.
ValueWhat to store, such as {option.value}. Accepts tokens.

Ways out

out. Turn on If it fails for a red way out.

Notes

  • The variable's scope decides whose value changes: the bot's, the server's, the member's or the user's.
  • Read it back as {var.name}.
  • The canvas shows {var.name} = value.

Example

Store {option.channel} in a server variable named logChannel so other flows can post there.

On this page