I am developing a simple "skill" in Alexa where you ask her questions and the answers are "hardcode" in the code since they are fixed answers.
My question is the following: one of the Intents is activated with a phrase "Tell me the 9 rules of good behavior". The problem is that these rules are very long and the user can get bored quickly. What I want to do is that Alexa tells you the rules 1,2 and 3, and ask you, do you want to continue listening the rules?.
If you say yes, she tells you the following 3 rules, and so on.
If you say no, she goes back to the initial menu, the "Skill Invocation". It is possible to do that?. I tried to use slots, but I didn`t get what I wanted. I think is not the more logical way to use slots in this case.
Here is the code that I have for this intent:
class TheNineRulesIntentHandler(AbstractRequestHandler):
"""Handler for TheNineRulesIntent."""
def can_handle(self, handler_input):
# type: (HandlerInput) -> bool
return ask_utils.is_intent_name("TheNineRulesIntent")(handler_input)
def handle(self, handler_input):
# type: (HandlerInput) -> Response
speak_output = "The Nine Rules are:\
1. Long Text...\
2. Long Text...\
3. Long Text...\
4. Long Text...\
5. Long Text...\
6. Long Text...\
7. Long Text...\
8. Long Text...\
9. Long Text... "
return (
handler_input.response_builder
.speak(speak_output)
.ask(speak_output)
.response )
Thanks,
Jose