Guild
Guild ⇐ Base
Represents a guild in Discord.
Kind: global class
Extends: Base
Properties
Name | Type | Description |
---|---|---|
partial | boolean | Whether the guild is partial or not. |
id | string | null | The ID of the guild. |
name | string | null | The name of the guild. |
icon | string | null | The icon of the guild. |
iconHash | string | null | The hash of the guild’s icon. |
splash | string | null | The splash image of the guild. |
string | null |
- Guild ⇐
Base
- new Guild([data], client)
- .me ⇒
GuildMember
- .afkChannel ⇒
VoiceChannel
- .widgetChannel ⇒
Promise.<Guild>
- .systemChannel ⇒
Promise.<Guild>
- .rulesChannel ⇒
Promise.<Guild>
- .publicUpdatesChannel ⇒
Promise.<Guild>
- .welcomeScreen ⇒
WelcomeScreenManager
- .integrations ⇒
GuildIntegrationManager
- .vanity ⇒
GuildVanityManager
- .commands ⇒
GuildApplicationCommandManager
- .fetch([options]) ⇒
Promise.<Guild>
- .edit([options]) ⇒
Promise.<Guild>
- .delete() ⇒
Promise.<Guild>
- .setName(name, [reason]) ⇒
Promise.<Guild>
- .setDescription(description, [reason]) ⇒
Promise.<Guild>
- .setVerificationLevel(verificationLevel, [reason]) ⇒
Promise.<Guild>
- .setDefaultMessageNotifications(defaultMessageNotifications, [reason]) ⇒
Promise.<Guild>
- .setExplicitContentFilter(explicitContentFilter, [reason]) ⇒
Promise.<Guild>
- .setAfkChannel(afkChannel, [reason]) ⇒
Promise.<Guild>
- .setAfkTimeout(afkTimeout, [reason]) ⇒
Promise.<Guild>
- .setIcon(icon, [reason]) ⇒
Promise.<Guild>
- .setOwner(owner, [reason]) ⇒
Promise.<Guild>
- .setSplash(splash, [reason]) ⇒
Promise.<Guild>
- .setDiscoverySplash(discoverySplash, [reason]) ⇒
Promise.<Guild>
- .setBanner(banner, [reason]) ⇒
Promise.<Guild>
- .setSystemChannel(systemChannel, [reason]) ⇒
Promise.<Guild>
- .setPreferredLocale(preferredLocale, [reason]) ⇒
Promise.<Guild>
- .setSystemChannelFlags(systemChannelFlags, [reason]) ⇒
Promise.<Guild>
- .setFeatures(features, [reason]) ⇒
Promise.<Guild>
- .setPremiumProgressBar(premiumProgressBar, reason) ⇒
Promise.<Guild>
- .iconURL([options]) ⇒
string
- .bannerURL([options]) ⇒
string
- .splashURL([options]) ⇒
string
- .discoverySplashURL([options]) ⇒
string
- .fetchOwner([options]) ⇒
Promise.<GuildMember>
- .fetchPreview() ⇒
Promise.<Object>
- .fetchActiveThreads() ⇒
Promise.<FetchedThreads>
- .fetchAuditLogs([options]) ⇒
Promise.<GuildAuditLog>
- .fetchMe([options]) ⇒
Promise.<GuildMember>
- .fetchWebhooks() ⇒
Promise.<RaidenCol.<string, Webhook>>
- .fetchFeed() ⇒
Promise.<Object>
- .modifyMFALevel(mfaLevel, [reason]) ⇒
Promise.<Guild>
- .getVoiceBasedChannels() ⇒
Collection.<Snowflake, GuildChannel>
- .getTextBasedChannels() ⇒
Collection.<Snowflake, GuildChannel>
- .getCategories() ⇒
Collection.<Snowflake, GuildChannel>
new Guild([data], client)
Constructs a new Guild object.
Param | Type | Description |
---|---|---|
[data] | Object | The data object containing guild information. |
client | Client | The 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
Param | Type | Description |
---|---|---|
[options] | Object | Options for fetching the guild. |
guild.edit([options]) ⇒ Promise.<Guild>
Edits the guild.
Kind: instance method of Guild
Param | Type | Description |
---|---|---|
[options] | Object | Options 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
Param | Type | Description |
---|---|---|
name | string | The new name for the guild. |
[reason] | string | Reason for changing the name. |
guild.setDescription(description, [reason]) ⇒ Promise.<Guild>
Sets the description of the guild.
Kind: instance method of Guild
Param | Type | Description |
---|---|---|
description | string | The new description for the guild. |
[reason] | string | Reason for changing the description. |
guild.setVerificationLevel(verificationLevel, [reason]) ⇒ Promise.<Guild>
Sets the verification level of the guild.
Kind: instance method of Guild
Param | Type | Description |
---|---|---|
verificationLevel | number | The new verification level for the guild. |
[reason] | string | Reason for changing the verification level. |
guild.setDefaultMessageNotifications(defaultMessageNotifications, [reason]) ⇒ Promise.<Guild>
Sets the default message notifications of the guild.
Kind: instance method of Guild
Param | Type | Description |
---|---|---|
defaultMessageNotifications | number | The new default message notifications for the guild. |
[reason] | string | Reason 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
Param | Type | Description |
---|---|---|
explicitContentFilter | number | The new explicit content filter level for the guild. |
[reason] | string | Reason 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
Param | Type | Description |
---|---|---|
afkChannel | Channel | The new AFK channel for the guild. |
[reason] | string | Reason for changing the AFK channel. |
guild.setAfkTimeout(afkTimeout, [reason]) ⇒ Promise.<Guild>
Sets the AFK timeout of the guild.
Kind: instance method of Guild
Param | Type | Description |
---|---|---|
afkTimeout | number | The new AFK timeout for the guild. |
[reason] | string | Reason for changing the AFK timeout. |
guild.setIcon(icon, [reason]) ⇒ Promise.<Guild>
Sets the icon of the guild.
Kind: instance method of Guild
Param | Type | Description |
---|---|---|
icon | string | The new icon for the guild. |
[reason] | string | Reason 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.
Param | Type | Description |
---|---|---|
owner | GuildMemberResolvable | The new owner of the guild. |
[reason] | string | The 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.
Param | Type | Description |
---|---|---|
splash | BufferResolvable | Base64Resolvable | null | The new splash image for the guild. Can be a Buffer or a base64-encoded string or null to remove the current splash image. |
[reason] | string | The 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.
Param | Type | Description |
---|---|---|
discoverySplash | BufferResolvable | Base64Resolvable | null | The 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] | string | The 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.
Param | Type | Description |
---|---|---|
banner | BufferResolvable | Base64Resolvable | null | The new banner image for the guild. Can be a Buffer or a base64-encoded string or null to remove the current banner image. |
[reason] | string | The 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.
Param | Type | Description |
---|---|---|
systemChannel | GuildChannelResolvable | The new system channel for the guild. |
[reason] | string | The 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.
Param | Type | Description |
---|---|---|
preferredLocale | string | The new preferred locale for the guild. |
[reason] | string | The 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.
Param | Type | Description |
---|---|---|
systemChannelFlags | number | The new system channel flags for the guild. |
[reason] | string | The 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.
Param | Type | Description |
---|---|---|
features | Array.<GuildFeature> | The new features of the guild. |
[reason] | string | The 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.
Param | Type | Description |
---|---|---|
premiumProgressBar | string | The new premium progress bar. |
reason | string | The 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.
Param | Type | Default | Description |
---|---|---|---|
[options] | Object | Additional options for the URL. | |
[options.dynamic] | boolean | false | Whether to return a dynamic icon. |
[options.size] | number | The size of the icon to return. | |
[options.format] | string | The 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.
Param | Type | Default | Description |
---|---|---|---|
[options] | Object | Additional options for the URL. | |
[options.dynamic] | boolean | false | Whether to return a dynamic banner. |
[options.size] | number | The size of the banner to return. | |
[options.format] | string | The 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.
Param | Type | Default | Description |
---|---|---|---|
[options] | Object | Additional options for the URL. | |
[options.dynamic] | boolean | false | Whether to return a dynamic splash. |
[options.size] | number | The size of the splash to return. | |
[options.format] | string | The 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.
Param | Type | Default | Description |
---|---|---|---|
[options] | Object | Additional options for the URL. | |
[options.dynamic] | boolean | false | Whether to return a dynamic discovery splash. |
[options.size] | number | The size of the discovery splash to return. | |
[options.format] | string | The 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.
Param | Type | Description |
---|---|---|
[options] | BaseFetchOptions | The 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.
Param | Type | Default | Description |
---|---|---|---|
[options] | Object | The options for fetching audit logs. | |
[options.user] | UserResolvable | The user to filter the audit log by. | |
[options.actionType] | string | The type of action to filter the audit log by. | |
[options.before] | Snowflake | GuildAuditLogEntry | The entry to get audit logs before. | |
[options.limit] | number | 50 | The 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.
Param | Type | Description |
---|---|---|
[options] | Object | The 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.
Param | Type | Description |
---|---|---|
mfaLevel | number | The new MFA level for the guild. |
[reason] | string | The 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.