Class

GuildManager

Guild cache and manager with fetch. Extends Collection so you can use `.get()`, `.set()`, `.filter()`, etc.

Extends Collection

Constructor

new GuildManager(client: Client)
ParamTypeDescription
clientClient

Properties

maxSize: number (readonly)

Methods

fetch(guildId: string): Promise<Guild>

Fetch a guild by ID (returns cache if present).

ParamTypeDescription
guildIdstring
resolve(guildId: string): Promise<Guild>

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

ParamTypeDescription
guildIdstring

Snowflake of the guild

set(key: string, value: Guild): this

Set a guild in the cache (evicts oldest if at capacity).

ParamTypeDescription
keystring
valueGuild