Commit 03e11ded authored by Eric Meier's avatar Eric Meier

added continue

parent 98ff21a5
...@@ -70,6 +70,7 @@ topicPrompt.setup(bot, recognizer); ...@@ -70,6 +70,7 @@ topicPrompt.setup(bot, recognizer);
bot.dialog("/", rootDialog.dialog(recognizer)); bot.dialog("/", rootDialog.dialog(recognizer));
bot.dialog("delete", require("./dialogs/delete")); bot.dialog("delete", require("./dialogs/delete"));
bot.dialog("continue", require("./dialogs/continue"));
bot.dialog("suggestions", require("./dialogs/suggestions")); bot.dialog("suggestions", require("./dialogs/suggestions"));
bot.dialog("name", require("./dialogs/name")); bot.dialog("name", require("./dialogs/name"));
bot.dialog("vote", require("./dialogs/vote")); bot.dialog("vote", require("./dialogs/vote"));
......
var client = require("../backend/client");
var answers = require("../speech/answers");
module.exports = [
function(session, args, next) {
if (!session.currentArticle) {
session.send(answers.formatedRandomAnswer("continue", ""));
}
session.replaceDialog(
"suggestions",
client.querySuggestions(
session.userData.currentArticle.topic,
100,
"high"
)
);
session.endDialog();
}
];
...@@ -9,6 +9,7 @@ const dialog = recognizer => { ...@@ -9,6 +9,7 @@ const dialog = recognizer => {
dialog.matches(/^vote:\[*.*\]/, "vote"); dialog.matches(/^vote:\[*.*\]/, "vote");
dialog.matches(/^suggestions:\[*.*\]/, "suggestions"); dialog.matches(/^suggestions:\[*.*\]/, "suggestions");
dialog.matches("continue", "continue");
dialog.matches("vote", "vote"); dialog.matches("vote", "vote");
dialog.matches("settings", "settings"); dialog.matches("settings", "settings");
dialog.matches("delete", "delete"); dialog.matches("delete", "delete");
......
...@@ -68,5 +68,10 @@ ...@@ -68,5 +68,10 @@
"awesome": [ "awesome": [
"Awesome! Do you want to read some more about **[2]** or some other topic?" "Awesome! Do you want to read some more about **[2]** or some other topic?"
] ]
},
"continue": {
"not_found": [
"I'm really sorry, but I cant remember me about our last 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