Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Client

Hierarchy

Index

Constructors

Properties

Methods

Constructors

constructor

  • Parameters

    Returns Client

Properties

Optional application

application: undefined | { flags: number; id: string }

bot

bot: boolean

channelGuildMap

channelGuildMap: {}

Type declaration

  • [s: string]: string

Optional gatewayURL

gatewayURL: undefined | string

groupChannels

groupChannels: Collection<GroupChannel>

guildShardMap

guildShardMap: {}

Type declaration

  • [s: string]: number

guilds

guilds: Collection<Guild>

lastConnect

lastConnect: number

lastReconnectDelay

lastReconnectDelay: number

notes

notes: {}

Type declaration

  • [s: string]: string

on

options

options: ClientOptions

presence

presence: Presence

privateChannelMap

privateChannelMap: {}

Type declaration

  • [s: string]: string

privateChannels

privateChannels: Collection<PrivateChannel>

ready

ready: boolean

reconnectAttempts

reconnectAttempts: number

relationships

relationships: Collection<Relationship>

requestHandler

requestHandler: RequestHandler

shards

shards: ShardManager

startTime

startTime: number

unavailableGuilds

unavailableGuilds: Collection<UnavailableGuild>

uptime

uptime: number

user

userGuildSettings

userGuildSettings: {}

Type declaration

userSettings

userSettings: UserSettings

users

voiceConnections

Readonly Static captureRejectionSymbol

captureRejectionSymbol: typeof captureRejectionSymbol

Static captureRejections

captureRejections: boolean

Sets or gets the default captureRejection value for all emitters.

Static defaultMaxListeners

defaultMaxListeners: number

Readonly Static errorMonitor

errorMonitor: typeof errorMonitor

This symbol shall be used to install a listener for only monitoring 'error' events. Listeners installed using this symbol are called before the regular 'error' listeners are called.

Installing a listener using this symbol does not change the behavior once an 'error' event is emitted, therefore the process will still crash if no regular 'error' listener is installed.

Methods

acceptInvite

  • Parameters

    • inviteID: string

    Returns Promise<Invite<"withoutCount", InviteChannel>>

addGroupRecipient

  • addGroupRecipient(groupID: string, userID: string): Promise<void>
  • Parameters

    • groupID: string
    • userID: string

    Returns Promise<void>

addGuildDiscoverySubcategory

  • Parameters

    • guildID: string
    • categoryID: string
    • Optional reason: string

    Returns Promise<DiscoverySubcategoryResponse>

addGuildMemberRole

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

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

    Returns Promise<void>

addListener

  • addListener(event: string | symbol, listener: (...args: any[]) => void): Client
  • Parameters

    • event: string | symbol
    • listener: (...args: any[]) => void
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns Client

addMessageReaction

  • addMessageReaction(channelID: string, messageID: string, reaction: string): Promise<void>
  • addMessageReaction(channelID: string, messageID: string, reaction: string, userID: string): Promise<void>
  • Parameters

    • channelID: string
    • messageID: string
    • reaction: string

    Returns Promise<void>

  • deprecated

    Parameters

    • channelID: string
    • messageID: string
    • reaction: string
    • userID: string

    Returns Promise<void>

addRelationship

  • addRelationship(userID: string, block?: boolean): Promise<void>
  • Parameters

    • userID: string
    • Optional block: boolean

    Returns Promise<void>

addSelfPremiumSubscription

  • addSelfPremiumSubscription(token: string, plan: string): Promise<void>
  • Parameters

    • token: string
    • plan: string

    Returns Promise<void>

banGuildMember

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

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

    Returns Promise<void>

closeVoiceConnection

  • closeVoiceConnection(guildID: string): void
  • Parameters

    • guildID: string

    Returns void

connect

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

