Skip to content

Commit

Permalink
Added script to approve or disapprove, complete with Roman emperor!
Browse files Browse the repository at this point in the history
  • Loading branch information
eliperkins committed May 22, 2012
1 parent 71c420a commit 84eb4b2
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions src/scripts/romanemperor.coffee
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Approve or disapprove of something
#
# <user> disapproves - Disapprove of something
# <user> approves - Approve of something
#
# Developed by One Mighty Roar - http://github.com/onemightyroar

module.exports = (robot) ->
robot.respond /@?([\w .-_]+) disapproves/i, (msg) ->
name = msg.match[1]
user = msg.message.user
firstname = user.name.toLowerCase().split(" ")[0]
if (firstname is name)
msg.send "http://i3.kym-cdn.com/photos/images/newsfeed/000/254/517/a70.gif"
else
msg.send firstname + ", stop pretending to be " + name


robot.respond /@?([\w .-_]+) approves/i, (msg) ->
name = msg.match[1]
user = msg.message.user
firstname = user.name.toLowerCase().split(" ")[0]
if (firstname is name)
msg.send "http://i1.kym-cdn.com/photos/images/newsfeed/000/254/655/849.gif"
else
msg.send firstname + ", stop pretending to be " + name

0 comments on commit 84eb4b2

Please sign in to comment.