Last active
November 16, 2018 21:56
-
-
Save Dviejopomata/88885a7b8cb1f65ad84a1fe44b7a422b to your computer and use it in GitHub Desktop.
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 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