Skip to content

Instantly share code, notes, and snippets.

@jazzedge
Created July 10, 2017 08:11
Show Gist options
  • Select an option

  • Save jazzedge/8c76bdc40c4cd2cc906f62765ede3278 to your computer and use it in GitHub Desktop.

Select an option

Save jazzedge/8c76bdc40c4cd2cc906f62765ede3278 to your computer and use it in GitHub Desktop.
Bot endConversation and reset all data
//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