mirror of
https://github.com/danbulant/discord.js
synced 2026-07-07 12:11:11 +00:00
Teensy weensy cleanup
This commit is contained in:
parent
ab30715028
commit
74c3bae506
2 changed files with 2 additions and 6 deletions
|
|
@ -41,9 +41,7 @@ class BurstRequestHandler extends RequestHandler {
|
||||||
this.globalLimit = false;
|
this.globalLimit = false;
|
||||||
this.handle();
|
this.handle();
|
||||||
}, Number(res.headers['retry-after']) + this.restManager.client.options.restTimeOffset);
|
}, Number(res.headers['retry-after']) + this.restManager.client.options.restTimeOffset);
|
||||||
if (res.headers['x-ratelimit-global']) {
|
if (res.headers['x-ratelimit-global']) this.globalLimit = true;
|
||||||
this.globalLimit = true;
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
item.reject(err);
|
item.reject(err);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -61,9 +61,7 @@ class SequentialRequestHandler extends RequestHandler {
|
||||||
this.globalLimit = false;
|
this.globalLimit = false;
|
||||||
resolve();
|
resolve();
|
||||||
}, Number(res.headers['retry-after']) + this.restManager.client.options.restTimeOffset);
|
}, Number(res.headers['retry-after']) + this.restManager.client.options.restTimeOffset);
|
||||||
if (res.headers['x-ratelimit-global']) {
|
if (res.headers['x-ratelimit-global']) this.globalLimit = true;
|
||||||
this.globalLimit = true;
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
this.queue.shift();
|
this.queue.shift();
|
||||||
this.waiting = false;
|
this.waiting = false;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue