Skip to content

Instantly share code, notes, and snippets.

@jazzedge
Created July 28, 2017 09:06
Show Gist options
  • Select an option

  • Save jazzedge/800936d1de7dd15b571df819bddfff5d to your computer and use it in GitHub Desktop.

Select an option

Save jazzedge/800936d1de7dd15b571df819bddfff5d to your computer and use it in GitHub Desktop.
Bot - Override Dialog behaviours
// See: http://www.pveller.com/smarter-conversations-part-2-open-dialogs/#Trigger-Actions
// You can define your own dialog’s behaviors by overwriting begin, replyReceived, and even recognize on your dialogs:
bot.dialog('custom', Object.assign(new builder.Dialog(), {
begin: (session) => {
session.send('I am built custom');
},
replyReceived: (session) => {
session.endDialog();
}
}));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment