This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const GreetPersonIntentHandler = { | |
canHandle(handlerInput) { | |
return handlerInput.requestEnvelope.request.type === 'IntentRequest' | |
&& handlerInput.requestEnvelope.request.intent.name === 'GreetPersonIntent'; | |
}, | |
handle(handlerInput) { | |
//getting the slot value | |
let name = handlerInput.requestEnvelope.request.intent.slots.person.value; | |
const speechText = `Hello ${name}, good to meet you.`; | |
return handlerInput.responseBuilder |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const LaunchRequestHandler = { | |
canHandle(handlerInput) { | |
return handlerInput.requestEnvelope.request.type === ‘LaunchRequest’; | |
}, | |
handle(handlerInput) { | |
const speechText = ‘Welcome to your Greeter’; | |
return handlerInput.responseBuilder | |
.speak(speechText) | |
.getResponse(); | |
}, |