Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Guild

Guilds in Discord represent an isolated collection of users and channels, and are often referred to as "servers" in the UI.

Hierarchy

Index

Constructors

constructor

Properties

afk

Information about the Guild AFK options

applicationId

applicationId: Snowflake | null

Application ID of the guild creator if it is bot-created

approximates

approximates: GuildApproximates

Information about approximated data for this guild

bannerHash

bannerHash: string | null

Guild banner image hash. Possibly null if guild does not have a banner image

bans

The guild's bans controller

boosts

boosts: GuildBoosts

GuildBoosts object containing guild boosts data

bot

bot: Bot

The Bot operating this structure

channels

The guild's channels controller

createdAt

createdAt: string | undefined

Timestamp for when the guild was created

description

description: string | null

The description for the guild. Possibly null if guild does not have a description

discoverySplashHash

discoverySplashHash: string | null

Guild discovery splash image hash. Possibly null if guild does not have a discovery splash image

emojis

This guild's emojis controller

features

features: GuildFeature[]

Enabled guild features

iconHash

iconHash: string | null

Guild icon hash. Possibly null if guild does not have an icon

id

Guild ID

integrations

The guild's integrations controller

invites

The guild's invites controller

large

large: boolean | undefined

Whether this guild is considered a large guild

levels

levels: GuildLevels

GuildLevels object containing information about all guild level data

locale

locale: string

The preferred locale of a public guild used in server discovery and notices from Discord

default

"en-US"

maxMembers

maxMembers: number | undefined

The maximum number of members for the guild

maxPresences

maxPresences: number | null | undefined

The maximum number of presence for the guild (the default value, currently 25000, is in effect when null is returned)

memberCount

memberCount: number | undefined

Total number of members in this guild

members

The guild's members controller

name

name: string

Guild name

owner

owner: Member | undefined

Guild owner Member. Possibly undefined if the bot is yet to cache that member

ownerId

ownerId: Snowflake

Guild owner ID

permissions

permissions: PermissionFlags | undefined

Total permissions for the Bot in the guild (excludes overrides)

presences

Presences of the members in the guild. Will only include non-offline members if the size is greater than identify.large_threshold

region

region: string

Guild voice region

roles

The guild's roles controller

rulesChannel

rulesChannel: GuildTextChannel | undefined

The channel where public guilds display rules and/or guidelines

splashHash

splashHash: string | null

Guild splash image hash. Possibly null if guild does not have a splash image

systemChannel

systemChannel: GuildSystemChannel

GuildSystemChannel object containing information about the guild system channel

unavailable

unavailable: boolean | undefined

Whether this guild is unavailable

updatesChannel

updatesChannel: GuildTextChannel | undefined

The channel where admins and moderators of public guilds receive notice from Discord

vanityURLCode

vanityURLCode: string | null

The vanity URL code for the guild. Possibly null if guild does not have a vanity URL

webhooks

The guild's webhooks controller

widget

widget: GuildWidget

The guild widget data

Methods

bannerURL

  • Returns the URL of the guild's banner image. Possibly returns null if the guild does not have a banner image

    Parameters

    • Default value format: GuildBannerFormat = GuildBannerFormat.PNG

      The format of the returned guild banner image

    • Optional size: undefined | number

      The size of the returned guild banner image

    Returns string | null

clone

  • clone(): this

discoverySplashURL

  • Returns the URL of the guild's discovery splash image. Possibly returns null if the guild does not have a discovery splash image

    Parameters

    • Default value format: GuildDiscoverySplashFormat = GuildDiscoverySplashFormat.PNG

      The format of the returned guild discovery splash image

    • Optional size: undefined | number

      The size of the returned guild discovery splash image

    Returns string | null

fetchVanityURL

fetchWidget

iconURL

  • iconURL(format?: GuildIconFormat, size?: undefined | number): string | null
  • Returns the URL of the guild's icon image. Possibly returns null if the guild does not have an icon

    Parameters

    • Default value format: GuildIconFormat = GuildIconFormat.PNG

      The format of the returned guild icon image

    • Optional size: undefined | number

      The size of the returned guild icon image

    Returns string | null

leave

  • leave(): Promise<void>

modify

prune

pruneCount

  • Returns the number of members that would be removed in a prune operation. Any inactive user that has a subset of the provided role(s) will be counted in the prune and users with additional roles will not.

    Parameters

    Returns Promise<number>

splashURL

  • Returns the URL of the guild's splash image. Possibly returns null if the guild does not have a splash image

    Parameters

    • Default value format: GuildSplashFormat = GuildSplashFormat.PNG

      The format of the returned guild splash image

    • Optional size: undefined | number

      The size of the returned guild splash image

    Returns string | null

update

Generated using TypeDoc