Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Guild

Hierarchy

Index

Constructors

Properties

Methods

Constructors

constructor

Properties

afkChannelID

afkChannelID: null | string

afkTimeout

afkTimeout: number

applicationID

applicationID: null | string

Optional approximateMemberCount

approximateMemberCount: number

Optional approximatePresenceCount

approximatePresenceCount: number

Optional autoRemoved

autoRemoved: boolean

banner

banner: null | string

bannerURL

bannerURL: null | string

channels

createdAt

createdAt: number

defaultNotifications

defaultNotifications: DefaultNotifications

description

description: null | string

discoverySplash

discoverySplash: null | string

discoverySplashURL

discoverySplashURL: null | string

Optional emojiCount

emojiCount: number

emojis

emojis: Emoji[]

explicitContentFilter

explicitContentFilter: ExplicitContentFilter

features

features: ("ANIMATED_ICON" | "BANNER" | "COMMERCE" | "COMMUNITY" | "DISCOVERABLE" | "FEATURABLE" | "INVITE_SPLASH" | "MEMBER_VERIFICATION_GATE_ENABLED" | "MONETIZATION_ENABLED" | "MORE_STICKERS" | "NEWS" | "PARTNERED" | "PREVIEW_ENABLED" | "PRIVATE_THREADS" | "ROLE_ICONS" | "ROLE_SUBSCRIPTIONS_ENABLED" | "SEVEN_DAY_THREAD_ARCHIVE" | "THREE_DAY_THREAD_ARCHIVE" | "TICKETED_EVENTS_ENABLED" | "VANITY_URL" | "VERIFIED" | "VIP_REGIONS" | "WELCOME_SCREEN_ENABLED")[]

icon

icon: null | string

iconURL

iconURL: null | string

id

id: string

joinedAt

joinedAt: number

large

large: boolean

maxMembers

maxMembers: number

Optional maxPresences

maxPresences: null | number

Optional maxVideoChannelUsers

maxVideoChannelUsers: number

memberCount

memberCount: number

members

members: Collection<Member>

mfaLevel

mfaLevel: MFALevel

name

name: string

nsfw

nsfw: boolean
deprecated

nsfwLevel

nsfwLevel: NSFWLevel

ownerID

ownerID: string

preferredLocale

preferredLocale: string

premiumProgressBarEnabled

premiumProgressBarEnabled: boolean

Optional premiumSubscriptionCount

premiumSubscriptionCount: number

premiumTier

premiumTier: PremiumTier

Optional primaryCategory

primaryCategory: DiscoveryCategory

Optional primaryCategoryID

primaryCategoryID: number

publicUpdatesChannelID

publicUpdatesChannelID: string

roles

rulesChannelID

rulesChannelID: null | string

shard

shard: Shard

splash

splash: null | string

splashURL

splashURL: null | string

stageInstances

stageInstances: Collection<StageInstance>

Optional stickers

stickers: Sticker[]

systemChannelFlags

systemChannelFlags: number

systemChannelID

systemChannelID: null | string

threads

unavailable

unavailable: boolean

vanityURL

vanityURL: null | string

verificationLevel

verificationLevel: VerificationLevel

voiceStates

voiceStates: Collection<VoiceState>

Optional welcomeScreen

welcomeScreen: WelcomeScreen

Optional widgetChannelID

widgetChannelID: null | string

Optional widgetEnabled

widgetEnabled: null | boolean

Methods

addDiscoverySubcategory

  • Parameters

    • categoryID: string
    • Optional reason: string

    Returns Promise<DiscoverySubcategoryResponse>

addMemberRole

  • addMemberRole(memberID: string, roleID: string, reason?: string): Promise<void>
  • Parameters

    • memberID: string
    • roleID: string
    • Optional reason: string

    Returns Promise<void>

banMember

  • banMember(userID: string, deleteMessageDays?: number, reason?: string): Promise<void>
  • Parameters

    • userID: string
    • Optional deleteMessageDays: number
    • Optional reason: string

    Returns Promise<void>

bulkEditCommands

createChannel

  • Parameters

    • name: string

    Returns Promise<TextChannel>

  • Parameters

    Returns Promise<TextChannel>

  • Parameters

    Returns Promise<TextVoiceChannel>

  • Parameters

    Returns Promise<CategoryChannel>

  • Parameters

    Returns Promise<NewsChannel>

  • Parameters

    Returns Promise<StoreChannel>

  • Parameters

    Returns Promise<StageChannel>

  • Parameters

    Returns Promise<unknown>

  • deprecated

    Parameters

    Returns Promise<TextChannel>

  • deprecated

    Parameters

    Returns Promise<TextVoiceChannel>

  • deprecated

    Parameters

    Returns Promise<CategoryChannel>

  • deprecated

    Parameters

    Returns Promise<NewsChannel>

  • deprecated

    Parameters

    Returns Promise<StoreChannel>

  • deprecated

    Parameters

    Returns Promise<StageChannel>

  • deprecated

    Parameters

    • name: string
    • Optional type: number
    • Optional reason: string
    • Optional options: string | CreateChannelOptions

    Returns Promise<unknown>

