Skip to content

Guild

Represents a guild in Discord.

Kind: global class
Extends: Base
Properties

NameTypeDescription
partialbooleanWhether the guild is partial or not.
idstring | nullThe ID of the guild.
namestring | nullThe name of the guild.
iconstring | nullThe icon of the guild.
iconHashstring | nullThe hash of the guild’s icon.
splashstring | nullThe splash image of the guild.
string | null

Constructs a new Guild object.

ParamTypeDescription
[data]ObjectThe data object containing guild information.
clientClientThe client object associated with the guild.

Returns the GuildMember instance of the bot user in this guild.

Kind: instance property of Guild
Returns: GuildMember - The GuildMember instance of the bot user in this guild.

Returns the voice channel where users are moved after being AFK for too long.

Kind: instance property of Guild
Returns: VoiceChannel - The voice channel where users are moved after being AFK for too long.

Returns the widget channel of the guild.

Kind: instance property of Guild
Returns: Promise.<Guild> - The widget channel of the guild.

Returns the system channel of the guild.

Kind: instance property of Guild
Returns: Promise.<Guild> - The system channel of the guild.

Returns the rules channel of the guild.

Kind: instance property of Guild
Returns: Promise.<Guild> - The rules channel of the guild.

Returns the public updates channel of the guild.

Kind: instance property of Guild
Returns: Promise.<Guild> - The public updates channel of the guild.

guild.welcomeScreen ⇒ WelcomeScreenManager

Section titled “guild.welcomeScreen ⇒ WelcomeScreenManager”

Returns the welcome screen manager for the guild.

Kind: instance property of Guild
Returns: WelcomeScreenManager - The welcome screen manager for the guild.

guild.integrations ⇒ GuildIntegrationManager

Section titled “guild.integrations ⇒ GuildIntegrationManager”

Returns the integration manager for the guild.

Kind: instance property of Guild
Returns: GuildIntegrationManager - The integration manager for the guild.

Returns the vanity manager for the guild.

Kind: instance property of Guild
Returns: GuildVanityManager - The vanity manager for the guild.

guild.commands ⇒ GuildApplicationCommandManager

Section titled “guild.commands ⇒ GuildApplicationCommandManager”

Returns the application command manager for the guild.

Kind: instance property of Guild
Returns: GuildApplicationCommandManager - The application command manager for the guild.

Fetches the guild.

Kind: instance method of Guild

ParamTypeDescription
[options]ObjectOptions for fetching the guild.

Edits the guild.

Kind: instance method of Guild

ParamTypeDescription
[options]ObjectOptions for editing the guild.

Deletes the guild.

Kind: instance method of Guild

Sets the name of the guild.

Kind: instance method of Guild

ParamTypeDescription
namestringThe new name for the guild.
[reason]stringReason for changing the name.

Sets the description of the guild.

Kind: instance method of Guild

ParamTypeDescription
descriptionstringThe new description for the guild.
[reason]stringReason for changing the description.

Sets the verification level of the guild.

Kind: instance method of Guild

ParamTypeDescription
verificationLevelnumberThe new verification level for the guild.
[reason]stringReason for changing the verification level.

Sets the default message notifications of the guild.

Kind: instance method of Guild

ParamTypeDescription
defaultMessageNotificationsnumberThe new default message notifications for the guild.
[reason]stringReason for changing the default message notifications.

Sets the explicit content filter level of the guild.

Kind: instance method of Guild

ParamTypeDescription
explicitContentFilternumberThe new explicit content filter level for the guild.
[reason]stringReason for changing the explicit content filter level.

Sets the AFK channel of the guild.

Kind: instance method of Guild

ParamTypeDescription
afkChannelChannelThe new AFK channel for the guild.
[reason]stringReason for changing the AFK channel.

Sets the AFK timeout of the guild.

Kind: instance method of Guild

ParamTypeDescription
afkTimeoutnumberThe new AFK timeout for the guild.
[reason]stringReason for changing the AFK timeout.

Sets the icon of the guild.

Kind: instance method of Guild

ParamTypeDescription
iconstringThe new icon for the guild.
[reason]stringReason for changing the icon.

