Repository navigation
Expressions (WIP)
Expressions are plain-text entered into Firebot that may or may not have special text-sequences that get replaced. Expressions are compromised of text tokens, quoted tokens, escape tokens and functions that are explained in detail below
Within expressions any text including white space that is not a quoted token, escape token, or part of a function is treated as literal text("as is").
Quoted tokens are replaced with their inner text. Quoted tokens begin and end with a ". Within a quoted token escape sequences are processed but all other text is treat as is. This means that functions will not be processed.
If a quoted token is started but a closing " is not found, an error will occur. See Escape Tokens if you need a literal double-quote in your output.
Functions are tokens that return a result that replaces the token. Functions begin with a $ followed by alphanumeric characters. If the function accepts arguments(parameters), the token is followed by an [, 0 or more comma-separated arguments, then a ]. Each argument can consist of text tokens, quoted tokens, escape tokens, functions or a combination there of.
Within a function's arguments block, white space directly after the [ is ignored, white space directly before and after a comma separator is ignore and white space before the ] is ignored: $var[ a , b ] is treated as $var[a,b]. If you wish to preserve said whitespace, use quoted text: $var[" a "," b "]
The current list of supported functions can be found here
Escape tokens are sequences of characters that get replaced with an underlying value. Unlike functions, they alter how the expression is processed.
| Sequence | Result | Notes |
|---|---|---|
\\ |
\ |
|
\$ |
$ |
Use to escape what would otherwise be treated as a function token start within a text token |
\" |
" |
Use to specify a literal double-quote within text and quoted tokens |
\[ |
[ |
Use just after a function token to use a literal opening bracket |
\] |
] |
Use within a function token's parameter to insert a literal closing bracket |
Big old TODO
Still need help? Come chat with us in the #help channel of our Discord server.