Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Guild<T>

Type parameters

  • T

Hierarchy

Index

Constructors

constructor

  • new Guild(client: Client, data: APIGuildData, shardID: number): Guild

Properties

afkChannelID

afkChannelID: string | null

The guild's id of AFK channel.

since

0.0.1

afkTimeout

afkTimeout: number

The guild's AFK timeout in seconds.

since

0.0.1

applicationID

applicationID: string | null

The guild's application id of the guild creator if it is bot-created.

Optional approximateMemberCount

approximateMemberCount: undefined | number

The approximate number of members in this guild, returned from the GET /guild/<id> endpoint when with_counts is true.

since

0.0.1

Optional approximatePresenceCount

approximatePresenceCount: undefined | number

The approximate number of online members in this guild, returned from the GET /guild/<id> endpoint when with_counts is true.

since

0.0.1

banner

banner: string | null

The guild's banner hash.

since

0.0.1

see

https://discord.com/developers/docs/reference#image-formatting

Readonly bans

bans: BanStore

The guild's bans.

since

0.0.1

Readonly channels

A store of channels for this guild.

since

0.0.1

see

https://discord.com/developers/docs/resources/channel#channel-object

Readonly client

client: T

defaultMessageNotification

defaultMessageNotification: GuildDefaultMessageNotifications

The guild's default message notifications level.

since

0.0.1

see

https://discord.com/developers/docs/resources/guild#guild-object-default-message-notification-level

deleted

deleted: boolean = false

Whether the guild is deleted.

since

0.0.1

description

description: string | null

The guild's description.

since

0.0.1

discoverySplash

discoverySplash: string | null

The guild's discovery splash hash.

since

0.0.1

see

https://discord.com/developers/docs/reference#image-formatting

Readonly emojis

The guild's store of custom emojis.

since

0.0.1

explicitContentFilter

explicitContentFilter: GuildExplicitContentFilterLevel

features

features: GuildFeatures[]

icon

icon: string | null

Readonly id

id: string

The guild ID.

since

0.0.1

Readonly integrations

integrations: IntegrationStore

The guild's store of integrations.

since

0.0.1

Readonly invites

The guild's store of invites.

since

0.0.1

joinedTimestamp

joinedTimestamp: number | null

When this guild was joined at.

since

0.0.1

large

large: boolean | null

Whether this is considered a large guild.

since

0.0.1

Optional maxMembers

maxMembers: undefined | number

The maximum amount of members for the guild.

since

0.0.1

Optional maxPresences

maxPresences: number | null

The maximum amount of presences for the guild (the default value, currently 25000, is in effect when null is returned).

since

0.0.1

memberCount

memberCount: number | null

Total number of members in this guild. This field will only be present if a guild was received from the GUILD_CREATE event.

since

0.0.1

Readonly members

A store of members for this guild.

since

0.0.1

see

https://discord.com/developers/docs/resources/guild#guild-member-object

mfaLevel

mfaLevel: GuildMFALevel | null

The guild's required Multi-Factor Authentication level.

since

0.0.1

see

https://discord.com/developers/docs/resources/guild#guild-object-mfa-level

name

name: string

The guild's name (2-100 characters).

since

0.0.1

ownerID

ownerID: string

The guild's owner ID.

since

0.0.1

permissions

permissions: Permissions | null

The guild's total permissions for the user in the guild (does not include channel overrides).

since

0.0.1

preferredLocale

preferredLocale: string

The preferred locale of a PUBLIC guild used in guild discovery and notices from Discord; defaults to "en-US".

since

0.0.1

premiumSubscriptionCount

premiumSubscriptionCount: number | null

The number of boosts this guild currently has.

since

0.0.1

premiumTier

premiumTier: GuildPremiumTier | null

Readonly presences

presences: PresenceStore

A store of presences for this guild.

since

0.0.1

see

https://discord.com/developers/docs/topics/gateway#presence-update

publicUpdatesChannel

publicUpdatesChannel: string | null

The id of the channel where admins and moderators of "PUBLIC" guilds receive notices from Discord.

since

0.0.1

region

region: string

The guild's voice region id for the guild.

since

0.0.1

see

https://discord.com/developers/docs/resources/voice#voice-region-object

Readonly roles

roles: RoleStore

The guild's store of roles.

since

0.0.1

rulesChannelID

rulesChannelID: string | null

The id of the channel where "PUBLIC" guilds display rules and/or guidelines.

since

0.0.1

Readonly shard

shard: WebSocketShard

The guild's store of integrations.

since

0.0.4

splash

splash: string | null

The guild's splash hash.

since

0.0.1

see

https://discord.com/developers/docs/reference#image-formatting

systemChannelFlags

systemChannelFlags: GuildSystemChannelFlags

systemChannelID

systemChannelID: string | null

The system channel ID.

since

0.0.1

unavailable

unavailable: boolean

Whether or not this guild is unavailable.

since

0.0.1

vanityUrlCode

vanityUrlCode: string | null

The vanity invite code for the guild.

since

0.0.1

verificationLevel

verificationLevel: GuildVerificationLevel

The guild's required verification level.

since

0.0.1

see

https://discord.com/developers/docs/resources/guild#guild-object-verification-level

Readonly voiceStates

voiceStates: VoiceStateStore

A store of voice states for this guild.

since

0.0.1

see

https://discord.com/developers/docs/resources/voice#voice-state-object

widget

widget: GuildWidget

The widget for this guild.

since

0.0.1

widgetChannelID

widgetChannelID: string | null

The channel id for the guild widget.

since

0.0.1

widgetEnabled

widgetEnabled: boolean

Whether or not the guild widget is enabled.

since

0.0.1

Accessors

createdAt

  • get createdAt(): Date

createdTimestamp

  • get createdTimestamp(): number

joinedAt

  • get joinedAt(): Date | null

me

owner

Methods

Protected _patch

  • _patch(data: APIGuildData): this

clone

  • clone(): this

delete

  • delete(requestOptions?: RequestOptions): Promise<this>

fetchPreview

  • fetchPreview(): Promise<APIGuildPreviewData>

fetchRegions

  • fetchRegions(): Promise<APIVoiceRegionData[]>

fetchVanityURL

iconURL

  • iconURL(options?: ImageURLOptions): string | null

leave

  • leave(): Promise<this>

modify

  • modify(__namedParameters: { banner: undefined | string | MessageAttachment | Buffer | Readable; icon: undefined | string | MessageAttachment | Buffer | Readable; options: options; splash: undefined | string | MessageAttachment | Buffer | Readable }, requestOptions?: RequestOptions): Promise<this>

prune

toJSON

  • toJSON(): Record<string, any>

toString

  • toString(): string

valueOf

  • valueOf(): string

Generated using TypeDoc