No magic numbers

This commit is contained in:
GotPPay
2018-01-23 01:40:19 +01:00
parent b2386ea0d6
commit 97b6755f2f
2 changed files with 8 additions and 2 deletions

View File

@@ -31,6 +31,12 @@ constants.voiceResponseStrings = {
GENERIC_CONTINUE : 'Would you like to continue'
}
//Timing is given in [ms]
constats.voiceResponseTimings = {
PAUSE_BETWEEN_QUESTIONS : 650,
PAUSE_AFTER_WELCOME_MESSAGE : 650,
}
module.exports = constants;

View File

@@ -39,7 +39,7 @@ module.exports = {
listOfPossibleQuestions +=
intent.intentExplanation +
intent.questions[0] +
'<break time="1s"/>';
'<break time="'+constants.voiceResponseTimings.PAUSE_BETWEEN_QUESTIONS+'ms"/>';
}
});
@@ -53,7 +53,7 @@ module.exports = {
this.response
.speak (
activeSkill.invocationAnswer +
'<break time="650ms"/>' +
'<break time="'+constants.voiceResponseTimings.PAUSE_AFTER_WELCOME_MESSAGE+'ms"/>' +
listOfPossibleQuestions
)
.listen (constants.voiceResponseStrings.GENERIC_CONTINUE); //Phrase from listen doesn't work !!!