mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-18 20:43:30 +01:00
Massively improve performance of message caching (#573)
This commit is contained in:
committed by
Amish Shah
parent
f02cc27735
commit
dbda589088
@@ -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);
|
||||||
|
|||||||
Reference in New Issue
Block a user