Skip to content

Instantly share code, notes, and snippets.

@lukaszlenart
Last active March 27, 2018 13:47
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 lukaszlenart/6569d03067ccb60bd0212c6c553b3c0e to your computer and use it in GitHub Desktop.
Save lukaszlenart/6569d03067ccb60bd0212c6c553b3c0e to your computer and use it in GitHub Desktop.
module.exports = (robot) ->
robot.respond /ping$/i, (msg) ->
msg.finish()
msg.send "pong!\nDo you want to play again?"
robot.respond /echo (.*)$/i, (msg) ->
msg.finish()
msg.send msg.match[1]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment