export class WebSocketShard extends EventEmitterRepresents a Shard's WebSocket connection
id : number
The shard's id
lastPingTimestamp : number
The last time a ping was sent (a timestamp)
manager : WebSocketManager
The WebSocketManager of the shard
ping : number
The previous heartbeat ping of the shard
status : Status
The current status of the shard
deprecated emitClose(event?: CloseEvent) :
yes
This method is responsible to emit close event for this shard. This method helps the shard reconnect.
on<Event extends keyof WebSocketShardEventTypes
>(event: Eventlistener: (...args: WebSocketShardEventTypes[Event]) => void) : this
Event extends keyof WebSocketShardEventTypes
once<Event extends keyof WebSocketShardEventTypes
>(event: Eventlistener: (...args: WebSocketShardEventTypes[Event]) => void) : this
Event extends keyof WebSocketShardEventTypes
Adds a packet to the queue to be sent to the gateway. If you use this method, make sure you understand that you need to provide a full [Payload](https://discord.com/developers/docs/topics/gateway#commands-and-events-gateway-commands). Do not use this method if you don't know what you're doing.
Emitted when the shard is fully ready. This event is emitted if:* all guilds were received by this shard* the ready timeout expired, and some guilds are unavailable
close(event: CloseEvent)
Emitted when a shard's WebSocket closes.