Test built-in intents

This commit is contained in:
GotPPay
2018-01-23 13:24:56 +01:00
parent a8ffe0a5c0
commit 39b8e7608e

View File

@@ -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 () {