Options
All
  • Public
  • Public/Protected
  • All
Menu

Class ClusterClient

Hierarchy

  • EventSpewer
    • ClusterClient

Implements

  • EventEmitter

Index

Constructors

constructor

  • Parameters

    Returns ClusterClient

Properties

_shardsWaiting

_shardsWaiting: BaseCollection<number, object> = new BaseCollection<number, {resolve: Function, reject: Function}>()

buckets

buckets: BaseCollection<number, Bucket> = new BaseCollection<number, Bucket>()

commandClient

commandClient: CommandClient | null = null

manager

manager: ClusterProcessChild | null = null

maxConcurrency

maxConcurrency: number = 1

ran

ran: boolean = false

rest

rest: DetritusRestClient

shardCount

shardCount: number = 0

shardEnd

shardEnd: number = -1

shardOptions

shardOptions: ShardClientOptions

shardStart

shardStart: number = 0

shards

shards: BaseCollection<number, ShardClient> = new BaseCollection<number, ShardClient>()

token

token: string

Methods

addListener

  • addListener(event: string | symbol, listener: function): this
  • Parameters

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

          • Rest ...args: any[]

          Returns void

    Returns this

emit

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

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

    Returns boolean

eventNames

  • eventNames(): Array<string | symbol>
  • Returns Array<string | symbol>

fillApplications

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

fillOauth2Application

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

getMaxListeners

  • getMaxListeners(): number
  • Returns number

getRatelimitKey

  • getRatelimitKey(shardId: number): number
  • Parameters

    • shardId: number

    Returns number

hasEventListener

  • hasEventListener(name: string | symbol): boolean
  • Parameters

    • name: string | symbol

    Returns boolean

hookedEmit

  • hookedEmit(shard: ShardClient, name: string, event: any): boolean
  • Parameters

    Returns boolean

hookedHasEventListener

  • hookedHasEventListener(shard: ShardClient, name: string): boolean
  • Parameters

    Returns boolean

kill

  • kill(error?: Error): void
  • Parameters

    Returns void

listenerCount

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

    • type: string | symbol

    Returns number

listeners

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

    • event: string | symbol

    Returns Function[]

off

  • off(event: string | symbol, listener: function): this
  • Parameters

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

          • Rest ...args: any[]

          Returns void

    Returns this

