From 4eaefa32799b4e96018162ebc1f46a3ae5fa79cd Mon Sep 17 00:00:00 2001 From: "Navy.gif" Date: Fri, 13 May 2022 11:06:24 +0300 Subject: [PATCH] bugfix --- src/structure/client/RateLimiter.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/structure/client/RateLimiter.js b/src/structure/client/RateLimiter.js index 6bf4500..1650683 100644 --- a/src/structure/client/RateLimiter.js +++ b/src/structure/client/RateLimiter.js @@ -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; } }