mirror of
https://github.com/r-ca/kidshift-skills.git
synced 2024-10-25 17:14:03 +00:00
wip
This commit is contained in:
parent
63a6054262
commit
6cd3df6ed2
|
@ -5,7 +5,6 @@
|
|||
"main": "index.js",
|
||||
"scripts": {
|
||||
"build": "tsc",
|
||||
"pjson": "ts-node ./src/tools/gen-package-json.ts > ./lambda/package.json",
|
||||
"clean": "rm -rf ./lambda/*"
|
||||
},
|
||||
"author": "Amazon Alexa",
|
||||
|
|
18
src/index.ts
18
src/index.ts
|
@ -43,6 +43,21 @@ const KidShiftAuthIntentHandler = {
|
|||
}
|
||||
};
|
||||
|
||||
|
||||
const KidShiftAuthIntentResutHandler = {
|
||||
canHandle(handlerInput: Alexa.HandlerInput) {
|
||||
return Alexa.getRequestType(handlerInput.requestEnvelope) === 'IntentRequest'
|
||||
&& Alexa.getIntentName(handlerInput.requestEnvelope) === 'KidShiftAuthIntent'
|
||||
&& Alexa.getDialogState(handlerInput.requestEnvelope) === 'COMPLETED';
|
||||
},
|
||||
async handle(handlerInput: Alexa.HandlerInput) {
|
||||
const speakOutput = 'Hello World!2';
|
||||
return handlerInput.responseBuilder
|
||||
.speak(speakOutput)
|
||||
.getResponse();
|
||||
}
|
||||
};
|
||||
|
||||
const HelpIntentHandler = {
|
||||
canHandle(handlerInput: Alexa.HandlerInput) {
|
||||
return Alexa.getRequestType(handlerInput.requestEnvelope) === 'IntentRequest'
|
||||
|
@ -136,7 +151,8 @@ exports.handler = Alexa.SkillBuilders.custom()
|
|||
FallbackIntentHandler,
|
||||
SessionEndedRequestHandler,
|
||||
IntentReflectorHandler,
|
||||
KidShiftAuthIntentHandler)
|
||||
KidShiftAuthIntentHandler,
|
||||
KidShiftAuthIntentResutHandler)
|
||||
.addErrorHandlers(
|
||||
ErrorHandler)
|
||||
.withPersistenceAdapter(new DynamoDBPersistantAttributesAdapter.DynamoDbPersistenceAdapter({
|
||||
|
|
Loading…
Reference in New Issue
Block a user