Permalink
Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
24 lines (18 sloc) 555 Bytes
# Description:
# Utility commands surrounding Hubot uptime.
#
# Commands:
# hubot ping - Reply with pong
# hubot echo <text> - Reply back with <text>
# hubot time - Reply with current time
# hubot die - End hubot process
module.exports = (robot) ->
robot.respond /PING$/i, (msg) ->
msg.send "PONG"
robot.respond /ECHO (.*)$/i, (msg) ->
msg.send msg.match[1]
robot.respond /TIME$/i, (msg) ->
msg.send "Server time is: #{new Date()}"
robot.respond /DIE$/i, (msg) ->
msg.send "Goodbye, cruel world."
process.exit 0