Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
module.exports = (robot) ->
robot.hear /^(halina)? (.+)/i, (msg) ->
msg.finish()
robot.logger.info "Catching: #{msg.match[2]}"
message = msg.message
message.done = false
message.text = message.text.replace(msg.match[1], robot.name)
robot.logger.info "Reroute message back to robot"
robot.receive message
return
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.