Last active
December 6, 2018 19:09
-
-
Save rmtuckerphx/4c5b4ef78c7fd52ea05109418876b96f to your computer and use it in GitHub Desktop.
Alexa Champion Tip 1
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
{ | |
"interactionModel": { | |
"languageModel": { | |
"invocationName": "champion tip", | |
"types": [ | |
], | |
"intents": [ | |
{ | |
"name": "AMAZON.CancelIntent", | |
"samples": [ | |
] | |
}, | |
{ | |
"name": "AMAZON.HelpIntent", | |
"samples": [ | |
] | |
}, | |
{ | |
"name": "AMAZON.StopIntent", | |
"samples": [ | |
"goodbye" | |
] | |
} | |
] | |
} | |
} | |
} |
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 CancelAndStopIntentHandler = { | |
canHandle(handlerInput) { | |
return handlerInput.requestEnvelope.request.type === 'IntentRequest' | |
&& (handlerInput.requestEnvelope.request.intent.name === 'AMAZON.CancelIntent' | |
|| handlerInput.requestEnvelope.request.intent.name === 'AMAZON.StopIntent'); | |
}, | |
handle(handlerInput) { | |
const speechText = 'Goodbye!'; | |
return handlerInput.responseBuilder | |
.speak(speechText) | |
.getResponse(); | |
}, | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment