Last active
August 1, 2017 08:50
-
-
Save alexzaitsev/5f0ab5a9d201e5e6438b098c57677d28 to your computer and use it in GitHub Desktop.
How To Write Reusable and Testable Code with Microsoft Bot Framework
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
const bot = new builder.UniversalBot(connector); | |
bot.dialog(‘/’, [ | |
(session, args, next) => { | |
if (session.userData.languageSet) { | |
next(); | |
} else { | |
session.beginDialog(‘welcome:/pickLocale’); | |
} | |
}, | |
... | |
]); | |
bot.library(require('./dialogs/welcome')); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi
A little mistake in your code :
session.beginDialog(‘welcome:/pickLocale’);
Replace by
session.beginDialog(‘welcome:pickLocale’);
Documentation