Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 1 addition & 15 deletions foodfact.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
// This sample demonstrates handling intents from an Alexa skill using the Alexa Skills Kit SDK (v2).
// Please visit https://alexa.design/cookbook for additional examples on implementing slots, dialog management,
// session persistence, api calls, and more.
const Alexa = require('ask-sdk-core');
const data = [
'Green, yellow, and red bell peppers are not actually the same vegetable.',
Expand Down Expand Up @@ -42,8 +39,7 @@ const FoodFactsHandler = {
return handlerInput.responseBuilder
.speak(speechText)
.reprompt(speechText)
//.reprompt('add a reprompt if you want to keep the session open for the user to respond')
.getResponse();
.getResponse();
}
};
const HelpIntentHandler = {
Expand Down Expand Up @@ -83,10 +79,6 @@ const SessionEndedRequestHandler = {
}
};

// The intent reflector is used for interaction model testing and debugging.
// It will simply repeat the intent the user said. You can create custom handlers
// for your intents by defining them above, then also adding them to the request
// handler chain below.
const IntentReflectorHandler = {
canHandle(handlerInput) {
return handlerInput.requestEnvelope.request.type === 'IntentRequest';
Expand All @@ -102,9 +94,6 @@ const IntentReflectorHandler = {
}
};

// Generic error handling to capture any syntax or routing errors. If you receive an error
// stating the request handler chain is not found, you have not implemented a handler for
// the intent being invoked or included it in the skill builder below.
const ErrorHandler = {
canHandle() {
return true;
Expand All @@ -120,9 +109,6 @@ const ErrorHandler = {
}
};

// This handler acts as the entry point for your skill, routing all request and response
// payloads to the handlers above. Make sure any new handlers or interceptors you've
// defined are included below. The order matters - they're processed top to bottom.
exports.handler = Alexa.SkillBuilders.custom()
.addRequestHandlers(
LaunchRequestHandler,
Expand Down