You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@yasinAtlibra Did you check the web example?
You can define the rules using javascript or converting a yaml string (js-yaml), no need server.
If you want to save the user's answers in a database, you can just call the API using the bot events, like end or storeChanged.
newYveBot(rules).on('end',(data)=>{$.post('url',{ data });})...
But if you want to load the chat rules in server and keep the control of rules/sessions, step by step, like
User opens chat
Client asks server for rule
Server replies a rule
Client answers
Server receives and replies the next rule
...
I recommend you to use socket.io because the chat conversation is async, you will need to implement sequential ajax requests to simulate the same behavior.
It would be great if you provide an example of restifying the bot.
The text was updated successfully, but these errors were encountered: