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 GetTriviaIntentHandler = { | |
canHandle(handlerInput) { | |
return Alexa.getRequestType(handlerInput.requestEnvelope) === 'IntentRequest' | |
&& Alexa.getIntentName(handlerInput.requestEnvelope) === 'GetTriviaIntent'; | |
}, | |
handle(handlerInput) { | |
let factArr = [ | |
`Originally, Stan Lee wanted to make the Hulk grey, but due to issues with printing, they moved forward with the iconic green.`, | |
`Superman's first appearance was as a bald supervillain, bent on conquering the world.`, | |
`Bruce Wayne has an IQ of 192, beating out both Stephen Hawking and Albert Einstein.`, |
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 GamePlayIntentHandler = { | |
canHandle(handlerInput) { | |
return Alexa.getRequestType(handlerInput.requestEnvelope) === 'IntentRequest' | |
&& Alexa.getIntentName(handlerInput.requestEnvelope) === 'GamePlayIntent'; | |
}, | |
handle(handlerInput) { | |
const userAction = Alexa.getSlotValue(handlerInput.requestEnvelope, 'choice'); | |
let speakOutput = ''; |