Arguments script functions¶
Functions for C# (Cb.Call) and Python (cb.call). See Script functions for how to use them.
args.all¶
Gives you every variable of the running action at once, like user, message and rewardTitle.
Gives back: An object with every variable name and its value.
var answer = await Cb.Call("args.all");
answer = cb.call("args.all")
args.get¶
Reads one variable of the running action, like the user who triggered it.
| Value | What to put in |
|---|---|
name |
The variable name without % signs, like "user". |
Gives back: The value, or null when the action has no variable with that name.
var answer = await Cb.Call("args.get", new { name = "user" });
answer = cb.call("args.get", name="user")
args.set¶
Sets a variable of the running action. Later sub-actions can use it as %name%.
| Value | What to put in |
|---|---|
name |
The variable name without % signs, like "winner". |
value |
The value to store: text, a number, true/false or a list. Leave it out to set it to empty (null). |
Gives back: Nothing.
var answer = await Cb.Call("args.set", new { name = "winner", value = "CoolViewer42" });
answer = cb.call("args.set", name="winner", value="CoolViewer42")