Skip to content

Latest commit

 

History

History
37 lines (27 loc) · 789 Bytes

UPGRADING.md

File metadata and controls

37 lines (27 loc) · 789 Bytes

Upgrading Router for Alexa Skill Kit SDK v2

Upgrading to v2.0.0

Init Router with object containing all your request handlers.

Before:

const router = new Router(
  // list your request handlers here like you did it in skillBuilder.addRequestHandlers()
  SessionEndedRequestHandler,
  CancelIntentHandler,
  HelpIntentHandler,
  FallbackHandler,
);

After:

const router = new Router({
  // list your request handlers here like you did it in skillBuilder.addRequestHandlers()
  SessionEndedRequestHandler,
  CancelIntentHandler,
  HelpIntentHandler,
  FallbackHandler,
});

After that update you can use jumpTo(). This code will jump to HelpIntentHandler.

return await router.jumpTo(handlerInput, 'HelpIntentHandler');