mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-10 16:43:31 +01:00
Merge branch 'rewrite-ratelimit-route-builder'
This commit is contained in:
@@ -14,7 +14,7 @@ class RequestHandler {
|
||||
}
|
||||
|
||||
get limited() {
|
||||
return this.queue.length === 0 || this.manager.globallyRateLimited || this.remaining <= 0;
|
||||
return this.manager.globallyRateLimited || this.remaining <= 0;
|
||||
}
|
||||
|
||||
set globallyLimited(limited) {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
module.exports = function burst() {
|
||||
if (this.limited) return;
|
||||
if (this.limited || this.queue.length === 0) return;
|
||||
this.execute(this.queue.shift())
|
||||
.then(this.handle.bind(this))
|
||||
.catch(({ timeout }) => {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
module.exports = function sequential() {
|
||||
if (this.busy || this.limited) return;
|
||||
if (this.busy || this.limited || this.queue.length === 0) return;
|
||||
this.busy = true;
|
||||
this.execute(this.queue.shift())
|
||||
.then(() => {
|
||||
|
||||
Reference in New Issue
Block a user