       return if reply == null
       return res.send "Latest poo: #{reply}"
 
-  robot.on 'connected', ->
+  robot.adapter.on 'connected', ->
     console.log("Connected event for poop tracker")
     setInterval ->
       checkRedisForShit()

redis_client.auth info.auth.split(":")[1] if info.auth

module.exports = (robot) ->
  console.log("Poop boot is #{robot.constructor.name} adapter: #{robot.adapter.send}")
  POO_TRACKER_KEY = "poops"
  POO_LATEST_KEY = "poops:latest_message"


      envelope.user = {}
      envelope.user.room = envelope.room = room
      envelope.user.type = 'groupchat'
      robot.adapter.send envelope, reply
      redis_client.set POO_LATEST_KEY, reply

  robot.respond /poo tracker( me)?/i, (res) ->
