mirror of
https://github.com/danbulant/discord.js
synced 2026-07-08 20:51:14 +00:00
Webpack build for branch master: 8b8a365e99
This commit is contained in:
parent
b8a8f0c2a9
commit
099c71131d
2 changed files with 5 additions and 3 deletions
|
|
@ -17652,6 +17652,7 @@ class WebSocketConnection extends EventEmitter {
|
||||||
this.ratelimit = {
|
this.ratelimit = {
|
||||||
queue: [],
|
queue: [],
|
||||||
remaining: 60,
|
remaining: 60,
|
||||||
|
total: 60,
|
||||||
resetTimer: null,
|
resetTimer: null,
|
||||||
};
|
};
|
||||||
this.connect(gateway);
|
this.connect(gateway);
|
||||||
|
|
@ -17760,9 +17761,9 @@ class WebSocketConnection extends EventEmitter {
|
||||||
processQueue() {
|
processQueue() {
|
||||||
if (this.ratelimit.remaining === 0) return;
|
if (this.ratelimit.remaining === 0) return;
|
||||||
if (this.ratelimit.queue.length === 0) return;
|
if (this.ratelimit.queue.length === 0) return;
|
||||||
if (this.ratelimit.remaining === 120) {
|
if (this.ratelimit.remaining === this.ratelimit.total) {
|
||||||
this.ratelimit.resetTimer = this.client.setTimeout(() => {
|
this.ratelimit.resetTimer = this.client.setTimeout(() => {
|
||||||
this.ratelimit.remaining = 60;
|
this.ratelimit.remaining = this.ratelimit.total;
|
||||||
this.processQueue();
|
this.processQueue();
|
||||||
}, 120e3);
|
}, 120e3);
|
||||||
}
|
}
|
||||||
|
|
@ -17846,6 +17847,7 @@ class WebSocketConnection extends EventEmitter {
|
||||||
this.packetManager.handleQueue();
|
this.packetManager.handleQueue();
|
||||||
this.ws = null;
|
this.ws = null;
|
||||||
this.status = Constants.Status.DISCONNECTED;
|
this.status = Constants.Status.DISCONNECTED;
|
||||||
|
this.ratelimit.remaining = this.ratelimit.total;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
2
discord.master.min.js
vendored
2
discord.master.min.js
vendored
File diff suppressed because one or more lines are too long
Loading…
Reference in a new issue