Created
January 22, 2018 03:17
-
-
Save kenng/9e72afece4ab9bb725bfdfd42605963f to your computer and use it in GitHub Desktop.
alexa-hello-world
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
'use strict'; | |
const Alexa = require('alexa-sdk'); | |
const handlers = { | |
'LaunchRequest': function () { | |
this.emit('SayHello'); | |
}, | |
'HelloIntent': function () { | |
this.emit('SayHello'); | |
}, | |
'SayHello': function() { | |
this.response.speak("Hello, Awesome"); | |
this.emit(':responseReady'); | |
}, | |
'Unhandled': function() { | |
this.response.speak("Sorry, I have not programmed to understand this yet"); | |
this.emit(':responseReady'); | |
} | |
}; | |
exports.handler = function (event, context) { | |
const alexa = Alexa.handler(event, context); | |
alexa.registerHandlers(handlers); | |
alexa.execute(); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment