Skip to content
This repository
Fetching contributors…

Octocat-spinner-32-eaf2f5

Cannot retrieve contributors at this time

file 36 lines (32 sloc) 0.976 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35
# Description:
# Approve or disapprove of something
#
# Dependencies:
# None
#
# Configuration:
# None
#
# Commands:
# hubot <user> disapproves - Disapprove of something
# hubot <user> approves - Approve of something
#
# Author:
# eliperkins

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
Something went wrong with that request. Please try again.