0

I'm trying to test my Alexa skill but I have a problem in this part of code :

const Alexa = require('alexa-sdk');
const alexa_info = require('ask-sdk-core');
//part 1
       exports.handler = alexa_info.SkillBuilders.custom()
      .addRequestHandlers(
        LaunchRequest,
        LaunchRequestHandler,
        GreetMeIntentHandler,
        EmailIntentHandler,
        MobileIntentHandler,
        HelpIntentHandler,
        CancelAndStopIntentHandler,
        SessionEndedRequestHandler
        )
        .addRequestInterceptors(RequestLog)
        .addResponseInterceptors(ResponseLog)
        .addErrorHandlers(ErrorHandler)
        .withApiClient(new alexa_info.DefaultApiClient())
        .lambda();
//part 2    
    exports.handler1 = (event, context) => {
        const alexa = Alexa.handler(event, context);
        alexa.APP_ID = APP_ID;
        alexa.registerHandlers(handlers,newSessionHandlers);
        alexa.execute();
    }

the two parts work individually but when I write the code segment to try to make them work together, I have problems. Can you help me?

0 Answers0