Test built-in intents
This commit is contained in:
@@ -34,7 +34,7 @@ module.exports = {
|
||||
destinationEmail = activeSkill.contactEmail;
|
||||
|
||||
let listOfPossibleQuestions = '';
|
||||
activeSkill.intents.forEach(intent => {
|
||||
activeSkill.intents.forEach (intent => {
|
||||
if (intent.questions.length > 0 && intent.intentExplanation) {
|
||||
listOfPossibleQuestions +=
|
||||
intent.intentExplanation +
|
||||
@@ -45,8 +45,6 @@ module.exports = {
|
||||
}
|
||||
});
|
||||
|
||||
console.log(listOfPossibleQuestions);
|
||||
|
||||
//Handler for launch requestconsole.log()
|
||||
handlers = {
|
||||
LaunchRequest: function () {
|
||||
@@ -161,6 +159,26 @@ module.exports = {
|
||||
}
|
||||
};
|
||||
|
||||
//Built-In intents
|
||||
|
||||
handlers['AMAZON.CancelIntent'] = function () {
|
||||
console.log ('Cancel');
|
||||
this.reponse.speak ('Thank you for using Saburly');
|
||||
this.emit (':responseReady');
|
||||
};
|
||||
|
||||
handlers['AMAZON.HelpIntent'] = function () {
|
||||
console.log ('Help');
|
||||
};
|
||||
|
||||
handlers['AMAZON.NoIntent'] = function () {
|
||||
console.log ('No');
|
||||
};
|
||||
|
||||
handlers['AMAZON.YesIntent'] = function () {
|
||||
console.log ('Yes');
|
||||
};
|
||||
|
||||
//Default handlers for unknown questions and session close
|
||||
|
||||
handlers.Unhandled = function () {
|
||||
|
||||
Reference in New Issue
Block a user