Created
April 23, 2012 11:21
-
-
Save francois2metz/2470292 to your computer and use it in GitHub Desktop.
A simple hubot script @parisjs special node
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This is a simple hubot script | |
# | |
module.exports = (robot) -> | |
robot.respond /do you love javascript\?/i, (msg) -> | |
msg.send "Yes! But I prefer coffee-script." | |
msg.finish() | |
robot.hear /javascript/i, (msg) -> | |
msg.send "Do you want to say: #{msg.message.text.replace(/javascript/g, 'coffee-script')}" | |
robot.hear /is google down\?/i, (msg) -> | |
msg.http('http://www.google.fr/').get() (err, res, body) -> | |
msg.send "never, it's you." if res.statusCode == 200 | |
msg.send "maybe, but you should check the connection." if res.statusCode != 200 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment