Preview environment

class WebSocketManager

extends

EventEmitter
export class WebSocketManager extends EventEmitter

The WebSocket manager for this client. This class forwards raw dispatch events, read more about it here https://discord.com/developers/docs/topics/gatewayundefined

readonly
client : Client

The client that instantiated this WebSocketManager

gateway : string | null

The gateway this manager uses

readonly
ping : number

The average ping of all WebSocketShards

A collection of all shards this manager handles

status : Status

The current status of this WebSocketManager

on(
listener: (data: any, shardId: number) => void
) : this

once(
listener: (data: any, shardId: number) => void
) : this