createChannel

  • Parameters

    • guildID: string
    • 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

    • guildID: string
    • name: string
    • type: 0
    • Optional reason: string
    • Optional options: string | CreateChannelOptions

    Returns Promise<TextChannel>

  • deprecated

    Parameters

    • guildID: string
    • name: string
    • type: 2
    • Optional reason: string
    • Optional options: string | CreateChannelOptions

    Returns Promise<VoiceChannel>

  • deprecated

    Parameters

    • guildID: string
    • name: string
    • type: 4
    • Optional reason: string
    • Optional options: string | CreateChannelOptions

    Returns Promise<CategoryChannel>

  • deprecated

    Parameters

    • guildID: string
    • name: string
    • type: 5
    • Optional reason: string
    • Optional options: string | CreateChannelOptions

    Returns Promise<NewsChannel>

  • deprecated

    Parameters

    • guildID: string
    • name: string
    • type: 6
    • Optional reason: string
    • Optional options: string | CreateChannelOptions

    Returns Promise<StoreChannel>

  • deprecated

    Parameters

    • guildID: string
    • name: string
    • type: 13
    • Optional reason: string
    • Optional options: string | CreateChannelOptions

    Returns Promise<StageChannel>

  • deprecated

    Parameters

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

    Returns Promise<unknown>

createChannelInvite

createChannelWebhook

  • createChannelWebhook(channelID: string, options: { avatar?: undefined | null | string; name: string }, reason?: string): Promise<Webhook>
  • Parameters

    • channelID: string
    • options: { avatar?: undefined | null | string; name: string }
      • Optional avatar?: undefined | null | string
      • name: string
    • Optional reason: string

    Returns Promise<Webhook>

createGroupChannel

  • createGroupChannel(userIDs: string[]): Promise<GroupChannel>
  • Parameters

    • userIDs: string[]

    Returns Promise<GroupChannel>

createGuild

  • Parameters

    Returns Promise<Guild>

createGuildEmoji

  • createGuildEmoji(guildID: string, options: EmojiOptions, reason?: string): Promise<Emoji>
  • Parameters

    • guildID: string
    • options: EmojiOptions
    • Optional reason: string

    Returns Promise<Emoji>

createGuildFromTemplate

  • createGuildFromTemplate(code: string, name: string, icon?: string): Promise<Guild>
  • Parameters

    • code: string
    • name: string
    • Optional icon: string

    Returns Promise<Guild>

createGuildTemplate

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

    • guildID: string
    • name: string
    • Optional description: null | string

    Returns Promise<GuildTemplate>

createMessage

createRole

  • Parameters

    • guildID: string
    • Optional options: Role | RoleOptions
    • Optional reason: string

    Returns Promise<Role>

crosspostMessage

  • Parameters

    • channelID: string
    • messageID: string

    Returns Promise<Message<TextableChannel>>

deleteChannel

  • deleteChannel(channelID: string, reason?: string): Promise<void>
  • Parameters

    • channelID: string
    • Optional reason: string

    Returns Promise<void>

deleteChannelPermission

  • deleteChannelPermission(channelID: string, overwriteID: string, reason?: string): Promise<void>
  • Parameters

    • channelID: string
    • overwriteID: string
    • Optional reason: string

    Returns Promise<void>

deleteGuild

  • deleteGuild(guildID: string): Promise<void>
  • Parameters

    • guildID: string

    Returns Promise<void>

deleteGuildDiscoverySubcategory

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

    • guildID: string
    • categoryID: string
    • Optional reason: string

    Returns Promise<void>

deleteGuildEmoji

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

    • guildID: string
    • emojiID: string
    • Optional reason: string

    Returns Promise<void>

deleteGuildIntegration

  • deleteGuildIntegration(guildID: string, integrationID: string): Promise<void>
  • Parameters

    • guildID: string
    • integrationID: string

    Returns Promise<void>

deleteGuildTemplate

  • deleteGuildTemplate(guildID: string, code: string): Promise<GuildTemplate>
  • Parameters

    • guildID: string
    • code: string

    Returns Promise<GuildTemplate>

deleteInvite

  • deleteInvite(inviteID: string, reason?: string): Promise<void>
  • Parameters

    • inviteID: string
    • Optional reason: string

    Returns Promise<void>

deleteMessage

  • deleteMessage(channelID: string, messageID: string, reason?: string): Promise<void>
  • Parameters

    • channelID: string
    • messageID: string
    • Optional reason: string

    Returns Promise<void>

deleteMessages

  • deleteMessages(channelID: string, messageIDs: string[], reason?: string): Promise<void>
  • Parameters

    • channelID: string
    • messageIDs: string[]
    • Optional reason: string

    Returns Promise<void>

