Skip to content
This repository
Tom Bell June 09, 2012
file 23 lines (21 sloc) 0.43 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
# Description:
# Cowsay.
#
# Dependencies:
# None
#
# Configuration:
# None
#
# Commands:
# hubot cowsay <statement> - Returns a cow that says what you want
#
# Author:
# brettbuddin

module.exports = (robot) ->
  robot.respond /cowsay( me)? (.*)/i, (msg) ->
    msg
      .http("http://cowsay.morecode.org/say")
      .query(format: 'text', message: msg.match[2])
      .get() (err, res, body) ->
        msg.send body
Something went wrong with that request. Please try again.