Skip to content
This repository
Fetching contributors…

Octocat-spinner-32-eaf2f5

Cannot retrieve contributors at this time

file 22 lines (20 sloc) 0.447 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
# Description:
# Return random animated GIFs from giftv
#
# Dependencies:
# None
#
# Configuration:
# None
#
# Commands:
# hubot giftv me - Returns a random animated GIF
#
# Author:
# brettbuddin

module.exports = (robot) ->
  robot.respond /giftv( me)?$/i, (msg) ->
    msg
      .http('http://www.gif.tv/gifs/get.php')
      .get() (err, res, body) ->
        msg.send 'http://www.gif.tv/gifs/' + body + '.gif' || 'Could not compute.'
Something went wrong with that request. Please try again.