Created
July 10, 2017 08:11
-
-
Save jazzedge/8c76bdc40c4cd2cc906f62765ede3278 to your computer and use it in GitHub Desktop.
Bot endConversation and reset all data
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| //End Conversation and clear all data (restart the conversation completely) | |
| bot.dialog('reset', function (session) { | |
| session.dialogData = {}; | |
| session.userData = {}; | |
| session.conversationData = {}; | |
| session.privateConversationData = {}; | |
| session.endConversation("End Conversation"); | |
| }).triggerAction({ matches: /^(exit)|(quit)|(goodbye)|(finish)|(stop)|(end)|(terminate)/i }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment