mirror of
https://github.com/danbulant/discord.js
synced 2026-07-06 11:40:41 +00:00
Webpack build for branch master: 55543754b9
This commit is contained in:
parent
a85022e3f3
commit
0abcaf1035
2 changed files with 8 additions and 8 deletions
|
|
@ -16133,8 +16133,8 @@ class RESTManager {
|
||||||
}
|
}
|
||||||
|
|
||||||
destroy() {
|
destroy() {
|
||||||
for (const handlerID in this.handlers) {
|
for (const handler of Object.values(this.handlers)) {
|
||||||
this.handlers[handlerID].destroy();
|
if (handler.destroy) handler.destroy();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -17616,8 +17616,8 @@ class WebSocketConnection extends EventEmitter {
|
||||||
*/
|
*/
|
||||||
this.ratelimit = {
|
this.ratelimit = {
|
||||||
queue: [],
|
queue: [],
|
||||||
remaining: 120,
|
remaining: 60,
|
||||||
resetTime: -1,
|
resetTimer: null,
|
||||||
};
|
};
|
||||||
this.connect(gateway);
|
this.connect(gateway);
|
||||||
|
|
||||||
|
|
@ -17726,10 +17726,10 @@ class WebSocketConnection extends EventEmitter {
|
||||||
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 === 120) {
|
||||||
this.ratelimit.resetTimer = setTimeout(() => {
|
this.ratelimit.resetTimer = this.client.setTimeout(() => {
|
||||||
this.ratelimit.remaining = 120;
|
this.ratelimit.remaining = 60;
|
||||||
this.processQueue();
|
this.processQueue();
|
||||||
}, 120e3); // eslint-disable-line
|
}, 120e3);
|
||||||
}
|
}
|
||||||
while (this.ratelimit.remaining > 0) {
|
while (this.ratelimit.remaining > 0) {
|
||||||
const item = this.ratelimit.queue.shift();
|
const item = this.ratelimit.queue.shift();
|
||||||
|
|
|
||||||
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