Class

WebSocketManager

Extends EventEmitter

Constructor

new WebSocketManager(options: WebSocketManagerOptions)

Properties

NameTypeDescription
pingread-onlynumberLast gateway heartbeat ACK latency (RTT) in milliseconds (average across shards). -1 until the first ACK, or when no strategy is connected. Per-shard: manager.getShard(id)?.ping.
client.on(Events.Ready, () => {
  console.log(client.ws.ping);
});

Methods

.connect()

Promise<void>

await client.ws.connect();

.fetchStatus()

Promise<Map<number, ShardStatus>>

Per-shard status map (empty before connect).

await client.ws.fetchStatus();