Of course Jan, sorry if Iām not explaining myself well.
Imagine that Intent1 is used to make a hotel reservation and Intent2 to confirm if you want to do anything else after the reservation.
Then, when we launch the application, the user says:
āI want to make a reservation tomorrowā and the assistant answers: āOkay. Do you need anything else?ā (Intent1).
The user answers: āNothing else, thank youā and the assistant answers: āHave a good day!ā (Intent2).
For that reason, I need both Intents to be executed because if I do that execution I get the following error:
Code:
ERR_NO_ROUTE
Message:
Could not find the route āINTENT_2_STATEā in your handler function.
if I can only execute one intent like this:
LAUNCH() {
return this.toStateIntent(āINTENT_1_STATEā, āIntent1ā);
},
I will have the error. That is why I had introduced the two intents in the app.setHandler().
If I have all the intents in the app.js file it doesnāt give me any error, but I wanted to refactor the code so that the app.js file wouldnāt be so big and so unreadable.
I hope you can understand me.
Regards.