question

BiznessMan avatar image
BiznessMan asked

Need help with the :ask emit

I am doing a modification of the Space Geek skill and after it says one of the facts (jokes in my case), I have it say "Do you want to hear another one?"

I have utterances for the stop intent (no, nope, etc) and in the simulator this works. I also have utterances defined for yes, yeah, etc that repeats the function with a new randomly selected joke. My problem is, if I say any random word that isn't defined in my utterances, it will repeat the function as if I said yes. Here is what my this.emit looks like

this.emit(':ask', speechOutput, repromptSpeech);

How can I make it respond to something that is not defined so I can have it instruct me to say a supported phrase?

alexa skills kitskillhelpintents
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Brian@Amazon avatar image
Brian@Amazon answered
How do you have the handlers defined for yes/no. It seems like you are asking correctly, but you are possibly not handling the responses properly.
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Matthew avatar image
Matthew answered

BiznessMan, are you using custom slots or do you have a bunch of utterance lines?

If you are using custom slots for yes/no, you could verify that the value the slot sends to your skill is one of the values you support and if it is not, respond with your supported phrases instructions.

10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.