Commit 6150f9f7 authored by Tammo Ronke's avatar Tammo Ronke

not defined

parents 9b31f8a1 41a92cd8
......@@ -64,9 +64,23 @@ bot.recognizer(recognizer);
*/
bot.dialog("welcome", require("./dialogs/welcome"));
<<<<<<< HEAD
bot.dialog("openSettings", require("./dialogs/settings")).triggerAction({
matches: "settings"
});
=======
bot
.dialog("learning", require("./dialogs/learning"))
.triggerAction({ matches: "learn" });
bot
.dialog("debug", session => {
session.beginDialog("welcome");
})
.triggerAction({
matches: "settings"
});
>>>>>>> 41a92cd8dcc059fc54be4ac7ab4ea9e199e7e2ab
bot.on("conversationUpdate", activity => {
if (activity.membersAdded) {
......
var builder = require("botbuilder");
module.exports = [
function(session, args, next) {
const intent = args.intent;
session.dialogData.duration = builder.EntityRecognizer.findEntity(
intent.entities,
"builtin.datetimeV2.duration"
);
session.dialogData.topic = builder.EntityRecognizer.findEntity(
intent.entities,
"topic"
);
session.dialogData.skillLevel = builder.EntityRecognizer.findEntity(
intent.entities,
"skillLevel"
);
next();
},
function(session, args, next) {
if (session.dialogData.topic) {
next();
return;
}
//session.send("What exactly do you want to learn about ?");
builder.Prompts.text(
session,
"What exactly do you want to learn about ?"
);
},
function(session, args, next) {
if (session.dialogData.skillLevel) {
next();
return;
}
builder.Prompts.choice(
session,
"How much do you already know about about " + args.response + "?",
"nothing|something|much",
{ listStyle: 3 }
);
},
function(session, args, next) {
if (session.dialogData.duration) {
next();
return;
}
builder.Prompts.time(
session,
"Wohaa! I really found a lot of interesting articles for you. How much time do you want to invest learning about this topic?"
);
}
];
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