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; } }