Options
All
  • Public
  • Public/Protected
  • All
Menu

Class KlasaGuild<T>

Klasa's Extended Guild

Type parameters

  • T

Hierarchy

Index

Constructors

constructor

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

channels: GuildChannelStore

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

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

emojis: GuildEmojiStore

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

invites: GuildInviteStore

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

members: GuildMemberStore

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

settings

settings: Settings

The guild level settings for this context (guild || default)

since

0.5.0

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
  • The Date when this object was created at

    Returns Date

createdTimestamp

  • get createdTimestamp(): number
  • The time when this object was created at

    Returns number

joinedAt

  • get joinedAt(): Date | null
  • When this guild was joined at, as a Date.

    since

    0.0.1

    Returns Date | null

language

me

  • get me(): GuildMember | null
  • The Client's member of this guild.

    since

    0.0.1

    Returns GuildMember | null

owner

  • get owner(): GuildMember | null
  • The owner of this guild.

    since

    0.0.1

    Returns GuildMember | null

Methods

Protected _patch

  • _patch(data: APIGuildData): this
  • Parameters

    • data: APIGuildData

    Returns this

clone

  • clone(): this
  • Basic clone method

    Returns this

delete

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

fetchPreview

  • fetchPreview(): Promise<APIGuildPreviewData>

fetchRegions

  • fetchRegions(): Promise<APIVoiceRegionData[]>

fetchVanityURL

  • fetchVanityURL(): Promise<GuildVanityURL>

iconURL

  • iconURL(options?: ImageURLOptions): string | null
  • Returns the icon url for the guild if one is available.

    Parameters

    • Optional options: ImageURLOptions

      The image size and format options.

    Returns string | null

leave

  • leave(): Promise<this>

modify

  • modify(__namedParameters: { banner: undefined | string | Readable | Buffer | MessageAttachment; icon: undefined | string | Readable | Buffer | MessageAttachment; options: options; splash: undefined | string | Readable | Buffer | MessageAttachment }, requestOptions?: RequestOptions): Promise<this>
  • Modifies the guild's settings.

    since

    0.0.1

    see

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

    Parameters

    • __namedParameters: { banner: undefined | string | Readable | Buffer | MessageAttachment; icon: undefined | string | Readable | Buffer | MessageAttachment; options: options; splash: undefined | string | Readable | Buffer | MessageAttachment }
      • banner: undefined | string | Readable | Buffer | MessageAttachment
      • icon: undefined | string | Readable | Buffer | MessageAttachment
      • options: options
      • splash: undefined | string | Readable | Buffer | MessageAttachment
    • Optional requestOptions: RequestOptions

      The additional request options.

    Returns Promise<this>

prune

  • prune(options: GuildPruneDryOptions, requestOptions?: RequestOptions): Promise<number>
  • prune(options: GuildPruneNonDryOptions, requestOptions?: RequestOptions): Promise<number | null>
  • Returns a number indicating the number of members that would be removed in a prune operation.

    since

    0.0.1

    see

    https://discord.com/developers/docs/resources/guild#get-guild-prune-count

    Parameters

    • options: GuildPruneDryOptions

      The number of days to count prune and the included roles.

    • Optional requestOptions: RequestOptions

      The additional request options.

    Returns Promise<number>

  • Parameters

    • options: GuildPruneNonDryOptions

      The number of days to count prune and the included roles.

    • Optional requestOptions: RequestOptions

      The additional request options.

    Returns Promise<number | null>

toJSON

  • toJSON(): Record<string, any>

toString

  • toString(): string
  • Defines the toString behavior of this structure.

    since

    0.0.4

    Returns string

valueOf

  • valueOf(): string
  • The basic value of this Structure

    Returns string

Generated using TypeDoc