Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • EventSpewer
    • ClusterClient

Index

Constructors

constructor

Properties

Readonly _refresh

_refresh: { applications: { last: number; time: number }; oauth2Application: { last: number; time: number } } = ...

Type declaration

  • applications: { last: number; time: number }
    • last: number
    • time: number
  • oauth2Application: { last: number; time: number }
    • last: number
    • time: number

Readonly _shardsWaiting

_shardsWaiting: BaseCollection<number, { reject: Function; resolve: Function }> = ...

buckets

buckets: BaseCollection<number, Bucket> = ...

Readonly commandClient

commandClient: null | CommandClient = null

Readonly interactionCommandClient

interactionCommandClient: null | InteractionCommandClient = null

Readonly manager

manager: null | ClusterProcessChild = null

maxConcurrency

maxConcurrency: number = 1

ran

ran: boolean = false

Readonly rest

rest: Client

shardCount

shardCount: number = 0

shardEnd

shardEnd: number = -1

shardOptions

shardOptions: ShardClientOptions = {}

shardStart

shardStart: number = 0

shards

shards: BaseCollection<number, ShardClient> = ...

Readonly token

token: string

Static Readonly captureRejectionSymbol

captureRejectionSymbol: typeof captureRejectionSymbol

Static captureRejections

captureRejections: boolean

Sets or gets the default captureRejection value for all emitters.

Static defaultMaxListeners

defaultMaxListeners: number

Static Readonly 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.

Accessors

applicationId

  • get applicationId(): string

clusterId

  • get clusterId(): number

Methods

addListener

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

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

          • Rest ...args: any[]

          Returns void

    Returns ClusterClient

emit

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

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

    Returns boolean

eventNames

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

fillApplications

  • fillApplications(): Promise<void>

fillOauth2Application

  • fillOauth2Application(): Promise<void>

getMaxListeners

  • getMaxListeners(): number
  • Returns number

getRatelimitKey

  • getRatelimitKey(shardId: number): number

hasEventListener

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

    • name: string | symbol

    Returns boolean

hookedEmit

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

hookedHasEventListener

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

kill

  • kill(error?: Error): 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): ClusterClient
  • Parameters

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

          • Rest ...args: any[]

          Returns void

    Returns ClusterClient

on

once