MajorKeys is a skill for Alexa and the Amazon Echo that recites one of DJ Khaled's keys to success whenever you feel they don't want you to win. It was inspired primarily by KhaledBot, a popular bot for Slack with the same function.
The skill itself is quite simple, selecting a random string from an array when the main intent is triggered. However, I attempted to design the voice interface in the most user-friendly way possible. For example, all of these requests (among others) are valid:
- tell MajorKeys to give me a major key to success
- ask MajorKeys for a major key to success
- ask MajorKeys to give me a key to success
- ask MajorKeys for a key to success
- ask MajorKeys for a major key
- ask MajorKeys for another one
- ask MajorKeys for another key
This was made possible by Matt Kruse's excellent alexa-app framework for developing Alexa skills in Node.js. It supports specifying utterances in a condensed pattern form that is iterated over to produce the final list. I highly recommend it if you're ever building skills in Node.js.