GuildManager

export class GuildManager extends CachedManager<Snowflake, Guild, GuildResolvable>
export class GuildManager extends CachedManager<Snowflake, Guild, GuildResolvable>
Manages API methods for Guilds and stores their cache.
Readonly
cache:Collection<K, Holds>
The cache of items for this manager.
Inherited from DataManager
Readonly
client:Client
The client that instantiated this Manager
Inherited from BaseManager
Readonly
holds:Constructable<Holds>
The data structure belonging to this manager.
Inherited from DataManager
create(options):Promise<Guild>
Creates a guild. This is only available to bots in fewer than 10 guilds.
Returns
The guild that was created
NameTypeOptionalDescription
optionsGuildCreateOptionsNoOptions for creating the guild
fetch(options):Promise<Guild>
Obtains one or multiple guilds from Discord, or the guild cache if it's already available.
NameTypeOptionalDescription
optionsSnowflake | FetchGuildOptionsNoThe guild's id or options
resolve(idOrInstance):Holds
Resolves a data entry to a data Object.
Returns
An instance from this Manager
NameTypeOptionalDescription
idOrInstanceHoldsNoThe id or instance of something in this Manager
resolveId(idOrInstance):K
Resolves a data entry to an instance id.
Returns
NameTypeOptionalDescription
idOrInstanceK | HoldsNoThe id or instance of something in this Manager
valueOf():Collection<K, Holds>
widgetImageURL(guild, style?):string
Returns a URL for the PNG widget of a guild.
NameTypeOptionalDescription
guildGuildResolvableNoThe guild of the widget image
styleGuildWidgetStyleYesThe style for the widget image