Skip to content

Instantly share code, notes, and snippets.

@ageldama
Created November 9, 2017 14:54
Show Gist options
  • Select an option

  • Save ageldama/4b96a47b762a507cccc5c6cae9fa6fdf to your computer and use it in GitHub Desktop.

Select an option

Save ageldama/4b96a47b762a507cccc5c6cae9fa6fdf to your computer and use it in GitHub Desktop.
'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