Last active
August 24, 2019 21:49
-
-
Save monoceros-tech/0823115879e30635ec3d261471a984b7 to your computer and use it in GitHub Desktop.
Snippet de un handler de ejemplo de cómo dar al usuario tiempo a responder - juego (Veo Veo)
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 LaunchRequest_Handler = { | |
canHandle(handlerInput) { | |
const request = handlerInput.requestEnvelope.request; | |
return request.type === 'LaunchRequest'; | |
}, | |
handle(handlerInput) { | |
let response = handlerInput.responseBuilder; | |
let say = `Estamos en salón. `; | |
say += `Veo veo, ¿qué ves? una cosita, ¿qué cosita es? Empieza por la letra A `; | |
let reprompt = `Vamos, te doy más tiempo. Cuando se te ocurra la palabra, llámame y dime qué cosa crees que es... `; | |
reprompt += `<audio src="soundbank://soundlibrary/ui/gameshow/amzn_ui_sfx_gameshow_waiting_loop_30s_01"/>`; | |
reprompt += ` ¿Qué cosita es?`; | |
return response | |
.speak(say) | |
.reprompt(reprompt) | |
.getResponse(); | |
}, | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment