Skip to content

Instantly share code, notes, and snippets.

@farhadnowzari
Created March 28, 2023 07:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save farhadnowzari/b16f041128f7ecf007a5aa5f0c28a925 to your computer and use it in GitHub Desktop.
Save farhadnowzari/b16f041128f7ecf007a5aa5f0c28a925 to your computer and use it in GitHub Desktop.
HelloWorldIntentHandler
const HelloWorldIntentHandler = {
canHandle(handlerInput) {
return Alexa.getRequestType(handlerInput.requestEnvelope) === 'IntentRequest'
&& Alexa.getIntentName(handlerInput.requestEnvelope) === 'HelloWorldIntent';
},
handle(handlerInput) {
const speakOutput = 'Hello World!';
return handlerInput.responseBuilder
.speak(speakOutput)
//.reprompt('add a reprompt if you want to keep the session open for the user to respond')
.getResponse();
}
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment