mirror of
https://github.com/danbulant/discord.js
synced 2026-06-10 02:02:40 +00:00
Massively improve performance of message caching (#573)
This commit is contained in:
parent
f02cc27735
commit
dbda589088
1 changed files with 1 additions and 1 deletions
|
|
@ -166,7 +166,7 @@ class TextBasedChannel {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.messages.size >= maxSize) {
|
if (this.messages.size >= maxSize) {
|
||||||
this.messages.delete(Array.from(this.messages.keys())[0]);
|
this.messages.delete(this.messages.keys().next().value);
|
||||||
}
|
}
|
||||||
|
|
||||||
this.messages.set(message.id, message);
|
this.messages.set(message.id, message);
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue