Skip to content
Merged
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 18 additions & 15 deletions docs/topics/opcodes-and-status-codes.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,21 +77,24 @@ Our voice gateways have their own set of opcodes and close codes.

###### Voice Close Event Codes

| Code | Description | Explanation |
|------|--------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------|
| 4001 | Unknown opcode | You sent an invalid [opcode](/docs/topics/opcodes-and-status-codes#voice-voice-opcodes). |
| 4002 | Failed to decode payload | You sent an invalid payload in your [identifying](/docs/events/gateway-events#identify) to the Gateway. |
| 4003 | Not authenticated | You sent a payload before [identifying](/docs/events/gateway-events#identify) with the Gateway. |
| 4004 | Authentication failed | The token you sent in your [identify](/docs/events/gateway-events#identify) payload is incorrect. |
| 4005 | Already authenticated | You sent more than one [identify](/docs/events/gateway-events#identify) payload. Stahp. |
| 4006 | Session no longer valid | Your session is no longer valid. |
| 4009 | Session timeout | Your session has timed out. |
| 4011 | Server not found | We can't find the server you're trying to connect to. |
| 4012 | Unknown protocol | We didn't recognize the [protocol](/docs/topics/voice-connections#establishing-a-voice-udp-connection-example-select-protocol-payload) you sent. |
| 4014 | Disconnected | Channel was deleted, you were kicked, voice server changed, or the main gateway session was dropped. Should not reconnect. |
| 4015 | Voice server crashed | The server crashed. Our bad! Try [resuming](/docs/topics/voice-connections#resuming-voice-connection). |
| 4016 | Unknown encryption mode | We didn't recognize your [encryption](/docs/topics/voice-connections#transport-encryption-and-sending-voice). |
| 4020 | Bad request | You sent a malformed request |
| Code | Description | Explanation |
|------|-------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------|
| 4001 | Unknown opcode | You sent an invalid [opcode](/docs/topics/opcodes-and-status-codes#voice-voice-opcodes). |
| 4002 | Failed to decode payload | You sent an invalid payload in your [identifying](/docs/events/gateway-events#identify) to the Gateway. |
| 4003 | Not authenticated | You sent a payload before [identifying](/docs/events/gateway-events#identify) with the Gateway. |
| 4004 | Authentication failed | The token you sent in your [identify](/docs/events/gateway-events#identify) payload is incorrect. |
| 4005 | Already authenticated | You sent more than one [identify](/docs/events/gateway-events#identify) payload. Stahp. |
| 4006 | Session no longer valid | Your session is no longer valid. |
| 4009 | Session timeout | Your session has timed out. |
| 4011 | Server not found | We can't find the server you're trying to connect to. |
| 4012 | Unknown protocol | We didn't recognize the [protocol](/docs/topics/voice-connections#establishing-a-voice-udp-connection-example-select-protocol-payload) you sent. |
| 4014 | Disconnected | Disconnect individual client (you were kicked, the main gateway session was dropped, etc.). Should not reconnect. |
| 4015 | Voice server crashed | The server crashed. Our bad! Try [resuming](/docs/topics/voice-connections#resuming-voice-connection). |
| 4016 | Unknown encryption mode | We didn't recognize your [encryption](/docs/topics/voice-connections#transport-encryption-and-sending-voice). |
| 4020 | Bad request | You sent a malformed request |
| 4021 | Disconnected: Rate Limited | Disconnect due to rate limit exceeded. Should not reconnect. |
| 4022 | Disconnected: Call Terminated | Disconnect all clients due to call terminatedc (channel deleted, voice server changed, etc.). Should not reconnect. |
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
| 4022 | Disconnected: Call Terminated | Disconnect all clients due to call terminatedc (channel deleted, voice server changed, etc.). Should not reconnect. |
| 4022 | Disconnected: Call Terminated | Disconnect all clients due to call terminated (channel deleted, voice server changed, etc.). Should not reconnect. |

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you, fixed.



## HTTP

Expand Down