deleteRole

  • deleteRole(guildID: string, roleID: string, reason?: string): Promise<void>
  • Parameters

    • guildID: string
    • roleID: string
    • Optional reason: string

    Returns Promise<void>

deleteSelfConnection

  • deleteSelfConnection(platform: string, id: string): Promise<void>
  • Parameters

    • platform: string
    • id: string

    Returns Promise<void>

deleteSelfPremiumSubscription

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

deleteUserNote

  • deleteUserNote(userID: string): Promise<void>
  • Parameters

    • userID: string

    Returns Promise<void>

deleteWebhook

  • deleteWebhook(webhookID: string, token?: string, reason?: string): Promise<void>
  • Parameters

    • webhookID: string
    • Optional token: string
    • Optional reason: string

    Returns Promise<void>

deleteWebhookMessage

  • deleteWebhookMessage(webhookID: string, token: string, messageID: string): Promise<void>
  • Parameters

    • webhookID: string
    • token: string
    • messageID: string

    Returns Promise<void>

disableSelfMFATOTP

  • disableSelfMFATOTP(code: string): Promise<{ token: string }>
  • Parameters

    • code: string

    Returns Promise<{ token: string }>

disconnect

  • disconnect(options: { reconnect?: undefined | boolean | "auto" }): void
  • Parameters

    • options: { reconnect?: undefined | boolean | "auto" }
      • Optional reconnect?: undefined | boolean | "auto"

    Returns void

editAFK

  • editAFK(afk: boolean): void
  • Parameters

    • afk: boolean

    Returns void

editChannel

editChannelPermission

  • editChannelPermission(channelID: string, overwriteID: string, allow: number | bigint, deny: number | bigint, type: string, reason?: string): Promise<void>
  • Parameters

    • channelID: string
    • overwriteID: string
    • allow: number | bigint
    • deny: number | bigint
    • type: string
    • Optional reason: string

    Returns Promise<void>

editChannelPosition

  • Parameters

    Returns Promise<void>

editGuild

  • Parameters

    • guildID: string
    • options: GuildOptions
    • Optional reason: string

    Returns Promise<Guild>

editGuildDiscovery

editGuildEmoji

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

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

    Returns Promise<Emoji>

editGuildIntegration

  • editGuildIntegration(guildID: string, integrationID: string, options: IntegrationOptions): Promise<void>
  • Parameters

    Returns Promise<void>

editGuildMember

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

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

    Returns Promise<void>

editGuildTemplate

editGuildVanity

  • editGuildVanity(guildID: string, code: null | string): Promise<GuildVanity>
  • Parameters

    • guildID: string
    • code: null | string

    Returns Promise<GuildVanity>

editGuildVoiceState

  • editGuildVoiceState(guildID: string, options: VoiceStateOptions, userID?: string): Promise<void>
  • Parameters

    Returns Promise<void>

editGuildWelcomeScreen

editGuildWidget

  • editGuildWidget(guildID: string, options: Widget): Promise<Widget>
  • Parameters

    • guildID: string
    • options: Widget

    Returns Promise<Widget>

editMessage

editNickname

  • editNickname(guildID: string, nick: string, reason?: string): Promise<void>
  • Parameters

    • guildID: string
    • nick: string
    • Optional reason: string

    Returns Promise<void>

editRole

  • editRole(guildID: string, roleID: string, options: RoleOptions, reason?: string): Promise<Role>
  • Parameters

    • guildID: string
    • roleID: string
    • options: RoleOptions
    • Optional reason: string

    Returns Promise<Role>

editRolePosition

  • editRolePosition(guildID: string, roleID: string, position: number): Promise<void>
  • Parameters

    • guildID: string
    • roleID: string
    • position: number

    Returns Promise<void>

editSelf

  • editSelf(options: { avatar?: undefined | string; username?: undefined | string }): Promise<ExtendedUser>
  • Parameters

    • options: { avatar?: undefined | string; username?: undefined | string }
      • Optional avatar?: undefined | string
      • Optional username?: undefined | string

    Returns Promise<ExtendedUser>

editSelfConnection

  • editSelfConnection(platform: string, id: string, data: { friendSync: boolean; visibility: number }): Promise<Connection>
  • Parameters

    • platform: string
    • id: string
    • data: { friendSync: boolean; visibility: number }
      • friendSync: boolean
      • visibility: number

    Returns Promise<Connection>

