Git Product home page Git Product logo

alexa-drag-race-skill's People

Contributors

calum avatar calum-cgi avatar daniels-sc avatar

Stargazers

 avatar  avatar

Watchers

 avatar

Forkers

daniels-sc

alexa-drag-race-skill's Issues

Add file to build/ which contains the following

When deploying a new version amazon require these fields:

  1. A short description
  2. A long description
  3. Three example questions

These should be set in a file which can easily be updated to make releases smoother.

error event{

View details in Rollbar: https://rollbar.com/calumforster/alexa-drag-race-skill/items/64/

error event{
  "type": "SessionEndedRequest",
  "requestId": "amzn1.echo-api.request.d3b161a4-8c8b-4506-bc2f-d3cbcfa84aa2",
  "timestamp": "2018-04-21T02:22:47Z",
  "locale": "en-US",
  "reason": "ERROR",
  "error": {
    "type": "INVALID_RESPONSE",
    "message": "An exception occurred while dispatching the request to the skill."
  }
}

error event{

View details in Rollbar: https://rollbar.com/calumforster/alexa-drag-race-skill/items/57/

error event{
  "type": "SessionEndedRequest",
  "requestId": "amzn1.echo-api.request.e118c30f-ee74-4cbc-8a60-89a983476821",
  "timestamp": "2018-02-07T19:54:46Z",
  "locale": "en-GB",
  "reason": "ERROR",
  "error": {
    "type": "INVALID_RESPONSE",
    "message": "Invalid SSML Output Speech for requestId amzn1.echo-api.request.2f3a0a73-fccc-4334-ad4f-8512b4adb9bb. Error: The audio is not of a supported MPEG version"
  }
}

Improve code coverage in three files

Tests should cover 100% of the code ideally. Write more tests to cover off any missing functions/lines of code for the following files:

  1. src/handlers.js
  2. src/main.js
  3. src/drag_race/tvdb_api.js
  4. src/drag_race/api.js

See these links to get code coverage reports:
https://codeclimate.com/github/calum/alexa-drag-race-skill/src/main.js
https://codeclimate.com/github/calum/alexa-drag-race-skill/src/handlers.js
https://codeclimate.com/github/calum/alexa-drag-race-skill/src/drag_race/tvdb_api.js
https://github.com/calum/alexa-drag-race-skill/issues/new

error event{

View details in Rollbar: https://rollbar.com/calumforster/alexa-drag-race-skill/items/62/

error event{
  "type": "SessionEndedRequest",
  "requestId": "amzn1.echo-api.request.491b97d0-b39b-4cbc-9056-0311ebd77934",
  "timestamp": "2018-02-22T00:58:18Z",
  "locale": "en-CA",
  "reason": "ERROR",
  "error": {
    "type": "INVALID_RESPONSE",
    "message": "An exception occurred while dispatching the request to the skill."
  }
}

error event{

View details in Rollbar: https://rollbar.com/calumforster/alexa-drag-race-skill/items/64/

error event{
  "type": "SessionEndedRequest",
  "requestId": "amzn1.echo-api.request.d3b161a4-8c8b-4506-bc2f-d3cbcfa84aa2",
  "timestamp": "2018-04-21T02:22:47Z",
  "locale": "en-US",
  "reason": "ERROR",
  "error": {
    "type": "INVALID_RESPONSE",
    "message": "An exception occurred while dispatching the request to the skill."
  }
}

error event{

View details in Rollbar: https://rollbar.com/calumforster/alexa-drag-race-skill/items/61/

error event{
  "type": "SessionEndedRequest",
  "requestId": "amzn1.echo-api.request.91928bbc-d8a9-4bc0-983d-7c358aaaa940",
  "timestamp": "2018-02-08T05:29:13Z",
  "locale": "en-IN",
  "reason": "ERROR",
  "error": {
    "type": "INVALID_RESPONSE",
    "message": "An exception occurred while dispatching the request to the skill."
  }
}

Fix error with all star seasons

Request:

{
  "session": {
    "new": false,
    "sessionId": "SessionId.78752953-f1c5-4dea-b73d-f7ccdd3a5d56",
    "application": {
      "applicationId": "amzn1.ask.skill.fb63dcb7-fdbf-457c-ad1e-614f084a7bfb"
    },
    "attributes": {},
    "user": {
      "userId": "amzn1.ask.account.AFWLHQHHME6UWKTLJR4H6UZZWZBNXIOXVXRKGAT452CANEGOU6CUTNYHOSA2IFKS7XWBDFC6JZNXSZV6FARFEUQKTWKXMLW2JVJJOOME6FWSVJCUJGWSP7RT7JEVC5AXHXDSX4UJ55MDVZJVA7XKTGKLKCLSXZEJKNTZDSRS4TCPEVRKNGIG6I26SCQCTG42JPWFJA4RRYGAVTI"
    }
  },
  "request": {
    "type": "IntentRequest",
    "requestId": "EdwRequestId.88e02369-fcb1-4270-ba1b-6927a2d410f6",
    "intent": {
      "name": "gettopthreefromseason",
      "slots": {
        "season_number": {
          "name": "season_number",
          "value": "all stars 2"
        }
      }
    },
    "locale": "en-GB",
    "timestamp": "2017-10-29T10:08:17Z"
  },
  "context": {
    "AudioPlayer": {
      "playerActivity": "IDLE"
    },
    "System": {
      "application": {
        "applicationId": "amzn1.ask.skill.fb63dcb7-fdbf-457c-ad1e-614f084a7bfb"
      },
      "user": {
        "userId": "amzn1.ask.account.AFWLHQHHME6UWKTLJR4H6UZZWZBNXIOXVXRKGAT452CANEGOU6CUTNYHOSA2IFKS7XWBDFC6JZNXSZV6FARFEUQKTWKXMLW2JVJJOOME6FWSVJCUJGWSP7RT7JEVC5AXHXDSX4UJ55MDVZJVA7XKTGKLKCLSXZEJKNTZDSRS4TCPEVRKNGIG6I26SCQCTG42JPWFJA4RRYGAVTI"
      },
      "device": {
        "supportedInterfaces": {}
      }
    }
  },
  "version": "1.0"
}

error:

2017-10-29T10:08:18.697Z 15eccebc-bc91-11e7-9e75-07a8cae71f4c TypeError: Cannot read property 'queens' of undefined
at /var/task/src/drag_race/api.js:183:34
at Request.request.get [as _callback] (/var/task/src/drag_race/api.js:14:12)
at Request.self.callback (/var/task/node_modules/request/request.js:186:22)
at emitTwo (events.js:106:13)
at Request.emit (events.js:191:7)
at Request.<anonymous> (/var/task/node_modules/request/request.js:1163:10)
at emitOne (events.js:96:13)
at Request.emit (events.js:188:7)
at IncomingMessage.<anonymous> (/var/task/node_modules/request/request.js:1085:12)
at IncomingMessage.g (events.js:292:16)

Handle the challenges won response better

Alexa reads undefined

{
  "version": "1.0",
  "response": {
    "outputSpeech": {
      "ssml": "<speak> Thorgy Thor has won 0 main challenges and 0 mini challenges: undefined </speak>",
      "type": "SSML"
    },
    "speechletResponse": {
      "outputSpeech": {
        "ssml": "<speak> Thorgy Thor has won 0 main challenges and 0 mini challenges: undefined </speak>"
      },
      "shouldEndSession": true
    }
  },
  "sessionAttributes": {}
}

error event{

View details in Rollbar: https://rollbar.com/calumforster/alexa-drag-race-skill/items/65/

error event{
  "type": "SessionEndedRequest",
  "requestId": "amzn1.echo-api.request.fd831364-3963-44b9-b71f-9b236fc8972e",
  "timestamp": "2018-06-04T08:57:07Z",
  "locale": "en-US",
  "reason": "ERROR",
  "error": {
    "type": "INVALID_RESPONSE",
    "message": "SpeechletResponse was null"
  }
}

error event{

View details in Rollbar: https://rollbar.com/calumforster/alexa-drag-race-skill/items/65/

error event{
  "type": "SessionEndedRequest",
  "requestId": "amzn1.echo-api.request.fd831364-3963-44b9-b71f-9b236fc8972e",
  "timestamp": "2018-06-04T08:57:07Z",
  "locale": "en-US",
  "reason": "ERROR",
  "error": {
    "type": "INVALID_RESPONSE",
    "message": "SpeechletResponse was null"
  }
}

add more questions to `intents.json`

Add a list of questions we want answered by the Alexa skill

Some potential new questions

most of these are taken from the reddit community feedback. I have no idea what some of them are...

  • Alexa, who did {queen} do for snatch game?
  • Alexa, who's after peppermint?
  • Alexa, were the fishnets ripped?
  • Alexa, who was the girl we knew she was?
  • Alexa, what's a DeLorean?
  • Alexa, do you wanna see my cucu again?
  • Alexa, who's that bitch that's on the top?
  • Alexa, did she done had herses yet?
  • Alexa, is that to men?
  • Alexa, do you know the signs of a brain aneurysm?
  • Alexa, who produces season 9?
  • Alexa, how's you head?

error event{

View details in Rollbar: https://rollbar.com/calumforster/alexa-drag-race-skill/items/58/

error event{
  "type": "SessionEndedRequest",
  "requestId": "amzn1.echo-api.request.566d1f15-c8df-4581-ab0e-f44688168261",
  "timestamp": "2018-02-07T20:22:29Z",
  "locale": "en-GB",
  "reason": "ERROR",
  "error": {
    "type": "INVALID_RESPONSE",
    "message": "An exception occurred while dispatching the request to the skill."
  }
}

error event{

View details in Rollbar: https://rollbar.com/calumforster/alexa-drag-race-skill/items/57/

error event{
  "type": "SessionEndedRequest",
  "requestId": "amzn1.echo-api.request.e118c30f-ee74-4cbc-8a60-89a983476821",
  "timestamp": "2018-02-07T19:54:46Z",
  "locale": "en-GB",
  "reason": "ERROR",
  "error": {
    "type": "INVALID_RESPONSE",
    "message": "Invalid SSML Output Speech for requestId amzn1.echo-api.request.2f3a0a73-fccc-4334-ad4f-8512b4adb9bb. Error: The audio is not of a supported MPEG version"
  }
}

Handle errors more gracefully

At the moment, if a drag queen isn't recognised the user get's no response.

Request:

{
  "session": {
    "new": true,
    "sessionId": "SessionId.433a2169-ec6a-40e4-bcb9-54556429a051",
    "application": {
      "applicationId": "amzn1.ask.skill.fb63dcb7-fdbf-457c-ad1e-614f084a7bfb"
    },
    "attributes": {},
    "user": {
      "userId": "amzn1.ask.account.AFWLHQHHME6UWKTLJR4H6UZZWZBNXIOXVXRKGAT452CANEGOU6CUTNYHOSA2IFKS7XWBDFC6JZNXSZV6FARFEUQKTWKXMLW2JVJJOOME6FWSVJCUJGWSP7RT7JEVC5AXHXDSX4UJ55MDVZJVA7XKTGKLKCLSXZEJKNTZDSRS4TCPEVRKNGIG6I26SCQCTG42JPWFJA4RRYGAVTI"
    }
  },
  "request": {
    "type": "IntentRequest",
    "requestId": "EdwRequestId.8cf30466-c645-42d8-b95e-441430e86574",
    "intent": {
      "name": "getseasonfromqueen",
      "slots": {
        "queen": {
          "name": "queen",
          "value": "is thorgy Thor"
        }
      }
    },
    "locale": "en-GB",
    "timestamp": "2017-10-28T23:13:43Z"
  },
  "context": {
    "AudioPlayer": {
      "playerActivity": "IDLE"
    },
    "System": {
      "application": {
        "applicationId": "amzn1.ask.skill.fb63dcb7-fdbf-457c-ad1e-614f084a7bfb"
      },
      "user": {
        "userId": "amzn1.ask.account.AFWLHQHHME6UWKTLJR4H6UZZWZBNXIOXVXRKGAT452CANEGOU6CUTNYHOSA2IFKS7XWBDFC6JZNXSZV6FARFEUQKTWKXMLW2JVJJOOME6FWSVJCUJGWSP7RT7JEVC5AXHXDSX4UJ55MDVZJVA7XKTGKLKCLSXZEJKNTZDSRS4TCPEVRKNGIG6I26SCQCTG42JPWFJA4RRYGAVTI"
      },
      "device": {
        "supportedInterfaces": {}
      }
    }
  },
  "version": "1.0"
}

Response:

The remote endpoint could not be called, or the response it returned was invalid.

Error message in logs:

2017-10-28T23:13:45.566Z a46aca2d-bc35-11e7-9291-77f9ca161688 TypeError: Cannot read property 'original' of undefined
at /var/task/src/drag_race/api.js:37:46
at Request.request.get [as _callback] (/var/task/src/drag_race/api.js:14:12)
at Request.self.callback (/var/task/node_modules/request/request.js:186:22)
at emitTwo (events.js:106:13)
at Request.emit (events.js:191:7)
at Request.<anonymous> (/var/task/node_modules/request/request.js:1163:10)
at emitOne (events.js:96:13)
at Request.emit (events.js:188:7)
at IncomingMessage.<anonymous> (/var/task/node_modules/request/request.js:1085:12)
at IncomingMessage.g (events.js:292:16)

error event{

View details in Rollbar: https://rollbar.com/calumforster/alexa-drag-race-skill/items/61/

error event{
  "type": "SessionEndedRequest",
  "requestId": "amzn1.echo-api.request.91928bbc-d8a9-4bc0-983d-7c358aaaa940",
  "timestamp": "2018-02-08T05:29:13Z",
  "locale": "en-IN",
  "reason": "ERROR",
  "error": {
    "type": "INVALID_RESPONSE",
    "message": "An exception occurred while dispatching the request to the skill."
  }
}

error event{

View details in Rollbar: https://rollbar.com/calumforster/alexa-drag-race-skill/items/58/

error event{
  "type": "SessionEndedRequest",
  "requestId": "amzn1.echo-api.request.566d1f15-c8df-4581-ab0e-f44688168261",
  "timestamp": "2018-02-07T20:22:29Z",
  "locale": "en-GB",
  "reason": "ERROR",
  "error": {
    "type": "INVALID_RESPONSE",
    "message": "An exception occurred while dispatching the request to the skill."
  }
}

error event{

View details in Rollbar: https://rollbar.com/calumforster/alexa-drag-race-skill/items/62/

error event{
  "type": "SessionEndedRequest",
  "requestId": "amzn1.echo-api.request.491b97d0-b39b-4cbc-9056-0311ebd77934",
  "timestamp": "2018-02-22T00:58:18Z",
  "locale": "en-CA",
  "reason": "ERROR",
  "error": {
    "type": "INVALID_RESPONSE",
    "message": "An exception occurred while dispatching the request to the skill."
  }
}

Handle all stars seasons better

At the moment, it is easy to error when asking about an all stars season

e.g.
who won all stars 2?

Request:

{
  "session": {
    "new": false,
    "sessionId": "SessionId.f7cb34fd-5142-4b48-a6a6-dc069c759e3a",
    "application": {
      "applicationId": "amzn1.ask.skill.fb63dcb7-fdbf-457c-ad1e-614f084a7bfb"
    },
    "attributes": {},
    "user": {
      "userId": "amzn1.ask.account.AFWLHQHHME6UWKTLJR4H6UZZWZBNXIOXVXRKGAT452CANEGOU6CUTNYHOSA2IFKS7XWBDFC6JZNXSZV6FARFEUQKTWKXMLW2JVJJOOME6FWSVJCUJGWSP7RT7JEVC5AXHXDSX4UJ55MDVZJVA7XKTGKLKCLSXZEJKNTZDSRS4TCPEVRKNGIG6I26SCQCTG42JPWFJA4RRYGAVTI"
    }
  },
  "request": {
    "type": "IntentRequest",
    "requestId": "EdwRequestId.3d3ccb5b-5711-4940-9dde-b729df1d9556",
    "intent": {
      "name": "getwinnerfromseason",
      "slots": {
        "season_number": {
          "name": "season_number",
          "value": "all stars 2"
        }
      }
    },
    "locale": "en-GB",
    "timestamp": "2017-10-28T23:18:24Z"
  },
  "context": {
    "AudioPlayer": {
      "playerActivity": "IDLE"
    },
    "System": {
      "application": {
        "applicationId": "amzn1.ask.skill.fb63dcb7-fdbf-457c-ad1e-614f084a7bfb"
      },
      "user": {
        "userId": "amzn1.ask.account.AFWLHQHHME6UWKTLJR4H6UZZWZBNXIOXVXRKGAT452CANEGOU6CUTNYHOSA2IFKS7XWBDFC6JZNXSZV6FARFEUQKTWKXMLW2JVJJOOME6FWSVJCUJGWSP7RT7JEVC5AXHXDSX4UJ55MDVZJVA7XKTGKLKCLSXZEJKNTZDSRS4TCPEVRKNGIG6I26SCQCTG42JPWFJA4RRYGAVTI"
      },
      "device": {
        "supportedInterfaces": {}
      }
    }
  },
  "version": "1.0"
}

Add intent to play a random quote from resources mp3 files

When a user says Alexa, ask Drag Race Facts for a quote we should play an mp3 audio file.

Here is an example from here:

const handlers = {
    'LaunchRequest' : function() {
        const speechOutput = 'Hello world!';
        const behavior = 'REPLACE_ALL';
        const url = 'https://url/to/audiosource';
        const token = 'myMusic';
        const expectedPreviousToken = 'expectedPreviousStream';
        const offsetInMilliseconds = 10000;
        this.response.speak(speechOutput)
                    .audioPlayerPlay(behavior, url, token, expectedPreviousToken, offsetInMilliseconds);
        this.emit(':responseReady');
    }
};

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.