Test built-in intents
This commit is contained in:
@@ -34,7 +34,7 @@ module.exports = {
|
|||||||
destinationEmail = activeSkill.contactEmail;
|
destinationEmail = activeSkill.contactEmail;
|
||||||
|
|
||||||
let listOfPossibleQuestions = '';
|
let listOfPossibleQuestions = '';
|
||||||
activeSkill.intents.forEach(intent => {
|
activeSkill.intents.forEach (intent => {
|
||||||
if (intent.questions.length > 0 && intent.intentExplanation) {
|
if (intent.questions.length > 0 && intent.intentExplanation) {
|
||||||
listOfPossibleQuestions +=
|
listOfPossibleQuestions +=
|
||||||
intent.intentExplanation +
|
intent.intentExplanation +
|
||||||
@@ -45,8 +45,6 @@ module.exports = {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
console.log(listOfPossibleQuestions);
|
|
||||||
|
|
||||||
//Handler for launch requestconsole.log()
|
//Handler for launch requestconsole.log()
|
||||||
handlers = {
|
handlers = {
|
||||||
LaunchRequest: function () {
|
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
|
//Default handlers for unknown questions and session close
|
||||||
|
|
||||||
handlers.Unhandled = function () {
|
handlers.Unhandled = function () {
|
||||||
|
|||||||
Reference in New Issue
Block a user