keep session open
This commit is contained in:
@@ -31,13 +31,15 @@ module.exports = {
|
|||||||
handlers = {};
|
handlers = {};
|
||||||
handlers = {
|
handlers = {
|
||||||
LaunchRequest: function () {
|
LaunchRequest: function () {
|
||||||
this.response.speak (activeSkill.invocationAnswer);
|
this.response.listen (activeSkill.invocationAnswer);// Using listen so session doesn't end
|
||||||
|
//TODO : Maybe to ask user does he want to hear possible intents
|
||||||
|
//For this functionality, we need explanation text for each intent (Question)
|
||||||
this.emit (':responseReady');
|
this.emit (':responseReady');
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
activeSkill.intents.map (intent => {
|
activeSkill.intents.map (intent => {
|
||||||
handlers[intent.intentName] = function () {
|
handlers[intent.intentName] = function () {
|
||||||
this.response.speak (intent.answer);
|
this.response.listen (intent.answer); //Using listen so session doesn't end
|
||||||
this.emit (':responseReady');
|
this.emit (':responseReady');
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user