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<Key, 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
optionsGuildCreateOptionsNo
Options 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 | FetchGuildOptionsNo
The guild's id or options
resolve(guild):Guild
Resolves a GuildResolvable to a Guild object.
NameTypeOptionalDescription
guildGuildResolvableNo
The guild resolvable to identify
resolveId(guild):Snowflake
Resolves a GuildResolvable to a Guild id string.
NameTypeOptionalDescription
guildGuildResolvableNo
The guild resolvable to identify
valueOf():Collection<Key, Holds>
widgetImageURL(guild, style?):string
Returns a URL for the PNG widget of a guild.
NameTypeOptionalDescription
guildGuildResolvableNo
The guild of the widget image
styleGuildWidgetStyleYes
The style for the widget image