editSelfSettings

editStatus

  • Parameters

    Returns void

editUserNote

  • editUserNote(userID: string, note: string): Promise<void>
  • Parameters

    • userID: string
    • note: string

    Returns Promise<void>

editWebhook

  • editWebhook(webhookID: string, options: WebhookOptions, token?: string, reason?: string): Promise<Webhook>
  • Parameters

    • webhookID: string
    • options: WebhookOptions
    • Optional token: string
    • Optional reason: string

    Returns Promise<Webhook>

editWebhookMessage

  • Parameters

    • webhookID: string
    • token: string
    • messageID: string
    • options: Pick<WebhookPayload, "content" | "embeds" | "file" | "allowedMentions">

    Returns Promise<Message<GuildTextableChannel>>

emit

  • emit(event: string | symbol, ...args: any[]): boolean
  • Parameters

    • event: string | symbol
    • Rest ...args: any[]

    Returns boolean

enableSelfMFATOTP

  • enableSelfMFATOTP(secret: string, code: string): Promise<{ backup_codes: { code: string; consumed: boolean }[]; token: string }>
  • Parameters

    • secret: string
    • code: string

    Returns Promise<{ backup_codes: { code: string; consumed: boolean }[]; token: string }>

eventNames

  • eventNames(): (string | symbol)[]
  • Returns (string | symbol)[]

executeSlackWebhook

  • executeSlackWebhook(webhookID: string, token: string, options: Record<string, unknown> & { auth?: undefined | boolean }): Promise<void>
  • executeSlackWebhook(webhookID: string, token: string, options: Record<string, unknown> & { auth?: undefined | boolean; wait: true }): Promise<Message<GuildTextableChannel>>
  • Parameters

    • webhookID: string
    • token: string
    • options: Record<string, unknown> & { auth?: undefined | boolean }

    Returns Promise<void>

  • Parameters

    • webhookID: string
    • token: string
    • options: Record<string, unknown> & { auth?: undefined | boolean; wait: true }

    Returns Promise<Message<GuildTextableChannel>>

executeWebhook

  • Parameters

    • webhookID: string
    • token: string
    • options: WebhookPayload & { wait: true }

    Returns Promise<Message<GuildTextableChannel>>

  • Parameters

    Returns Promise<void>

followChannel

  • followChannel(channelID: string, webhookChannelID: string): Promise<ChannelFollow>
  • Parameters

    • channelID: string
    • webhookChannelID: string

    Returns Promise<ChannelFollow>

getBotGateway

  • getBotGateway(): Promise<{ session_start_limit: { max_concurrency: number; remaining: number; reset_after: number; total: number }; shards: number; url: string }>
  • Returns Promise<{ session_start_limit: { max_concurrency: number; remaining: number; reset_after: number; total: number }; shards: number; url: string }>

getChannel

  • Parameters

    • channelID: string

    Returns AnyChannel

getChannelInvites

  • Parameters

    • channelID: string

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

getChannelWebhooks

  • getChannelWebhooks(channelID: string): Promise<Webhook[]>
  • Parameters

    • channelID: string

    Returns Promise<Webhook[]>

getDMChannel

  • Parameters

    • userID: string

    Returns Promise<PrivateChannel>

getDiscoveryCategories

getGateway

  • getGateway(): Promise<{ url: string }>
  • Returns Promise<{ url: string }>

getGuildAuditLog

getGuildAuditLogs

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

    Parameters

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

    Returns Promise<GuildAuditLog>

getGuildBan

  • getGuildBan(guildID: string, userID: string): Promise<{ reason?: undefined | string; user: User }>
  • Parameters

    • guildID: string
    • userID: string

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

getGuildBans

  • getGuildBans(guildID: string): Promise<{ reason?: undefined | string; user: User }[]>
  • Parameters

    • guildID: string

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

getGuildDiscovery

  • Parameters

    • guildID: string

    Returns Promise<DiscoveryMetadata>

getGuildEmbed

  • getGuildEmbed(guildID: string): Promise<Widget>
  • deprecated

    Parameters

    • guildID: string

    Returns Promise<Widget>

getGuildIntegrations

