mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-16 11:33:30 +01:00
feat(Util): add SweptCollection for auto sweeping of caches (#6110)
Co-authored-by: DTrombett <73136330+DTrombett@users.noreply.github.com> Co-authored-by: 1Computer1 <22125769+1Computer1@users.noreply.github.com> Co-authored-by: Antonio Román <kyradiscord@gmail.com> Co-authored-by: NotSugden <28943913+NotSugden@users.noreply.github.com> Co-authored-by: Shino <shinotheshino@gmail.com> Co-authored-by: SpaceEEC <24881032+SpaceEEC@users.noreply.github.com> Co-authored-by: Noel <icrawltogo@gmail.com> Co-authored-by: Vlad Frangu <kingdgrizzle@gmail.com>
This commit is contained in:
@@ -58,6 +58,12 @@ const client: Client = new Client({
|
||||
MessageManager: 200,
|
||||
// @ts-expect-error
|
||||
Message: 100,
|
||||
ThreadManager: {
|
||||
sweepInterval: require('./SweptCollection').filterByLifetime({
|
||||
getComparisonTimestamp: (e: any) => e.archiveTimestamp,
|
||||
excludeFromSweep: (e: any) => !e.archived,
|
||||
}),
|
||||
},
|
||||
}),
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user