Skip to main content

$client

This object is used for storing arbitrary data related to the current bot user.

After all bot reactions have been executed, the $client contents are saved to the internal database and persisted between user requests. This data is never cleared automatically.

caution
There is a limit on the amount of data stored in the $client object. If this limit is exceeded, the current script is aborted and the bot stops responding to the user.

How to use

state: Welcome
q!: $regex</start>
if: !$client.wasGreeted
script:
$client.wasGreeted = true;
a: Hello and welcome to our online store!
else:
a: Hello again!