Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Shard

Utility manager for a shard

Hierarchy

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

Index

Constructors

constructor

  • Parameters

    Returns Shard

Properties

id

id: number

ping

ping: number = 0

Ping in ms

worker

worker: Worker<{}>

Accessors

ready

  • get ready(): boolean
  • Whether or not the shard is READY

    Returns boolean

state

  • Current shard state

    Returns State

Methods

getGuildMembers

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

    • opts: GatewayRequestGuildMembersData

    Returns Promise<Collection<string, APIGuildMember>>

register

  • register(): Promise<{}>
  • Returns 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
  • Parameters

    • presence: GatewayPresenceUpdateData

    Returns void

start

  • start(): void
  • Returns void

Generated using TypeDoc