getGuildInvites

  • Parameters

    • guildID: string

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

getGuildPreview

  • Parameters

    • guildID: string

    Returns Promise<GuildPreview>

getGuildTemplate

  • Parameters

    • code: string

    Returns Promise<GuildTemplate>

getGuildTemplates

  • Parameters

    • guildID: string

    Returns Promise<GuildTemplate[]>

getGuildVanity

  • getGuildVanity(guildID: string): Promise<GuildVanity>
  • Parameters

    • guildID: string

    Returns Promise<GuildVanity>

getGuildWebhooks

  • getGuildWebhooks(guildID: string): Promise<Webhook[]>
  • Parameters

    • guildID: string

    Returns Promise<Webhook[]>

getGuildWelcomeScreen

  • Parameters

    • guildID: string

    Returns Promise<WelcomeScreen>

getGuildWidget

  • getGuildWidget(guildID: string): Promise<Widget>
  • Parameters

    • guildID: string

    Returns Promise<Widget>

getInvite

  • Parameters

    • inviteID: string
    • Optional withCounts: false

    Returns Promise<Invite<"withoutCount", InviteChannel>>

  • Parameters

    • inviteID: string
    • withCounts: true

    Returns Promise<Invite<"withCount", InviteChannel>>

getMaxListeners

  • getMaxListeners(): number
  • Returns number

getMessage

  • Parameters

    • channelID: string
    • messageID: string

    Returns Promise<Message<TextableChannel>>

getMessageReaction

  • getMessageReaction(channelID: string, messageID: string, reaction: string, options?: GetMessageReactionOptions): Promise<User[]>
  • getMessageReaction(channelID: string, messageID: string, reaction: string, limit?: number, before?: string, after?: string): Promise<User[]>
  • Parameters

    Returns Promise<User[]>

  • deprecated

    Parameters

    • channelID: string
    • messageID: string
    • reaction: string
    • Optional limit: number
    • Optional before: string
    • Optional after: string

    Returns Promise<User[]>

getMessages

  • Parameters

    Returns Promise<Message<TextableChannel>[]>

  • deprecated

    Parameters

    • channelID: string
    • Optional limit: number
    • Optional before: string
    • Optional after: string
    • Optional around: string

    Returns Promise<Message<TextableChannel>[]>

getOAuthApplication

  • Parameters

    • Optional appID: string

    Returns Promise<OAuthApplicationInfo>

getPins

  • Parameters

    • channelID: string

    Returns Promise<Message<TextableChannel>[]>

getPruneCount

  • getPruneCount(guildID: string, options?: GetPruneOptions): Promise<number>
  • Parameters

    Returns Promise<number>

getRESTChannel

  • getRESTChannel(channelID: string): Promise<AnyChannel>
  • Parameters

    • channelID: string

    Returns Promise<AnyChannel>

getRESTGuild

  • getRESTGuild(guildID: string, withCounts?: boolean): Promise<Guild>
  • Parameters

    • guildID: string
    • Optional withCounts: boolean

    Returns Promise<Guild>

getRESTGuildChannels

  • Parameters

    • guildID: string

    Returns Promise<AnyGuildChannel[]>

getRESTGuildEmoji

  • getRESTGuildEmoji(guildID: string, emojiID: string): Promise<Emoji>
  • Parameters

    • guildID: string
    • emojiID: string

    Returns Promise<Emoji>

getRESTGuildEmojis

  • getRESTGuildEmojis(guildID: string): Promise<Emoji[]>
  • Parameters

    • guildID: string

    Returns Promise<Emoji[]>

getRESTGuildMember

  • getRESTGuildMember(guildID: string, memberID: string): Promise<Member>
  • Parameters

    • guildID: string
    • memberID: string

    Returns Promise<Member>

getRESTGuildMembers

  • Parameters

    Returns Promise<Member[]>

  • deprecated

    Parameters

    • guildID: string
    • Optional limit: number
    • Optional after: string

    Returns Promise<Member[]>

getRESTGuildRoles

  • getRESTGuildRoles(guildID: string): Promise<Role[]>
  • Parameters

    • guildID: string

    Returns Promise<Role[]>

getRESTGuilds

  • Parameters

    Returns Promise<Guild[]>

  • deprecated

    Parameters

    • Optional limit: number
    • Optional before: string
    • Optional after: string

    Returns Promise<Guild[]>

