Preview deployment

class Options

extends

null
export class Options extends null

Contains various utilities for client options.

staticreadonly
DefaultMakeCacheSettings : CacheWithLimitsOptions

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 })

staticreadonly
DefaultSweeperSettings : SweeperOptions

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
cacheEverything() : CacheFactory

Create a cache factory that always caches everything.

static
cacheWithLimits() : CacheFactory

Create a cache factory using predefined settings to sweep or limit.

Examples:
// 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
createDefault() : ClientOptions

The default client options.