Skip to content

Instantly share code, notes, and snippets.

@matthewsimo
Last active December 15, 2015 16:59
Show Gist options
  • Select an option

  • Save matthewsimo/5293411 to your computer and use it in GitHub Desktop.

Select an option

Save matthewsimo/5293411 to your computer and use it in GitHub Desktop.
Levo script for patting people on the back.
# Allow Hubot to brighten someone\'s day.
#
# Commands:
# comp <name/me> - Give person a compliment!
# compliment <name/me> - Give person a compliment!
# Compliment data taken from http://emergencycompliment.com/ - thanks!
compliments = [
"Your prom date still thinks about you all the time.",
"All your friends worry they aren\u2019t as funny as you.",
"Your boss loved that thing you did at work today.",
"Your blog is the best blog.",
"People at trivia night are terrified of you.",
"Those shoes were a great call. ",
"Hey, did you lose weight? (not that you needed to!)",
"You are the most charming person in a 50 mile vicinity.",
"Everyone was super jealous of your SAT score.",
"You chuckle at the New York Times Sunday crossword (sorry Will Shortz).",
"Mensa would be so lucky.",
"All the 6th graders agreed, your baking soda volcano was the best at the science fair.",
"I would totally trust you to dog-sit for a long weekend.",
"9/10 dentists agree, you are the BEST.",
"Your voice sounds like a thousand cats purring. Also, I'm on acid.",
"Today's outfit = Thumbs up.",
"Every other country is super jealous you're a citizen in this country.",
"Your hair looks great today. It also looked really good two days ago.",
"I want to kiss you. I hope that's not too forward of me.",
"That song was definitely written for you.",
"You're not crazy, they are 100% into you.",
"Your parents are more proud of you than you'll ever know.",
"Rumor is Disney is basing its next cartoon on you.",
"You actually looked super graceful that time you tripped in front of everyone.",
"Your sneezes sound like a chorus of angels giggling.",
"You don't get drunk, you get superhuman.",
"You could be an astronaut if you wanted. NASA told me so.",
"I'm not telling you what to do, but you could pull off orange corduroy.",
"Your hair smells like freshly cut grass.",
"Your pet loves you too much to ever run away.",
"No one has ever thought your feet look gross.",
"They've never told you this, but your boss is really impressed by you.",
"Your cousins refer to you as \"the cool cousin\".",
"The kid you passed on the street today wants to grow up to be like you.",
"Your dental hygiene is impeccable. ",
"You're as sweet as a can of artificially flavored diet soda.",
"Everyone was cool with that time you peed in the shower.",
"You pick the best radio stations when you're riding shotgun.",
"You think of the funniest names for wi-fi connections.",
"Keep walking around naked. Your neighbors are into it.",
"You have the power to start and WIN a dance-off.",
"You've never had morning breath. I swear.",
"Your senior portrait was the best.",
"8 out of 10 co-workers agree, your desk is the cleanest. ",
"You'd be the last one standing in a horror movie.",
"You're a benevolent tipper.",
"You're the best at making cereal.",
"Your parents aren't worried about you.",
"You're funny. Like, LOL style.",
];
randomItem = () ->
compliments[Math.floor((Math.random() * compliments.length)+1)]
calculateCompliment = (person) ->
person = person || "Yo"
"#{person}, my algorithms are calculating the most apt compliment:\n#{randomItem()}"
module.exports = (robot) ->
robot.respond /(comp)(liment)?([ \t]*)?(.*)?/i, (msg) ->
person = msg.match[4] || msg.message.user.name
if(person.toLowerCase() is 'me')
person = msg.message.user.name
msg.send calculateCompliment(person)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment