refactor: merge collections with keeping entries at max (#6242)

This commit is contained in:
1Computer1
2021-07-31 16:03:58 -04:00
committed by GitHub
parent a25e16599a
commit bb5e648f3d
9 changed files with 209 additions and 170 deletions

View File

@@ -12,6 +12,14 @@ const client = new Client({
makeCache: Options.cacheWithLimits({
MessageManager: 10,
PresenceManager: 10,
UserManager: {
maxSize: 1,
keepOverLimit: v => v.id === client.user.id,
},
GuildMemberManager: {
maxSize: 1,
keepOverLimit: v => v.id === client.user.id,
},
}),
});