Interface CollectionLimitsOptions

Changing many of these may have the side effect of silently breaking various functionalities. Most of these are not intended to be changed, and are only exposed for advanced use cases.

For the options which accept a number and an object:

  • number: applies for all instances in which the limit would apply
  • object: dictionary of ids to limits. When setting limits, if the id is present, the specific number listed with that id will be used. Else, the default key will be used. If the default key is not present, whatever the default for that specific option is will be used.

See the Dictionary Key header for each option for what the id refers to.

Hierarchy

  • CollectionLimitsOptions

Properties

auditLogEntries?: number | Record<string, number>

The maximum number of audit log entries to keep cached. Entries are only cached if recieved via the GUILD_AUDIT_LOG_ENTRY_CREATE gateway event.

Dictionary Key

guild id

Default Value

50

autoModerationRules?: number | Record<string, number>

The maximum number of auto moderation rules to keep cached. Entries are only cached if fetched via REST, or recieved via the AUTO_MODERATION_RULE_CREATE/AUTO_MODERATION_RULE_UPDATE events.

Dictionary Key

guild id

Default Value

Infinity

channels?: number | Record<string, number>

The maximum number of guild channels to cache.

Dictionary Key

guild id

Default Value

Infinity

emojis?: number | Record<string, number>

The maximum number of guild emojis to cache.

Dictionary Key

guild id

Default Value

Infinity

groupChannels?: number

The maximum number of group channels to cache.

Default Value

10

guildThreads?: number | Record<string, number>

The maximum number of threads to cache per guild. Setting this too low might cause channels to have missing threads, as they all pull from the guild.

Dictionary Key

guild id

Default Value

Infinity

guilds?: number

The maximum number of guilds to cache.

Default Value

Infinity

Note

Changing this WILL silently break a lot of things which rely on caching.

integrations?: number | Record<string, number>

The maximum number of guild integrations to cache.

Dictionary Key

guild id

Default Value

Infinity

invites?: number | Record<string, number>

The maximum number of guild invites to cache.

Dictionary Key

guild id

Default Value

Infinity

members?: number | Record<string, number>

The maximum number of members to cache.

Note: If you request members from the gateway, this will be increased (on the specific guild) as needed to accommodate those members.

Dictionary Key

guild id

Default Value

Infinity

messages?: number | Record<string, number>

The maximum number of messages to cache.

Dictionary Key

channel id

Default Value

100

privateChannels?: number

The maximum number of private channels to cache.

Default Value

25

roles?: number | Record<string, number>

The maximum number of roles to cache.

Dictionary Key

guild id

Default Value

Infinity

scheduledEvents?: number | Record<string, number>

The maximum number of scheduled events to cache.

Dictionary Key

guild id

Default Value

Infinity

stageInstances?: number | Record<string, number>

The maximum number of stage instances to cache.

Dictionary Key

guild id

Default Value

Infinity

stickers?: number | Record<string, number>

The maximum number of guild stickers to cache.

Dictionary Key

guild id

Default Value

Infinity

unavailableGuilds?: number

The maximum number of unavailable guilds to cache.

Default Value

Infinity

Note

Changing this WILL break many things. The client may not even ready poperly.

users?: number

The maximum number of users to cache globally.

Default Value

Infinity

voiceMembers?: number | Record<string, number>

The maximum number of voice members to cache.

Dictionary Key

guild id

Default Value

Infinity

voiceStates?: number | Record<string, number>

The maximum number of voice states to cache.

Dictionary Key

guild id

Default Value

Infinity