Options
All
  • Public
  • Public/Protected
  • All
Menu

Utility manager for a shard

Hierarchy

  • EventEmitter<DiscordDefaultEventMap & { CLOSED: [code: number, reason: string] }>
    • Shard

Index

Constructors

Properties

Accessors

Methods

Constructors

constructor

  • new Shard(id: number, worker: Worker): Shard
  • Parameters

    • id: number
    • worker: Worker

    Returns Shard

Properties

id

id: number

ping

ping: number = 0

Ping in ms

worker

worker: Worker

Accessors

ready

  • get ready(): boolean

state

Methods

getGuildMembers

  • getGuildMembers(opts: GatewayRequestGuildMembersData): Promise<Collection<string, APIGuildMember>>
  • Parameters

    • opts: GatewayRequestGuildMembersData

    Returns Promise<Collection<string, APIGuildMember>>

register

  • register(): Promise<{}>

restart

  • restart(kill: boolean, code?: number, reason?: string): void
  • Parameters

    • kill: boolean
    • code: number = 1012
    • reason: string = 'Manually Stopped'

    Returns void

setPresence

  • setPresence(presence: GatewayPresenceUpdateData): void

start

  • start(): void

Legend

  • Constructor
  • Property
  • Method
  • Inherited constructor
  • Inherited property
  • Inherited method
  • Property
  • Static method

Generated using TypeDoc