mirror of
https://github.com/danbulant/discord.js
synced 2026-05-27 22:11:53 +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) {
|
||||
client.setInterval(() => {
|
||||
for (const handler in this.handlers) {
|
||||
if (this.handlers[handler] && this.handlers[handler]._inactive) {
|
||||
this.handlers[handler] = undefined;
|
||||
if (this.handlers[handler]._inactive) {
|
||||
delete this.handlers[handler];
|
||||
}
|
||||
}
|
||||
}, client.options.restSweepInterval * 1000);
|
||||
|
|
|
|||
Loading…
Reference in a new issue