Reputation: 133
Currently, you have to add intents manually by defining it in addRequestHandlers
Alexa.SkillBuilders.custom()
.addRequestHandlers(
LaunchRequestHandler
)
But is there a way How can I do it automatically for example in the loop? My intents will be in an array.
Upvotes: 1
Views: 204
Reputation: 481
If your intents are inside an array then can do something like below,
const intents = [
LaunchRequestHandler,
ByeIntentHandler,
CancelAndStopIntentHandler,
HelpIntentHandler,
ErrorHandler
];
let skill = Alexa.SkillBuilders.custom()
.addRequestHandlers(
...intents
)
.create();
Upvotes: 2