getRESTUser

  • getRESTUser(userID: string): Promise<User>
  • Parameters

    • userID: string

    Returns Promise<User>

getSelf

  • Returns Promise<ExtendedUser>

getSelfBilling

  • getSelfBilling(): Promise<{ payment_gateway?: undefined | string; payment_source?: undefined | { brand: string; expires_month: number; expires_year: number; invalid: boolean; last_4: number; type: string }; premium_subscription?: undefined | { canceled_at?: undefined | string; created_at: string; current_period_end?: undefined | string; current_period_start?: undefined | string; ended_at?: undefined | string; plan: string; status: number } }>
  • Returns Promise<{ payment_gateway?: undefined | string; payment_source?: undefined | { brand: string; expires_month: number; expires_year: number; invalid: boolean; last_4: number; type: string }; premium_subscription?: undefined | { canceled_at?: undefined | string; created_at: string; current_period_end?: undefined | string; current_period_start?: undefined | string; ended_at?: undefined | string; plan: string; status: number } }>

getSelfConnections

  • Returns Promise<Connection[]>

getSelfMFACodes

  • getSelfMFACodes(password: string, regenerate?: boolean): Promise<{ backup_codes: { code: string; consumed: boolean }[] }>
  • Parameters

    • password: string
    • Optional regenerate: boolean

    Returns Promise<{ backup_codes: { code: string; consumed: boolean }[] }>

getSelfPayments

  • getSelfPayments(): Promise<{ amount: number; amount_refunded: number; created_at: string; currency: string; description: string; status: number }[]>
  • Returns Promise<{ amount: number; amount_refunded: number; created_at: string; currency: string; description: string; status: number }[]>

getSelfSettings

  • Returns Promise<UserSettings>

getUserProfile

  • Parameters

    • userID: string

    Returns Promise<UserProfile>

getVoiceRegions

  • getVoiceRegions(guildID?: string): Promise<VoiceRegion[]>
  • Parameters

    • Optional guildID: string

    Returns Promise<VoiceRegion[]>

getWebhook

  • getWebhook(webhookID: string, token?: string): Promise<Webhook>
  • Parameters

    • webhookID: string
    • Optional token: string

    Returns Promise<Webhook>

getWebhookMessage

  • Parameters

    • webhookID: string
    • token: string
    • messageID: string

    Returns Promise<Message<GuildTextableChannel>>

joinVoiceChannel

  • joinVoiceChannel(channelID: string, options?: { opusOnly?: undefined | boolean; shared?: undefined | boolean }): Promise<VoiceConnection>
  • Parameters

    • channelID: string
    • Optional options: { opusOnly?: undefined | boolean; shared?: undefined | boolean }
      • Optional opusOnly?: undefined | boolean
      • Optional shared?: undefined | boolean

    Returns Promise<VoiceConnection>

kickGuildMember

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

    • guildID: string
    • userID: string
    • Optional reason: string

    Returns Promise<void>

leaveGuild

  • leaveGuild(guildID: string): Promise<void>
  • Parameters

    • guildID: string

    Returns Promise<void>

leaveVoiceChannel

  • leaveVoiceChannel(channelID: string): void
  • Parameters

    • channelID: string

    Returns void

listenerCount

  • listenerCount(event: string | symbol): number
  • Parameters

    • event: string | symbol

    Returns number

listeners

  • listeners(event: string | symbol): Function[]
  • Parameters

    • event: string | symbol

    Returns Function[]

off

  • off(event: string | symbol, listener: (...args: any[]) => void): Client
  • Parameters

    • event: string | symbol
    • listener: (...args: any[]) => void
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns Client

once

  • once(event: string | symbol, listener: (...args: any[]) => void): Client
  • Parameters

    • event: string | symbol
    • listener: (...args: any[]) => void
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns Client

pinMessage

  • pinMessage(channelID: string, messageID: string): Promise<void>
  • Parameters

    • channelID: string
    • messageID: string

    Returns Promise<void>

prependListener

  • prependListener(event: string | symbol, listener: (...args: any[]) => void): Client
  • Parameters

    • event: string | symbol
    • listener: (...args: any[]) => void
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns Client

