Skip to content

WebSocketClosedEvent

The WebSocketClosedEvent is sent by the server to the client when a Discord voice WebSocket connection is closed.


FieldTypeDescription
opstringAlways event
typestringAlways WebSocketClosedEvent
guildIdstringThe Discord guild ID
codenumberThe Discord close code
reasonstringThe close reason
byRemotebooleanWhether the connection was closed by Discord

{
"op": "event",
"type": "WebSocketClosedEvent",
"guildId": "1234567890",
"code": 4014,
"reason": "Disconnected",
"byRemote": true
}