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
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(guild):Guild | null
Resolves a GuildResolvable to a Guild object.
NameTypeOptionalDescription
guildGuildResolvableNoThe guild resolvable to identify
resolveId(guild):Snowflake | null
Resolves a GuildResolvable to a Guild id string.
NameTypeOptionalDescription
guildGuildResolvableNoThe guild resolvable to identify
valueOf():Collection<Key, 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