Last active
April 22, 2016 12:29
-
-
Save jjgrainger/57d8f3cbe9a5579cc4937b0b439f3dd1 to your computer and use it in GitHub Desktop.
Hubot bark script
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
# all scripts are modules, a function which accepts the robot | |
module.exports = (robot) -> | |
# an array of random barks that bowie can make | |
barks = [ | |
'bark!', | |
'wooof!', | |
'grrrrroowwwll', | |
'meow?' | |
] | |
# when bowie hears the word 'bark' in a message | |
robot.hear /bark/i, (msg) -> | |
# reply with a random bark | |
msg.send msg.random barks |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment