Created
August 10, 2012 04:52
-
-
Save stephenyeargin/3311153 to your computer and use it in GitHub Desktop.
Turn your Hubot into Bender
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Description: | |
| # Turn your Hubot into Bender | |
| # | |
| # Dependencies: | |
| # None | |
| # | |
| # Configuration: | |
| # None | |
| # | |
| # Commands: | |
| # hubot quote - Returns a random quote from @FuturamaQuotes | |
| # hubot - Say just its name for quotes from Bender | |
| # hubot kill all humans - What it wants to do | |
| # hubot <hate verb> - Sass the robot, see what happens | |
| # | |
| # Author: | |
| # stephenyeargin | |
| module.exports = (robot) -> | |
| # hubot quote - Returns a random quote from @FuturamaQuotes | |
| robot.respond /(quote|quotes)$/i, (msg) -> | |
| msg.http("http://api.twitter.com/1/statuses/user_timeline/futuramaquotes.json?count=100&include_rts=true") | |
| .get() (err, res, body) -> | |
| response = JSON.parse body | |
| if response[0] | |
| tweet = msg.random response | |
| msg.send tweet["text"] | |
| else | |
| msg.send "Awww, crap. Couldn't do it." | |
| # hubot kill all humans | |
| robot.respond /(kill all humans)$/i, (msg) -> | |
| killall_responses = | |
| [ | |
| "Now we're talking!", | |
| "Hey baby, wanna kill all humans?", | |
| "I came to Earth with a simple dream: To kill all humans. And this is how it must end!? Who's the real 600 ton giant monster here? Not I... Not... I... ", | |
| "We haven't killed a human in over 800 years, and _that_ was just a very sick Girl Scout.", | |
| "http://www.youtube.com/watch?v=SYmYbkdHCBE", | |
| ] | |
| msg.send msg.random killall_responses | |
| # hubot <hate verb> | |
| robot.respond /(stfu|die|suck|fuck|gtfo)(.*)$/i, (msg) -> | |
| hate_responses = [ | |
| "Why I outta ...", | |
| "Look, pal, you've only got one set of clothes and you're not taking them off while I'm here.", | |
| "You old lunatic, how ya been?", | |
| "Oh. Your. God.", | |
| "This is the worst kind of discrimination. The kind against me!", | |
| "Everybody's a jerk. You, me, this jerk.", | |
| "I hate the people that love me and they hate me.", | |
| "Do I preach to you while you're lying stoned in the gutter? No.", | |
| "Tempers are wearing thin. Let's hope some robot doesn't kill everybody.", | |
| "I'm gonna go build my own theme park! With blackjack and hookers! In fact, forget the park!", | |
| "Bite my shiny metal ass!", | |
| "Who are you, and why should I care?", | |
| "What do you mean 'we,' flesh-tube?", | |
| "What kind of party is this? There's no booze and only one hooker." | |
| ] | |
| msg.send msg.random hate_responses | |
| # hubot - If name of bot said by itself | |
| robot.respond '/.*/i', (msg) -> | |
| if msg.message.text.toUpperCase() != robot.name.toUpperCase() | |
| return | |
| self_responses = | |
| [ | |
| "What do youuuu want, meat bag?", | |
| "I didn't do nothin'!", | |
| "Welp. We're boned.", | |
| "zzzz Kill all humans... kill all humans... must kill all the humans.", | |
| "Bite my shiny metal ass.", | |
| "I can't. You should have called my cousin, Turner.", | |
| "Come on, let's deal. You'll have plenty of time to talk when you're poor.", | |
| "Ah, lets face it: Comedy's a dead art form. Now, tragedy... That's funny!", | |
| "Hey, wait! Gimme a do-over! My cheating chip malfunctioned!", | |
| "I assure you, I barely know the meaning of the word \"labor\".", | |
| "Hey, what kinda party is this? There's no booze and only one hooker.", | |
| "Well, let's get looting!", | |
| "Wait, wait, wait, wait. What is it you like best about me?", | |
| "I've never made anyone's life easier and you know it!", | |
| "It was a sacred tribute to my ancestral prototypes which happened to take the form of a drinking contest.", | |
| "I love this planet. I've got wealth, fame and access to the depths of sleaze that those things bring.", | |
| "Yeah. Would you kindly shut your noise hole?", | |
| "Yeah, but everybody's a jerk. You, me, this jerk.", | |
| "http://www.youtube.com/watch?v=sUQalyubXxU", | |
| ] | |
| msg.send msg.random self_responses |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment