Represents a Shard's WebSocket connection
Extends
EventEmitterEmitted 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
Name | Type | Optional | Description |
---|---|---|---|
unavailableGuilds | Set<string> | No | Set of unavailable guilds, if any |
Emitted when a shard's WebSocket closes.
Name | Type | Optional | Description |
---|---|---|---|
event | CloseEvent | No | The received event |
Name | Type | Optional | Description |
---|---|---|---|
event | K | No | None |
listener | (...args: WebSocketShardEventTypes[K]) => Awaitable<void> | No | None |
Name | Type | Optional | Description |
---|---|---|---|
event | K | No | None |
listener | (...args: WebSocketShardEventTypes[K]) => Awaitable<void> | No | None |
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.
Name | Type | Optional | Description |
---|---|---|---|
data | unknown | No | The full packet to send |
important | boolean | Yes | If this packet should be added first in queue This parameter is **deprecated**. Important payloads are determined by their opcode instead. |