I think this is related to slack adapter, hubot die message delivered ok when I run it in Shell but not with slack adapter.
my ping.coffee, I added a sleep function and call it to sleep 10 seconds before process.exit 0 but does not make any difference.
# Description:
# Utility commands surrounding Hubot uptime.
# hubot responds to "thank you" now
#
# Commands:
# hubot ping - Reply with pong
# hubot echo <text> - Reply back with <text>
# hubot time - Reply with current time
# hubot die - End hubot process
userCanKillMe = ['admin', 'Shell']
responseToThanks = ['You are welcome',
'My pleasure',
'Buy me a drink next time']
refuseToDie = ['Well, give me a reason',
'Why you want to kill me?',
'Are you sure?',
'Don\'t like me? I am only trying to help',
'Bored? find something else to do',
'You can\'t kill me!']
sleep = (ms) ->
start = new Date().getTime()
continue while new Date().getTime() - start < ms
module.exports = (robot) ->
robot.respond /thanks?\s*[a-zA-Z!\s]*$/i, (msg) ->
msg.send msg.random responseToThanks
robot.respond /PING$/i, (msg) ->
msg.send "PONG"
robot.respond /ADAPTER$/i, (msg) ->
msg.send robot.adapterName
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) ->
if msg.message.user.name in userCanKillMe
msg.send "I will be back ..."
sleep 10000
process.exit 0
else
msg.send msg.random refuseToDie