Description Usage Arguments Functions Fields
switchboards are chains of if-then statements, which can be very useful when long chains of such statements are needed, such as when programming bots. Using switchboards allows users to divide parts of their chain into different files or modules.
1 2 3 4 5 6 7 | addAction(.self, condition, action, name = NULL, endChain = F, ...)
delAction(.self, idx)
evaluateAll(.self)
makeSwitchboard()
|
condition |
A logical statement, to be evaluated when the entire switchboard is evaluated.
If true, the associated action is executed.
The content of this argument remains unevaluated and is converted to a language object,
to be evaluated when the |
action |
A piece of code to be run when the associated if statement is evaluated and found to be true.
Content placed within |
name |
A name for this particular if-then statement. Can be left empty. |
endChain |
Logical. Should this statement, if true, end the evaluation of any further statements? |
idx |
Character or numeric. The to-be-deleted if-then statement. You can provide either its name or its number. |
addAction
: add an action to a switchboard.
delAction
: Delete an action from a switchboard.
evaluateAll
: Evaluate all actions in a switchboard.
Evaluate all if-then statements in a switchboard.
makeSwitchboard
: Make a switchboard object
actions
A list of if-then statements.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.