Set the owner of the guild.

Kind: instance method of Guild
Returns: Promise.<Guild> - The updated guild.

ParamTypeDescription
ownerGuildMemberResolvableThe new owner of the guild.
[reason]stringThe reason for setting the owner.

Set the splash image for the guild.

Kind: instance method of Guild
Returns: Promise.<Guild> - The updated guild.

ParamTypeDescription
splashBufferResolvable | Base64Resolvable | nullThe new splash image for the guild. Can be a Buffer or a base64-encoded string or null to remove the current splash image.
[reason]stringThe reason for setting the splash.

Set the discovery splash image for the guild.

Kind: instance method of Guild
Returns: Promise.<Guild> - The updated guild.

ParamTypeDescription
discoverySplashBufferResolvable | Base64Resolvable | nullThe new discovery splash image for the guild. Can be a Buffer or a base64-encoded string or null to remove the current discovery splash image.
[reason]stringThe reason for setting the discovery splash.

Set the banner image for the guild.

Kind: instance method of Guild
Returns: Promise.<Guild> - The updated guild.

ParamTypeDescription
bannerBufferResolvable | Base64Resolvable | nullThe new banner image for the guild. Can be a Buffer or a base64-encoded string or null to remove the current banner image.
[reason]stringThe reason for setting the banner.

Set the system channel for the guild.

Kind: instance method of Guild
Returns: Promise.<Guild> - The updated guild.

ParamTypeDescription
systemChannelGuildChannelResolvableThe new system channel for the guild.
[reason]stringThe reason for setting the system channel.

Set the preferred locale for the guild.

Kind: instance method of Guild
Returns: Promise.<Guild> - The updated guild.

ParamTypeDescription
preferredLocalestringThe new preferred locale for the guild.
[reason]stringThe reason for setting the preferred locale.

Set the system channel flags for the guild.

Kind: instance method of Guild
Returns: Promise.<Guild> - The updated guild.

ParamTypeDescription
systemChannelFlagsnumberThe new system channel flags for the guild.
[reason]stringThe reason for setting the system channel flags.

Set the features of the guild.

Kind: instance method of Guild
Returns: Promise.<Guild> - The updated guild.

ParamTypeDescription
featuresArray.<GuildFeature>The new features of the guild.
[reason]stringThe reason for setting the features.

Sets the premium progress bar of the guild.

Kind: instance method of Guild
Returns: Promise.<Guild> - The updated guild.

ParamTypeDescription
premiumProgressBarstringThe new premium progress bar.
reasonstringThe reason for setting the premium progress bar.

Returns the URL of the guild’s icon.

Kind: instance method of Guild
Returns: string - The URL of the guild’s icon, or null if the guild has no icon.

ParamTypeDefaultDescription
[options]ObjectAdditional options for the URL.
[options.dynamic]booleanfalseWhether to return a dynamic icon.
[options.size]numberThe size of the icon to return.
[options.format]stringThe format of the icon to return.

Returns the URL of the guild’s banner.

Kind: instance method of Guild
Returns: string - The URL of the guild’s banner, or null if the guild has no banner.

ParamTypeDefaultDescription
[options]ObjectAdditional options for the URL.
[options.dynamic]booleanfalseWhether to return a dynamic banner.
[options.size]numberThe size of the banner to return.
[options.format]stringThe format of the banner to return.

Returns the URL of the guild’s splash.

Kind: instance method of Guild
Returns: string - The URL of the guild’s splash, or null if the guild has no splash.

ParamTypeDefaultDescription
[options]ObjectAdditional options for the URL.
[options.dynamic]booleanfalseWhether to return a dynamic splash.
[options.size]numberThe size of the splash to return.
[options.format]stringThe format of the splash to return.

guild.discoverySplashURL([options]) ⇒ string

Section titled “guild.discoverySplashURL([options]) ⇒ string”

Returns the URL of the guild’s discovery splash.

Kind: instance method of Guild
Returns: string - The URL of the guild’s discovery splash, or null if the guild has no discovery splash.

