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: undefined | number

Optional approximatePresenceCount

approximatePresenceCount: undefined | number

Optional autoRemoved

autoRemoved: undefined | 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: undefined | number

emojis

emojis: Emoji[]

explicitContentFilter

explicitContentFilter: ExplicitContentFilter

features

features: string[]

icon

icon: null | string

iconURL

iconURL: null | string

id

id: string

joinedAt

joinedAt: number

large

large: boolean

maxMembers

maxMembers: number

maxPresences

maxPresences: number

Optional maxVideoChannelUsers

maxVideoChannelUsers: undefined | number

memberCount

memberCount: number

members

members: Collection<Member>

mfaLevel

name

name: string

nsfw

nsfw: boolean

ownerID

ownerID: string

preferredLocale

preferredLocale: string

Optional premiumSubscriptionCount

premiumSubscriptionCount: undefined | number

premiumTier

premiumTier: PremiumTier

Optional primaryCategory

primaryCategory: undefined | DiscoveryCategory

Optional primaryCategoryID

primaryCategoryID: undefined | number

publicUpdatesChannelID

publicUpdatesChannelID: string

region

region: string

roles

rulesChannelID

rulesChannelID: null | string

shard

shard: Shard

splash

splash: null | string

splashURL

splashURL: null | string

systemChannelFlags

systemChannelFlags: number

systemChannelID

systemChannelID: null | string

unavailable

unavailable: boolean

vanityURL

vanityURL: null | string

verificationLevel

verificationLevel: VerificationLevel

voiceStates

voiceStates: Collection<VoiceState>

Optional welcomeScreen

welcomeScreen: undefined | WelcomeScreen

Optional widgetChannelID

widgetChannelID: undefined | null | string

Optional widgetEnabled

widgetEnabled: undefined | 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>

createChannel

  • Parameters

    • name: string

    Returns Promise<TextChannel>

  • Parameters

    Returns Promise<TextChannel>

  • Parameters

    Returns Promise<VoiceChannel>

  • 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<VoiceChannel>

  • 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>

createEmoji

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

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

    Returns Promise<Emoji>

createRole

  • Parameters

    Returns Promise<Role>

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>

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>

deleteTemplate

  • Parameters

    • code: string

    Returns Promise<GuildTemplate>

dynamicBannerURL

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

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

    Returns string

dynamicDiscoverySplashURL

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

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

    Returns string

dynamicIconURL

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

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

    Returns string

dynamicSplashURL

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

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

    Returns string

edit

  • Parameters

    Returns Promise<Guild>

editDiscovery

editEmoji

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

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

    Returns Promise<Emoji>

editIntegration

  • Parameters

    Returns Promise<void>

editMember

  • editMember(memberID: string, options: MemberOptions, reason?: string): Promise<void>
  • Parameters

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

    Returns Promise<void>

editNickname

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

    • nick: string

    Returns Promise<void>

editRole

  • Parameters

    Returns Promise<Role>

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

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<{ reason?: undefined | string; user: User }>
  • Parameters

    • userID: string

    Returns Promise<{ reason?: undefined | string; user: User }>

getBans

  • getBans(): Promise<{ reason?: undefined | string; user: User }[]>
  • Returns Promise<{ reason?: undefined | string; user: User }[]>

getDiscovery

getEmbed

  • deprecated

    Returns Promise<Widget>

getIntegrations

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[]>

getTemplates

  • Returns Promise<GuildTemplate[]>

getVanity

  • Returns Promise<GuildVanity>

getVoiceRegions

  • Returns Promise<VoiceRegion[]>

getWebhooks

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

getWelcomeScreen

  • Returns Promise<WelcomeScreen>

getWidget

  • getWidget(): 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

  • Parameters

    Returns Permission

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

Generated using TypeDoc