Preview environment

class GuildManager

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() : Promise<Guild>

Creates a guild. This is only available to bots in fewer than 10 guilds.

Returns: The guild that was created

Obtains one or multiple guilds from Discord, or the guild cache if it's already available.

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 | null

Resolves a GuildResolvable to a Guild object.

resolveId() : Snowflake | null

Resolves a GuildResolvable to a Guild id string.

setIncidentActions() : Promise<IncidentActions>

Sets the incident actions for a guild.

valueOf() : Collection<Key, Holds>

Inherited from: DataManager

widgetImageURL() : string

Returns a URL for the PNG widget of a guild.