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)| Param | Type | Description |
|---|---|---|
| client | Client |
Methods
delete
(key: string): booleanRemove a guild and cascade its channels / message caches. FIFO eviction uses `onEvict` instead (via `super.delete` in LimitedCollection).
| Param | Type | Description |
|---|---|---|
| key | string |
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`.
| Param | Type | Description |
|---|---|---|
| guildId | string | |
| options? | { force?: boolean; } |
resolve
(guildId: string): Promise<Guild>Get a guild from cache or fetch from the API if not present.
| Param | Type | Description |
|---|---|---|
| guildId | string | Snowflake of the guild |