The user can ask Alexa for trivia related to heroes, and our Skill must be able to respond with that.

To achieve this, we are going to build a new handler. This handler will acknowledge that the user is asking for hero trivia and will give the trivia back to the user.

We’ll again follow the instructions step by step to complete the code and later copy it over to the Alexa console.

About HelloWorldIntentHandler

Notice that the HelloWorldIntentHandler is still in the code. Didn’t we delete HelloWorldIntent though?

Not entirely. While the intent is gone from the interaction model, the back-end handler is still present. We need a new handler, so let’s make things easier and reuse this handler for a new one called GetTriviaIntentHandler.

Get hands-on with 1200+ tech skills courses.