Skip to content

Instantly share code, notes, and snippets.

@garystafford
Last active August 14, 2018 00:48
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 garystafford/f8b72b815b5e0f3efe4a4b97c46f0733 to your computer and use it in GitHub Desktop.
Save garystafford/f8b72b815b5e0f3efe4a4b97c46f0733 to your computer and use it in GitHub Desktop.
const request = handlerInput.requestEnvelope.request;
let currentIntent = request.intent;
if (myNameValue === undefined) {
myNameValue = slotValue(request.intent.slots.myName);
}
if (!myNameValue) {
return handlerInput.responseBuilder
.addDelegateDirective(currentIntent)
.getResponse();
}
let myQuestionValue = slotValue(request.intent.slots.myQuestion);
if (!myQuestionValue) {
return handlerInput.responseBuilder
.addDelegateDirective(currentIntent)
.getResponse();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment