I'm using STDLIB and Node.js to write an Alexa skill that delivers a random limerick. I want a flow like this:
User: Ask LimerickKid for a limerick.
Alexa skill fires, delivers limerick.
Alexa: Would you like another?
And then use the AMAZON.YesIntent and AMAZON.NoIntent to handle the request and refire the intent if Yes.
My problem is totally Noob. In my LimerickKid.js script, I can execute javascript fine to deliver the limerick. But when I execute this:
module.exports = function (slots, callback) {
return callback(null, TheLimerick);
}
Alexa delivers the limerick, and the session terminates. I can't execute any code after that. How do I fire that function and trigger Alexa to ask the user if they want another?