This commit is contained in:
ろむねこ 2024-07-16 14:39:52 +09:00
parent e29e8fe5d0
commit c00f28be55
Signed by: Fujimatsu
GPG Key ID: FA1F39A1BA37D168

View File

@ -36,8 +36,14 @@ const KidShiftAuthIntentHandler = {
&& Alexa.getIntentName(handlerInput.requestEnvelope) === 'KidShiftAuthIntent';
},
handle(handlerInput: Alexa.HandlerInput) {
if (Alexa.getSlot(handlerInput.requestEnvelope, 'loginCode').value === undefined) {
return handlerInput.responseBuilder
.speak('Please provide a valid login code')
.reprompt('Please provide a valid login code')
.getResponse();
}
return handlerInput.responseBuilder
.speak('DEBUG: your auth code is ' + Alexa.getSlotValue(handlerInput.requestEnvelope, 'loginCode'))
.speak('your auth code is ' + Alexa.getSlotValue(handlerInput.requestEnvelope, 'loginCode'))
.getResponse();
}
};