class GuildManager
extends
CachedManager<Snowflake, Guild, GuildResolvable>export class GuildManager extends CachedManager<Snowflake, Guild, GuildResolvable>Manages API methods for Guilds and stores their cache.
readonlycache : Collection<Key, Holds>
The cache of items for this manager.
Inherited from: DataManager
readonlyholds : Constructable<Holds>
The data structure belonging to this manager.
Inherited from: DataManager
create(options: GuildCreateOptions) : Promise<Guild>
options: GuildCreateOptions
Creates a guild. This is only available to bots in fewer than 10 guilds.
Returns: The guild that was created
Overload 1
Overload 2
fetch(options: Snowflake | FetchGuildOptions) : Promise<Guild>
options: Snowflake | FetchGuildOptions
Obtains one or multiple guilds from Discord, or the guild cache if it's already available.
fetchSoundboardSounds(options: FetchSoundboardSoundsOptions) : Promise<Collection<Snowflake, Collection<Snowflake, GuildSoundboardSound>>>
options: FetchSoundboardSoundsOptions
Fetches soundboard sounds for the specified guilds.
Examples:
// Fetch soundboard sounds for multiple guilds
const soundboardSounds = await client.guilds.fetchSoundboardSounds({
guildIds: ['123456789012345678', '987654321098765432'],
})
console.log(soundboardSounds.get('123456789012345678')); resolve(guild: GuildResolvable) : Guild | null
guild: GuildResolvable
Resolves a GuildResolvable to a Guild object.
resolveId(guild: GuildResolvable) : Snowflake | null
guild: GuildResolvable
Resolves a GuildResolvable to a Guild id string.
setIncidentActions(guild: GuildResolvableincidentActions: IncidentActionsEditOptions) : Promise<IncidentActions>
guild: GuildResolvable
incidentActions: IncidentActionsEditOptions
Sets the incident actions for a guild.
valueOf() : Collection<Key, Holds>
Inherited from: DataManager
widgetImageURL(guild: GuildResolvablestyle?: GuildWidgetStyle) : string
guild: GuildResolvable
style?: GuildWidgetStyle
Returns a URL for the PNG widget of a guild.