question

newuser-3e932815-6b7b-4e10-b1d9-bf70b4a7cc3c avatar image

How to make my hendlers working and start the Alexa skill using presentation message (javascript)

how can I perform multiple functions that refer to different APIs? Also I would like that when I call my skill, it started with the presentation. But I can't do that, why?

const Alexa = require('alexa-sdk');const alexa_info = require('ask-sdk-core');

 exports.handler = (event, context) => {
        const alexa = Alexa.handler(event, context);
       const skillBuilder = alexa_info.SkillBuilders.custom();
         skillBuilder
        .addRequestHandlers(
        LaunchRequestHandler,
        GreetMeIntentHandler,
        EmailIntentHandler,
        MobileIntentHandler,
        HelpIntentHandler,
        CancelAndStopIntentHandler,
        SessionEndedRequestHandler
        )
        .addRequestInterceptors(RequestLog)
        .addResponseInterceptors(ResponseLog)
        .addErrorHandlers(ErrorHandler)
        .withApiClient(new alexa_info.DefaultApiClient())
        .lambda();
        
        alexa.APP_ID = APP_ID;
        alexa.registerHandlers(handlers);
        alexa.execute();
    };

and my launch Request is

        const LaunchRequest = {
      canHandle(handlerInput) {
        return handlerInput.requestEnvelope.request.type === 'LaunchRequest';
      },
      handle(handlerInput) {
        return handlerInput.responseBuilder.speak(messages.WELCOME)
            .reprompt(messages.HELP)       
            .reprompt(messages.WHAT_DO_YOU_WANT)
            .getResponse();
      },
    };
alexa skills kitalexaskill builderuserid
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

0 Answers