Contains various utilities for client options.
Extends
nullThe 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 })
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 } }
Create a cache factory that always caches everything.
Create a cache factory using predefined settings to sweep or limit.
Example
Name | Type | Optional | Description |
---|---|---|---|
settings | CacheWithLimitsOptions | Yes | Settings passed to the relevant constructor. If no setting is provided for a manager, it uses Collection. If a number is provided for a manager, it uses that number as the max size for a LimitedCollection. If LimitedCollectionOptions are provided for a manager, it uses those settings to form a LimitedCollection. |
The default client options.