This commit is contained in:
ろむねこ 2024-07-16 11:47:38 +09:00
parent 721ff5ba29
commit 0d97c04337
Signed by: Fujimatsu
GPG Key ID: FA1F39A1BA37D168

View File

@ -44,24 +44,23 @@ const HelloWorldIntentHandler = {
const KidShiftAuthIntentHandler = {
canHandle(handlerInput: Alexa.HandlerInput) {
return (Alexa.getRequestType(handlerInput.requestEnvelope) === 'IntentRequest')
|| (Alexa.getRequestType(handlerInput.requestEnvelope) === 'KidShiftAuthIntent');
return (Alexa.getRequestType(handlerInput.requestEnvelope) === 'IntentRequest') && (Alexa.getRequestType(handlerInput.requestEnvelope) === 'KidShiftAuthIntent');
},
handle(handlerInput: Alexa.HandlerInput) {
// dialogStateを取得
const dialogState = Alexa.getDialogState(handlerInput.requestEnvelope);
// dialogStateがCOMPLETEDでない場合は、処理を続行
console.log("Dialog state is " + dialogState);
if (dialogState !== 'COMPLETED') {
return handlerInput.responseBuilder
.addDelegateDirective()
.getResponse();
}
// // dialogStateを取得
// const dialogState = Alexa.getDialogState(handlerInput.requestEnvelope);
//
// // dialogStateがCOMPLETEDでない場合は、処理を続行
//
// console.log("Dialog state is " + dialogState);
//
// if (dialogState !== 'COMPLETED') {
// return handlerInput.responseBuilder
// .addDelegateDirective()
// .getResponse();
// }
//
// LOGIN_CODEスロットの値を取得
const loginCode = Alexa.getSlotValue(handlerInput.requestEnvelope, 'loginCode');