on

  • on(event: string | symbol, listener: function): this
  • on(event: "activityJoinInvite", listener: function): this
  • on(event: "activityJoinRequest", listener: function): this
  • on(event: "activityStart", listener: function): this
  • on(event: "braintreePopupBridgeCallback", listener: function): this
  • on(event: "callCreate", listener: function): this
  • on(event: "callDelete", listener: function): this
  • on(event: "callUpdate", listener: function): this
  • on(event: "channelCreate", listener: function): this
  • on(event: "channelDelete", listener: function): this
  • on(event: "channelPinsAck", listener: function): this
  • on(event: "channelPinsUpdate", listener: function): this
  • on(event: "channelUpdate", listener: function): this
  • on(event: "channelRecipientAdd", listener: function): this
  • on(event: "channelRecipientRemove", listener: function): this
  • on(event: "entitlementCreate", listener: function): this
  • on(event: "entitlementDelete", listener: function): this
  • on(event: "entitlementUpdate", listener: function): this
  • on(event: "friendSuggestionCreate", listener: function): this
  • on(event: "friendSuggestionDelete", listener: function): this
  • on(event: "gatewayReady", listener: function): this
  • on(event: "gatewayResumed", listener: function): this
  • on(event: "giftCodeUpdate", listener: function): this
  • on(event: "guildBanAdd", listener: function): this
  • on(event: "guildBanRemove", listener: function): this
  • on(event: "guildCreate", listener: function): this
  • on(event: "guildDelete", listener: function): this
  • on(event: "guildEmojisUpdate", listener: function): this
  • on(event: "guildIntegrationsUpdate", listener: function): this
  • on(event: "guildMemberAdd", listener: function): this
  • on(event: "guildMemberListUpdate", listener: function): this
  • on(event: "guildMemberRemove", listener: function): this
  • on(event: "guildMemberUpdate", listener: function): this
  • on(event: "guildMembersChunk", listener: function): this
  • on(event: "guildReady", listener: function): this
  • on(event: "guildRoleCreate", listener: function): this
  • on(event: "guildRoleDelete", listener: function): this
  • on(event: "guildRoleUpdate", listener: function): this
  • on(event: "guildUpdate", listener: function): this
  • on(event: "inviteCreate", listener: function): this
  • on(event: "inviteDelete", listener: function): this
  • on(event: "libraryApplicationUpdate", listener: function): this
  • on(event: "lobbyCreate", listener: function): this
  • on(event: "lobbyDelete", listener: function): this
  • on(event: "lobbyUpdate", listener: function): this
  • on(event: "lobbyMemberDisconnect", listener: function): this
  • on(event: "lobbyMemberUpdate", listener: function): this
  • on(event: "lobbyMessage", listener: function): this
  • on(event: "lobbyVoiceServerUpdate", listener: function): this
  • on(event: "lobbyVoiceStateUpdate", listener: function): this
  • on(event: "messageAck", listener: function): this
  • on(event: "messageCreate", listener: function): this
  • on(event: "messageDelete", listener: function): this
  • on(event: "messageDeleteBulk", listener: function): this
  • on(event: "messageReactionAdd", listener: function): this
  • on(event: "messageReactionRemove", listener: function): this
  • on(event: "messageReactionRemoveAll", listener: function): this
  • on(event: "messageReactionRemoveEmoji", listener: function): this
  • on(event: "messageUpdate", listener: function): this
  • on(event: "oauth2TokenRevoke", listener: function): this
  • on(event: "presenceUpdate", listener: function): this
  • on(event: "presencesReplace", listener: function): this
  • on(event: "recentMentionDelete", listener: function): this
  • on(event: "relationshipAdd", listener: function): this
  • on(event: "relationshipRemove", listener: function): this
  • on(event: "sessionsReplace", listener: function): this
  • on(event: "streamCreate", listener: function): this
  • on(event: "streamDelete", listener: function): this
  • on(event: "streamServerUpdate", listener: function): this
  • on(event: "streamUpdate", listener: function): this
  • on(event: "typingStart", listener: function): this
  • on(event: "typingStop", listener: function): this
  • on(event: "userAchievementUpdate", listener: function): this
  • on(event: "userConnectionsUpdate", listener: function): this
  • on(event: "userFeedSettingsUpdate", listener: function): this
  • on(event: "userGuildSettingsUpdate", listener: function): this
  • on(event: "userNoteUpdate", listener: function): this
  • on(event: "userPaymentSourcesUpdate", listener: function): this
  • on(event: "userPaymentsUpdate", listener: function): this
  • on(event: "userUpdate", listener: function): this
  • on(event: "usersUpdate", listener: function): this
  • on(event: "voiceServerUpdate", listener: function): this
  • on(event: "voiceStateUpdate", listener: function): this
  • on(event: "webhooksUpdate", listener: function): this
  • on(event: "raw", listener: function): this
  • on(event: "restRequest", listener: function): this
  • on(event: "restResponse", listener: function): this
  • on(event: "unknown", listener: function): this
  • on(event: "warn", listener: function): this
  • on(event: "killed", listener: function): this
  • on(event: "ready", listener: function): this
  • on(event: "shard", listener: function): this

once

  • once(event: string | symbol, listener: function): this
  • Parameters

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

          • Rest ...args: any[]

          Returns void

    Returns this

prependListener

  • prependListener(event: string | symbol, listener: function): this
  • Parameters

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

          • Rest ...args: any[]

          Returns void

    Returns this

prependOnceListener

  • prependOnceListener(event: string | symbol, listener: function): this
  • Parameters

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

          • Rest ...args: any[]

          Returns void

    Returns this

rawListeners

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

    • event: string | symbol

    Returns Function[]

removeAllListeners

  • removeAllListeners(name?: string | symbol): this
  • Parameters

    • Optional name: string | symbol

    Returns this

removeAllSubscriptions

  • removeAllSubscriptions(): this
  • Returns this

removeListener

  • removeListener(event: string | symbol, listener: function): this
  • Parameters

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

          • Rest ...args: any[]

          Returns void

    Returns this

removeSubscription

  • removeSubscription(subscription: EventSubscription): void
  • Parameters

    • subscription: EventSubscription

    Returns void

run

setMaxListeners

  • setMaxListeners(n: number): this
  • Parameters

    • n: number

    Returns this

setShardCount

  • setShardCount(value: number): void
  • Parameters

    • value: number

    Returns void

setShardEnd

  • setShardEnd(value: number): void
  • Parameters

    • value: number

    Returns void

setShardStart

  • setShardStart(value: number): void
  • Parameters

    • value: number

    Returns void

subscribe

  • subscribe(name: string | symbol, listener: function): EventSubscription
  • Parameters

    • name: string | symbol
    • listener: function
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns EventSubscription

Object literals

_refresh

_refresh: object

applications

applications: object

last

last: number = 0

time

time: number = 4 * (60 * 60) * 1000

oauth2Application

oauth2Application: object

last

last: number = 0

time

time: number = 4 * (60 * 60) * 1000

Generated using TypeDoc