question

nullroar avatar image
nullroar asked

zero-knowledge Alexa dev: why does my intent response trigger on ANY input?

Hey folks,
I'm working on my very first Alexa app, and I've set up a basic HelloIntent with simple inputs that I want to trigger a response.

Right now, I'm getting the response for *ANYTHING* said within the app, however. Not simply the trigger intents.

I'm wondering if it's because I need a catch-all or some other response command so it doesn't default to the handlers. I'm still learning and don't know. Here's hoping someone can point out the flaw.

My basic Lambda code is as follows:

"use strict";

var Alexa = require("alexa-sdk");

var handlers = {
  "HelloIntent": function () {
    this.response.speak("Lorem Ipsum Dolor"); 
    this.emit(':responseReady');
  },
  "LaunchRequest": function () {
    this.response.speak("Rolod muspi merol"); 
    this.emit(':responseReady');
  }
};

exports.handler = function(event, context, callback){
  var alexa = Alexa.handler(event, context);
    alexa.registerHandlers(handlers);
    alexa.execute();
};
<br>
alexa skills kitintentsresponse
10 |5000

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

Tsuneki@Amazon avatar image
Tsuneki@Amazon answered

Hi nullroar,

Thanks for posting.

Could you post your skill ID for further investigation?

10 |5000

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

Irina Sergienya avatar image
Irina Sergienya answered

Hello. Could you please provide your skill model?

Also, try to add to the handler for Unhandled intent:

Unhandled': function () {
    this.emit(':ask', 'I haven't got this. Please try again', 'I haven't got this. Please try again);
}
10 |5000

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