Is it possible the let chatbot perform an action based on certain results he returns?
I was thinking of puttng a JSON string into the rive file:
+ (hello|hi|hey|howdy|hola|hai|yo) [*]
- {"id":1, "txt": "How are you?"}
And then parse it back into a JS object.
var reply = rs.reply("soandso", text);
reply= JSON.parse(reply);
Then according to the id it executes an action that I want. Is there a better way to do it (with rivescript or maybe with another language)?