Represents a guild (or a server) on Discord. It's recommended to see if a guild is available before performing operations or reading data from it. You can check this with available.
Extends
AnonymousGuildThe approximate amount of members the guild has You will need to fetch the guild using if you want to receive this parameter
The approximate amount of presences the guild has You will need to fetch the guild using if you want to receive this parameter
Whether the guild is available to access. If it is not available, it indicates a server outage
The hash of the guild banner
Inherited from AnonymousGuildThe time this guild was created at
Inherited from BaseGuildThe timestamp this guild was created at
Inherited from BaseGuildThe description of the guild, if any
Inherited from AnonymousGuildAn array of features available to this guild
Inherited from BaseGuildThe icon hash of this guild
Inherited from BaseGuildThe maximum amount of presences the guild can have (this is
null
for all but the largest of guilds) You will need to fetch the guild using if you want to receive this parameterThe maximum amount of users allowed in a stage video channel.
The name of this guild
Inherited from BaseGuildThe acronym that shows up in place of a guild icon
Inherited from BaseGuildThe NSFW level of this guild
Inherited from AnonymousGuildWhether this guild is partnered
Inherited from BaseGuildThe hash of the guild invite splash image
Inherited from AnonymousGuildThe vanity invite code of the guild, if any
Inherited from AnonymousGuildThe use count of the vanity URL code of the guild, if any You will need to fetch this parameter using fetchVanityData if you want to receive it
The verification level of the guild
Inherited from AnonymousGuildWhether this guild is verified
Inherited from BaseGuildThe voice state adapter for this guild that can be used with discordjs/voice to play audio in voice and stage channels.
The URL to this guild's banner.
Returns
Name | Type | Optional | Description |
---|---|---|---|
options | ImageURLOptions | Yes | Options for the image URL |
Creates a template for the guild.
Name | Type | Optional | Description |
---|---|---|---|
name | string | No | The name for the template |
description | string | Yes | The description for the template |
Deletes the guild.
Sets whether this guild's invites are disabled.
Name | Type | Optional | Description |
---|---|---|---|
disabled | boolean | Yes | Whether the invites are disabled |
The URL to this guild's discovery splash image.
Returns
Name | Type | Optional | Description |
---|---|---|---|
options | ImageURLOptions | Yes | Options for the image URL |
Updates the guild with new information - e.g. a new name.
Name | Type | Optional | Description |
---|---|---|---|
options | GuildEditOptions | No | The options to provide |
Edits the guild onboarding data for this guild.
Name | Type | Optional | Description |
---|---|---|---|
options | GuildOnboardingEditOptions | No | The options to provide |
Updates the guild's welcome screen
Name | Type | Optional | Description |
---|---|---|---|
options | WelcomeScreenEditOptions | No | The options to provide |
Whether this guild equals another guild. It compares all properties, so for most operations it is advisable to just compare
guild.id === guild2.id
as it is much faster and is often what most users need.Name | Type | Optional | Description |
---|---|---|---|
guild | Guild | No | The guild to compare with |
Fetches this guild.
Inherited from BaseGuildFetches audit logs for this guild.
Name | Type | Optional | Description |
---|---|---|---|
options | GuildAuditLogsFetchOptions<T> | Yes | Options for fetching audit logs |
Fetches a collection of integrations to this guild. Resolves with a collection mapping integrations by their ids.
Fetches the guild onboarding data for this guild.
Fetches the owner of the guild. If the member object isn't needed, use ownerId instead.
Name | Type | Optional | Description |
---|---|---|---|
options | BaseFetchOptions | Yes | The options for fetching the member |
Obtains a guild preview for this guild from Discord.
Fetches a collection of templates from this guild. Resolves with a collection mapping templates by their codes.
Fetches the vanity URL invite object to this guild. Resolves with an object containing the vanity URL invite code and the use count
Fetches all webhooks for the guild.
Fetches the welcome screen for this guild.
Fetches the guild widget data, requires the widget to be enabled.
Fetches the guild widget settings.
The URL to this guild's icon.
Returns
Name | Type | Optional | Description |
---|---|---|---|
options | ImageURLOptions | Yes | Options for the image URL |
Leaves the guild.
Edits the AFK channel of the guild.
Name | Type | Optional | Description |
---|---|---|---|
afkChannel | VoiceChannelResolvable | null | No | The new AFK channel |
reason | string | Yes | Reason for changing the guild's AFK channel |
Edits the AFK timeout of the guild.
Name | Type | Optional | Description |
---|---|---|---|
afkTimeout | number | No | The time in seconds that a user must be idle to be considered AFK |
reason | string | Yes | Reason for changing the guild's AFK timeout |
Sets a new guild banner.
Name | Type | Optional | Description |
---|---|---|---|
banner | BufferResolvable | Base64Resolvable | null | No | The new banner of the guild |
reason | string | Yes | Reason for changing the guild's banner |
Edits the setting of the default message notifications of the guild.
Name | Type | Optional | Description |
---|---|---|---|
defaultMessageNotifications | GuildDefaultMessageNotifications | null | No | The new default message notification level of the guild |
reason | string | Yes | Reason for changing the setting of the default message notifications |
Sets a new guild discovery splash image.
Name | Type | Optional | Description |
---|---|---|---|
discoverySplash | BufferResolvable | Base64Resolvable | null | No | The new discovery splash image of the guild |
reason | string | Yes | Reason for changing the guild's discovery splash image |
Edits the level of the explicit content filter.
Name | Type | Optional | Description |
---|---|---|---|
explicitContentFilter | GuildExplicitContentFilter | null | No | The new level of the explicit content filter |
reason | string | Yes | Reason for changing the level of the guild's explicit content filter |
Sets a new guild icon.
Name | Type | Optional | Description |
---|---|---|---|
icon | BufferResolvable | Base64Resolvable | null | No | The new icon of the guild |
reason | string | Yes | Reason for changing the guild's icon |
Sets the guild's MFA level An elevated MFA level requires guild moderators to have 2FA enabled.
Name | Type | Optional | Description |
---|---|---|---|
level | GuildMFALevel | No | The MFA level |
reason | string | Yes | Reason for changing the guild's MFA level |
Edits the name of the guild.
Name | Type | Optional | Description |
---|---|---|---|
name | string | No | The new name of the guild |
reason | string | Yes | Reason for changing the guild's name |
Sets a new owner of the guild.
Name | Type | Optional | Description |
---|---|---|---|
owner | GuildMemberResolvable | No | The new owner of the guild |
reason | string | Yes | Reason for setting the new owner |
Edits the preferred locale of the guild.
Name | Type | Optional | Description |
---|---|---|---|
preferredLocale | Locale | null | No | The new preferred locale of the guild |
reason | string | Yes | Reason for changing the guild's preferred locale |
Edits the enabled state of the guild's premium progress bar
Name | Type | Optional | Description |
---|---|---|---|
enabled | boolean | Yes | The new enabled state of the guild's premium progress bar |
reason | string | Yes | Reason for changing the state of the guild's premium progress bar |
Edits the community updates channel of the guild.
Name | Type | Optional | Description |
---|---|---|---|
publicUpdatesChannel | TextChannelResolvable | null | No | The new community updates channel |
reason | string | Yes | Reason for changing the guild's community updates channel |
Edits the rules channel of the guild.
Name | Type | Optional | Description |
---|---|---|---|
rulesChannel | TextChannelResolvable | null | No | The new rules channel |
reason | string | Yes | Reason for changing the guild's rules channel |
Edits the safety alerts channel of the guild.
Name | Type | Optional | Description |
---|---|---|---|
safetyAlertsChannel | TextChannelResolvable | null | No | The new safety alerts channel |
reason | string | Yes | Reason for changing the guild's safety alerts channel |
Sets a new guild invite splash image.
Name | Type | Optional | Description |
---|---|---|---|
splash | BufferResolvable | Base64Resolvable | null | No | The new invite splash image of the guild |
reason | string | Yes | Reason for changing the guild's invite splash image |
Edits the system channel of the guild.
Name | Type | Optional | Description |
---|---|---|---|
systemChannel | TextChannelResolvable | null | No | The new system channel |
reason | string | Yes | Reason for changing the guild's system channel |
Edits the flags of the default message notifications of the guild.
Name | Type | Optional | Description |
---|---|---|---|
systemChannelFlags | SystemChannelFlagsResolvable | No | The new flags for the default message notifications |
reason | string | Yes | Reason for changing the flags of the default message notifications |
Edits the verification level of the guild.
Name | Type | Optional | Description |
---|---|---|---|
verificationLevel | GuildVerificationLevel | null | No | The new verification level of the guild |
reason | string | Yes | Reason for changing the guild's verification level |
Edits the guild's widget settings.
Name | Type | Optional | Description |
---|---|---|---|
settings | GuildWidgetSettingsData | No | The widget settings for the guild |
reason | string | Yes | Reason for changing the guild's widget settings |
The URL to this guild's invite splash image.
Returns
Name | Type | Optional | Description |
---|---|---|---|
options | ImageURLOptions | Yes | Options for the image URL |
When concatenated with a string, this automatically returns the guild's name instead of the Guild object.
Inherited from BaseGuildReturns a URL for the PNG widget of the guild.
Name | Type | Optional | Description |
---|---|---|---|
style | GuildWidgetStyle | Yes | The style for the widget image |