Looking more at the Lambda function...
And... how to get those intents to actually work?
Shouldn't the Lambda function also be updated to use them?
I cannot find information on what to do.
It seems that there should be a pause... Alexa creates speechOutput, reading the random fact, asks "would you like another or to repeat this one" and acts on Next or Repeat or Stop utterances.
BUT HOW?!?!!
What do I insert, and where between the curley brackets do I insert it?
Pasting here straight from my Lambda function:
}, 'GetFact': function () {
// Get a random space flight fact from the space facts list
var factIndex = Math.floor(Math.random() * FACTS.length);
var randomFact = FACTS[factIndex];
// Create speech output
var speechOutput = "Here's your fun fact about space flight: " + randomFact;
this.emit(':tellWithCard', speechOutput, SKILL_NAME, randomFact)
},
Shouldn't there be three SOMETHINGs...
// Create speech output
var speechOutput = "Here's your fun fact about space flight: " + randomFact <SOMETHING_1> RIGHT HERE TO MAKE ALEXA ASK "want another" or "repeat";
this.emit(':tellWithCard', speechOutput, SKILL_NAME, randomFact)
And then should there be <SOMETHING_2>...
{
in another curley bracket section with
AMAZON.NextIntent
}
And should there also be <SOMETHING_3>...
{
in another curley bracket section with
AMAZON.RepeattIntent
}
If so, what's that look like?
},
'AMAZON.NextIntent': function () {
var speechOutput = "Would you like another Space Flight Fun Fact?";
since the logic for "Next" intent is actually the exact same as "GetFact"
how to "call GetFact" or "GOTO GetFact"?????????" or "just please read the next fact already, Alexa?"
or
do I repeat the GetFact logic right here in the NextIntent curley bracket section?!?!?!?;
},
?
And what to do to get Alexa to repeat the last Fun Fact when I say "Repeat," and not play the last song played? Is some slot management needed?
Where's the information on how to add the current Fun Fact to some slot such that the slot can be referenced by RepeatIntent?
Thanks,
Mike