From 6b26db3d18b6ea6d376157f11db30abd61f4266b Mon Sep 17 00:00:00 2001 From: GotPPay Date: Tue, 23 Jan 2018 02:15:44 +0100 Subject: [PATCH] fix code --- backend/models/alexa.js | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/backend/models/alexa.js b/backend/models/alexa.js index 87d1b95..51ac02e 100644 --- a/backend/models/alexa.js +++ b/backend/models/alexa.js @@ -45,18 +45,7 @@ module.exports = { } }); - //Defaul Amazon handlers (some of them) - - handlers.NewSession = function () {}; - - handlers['AMAZON.HelpIntent'] = function () { - console.log ('Help intent'); - this.response - .speak (listOfPossibleQuestions) - .listen (constants.voiceResponseStrings.GENERIC_CONTINUE); //Phrase from listen doesn't work !!! - }; - - //Handler for launch request + //Handler for launch requestconsole.log() handlers = { LaunchRequest: function () { this.response @@ -170,6 +159,19 @@ module.exports = { } }; + //Defaul Amazon handlers (some of them) + + handlers.NewSession = function () { + console.log(this.event.request); + }; + + handlers['AMAZON.HelpIntent'] = function () { + console.log ('Help intent'); + this.response + .speak (listOfPossibleQuestions) + .listen (constants.voiceResponseStrings.GENERIC_CONTINUE); //Phrase from listen doesn't work !!! + }; + //Default handlers for unknown questions and session close handlers.Unhandled = function () {