From 70576a2fce64c939c6b8849a123c5f36582cad9d Mon Sep 17 00:00:00 2001 From: kiranrajput97 Date: Fri, 25 Oct 2019 00:34:24 +0530 Subject: [PATCH] performence improvements --- foodfact.js | 16 +--------------- 1 file changed, 1 insertion(+), 15 deletions(-) diff --git a/foodfact.js b/foodfact.js index 259aa3d..2cf581c 100644 --- a/foodfact.js +++ b/foodfact.js @@ -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.', @@ -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 = { @@ -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'; @@ -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; @@ -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,