Templating Language

Hold your horses! It's simple

Thread-Watcher's pipeline allows you to "carry" data from one module to the subsequent modules in the pipeline. Any value captured in can be injected into messages, embeds, and even button labels.

The ticket panel configuration screen of the website makes finding and inserting these variables a breeze. Simple type {{ wherever you want to use a variable in a text and a "picker" of different variables will appear on screen where supported!

The Basics

Variables are wrapped in curly braces: {{variable}} You can access specific properties of a variable by dot notation: {{variable.property}} For example, to greet a user we can do:

Hello there, {{env.user.tag}}

Lists

So far we've looked into "atomic" variables. But, a variable can also be a list of variables. Consider a ticket with a pop-up asking the user to define categories for their ticket. In this case the user might choose multiple available options.

Thread-Watcher handles these variables as lists. To access a specific variable in a list you use the square brackets and indicate which item you want to select, such as module.options[2] to select the third selected option.

Thread-Watcher lists are 0 indexed which means the first item in our list has the index of 0.

We can also access lists "backwards" by providing a negative index. For example module.options[-1] will give us the last item and module.options[-2] will give us the second to last answer

Functions

functions will be added at a later time. Thanks for reading :D

Last updated