Testing dialog handler

This commit is contained in:
GotPPay
2018-01-19 07:43:10 +01:00
parent a570640fe1
commit b07a9e21b3
2 changed files with 174 additions and 62 deletions

View File

@@ -53,19 +53,24 @@ module.exports = {
};
});
//Handler for sending message
handlers.SendMessageIntent = function () {
console.log("Dialog state : " + this.event.request.dialogState);
console.log("Intent object :");
console.log(this.event.request.intent);
};
//Default handlers for unknown questions and session close
handlers.Unhandled = function () {
this.response
.speak (constants.voiceResponseStrings.QUESTION_NOT_FOUND)
.listen (constants.voiceResponseStrings.GENERIC_CONTINUE);
}
};
handlers.SessionEndedRequest = function(){
handlers.SessionEndedRequest = function () {
//We don't care for now
}
};
})
.catch (e => {
//Something is wrong, skill is not ready, use catch-all intent to inform user