Implement help intent

This commit is contained in:
GotPPay
2018-01-23 01:56:07 +01:00
parent 370edd6ef0
commit 3202bf5f0b

View File

@@ -39,7 +39,9 @@ module.exports = {
listOfPossibleQuestions += listOfPossibleQuestions +=
intent.intentExplanation + intent.intentExplanation +
intent.questions[0] + intent.questions[0] +
'<break time="'+constants.voiceResponseTimings.PAUSE_BETWEEN_QUESTIONS+'ms"/>'; '<break time="' +
constants.voiceResponseTimings.PAUSE_BETWEEN_QUESTIONS +
'ms"/>';
} }
}); });
@@ -47,13 +49,22 @@ module.exports = {
handlers.NewSession = function () {}; 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 request
handlers = { handlers = {
LaunchRequest: function () { LaunchRequest: function () {
this.response this.response
.speak ( .speak (
activeSkill.invocationAnswer + activeSkill.invocationAnswer +
'<break time="'+constants.voiceResponseTimings.PAUSE_AFTER_WELCOME_MESSAGE+'ms"/>' + '<break time="' +
constants.voiceResponseTimings.PAUSE_AFTER_WELCOME_MESSAGE +
'ms"/>' +
listOfPossibleQuestions listOfPossibleQuestions
) )
.listen (constants.voiceResponseStrings.GENERIC_CONTINUE); //Phrase from listen doesn't work !!! .listen (constants.voiceResponseStrings.GENERIC_CONTINUE); //Phrase from listen doesn't work !!!