Skip to content
This repository
Fetching contributors…

Cannot retrieve contributors at this time

file 29 lines (27 sloc) 0.792 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
# Description
# random cat gifs as a service for your cat gif driven development
# source for the service: https://github.com/flores/moarcats
# most of the below is lifted from corgime.coffee
#
# Dependencies:
# None
#
# Configuration:
# None
#
# Commands:
# hubot moarcats me - links http://edgecats.net, which serves a random cat gif
# hubot moarcats bomb <n> - gives <n> cat gifs
#
# Author:
# flores

module.exports = (robot) ->
  robot.respond /moarcats me/i, (msg) ->
    msg.http("http://edgecats.net/random").get() (err, res, body) ->
      msg.send body

  robot.respond /moarcats bomb( (\d+))?/i, (msg) ->
    count = msg.match[2] || 5
    for cat in [1..count]
      msg.http("http://edgecats.net/random")
        .get() (err, res, body) ->
          msg.send body
Something went wrong with that request. Please try again.