close session after finishing intent
This commit is contained in:
@@ -61,7 +61,7 @@ module.exports = {
|
||||
'ms"/>' +
|
||||
'Would you like to hear list of questions that you can ask me'
|
||||
)
|
||||
.listen (constants.voiceResponseStrings.GENERIC_CONTINUE); //Phrase from listen doesn't work !!!
|
||||
.listen (constants.voiceResponseStrings.GENERIC_CONTINUE);
|
||||
this.attributes['LaunchRequestYesNo'] = true;
|
||||
this.emit (':responseReady');
|
||||
},
|
||||
@@ -121,14 +121,12 @@ module.exports = {
|
||||
answerPromise
|
||||
.then (answer => {
|
||||
this.response
|
||||
.speak (answer)
|
||||
.listen (constants.voiceResponseStrings.GENERIC_CONTINUE); //Phrase from listen doesn't work !!!
|
||||
.speak (answer);
|
||||
this.emit (':responseReady');
|
||||
})
|
||||
.catch (error => {
|
||||
this.response
|
||||
.speak (error)
|
||||
.listen (constants.voiceResponseStrings.GENERIC_CONTINUE); //Phrase from listen doesn't work !!!
|
||||
.speak (error);
|
||||
this.emit (':responseReady');
|
||||
});
|
||||
};
|
||||
@@ -242,7 +240,7 @@ module.exports = {
|
||||
}
|
||||
this.response
|
||||
.speak (listOfPossibleQuestions)
|
||||
.listen (constants.voiceResponseStrings.GENERIC_CONTINUE); //Phrase from listen doesn't work !!!
|
||||
.listen (constants.voiceResponseStrings.GENERIC_CONTINUE);
|
||||
this.emit (':responseReady');
|
||||
};
|
||||
|
||||
@@ -252,8 +250,7 @@ module.exports = {
|
||||
this.emit ('HelpIntent');
|
||||
} else {
|
||||
this.response
|
||||
.speak (constants.voiceResponseStrings.DIDNT_ASK_ANYTHING)
|
||||
.listen (constants.voiceResponseStrings.GENERIC_CONTINUE);
|
||||
.speak (constants.voiceResponseStrings.DIDNT_ASK_ANYTHING);
|
||||
this.emit (':responseReady');
|
||||
}
|
||||
};
|
||||
@@ -262,13 +259,11 @@ module.exports = {
|
||||
if (this.attributes['LaunchRequestYesNo']) {
|
||||
this.attributes['LaunchRequestYesNo'] = false;
|
||||
this.response
|
||||
.speak ('')
|
||||
.listen (constants.voiceResponseStrings.GENERIC_CONTINUE);
|
||||
.speak ('');
|
||||
this.emit (':responseReady');
|
||||
} else {
|
||||
this.response
|
||||
.speak (constants.voiceResponseStrings.DIDNT_ASK_ANYTHING)
|
||||
.listen (constants.voiceResponseStrings.GENERIC_CONTINUE);
|
||||
.speak (constants.voiceResponseStrings.DIDNT_ASK_ANYTHING);
|
||||
this.emit (':responseReady');
|
||||
}
|
||||
};
|
||||
@@ -277,14 +272,15 @@ module.exports = {
|
||||
|
||||
handlers.Unhandled = function () {
|
||||
this.response
|
||||
.speak (constants.voiceResponseStrings.QUESTION_NOT_FOUND)
|
||||
.listen (constants.voiceResponseStrings.GENERIC_CONTINUE);
|
||||
.speak (constants.voiceResponseStrings.QUESTION_NOT_FOUND);
|
||||
this.emit (':responseReady');
|
||||
};
|
||||
|
||||
//Session handlers
|
||||
|
||||
handlers.SessionEndedRequest = function () {
|
||||
//We don't care for now
|
||||
this.response.speak (`Thank you for using ${skillName}`);
|
||||
this.emit (':responseReady');
|
||||
};
|
||||
})
|
||||
.catch (e => {
|
||||
|
||||
1971
web/package-lock.json
generated
1971
web/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user