createCommand

createEmoji

  • createEmoji(options: { image: string; name: string; roles?: string[] }, reason?: string): Promise<Emoji>
  • Parameters

    • options: { image: string; name: string; roles?: string[] }
      • image: string
      • name: string
      • Optional roles?: string[]
    • Optional reason: string

    Returns Promise<Emoji>

createRole

  • createRole(options: RoleOptions, reason?: string): Promise<Role>
  • createRole(options: Role, reason?: string): Promise<Role>
  • Parameters

    Returns Promise<Role>

  • Parameters

    • options: Role
    • Optional reason: string

    Returns Promise<Role>

createSticker

  • Parameters

    Returns Promise<Sticker>

createTemplate

  • createTemplate(name: string, description?: null | string): Promise<GuildTemplate>
  • Parameters

    • name: string
    • Optional description: null | string

    Returns Promise<GuildTemplate>

delete

  • delete(): Promise<void>
  • Returns Promise<void>

deleteCommand

  • deleteCommand(commandID: string): Promise<void>
  • Parameters

    • commandID: string

    Returns Promise<void>

deleteDiscoverySubcategory

  • deleteDiscoverySubcategory(categoryID: string, reason?: string): Promise<void>
  • Parameters

    • categoryID: string
    • Optional reason: string

    Returns Promise<void>

deleteEmoji

  • deleteEmoji(emojiID: string, reason?: string): Promise<void>
  • Parameters

    • emojiID: string
    • Optional reason: string

    Returns Promise<void>

deleteIntegration

  • deleteIntegration(integrationID: string): Promise<void>
  • Parameters

    • integrationID: string

    Returns Promise<void>

deleteRole

  • deleteRole(roleID: string): Promise<void>
  • Parameters

    • roleID: string

    Returns Promise<void>

deleteSticker

  • deleteSticker(stickerID: string, reason?: string): Promise<void>
  • Parameters

    • stickerID: string
    • Optional reason: string

    Returns Promise<void>

deleteTemplate

  • Parameters

    • code: string

    Returns Promise<GuildTemplate>

dynamicBannerURL

  • dynamicBannerURL(format?: "jpg" | "jpeg" | "png" | "webp" | "gif", size?: number): null | string
  • Parameters

    • Optional format: "jpg" | "jpeg" | "png" | "webp" | "gif"
    • Optional size: number

    Returns null | string

dynamicDiscoverySplashURL

  • dynamicDiscoverySplashURL(format?: "jpg" | "jpeg" | "png" | "webp" | "gif", size?: number): null | string
  • Parameters

    • Optional format: "jpg" | "jpeg" | "png" | "webp" | "gif"
    • Optional size: number

    Returns null | string

dynamicIconURL

  • dynamicIconURL(format?: "jpg" | "jpeg" | "png" | "webp" | "gif", size?: number): null | string
  • Parameters

    • Optional format: "jpg" | "jpeg" | "png" | "webp" | "gif"
    • Optional size: number

    Returns null | string

dynamicSplashURL

  • dynamicSplashURL(format?: "jpg" | "jpeg" | "png" | "webp" | "gif", size?: number): null | string
  • Parameters

    • Optional format: "jpg" | "jpeg" | "png" | "webp" | "gif"
    • Optional size: number

    Returns null | string

edit

  • Parameters

    Returns Promise<Guild>

editChannelPositions

  • Parameters

    Returns Promise<void>

editCommand

editCommandPermissions

editDiscovery

editEmoji

  • editEmoji(emojiID: string, options: { name: string; roles?: string[] }, reason?: string): Promise<Emoji>
  • Parameters

    • emojiID: string
    • options: { name: string; roles?: string[] }
      • name: string
      • Optional roles?: string[]
    • Optional reason: string

    Returns Promise<Emoji>

editIntegration

  • Parameters

    Returns Promise<void>

editMember

  • Parameters

    • memberID: string
    • options: MemberOptions
    • Optional reason: string

    Returns Promise<Member>

editNickname

  • editNickname(nick: string): Promise<void>
  • deprecated

    Parameters

    • nick: string

    Returns Promise<void>

editRole

  • Parameters

    Returns Promise<Role>