prependOnceListener

  • prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): Client
  • Parameters

    • event: string | symbol
    • listener: (...args: any[]) => void
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns Client

pruneMembers

  • Parameters

    Returns Promise<number>

purgeChannel

  • purgeChannel(channelID: string, options: PurgeChannelOptions): Promise<number>
  • purgeChannel(channelID: string, limit?: number, filter?: (m: Message<GuildTextableChannel>) => boolean, before?: string, after?: string, reason?: string): Promise<number>

rawListeners

  • rawListeners(event: string | symbol): Function[]
  • Parameters

    • event: string | symbol

    Returns Function[]

removeAllListeners

  • removeAllListeners(event?: string | symbol): Client
  • Parameters

    • Optional event: string | symbol

    Returns Client

removeGroupRecipient

  • removeGroupRecipient(groupID: string, userID: string): Promise<void>
  • Parameters

    • groupID: string
    • userID: string

    Returns Promise<void>

removeGuildMemberRole

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

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

    Returns Promise<void>

removeListener

  • removeListener(event: string | symbol, listener: (...args: any[]) => void): Client
  • Parameters

    • event: string | symbol
    • listener: (...args: any[]) => void
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns Client

removeMessageReaction

  • removeMessageReaction(channelID: string, messageID: string, reaction: string, userID?: string): Promise<void>
  • Parameters

    • channelID: string
    • messageID: string
    • reaction: string
    • Optional userID: string

    Returns Promise<void>

removeMessageReactionEmoji

  • removeMessageReactionEmoji(channelID: string, messageID: string, reaction: string): Promise<void>
  • Parameters

    • channelID: string
    • messageID: string
    • reaction: string

    Returns Promise<void>

removeMessageReactions

  • removeMessageReactions(channelID: string, messageID: string): Promise<void>
  • Parameters

    • channelID: string
    • messageID: string

    Returns Promise<void>

removeRelationship

  • removeRelationship(userID: string): Promise<void>
  • Parameters

    • userID: string

    Returns Promise<void>

searchChannelMessages

searchGuildMembers

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

    • guildID: string
    • query: string
    • Optional limit: number

    Returns Promise<Member[]>

searchGuildMessages

sendChannelTyping

  • sendChannelTyping(channelID: string): Promise<void>
  • Parameters

    • channelID: string

    Returns Promise<void>

setMaxListeners

  • setMaxListeners(n: number): Client
  • Parameters

    • n: number

    Returns Client

syncGuildIntegration

  • syncGuildIntegration(guildID: string, integrationID: string): Promise<void>
  • Parameters

    • guildID: string
    • integrationID: string

    Returns Promise<void>

syncGuildTemplate

  • syncGuildTemplate(guildID: string, code: string): Promise<GuildTemplate>
  • Parameters

    • guildID: string
    • code: string

    Returns Promise<GuildTemplate>

toString

  • toString(): string
  • Returns string

unbanGuildMember

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

    • guildID: string
    • userID: string
    • Optional reason: string

    Returns Promise<void>

unpinMessage

  • unpinMessage(channelID: string, messageID: string): Promise<void>
  • Parameters

    • channelID: string
    • messageID: string

    Returns Promise<void>

validateDiscoverySearchTerm

  • validateDiscoverySearchTerm(term: string): Promise<{ valid: boolean }>
  • Parameters

    • term: string

    Returns Promise<{ valid: boolean }>

Static listenerCount

  • listenerCount(emitter: EventEmitter, event: string | symbol): number
  • deprecated

    since v4.0.0

    Parameters

    • emitter: EventEmitter
    • event: string | symbol

    Returns number

Static on

  • on(emitter: EventEmitter, event: string): AsyncIterableIterator<any>
  • Parameters

    • emitter: EventEmitter
    • event: string

    Returns AsyncIterableIterator<any>

Static once

  • once(emitter: NodeEventTarget, event: string | symbol): Promise<any[]>
  • once(emitter: DOMEventTarget, event: string): Promise<any[]>
  • Parameters

    • emitter: NodeEventTarget
    • event: string | symbol

    Returns Promise<any[]>

  • Parameters

    • emitter: DOMEventTarget
    • event: string

    Returns Promise<any[]>

Generated using TypeDoc