Skip to content

Guild

Guild ⇐ Base

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

new Guild([data], client)

Constructs a new Guild object.

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

guild.me ⇒ GuildMember

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.

guild.afkChannel ⇒ VoiceChannel

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.

guild.widgetChannel ⇒ Promise.<Guild>

Returns the widget channel of the guild.

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

guild.systemChannel ⇒ Promise.<Guild>

Returns the system channel of the guild.

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

guild.rulesChannel ⇒ Promise.<Guild>

Returns the rules channel of the guild.

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

guild.publicUpdatesChannel ⇒ Promise.<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

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

Returns the integration manager for the guild.

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

guild.vanity ⇒ GuildVanityManager

Returns the vanity manager for the guild.

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

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.

guild.fetch([options]) ⇒ Promise.<Guild>

Fetches the guild.

Kind: instance method of Guild

ParamTypeDescription
[options]ObjectOptions for fetching the guild.

guild.edit([options]) ⇒ Promise.<Guild>

Edits the guild.

Kind: instance method of Guild

ParamTypeDescription
[options]ObjectOptions for editing the guild.

guild.delete() ⇒ Promise.<Guild>

Deletes the guild.

Kind: instance method of Guild

guild.setName(name, [reason]) ⇒ Promise.<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.

guild.setDescription(description, [reason]) ⇒ Promise.<Guild>

Sets the description of the guild.

Kind: instance method of Guild

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

guild.setVerificationLevel(verificationLevel, [reason]) ⇒ Promise.<Guild>

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.

guild.setDefaultMessageNotifications(defaultMessageNotifications, [reason]) ⇒ Promise.<Guild>

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.

guild.setExplicitContentFilter(explicitContentFilter, [reason]) ⇒ Promise.<Guild>

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.

guild.setAfkChannel(afkChannel, [reason]) ⇒ Promise.<Guild>

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.

guild.setAfkTimeout(afkTimeout, [reason]) ⇒ Promise.<Guild>

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.

guild.setIcon(icon, [reason]) ⇒ Promise.<Guild>

Sets the icon of the guild.

Kind: instance method of Guild

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

guild.setOwner(owner, [reason]) ⇒ Promise.<Guild>

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.

guild.setSplash(splash, [reason]) ⇒ Promise.<Guild>

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.

guild.setDiscoverySplash(discoverySplash, [reason]) ⇒ Promise.<Guild>

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.

guild.setBanner(banner, [reason]) ⇒ Promise.<Guild>

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.

guild.setSystemChannel(systemChannel, [reason]) ⇒ Promise.<Guild>

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.

guild.setPreferredLocale(preferredLocale, [reason]) ⇒ Promise.<Guild>

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.

guild.setSystemChannelFlags(systemChannelFlags, [reason]) ⇒ Promise.<Guild>

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.

guild.setFeatures(features, [reason]) ⇒ Promise.<Guild>

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.

guild.setPremiumProgressBar(premiumProgressBar, reason) ⇒ Promise.<Guild>

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.

guild.iconURL([options]) ⇒ string

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.

guild.bannerURL([options]) ⇒ string

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.

guild.splashURL([options]) ⇒ string

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

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>

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.

guild.fetchPreview() ⇒ Promise.<Object>

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>

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>

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>

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

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.

guild.fetchFeed() ⇒ Promise.<Object>

Fetches the guild feed for the guild.

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

guild.modifyMFALevel(mfaLevel, [reason]) ⇒ Promise.<Guild>

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>

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>

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>

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.