editSticker

  • Parameters

    Returns Promise<Sticker>

editTemplate

editVanity

  • editVanity(code: null | string): Promise<GuildVanity>
  • Parameters

    • code: null | string

    Returns Promise<GuildVanity>

editVoiceState

  • Parameters

    Returns Promise<void>

editWelcomeScreen

editWidget

  • Parameters

    Returns Promise<Widget>

fetchAllMembers

  • fetchAllMembers(timeout?: number): Promise<number>
  • Parameters

    • Optional timeout: number

    Returns Promise<number>

fetchMembers

getActiveThreads

getAuditLog

getAuditLogs

  • getAuditLogs(limit?: number, before?: string, actionType?: number, userID?: string): Promise<GuildAuditLog>
  • deprecated

    Parameters

    • Optional limit: number
    • Optional before: string
    • Optional actionType: number
    • Optional userID: string

    Returns Promise<GuildAuditLog>

getBan

  • getBan(userID: string): Promise<GuildBan>
  • Parameters

    • userID: string

    Returns Promise<GuildBan>

getBans

getCommand

getCommandPermissions

getCommands

getDiscovery

getEmbed

  • deprecated

    Returns Promise<Widget>

getIntegrations

  • Returns Promise<GuildIntegration>

getInvites

  • Returns Promise<Invite<"withMetadata", InviteChannel>[]>

getPruneCount

  • Parameters

    Returns Promise<number>

getRESTChannels

  • Returns Promise<AnyGuildChannel[]>

getRESTEmoji

  • getRESTEmoji(emojiID: string): Promise<Emoji>
  • Parameters

    • emojiID: string

    Returns Promise<Emoji>

getRESTEmojis

  • getRESTEmojis(): Promise<Emoji[]>
  • Returns Promise<Emoji[]>

getRESTMember

  • getRESTMember(memberID: string): Promise<Member>
  • Parameters

    • memberID: string

    Returns Promise<Member>

getRESTMembers

  • Parameters

    Returns Promise<Member[]>

  • deprecated

    Parameters

    • Optional limit: number
    • Optional after: string

    Returns Promise<Member[]>

getRESTRoles

  • getRESTRoles(): Promise<Role[]>
  • Returns Promise<Role[]>

getRESTSticker

  • getRESTSticker(stickerID: string): Promise<Sticker>
  • Parameters

    • stickerID: string

    Returns Promise<Sticker>

getRESTStickers

  • getRESTStickers(): Promise<Sticker[]>
  • Returns Promise<Sticker[]>

getTemplates

  • Returns Promise<GuildTemplate[]>

getVanity

  • Returns Promise<GuildVanity>

getVoiceRegions

  • Returns Promise<VoiceRegion[]>

getWebhooks

  • getWebhooks(): Promise<Webhook[]>
  • Returns Promise<Webhook[]>

getWelcomeScreen

  • Returns Promise<WelcomeScreen>

getWidget

  • Returns Promise<WidgetData>

getWidgetSettings

  • getWidgetSettings(): Promise<Widget>
  • Returns Promise<Widget>

inspect

  • Returns Guild

kickMember

  • kickMember(userID: string, reason?: string): Promise<void>
  • Parameters

    • userID: string
    • Optional reason: string

    Returns Promise<void>

leave

  • leave(): Promise<void>
  • Returns Promise<void>

leaveVoiceChannel

  • leaveVoiceChannel(): void
  • Returns void

permissionsOf

pruneMembers

  • Parameters

    Returns Promise<number>

removeMemberRole

  • removeMemberRole(memberID: string, roleID: string, reason?: string): Promise<void>
  • Parameters

    • memberID: string
    • roleID: string
    • Optional reason: string

    Returns Promise<void>

searchMembers

  • searchMembers(query: string, limit?: number): Promise<Member[]>
  • Parameters

    • query: string
    • Optional limit: number

    Returns Promise<Member[]>

syncIntegration

  • syncIntegration(integrationID: string): Promise<void>
  • Parameters

    • integrationID: string

    Returns Promise<void>

syncTemplate

  • Parameters

    • code: string

    Returns Promise<GuildTemplate>

toJSON

  • Parameters

    • Optional props: string[]

    Returns JSONCache

toString

  • toString(): string
  • Returns string

unbanMember

  • unbanMember(userID: string, reason?: string): Promise<void>
  • Parameters

    • userID: string
    • Optional reason: string

    Returns Promise<void>

Static getCreatedAt

  • getCreatedAt(id: string): number
  • Parameters

    • id: string

    Returns number

Static getDiscordEpoch

  • getDiscordEpoch(id: string): number
  • Parameters

    • id: string

    Returns number

Generated using TypeDoc