Commit 3334da3a authored by Eric Meier's avatar Eric Meier

root dialog

parent b6240cbd
......@@ -2,6 +2,8 @@ var restify = require("restify");
var builder = require("botbuilder");
var botbuilder_azure = require("botbuilder-azure");
var rootDialog = require("./dialogs/root");
var durationPrompt = require("./prompts/durationPrompt");
var topicPrompt = require("./prompts/topicPrompt");
......@@ -65,25 +67,19 @@ topicPrompt.setup(bot, recognizer);
/*
* Dialogs
*/
bot.dialog("welcome", require("./dialogs/welcome"));
bot.dialog("/", rootDialog.dialog(recognizer));
<<<<<<< HEAD
bot.dialog("openSettings", require("./dialogs/settings")).triggerAction({
matches: "settings"
});
=======
bot
.dialog("learning", require("./dialogs/learning"))
.triggerAction({ matches: "learn" });
bot.dialog("welcome", require("./dialogs/welcome"));
bot.dialog("openSettings", require("./dialogs/settings"));
bot.dialog("learning", require("./dialogs/learning"));
bot
.dialog("debug", session => {
/*bot.dialog("debug", session => {
session.beginDialog("welcome");
})
.triggerAction({
matches: "settings"
});
>>>>>>> 41a92cd8dcc059fc54be4ac7ab4ea9e199e7e2ab
*/
bot.on("conversationUpdate", activity => {
if (activity.membersAdded) {
......@@ -95,7 +91,3 @@ bot.on("conversationUpdate", activity => {
});
}
});
bot.dialog("/", session => {
session.send("nothing implemented");
});
var builder = require("botbuilder");
const dialog = recognizer => {
var dialog = new builder.IntentDialog({
recognizers: [recognizer]
});
dialog.matches("settings", "welcome");
dialog.matches("learn", "learning");
return dialog;
};
module.exports = { dialog };
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment