Skip to content

Parameters

Parameters is the temporary data storage used in custom commands to pass data between actions.

They are represented in every action's message template by the predefined parameters variable.

Parameters can also be used for passing data within a chain of actions executed by the run tag.

WARNING

Parameters lifecycle is limited to 15 minutes from the moment when they were accessed last time!

Saving Data

You can use the following construct to save any data into parameters:

JuniperBot Template
{% do parameters.store('example', 'Hello world') %}

If custom command's action is executed resulting in a new message being sent, the parameters will be bound to this message.

If this message contains components executing other actions within the custom command, parameters bound to the original message will be passed to the executed action.

Accessing Data

The data of the parameters can be accessed as follows:

JuniperBot Template
{{ parameters.get('example') }}

All rights sniffed.