Yes and No intent dont work with dialog
This commit is contained in:
@@ -42,40 +42,21 @@ module.exports = {
|
||||
'<break time="1s"/>';
|
||||
}
|
||||
});
|
||||
console.log(listOfPossibleQuestions);
|
||||
|
||||
//Defaul Amazon handlers (some of them)
|
||||
|
||||
handlers.NewSession = function () {
|
||||
this.attributes['WaitingQuestions'] = false;
|
||||
};
|
||||
|
||||
handlers['YesIntent'] = function () {
|
||||
console.log("yes intent");
|
||||
if (this.attributes['WaitingQuestions']) {
|
||||
this.response
|
||||
.speak (listOfPossibleQuestions)
|
||||
.listen(constants.voiceResponseStrings.GENERIC_CONTINUE);
|
||||
this.emit(':responseReady');
|
||||
}
|
||||
};
|
||||
|
||||
handlers['NoIntent'] = function () {
|
||||
console.log("No intent");
|
||||
if (this.attributes['WaitingQuestions']) {
|
||||
this.attributes['WaitingQuestions'] = false;
|
||||
}
|
||||
};
|
||||
handlers.NewSession = function () {};
|
||||
|
||||
//Handler for launch request
|
||||
handlers = {
|
||||
LaunchRequest: function () {
|
||||
this.response
|
||||
.speak (activeSkill.invocationAnswer + '<break time="650ms"/> Would you like to hear possible questions ?')
|
||||
.speak (
|
||||
activeSkill.invocationAnswer +
|
||||
'<break time="650ms"/>' +
|
||||
listOfPossibleQuestions
|
||||
)
|
||||
.listen (constants.voiceResponseStrings.GENERIC_CONTINUE); //Phrase from listen doesn't work !!!
|
||||
|
||||
this.attributes['WantToHearQuestions'] = true;
|
||||
|
||||
this.emit (':responseReady');
|
||||
},
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user