Skip to content

Instantly share code, notes, and snippets.

@jjgrainger
Last active April 22, 2016 12:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jjgrainger/57d8f3cbe9a5579cc4937b0b439f3dd1 to your computer and use it in GitHub Desktop.
Save jjgrainger/57d8f3cbe9a5579cc4937b0b439f3dd1 to your computer and use it in GitHub Desktop.
Hubot bark script
# 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