mirror of
https://github.com/danbulant/discord.js
synced 2026-06-06 00:02:52 +00:00
refactor: improve sweep performance
This commit is contained in:
parent
27a0f48441
commit
bd83bb9fd6
1 changed files with 2 additions and 2 deletions
|
|
@ -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);
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue