Hackster is hosting Hackster Holidays, Ep. 6: Livestream & Giveaway Drawing. Watch previous episodes or stream live on Monday!Stream Hackster Holidays, Ep. 6 on Monday!
Michael Li
Created May 15, 2016 © Apache-2.0

Pick Up Lines

This app gives you 50 of the best pick up lines in the world, so that you can start a conversation with any girl that you see.

BeginnerFull instructions provided6 hours47
Pick Up Lines

Story

Read more

Code

Pick Up Lines

JavaScript
This is used to develop a Skill for Amazon Echo/Alexa.
/**
 * App ID for the skill
 */
var APP_ID = undefined; //replace with "amzn1.echo-sdk-ams.app.[your-unique-value-here]";
var LINES = [
    "Roses are red violets are blue, I didn’t know what perfect was until I met you.",
    "I just had to come talk with you. Sweetness is my weakness.",
    "Aside from being sexy, what do you do for a living?",
    "My mom thinks I`m gay, can you help me prove her wrong?",
    "Is Your Dad A Preacher? Because Girl You’re A Blessing.",
    "I’m no organ donor but I would be happy to give you my heart.",
    "You look familiar, didn’t we take a class together? I could’ve sworn we had chemistry.",
    "I don’t believe in love at first sight, but I’m willing to make an exception in your case.",
    "I didn't really believe in love at first sight, until I saw you.",
    "There’s only one thing I want to change about you. Your last name.",
    "Of all your beautiful curves, your smile is my favourite.",
    "Your smile lit up the room, so I just had to come over.",
    "You may fall from the sky, you may fall from a tree, but the best way to fall, is in love with me.",
    "There isn’t a word in the dictionary to describe how beautiful you are.",
    "I’m afraid of the dark. Will you sleep with me tonight?",
    "I lost my teddy bear, so can I sleep with you tonight?",
    "I know somebody who likes you but if I weren’t so shy, I would tell you who.",
    "I’ll treat you like my homework: Slam you on the table and do you all night long!",
    "Hi, will you help me find my lost puppy? I think he went into this hotel room across the street.",
    "Most people like to watch the Superbowl because it only happens once a year, but I would rather talk to you because the chance of meeting someone like you only happens once in a lifetime.",
    "Are you as beautiful on the inside as you are on the outside?",
    "You are hotter than the bottom of my laptop.",
    "Are you a vampire? Because you looked a little thirsty when you looked at me.",
    "Are you religious? Because you’re the answer to all my prayers.",
    "You like sleeping? Me too! We should do it together sometime.",
    "Are you a magician? Because whenever I look at you everyone else disappears.",
    "I was feeling a little bit off today, but you definitely turned me on.",
    "You must be a hell of a thief because you stole my heart from across the room."
];

/**
 * The AlexaSkill prototype and helper functions
 */
var AlexaSkill = require('./AlexaSkill');

/**
 *
 * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Introduction_to_Object-Oriented_JavaScript#Inheritance
 */
var PickUpLines = function () {
    AlexaSkill.call(this, APP_ID);
};

// Extend AlexaSkill
PickUpLines.prototype = Object.create(AlexaSkill.prototype);
PickUpLines.prototype.constructor = PickUpLines;

PickUpLines.prototype.eventHandlers.onSessionStarted = function (sessionStartedRequest, session) {
    console.log("PickUpLines onSessionStarted requestId: " + sessionStartedRequest.requestId
        + ", sessionId: " + session.sessionId);
    // any initialization logic goes here
};

PickUpLines.prototype.eventHandlers.onLaunch = function (launchRequest, session, response) {
    console.log("PickUpLines onLaunch requestId: " + launchRequest.requestId + ", sessionId: " + session.sessionId);
    handleNewFactRequest(response);
};

/**
 * Overridden to show that a subclass can override this function to teardown session state.
 */
PickUpLines.prototype.eventHandlers.onSessionEnded = function (sessionEndedRequest, session) {
    console.log("PickUpLines onSessionEnded requestId: " + sessionEndedRequest.requestId
        + ", sessionId: " + session.sessionId);
    // any cleanup logic goes here
};

PickUpLines.prototype.intentHandlers = {
    "GetNewFactIntent": function (intent, session, response) {
        handleNewFactRequest(response);
    },

    "AMAZON.HelpIntent": function (intent, session, response) {
        response.ask("You can ask Pick Up Lines give me a pick up line, or, you can say exit... What can I help you with?", "What can I help you with?");
    },

    "AMAZON.StopIntent": function (intent, session, response) {
        var speechOutput = "Goodbye";
        response.tell(speechOutput);
    },

    "AMAZON.CancelIntent": function (intent, session, response) {
        var speechOutput = "Goodbye";
        response.tell(speechOutput);
    }
};

/**
 * Gets a random new fact from the list and returns to the user.
 */
function handleNewFactRequest(response) {
    // Get a random space fact from the space facts list
    var factIndex = Math.floor(Math.random() * LINES.length);
    var fact = LINES[factIndex];

    // Create speech output
    var speechOutput = "Here's your pick up line: " + fact;

    response.tellWithCard(speechOutput, "PickUpLines", speechOutput);
}

// Create the handler that responds to the Alexa Request.
exports.handler = function (event, context) {
    // Create an instance of the SpaceGeek skill.
    var pickupLines = new PickUpLines();
    pickupLines.execute(event, context);
};

Credits

Michael Li

Michael Li

1 project • 0 followers
Co-founder of a technology blog, adn Founder of a technology-focused YouTube Channel.

Comments