Wiki: Document variables for events

Signed-off-by: Knut Ahlers <knut@ahlers.me>
This commit is contained in:
Knut Ahlers 2021-09-03 00:15:46 +02:00
parent df9fe579ea
commit ebde2da41d
Signed by: luzifer
GPG Key ID: 0066F03ED215AD7D

View File

@ -166,6 +166,10 @@ Additionally there are some functions available in the templates:
- `toUpper <string>` - Converts the given string to upper-case
- `variable <name> [default]` - Returns the variable value or default in case it is empty
For some events special variables are made available:
- `title` - Available in `title_update` - The new stream title
- `category` - Available in `category_update` - The new stream category
## Command executions
Your command will get a JSON object passed through `stdin` you can parse to gain details about the message. It is expected to yield an array of actions on `stdout` and exit with status `0`. If it does not the action will be marked failed. In case you need to output debug output you can use `stderr` which is directly piped to the bots `stderr`.