Created
November 9, 2017 14:54
-
-
Save ageldama/4b96a47b762a507cccc5c6cae9fa6fdf to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| 'use strict'; | |
| const Alexa = require("alexa-sdk"); | |
| exports.handler = function(event, context, callback) { | |
| const alexa = Alexa.handler(event, context); | |
| alexa.registerHandlers(handlers); | |
| alexa.execute(); | |
| }; | |
| const handlers = { | |
| 'LaunchRequest': function () { | |
| }, | |
| 'HelloWithName': function () { | |
| var name = this.event.request.intent.slots.Name.value; | |
| this.response.speak('Hello, ' + name); | |
| this.emit(':responseReady'); | |
| }, | |
| 'AMAZON.HelpIntent': function () { | |
| }, | |
| 'AMAZON.CancelIntent': function () { | |
| }, | |
| 'AMAZON.StopIntent': function () { | |
| } | |
| }; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment