This commit is contained in:
Erik 2022-05-13 11:06:24 +03:00
parent c762182e2a
commit 4eaefa3279
Signed by: Navy.gif
GPG Key ID: 811EC0CD80E7E5FB

View File

@ -63,7 +63,7 @@ class RateLimiter {
if (now - lastDelete < this.deleteInterval) {
const timeout = this.deleteTimeouts[channel.id];
if (!timeout || timeout._destroyed)
this.deleteTimeouts[channel.id] = setTimeout(this.delete.bind(this), this.deleteInterval * 1000, channel);
this.deleteTimeouts[channel.id] = setTimeout(this._delete.bind(this), this.deleteInterval * 1000, channel);
return;
}
this.lastDelete[channel.id] = now;
@ -76,7 +76,7 @@ class RateLimiter {
rejects.push(reject);
this.deleteQueue[channel.id].shift();
} else { // left over messages go in next batch
this.deleteTimeouts[channel.id] = setTimeout(this.delete.bind(this), this.deleteInterval * 1000, channel);
this.deleteTimeouts[channel.id] = setTimeout(this._delete.bind(this), this.deleteInterval * 1000, channel);
break;
}
}