def online=(bool)
      notify = self.__send__("online?_unsynced") != bool && @monitored
      sync(:online?, bool, true)

      return unless notify
      if bool
        @bot.handlers.dispatch(:online, nil, self)
      else
        @bot.handlers.dispatch(:offline, nil, self)
      end
    end
def online=(bool)
      notify = self.__send__("online?_unsynced") != bool && @monitored
      sync(:online?, bool, true)

      return unless notify
      if bool
        @bot.handlers.dispatch(:online, nil, self)
      else
        @bot.handlers.dispatch(:offline, nil, self)
      end
    end
Updates the user's online state and dispatch the correct event.

 @since 2.0.0
 @return [void]
 @api private