WebSocketClosedEvent
The WebSocketClosedEvent is sent by the server to the client when a Discord voice WebSocket connection is closed.
Structure
Section titled “Structure”| Field | Type | Description |
|---|---|---|
op | string | Always event |
type | string | Always WebSocketClosedEvent |
guildId | string | The Discord guild ID |
code | number | The Discord close code |
reason | string | The close reason |
byRemote | boolean | Whether the connection was closed by Discord |
Example Payload
Section titled “Example Payload”{ "op": "event", "type": "WebSocketClosedEvent", "guildId": "1234567890", "code": 4014, "reason": "Disconnected", "byRemote": true}