ParamTypeDefaultDescription
[options]ObjectAdditional options for the URL.
[options.dynamic]booleanfalseWhether to return a dynamic discovery splash.
[options.size]numberThe size of the discovery splash to return.
[options.format]stringThe format of the discovery splash to return.

guild.fetchOwner([options]) ⇒ Promise.<GuildMember>

Section titled “guild.fetchOwner([options]) ⇒ Promise.<GuildMember>”

Fetches the owner of the guild.

Kind: instance method of Guild
Returns: Promise.<GuildMember> - A promise that resolves with the GuildMember instance of the guild owner.

ParamTypeDescription
[options]BaseFetchOptionsThe options to fetch the owner with.

Fetches a preview of the guild.

Kind: instance method of Guild
Returns: Promise.<Object> - A promise that resolves with the preview of the guild.

guild.fetchActiveThreads() ⇒ Promise.<FetchedThreads>

Section titled “guild.fetchActiveThreads() ⇒ Promise.<FetchedThreads>”

Fetches the active threads in the guild.

Kind: instance method of Guild
Returns: Promise.<FetchedThreads> - A promise that resolves with the active threads in the guild.

guild.fetchAuditLogs([options]) ⇒ Promise.<GuildAuditLog>

Section titled “guild.fetchAuditLogs([options]) ⇒ Promise.<GuildAuditLog>”

Fetches the audit logs for the guild.

Kind: instance method of Guild
Returns: Promise.<GuildAuditLog> - A promise that resolves with the fetched audit logs.

ParamTypeDefaultDescription
[options]ObjectThe options for fetching audit logs.
[options.user]UserResolvableThe user to filter the audit log by.
[options.actionType]stringThe type of action to filter the audit log by.
[options.before]Snowflake | GuildAuditLogEntryThe entry to get audit logs before.
[options.limit]number50The maximum number of audit logs to fetch.

guild.fetchMe([options]) ⇒ Promise.<GuildMember>

Section titled “guild.fetchMe([options]) ⇒ Promise.<GuildMember>”

Fetches the bot’s own member object for the guild.

Kind: instance method of Guild
Returns: Promise.<GuildMember> - A promise that resolves with the bot’s own member object for the guild.

ParamTypeDescription
[options]ObjectThe options for fetching the member object.

guild.fetchWebhooks() ⇒ Promise.<RaidenCol.<string, Webhook>>

Section titled “guild.fetchWebhooks() ⇒ Promise.<RaidenCol.<string, Webhook>>”

Fetches the webhooks for the guild.

Kind: instance method of Guild
Returns: Promise.<RaidenCol.<string, Webhook>> - A promise that resolves with the fetched webhooks for the guild.

Fetches the guild feed for the guild.

Kind: instance method of Guild
Returns: Promise.<Object> - A promise that resolves with the fetched guild feed.

Modifies the MFA (multi-factor authentication) level of the guild.

Kind: instance method of Guild
Returns: Promise.<Guild> - A promise that resolves with the guild object with the modified MFA level.

ParamTypeDescription
mfaLevelnumberThe new MFA level for the guild.
[reason]stringThe reason for modifying the MFA level.

guild.getVoiceBasedChannels() ⇒ Collection.<Snowflake, GuildChannel>

Section titled “guild.getVoiceBasedChannels() ⇒ Collection.<Snowflake, GuildChannel>”

Gets all the voice-based channels in the guild.

Kind: instance method of Guild
Returns: Collection.<Snowflake, GuildChannel> - A collection of all the voice-based channels in the guild.

guild.getTextBasedChannels() ⇒ Collection.<Snowflake, GuildChannel>

Section titled “guild.getTextBasedChannels() ⇒ Collection.<Snowflake, GuildChannel>”

Gets all the text-based channels in the guild.

Kind: instance method of Guild
Returns: Collection.<Snowflake, GuildChannel> - A collection of all the text-based channels in the guild.

guild.getCategories() ⇒ Collection.<Snowflake, GuildChannel>

Section titled “guild.getCategories() ⇒ Collection.<Snowflake, GuildChannel>”

Gets all the categories in the guild.

Kind: instance method of Guild
Returns: Collection.<Snowflake, GuildChannel> - A collection of all the categories in the guild.