mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-14 18:43:31 +01:00
refactor: improve sweep performance
This commit is contained in:
@@ -16,8 +16,8 @@ class RESTManager {
|
|||||||
if (client.options.restSweepInterval > 0) {
|
if (client.options.restSweepInterval > 0) {
|
||||||
client.setInterval(() => {
|
client.setInterval(() => {
|
||||||
for (const handler in this.handlers) {
|
for (const handler in this.handlers) {
|
||||||
if (this.handlers[handler] && this.handlers[handler]._inactive) {
|
if (this.handlers[handler]._inactive) {
|
||||||
this.handlers[handler] = undefined;
|
delete this.handlers[handler];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}, client.options.restSweepInterval * 1000);
|
}, client.options.restSweepInterval * 1000);
|
||||||
|
|||||||
Reference in New Issue
Block a user