function handleRatelimit(?int $limit, ?int $remaining, ?float $resetTime) {
        return $this->get()->then(function ($data) use ($limit, $remaining, $resetTime) {
            if($limit === null && $remaining === null && $resetTime === null) {
                $limit = $data['limit'];
                $remaining = $data['remaining'] + 1; // there is no ratelimit...
                $resetTime = $data['resetTime'];
            } else {
                $limit = $limit ?? $data['limit'];
                $remaining = $remaining ?? $data['remaining'];
                $resetTime = $resetTime ?? $data['resetTime'];
            }
            
            if($remaining === 0 && $resetTime > \microtime(true)) {
                $this->api->client->emit('debug', 'Endpoint "'.$this->endpoint.'" ratelimit encountered, continueing in '.($resetTime - \microtime(true)).' seconds');
            }
            
            return $this->set(array('limit' => $limit, 'remaining' => $remaining, 'resetTime' => $resetTime));
        });
    }