Last active
August 12, 2017 17:41
-
-
Save jazzedge/39e3271ce16c2084855efd5e9ae5c39f to your computer and use it in GitHub Desktop.
Bot - onSelectAction: trigger new dialog without clearing stack
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
| bot.dialog('help', function (session, args, next) { | |
| session.endDialog("I'm a virtual assistant that can help decide whether or not you require planning permission for a loft. <br/>Please say 'ok' to continue"); | |
| }) | |
| .triggerAction({ | |
| matches: /^help$/i, | |
| onSelectAction: (session, args, next) => { | |
| // Add the help dialog to the dialog stack | |
| // (override the default behavior of replacing the stack) | |
| session.beginDialog(args.action, args); | |
| } | |
| }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment