Class

GuildManager

Guild cache and manager with fetch. Extends LimitedCollection so you can use `.get()`, `.set()`, `.filter()`, etc. FIFO-evicts (and cascades nested caches) when at the resolved `cache.guilds` limit.

Extends LimitedCollection

Constructor

new GuildManager(client: Client)
ParamTypeDescription
clientClient

Methods

delete(key: string): boolean

Remove a guild and cascade its channels / message caches. FIFO eviction uses `onEvict` instead (via `super.delete` in LimitedCollection).

ParamTypeDescription
keystring
fetch(guildId: string, options?: { force?: boolean; }): Promise<Guild>

Fetch a guild by ID. Returns the cached guild unless `force` is set, in which case REST metadata is applied via `_patch`.

ParamTypeDescription
guildIdstring
options?{ force?: boolean; }
resolve(guildId: string): Promise<Guild>

Get a guild from cache or fetch from the API if not present.

ParamTypeDescription
guildIdstring

Snowflake of the guild