Commit afc57e02 authored by Tammo Ronke's avatar Tammo Ronke
parents d473b96d c90a5871
......@@ -70,6 +70,7 @@ topicPrompt.setup(bot, recognizer);
bot.dialog("/", rootDialog.dialog(recognizer));
bot.dialog("delete", require("./dialogs/delete"));
bot.dialog("continue", require("./dialogs/continue"));
bot.dialog("suggestions", require("./dialogs/suggestions"));
bot.dialog("name", require("./dialogs/name"));
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 => {
dialog.matches(/^vote:\[*.*\]/, "vote");
dialog.matches(/^suggestions:\[*.*\]/, "suggestions");
dialog.matches("continue", "continue");
dialog.matches("vote", "vote");
dialog.matches("settings", "settings");
dialog.matches("delete", "delete");
......
......@@ -68,5 +68,10 @@
"awesome": [
"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