class Options
extends
nullexport class Options extends null
Contains various utilities for client options.
staticreadonlyCacheWithLimitsOptions DefaultMakeCacheSettings :
The default settings passed to makeCache. The caches that this changes are:* MessageManager
- Limit to 200 messages If you want to keep default behavior and add on top of it you can use this object and add on to it, e.g. makeCache: Options.cacheWithLimits({ ...Options.DefaultMakeCacheSettings, ReactionManager: 0 })
staticreadonlySweeperOptions DefaultSweeperSettings :
The default settings passed to sweepers. The sweepers that this changes are:* threads
- Sweep archived threads every hour, removing those archived more than 4 hours ago If you want to keep default behavior and add on top of it you can use this object and add on to it, e.g. sweepers: { ...Options.DefaultSweeperSettings, messages: { interval: 300, lifetime: 600 } }
static cacheEverythingCacheFactory () :
Create a cache factory that always caches everything.
static cacheWithLimitssettings?: CacheWithLimitsOptions) : CacheFactory (
Create a cache factory using predefined settings to sweep or limit.
// Store up to 200 messages per channel and 200 members per guild, always keeping the client member.
Options.cacheWithLimits({
MessageManager: 200,
GuildMemberManager: {
maxSize: 200,
keepOverLimit: (member) => member.id === client.user.id,
},
});
static createDefaultClientOptions () :
The default client options.