Simulate built-in intents
This commit is contained in:
@@ -44,6 +44,7 @@ module.exports = {
|
||||
'ms"/>';
|
||||
}
|
||||
});
|
||||
listOfPossibleQuestions += 'If you dont know what to do, just say help or stop';
|
||||
|
||||
//Handler for launch requestconsole.log()
|
||||
handlers = {
|
||||
@@ -161,20 +162,20 @@ module.exports = {
|
||||
|
||||
//Built-In intents
|
||||
|
||||
handlers['AMAZON.CancelIntent'] = function () {
|
||||
handlers.CancelIntent = function () {
|
||||
console.log ('Cancel');
|
||||
this.reponse.speak ('Thank you for using Saburly');
|
||||
this.emit (':responseReady');
|
||||
};
|
||||
|
||||
handlers['AMAZON.HelpIntent'] = function () {
|
||||
handlers.HelpIntent = function () {
|
||||
console.log ('Help');
|
||||
this.response
|
||||
.speak (listOfPossibleQuestions)
|
||||
.listen (constants.voiceResponseStrings.GENERIC_CONTINUE); //Phrase from listen doesn't work !!!
|
||||
this.emit (':responseReady');
|
||||
};
|
||||
|
||||
handlers.HelpIntent = function (){
|
||||
console.log('Help');
|
||||
}
|
||||
|
||||
//Default handlers for unknown questions and session close
|
||||
|
||||
handlers.Unhandled = function () {
|
||||
|
||||
Reference in New Issue
Block a user