Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
const DatoCuriosoHandler = {
canHandle(handlerInput) {
return (
handlerInput.requestEnvelope.request.type === "IntentRequest" &&
handlerInput.requestEnvelope.request.intent.name === "datoCurioso"
)
},
handle(handlerInput) {
const speechText =
funFactsAboutFormula1[_.random(0, funFactsAboutFormula1.length)]
// "Este es un dato curioso"
return handlerInput.responseBuilder
.speak(speechText)
.reprompt(speechText)
.getResponse()
},
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.