$reactions.newSession
Deprecated
This method creates a new session and passes parameters to it.
caution
This method is deprecated.
Use
$jsapi.startSession
or $jsapi.stopSession
instead.Syntax
The method accepts an object with the following properties:
Property | Type | Description | Default value |
---|---|---|---|
client | Object | The data that will be available in the new session via the $client object. | The current value of $client |
data | Object | Arbitrary data to be passed into the new session. It will be available as $request.data . | Empty object |
message | String | The message to be sent to the script after the new session is started. This property is required. | — |
request | Object | The data that will be available in the new session via the $request object. | The current value of $request |
session | Object | The data that will be available in the new session via the $session object. | Empty object |
How to use
state: Reset
q!: $regex</reset>
script:
$reactions.newSession({message: "/start", data: $request.data});