diff --git a/docs/topics/opcodes-and-status-codes.md b/docs/topics/opcodes-and-status-codes.md index 74ce2e707e..99065358ef 100644 --- a/docs/topics/opcodes-and-status-codes.md +++ b/docs/topics/opcodes-and-status-codes.md @@ -23,25 +23,25 @@ All gateway events in Discord are tagged with an opcode that denotes the payload ###### Gateway Close Event Codes -In order to prevent broken reconnect loops, you should consider some close codes as a signal to stop reconnecting. This can be because your token expired, or your identification is invalid. This table explains what the application defined close codes for the gateway are, and which close codes you should not attempt to reconnect. +In order to prevent broken reconnect loops, you should consider some close codes as a signal to stop reconnecting. This can be because your token expired, or your identification is invalid. This table explains what the application-defined close codes for the gateway are, which close codes you should not attempt to reconnect, and which ones require you to start a new session. -| Code | Description | Explanation | Reconnect | -|------|-----------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-----------| -| 4000 | Unknown error | We're not sure what went wrong. Try reconnecting? | true | -| 4001 | Unknown opcode | You sent an invalid [Gateway opcode](/docs/topics/opcodes-and-status-codes#gateway-gateway-opcodes) or an invalid payload for an opcode. Don't do that! | true | -| 4002 | Decode error | You sent an invalid [payload](/docs/events/gateway#sending-events) to Discord. Don't do that! | true | -| 4003 | Not authenticated | You sent us a payload prior to [identifying](/docs/events/gateway#identifying), or this session has been invalidated. | true | -| 4004 | Authentication failed | The account token sent with your [identify payload](/docs/events/gateway-events#identify) is incorrect. | false | -| 4005 | Already authenticated | You sent more than one identify payload. Don't do that! | true | -| 4007 | Invalid `seq` | The sequence sent when [resuming](/docs/events/gateway-events#resume) the session was invalid. Reconnect and start a new session. | true | -| 4008 | Rate limited | Woah nelly! You're sending payloads to us too quickly. Slow it down! You will be disconnected on receiving this. | true | -| 4009 | Session timed out | Your session timed out. Reconnect and start a new one. | true | -| 4010 | Invalid shard | You sent us an invalid [shard when identifying](/docs/events/gateway#sharding). | false | -| 4011 | Sharding required | The session would have handled too many guilds - you are required to [shard](/docs/events/gateway#sharding) your connection in order to connect. | false | -| 4012 | Invalid API version | You sent an invalid version for the gateway. | false | -| 4013 | Invalid intent(s) | You sent an invalid intent for a [Gateway Intent](/docs/events/gateway#gateway-intents). You may have incorrectly calculated the bitwise value. | false | -| 4014 | Disallowed intent(s) | You sent a disallowed intent for a [Gateway Intent](/docs/events/gateway#gateway-intents). You may have tried to specify an intent that you [have not enabled or are not approved for](/docs/events/gateway#privileged-intents). | false | +| Code | Description | Explanation | Reconnect | Resume | +|------|-----------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-----------|--------| +| 4000 | Unknown error | We're not sure what went wrong. Try reconnecting? | true | true | +| 4001 | Unknown opcode | You sent an invalid [Gateway opcode](/docs/topics/opcodes-and-status-codes#gateway-gateway-opcodes) or an invalid payload for an opcode. Don't do that! | true | false | +| 4002 | Decode error | You sent an invalid [payload](/docs/events/gateway#sending-events) to Discord. Don't do that! | true | true | +| 4003 | Not authenticated | You sent us a payload prior to [identifying](/docs/events/gateway#identifying), or this session has been invalidated. | true | false | +| 4004 | Authentication failed | The account token sent with your [identify payload](/docs/events/gateway-events#identify) is incorrect. | false | false | +| 4005 | Already authenticated | You sent more than one identify payload. Don't do that! | true | false | +| 4007 | Invalid `seq` | The sequence sent when [resuming](/docs/events/gateway-events#resume) the session was invalid. | true | false | +| 4008 | Rate limited | Woah nelly! You're sending payloads to us too quickly. Slow it down! You will be disconnected on receiving this. | true | true | +| 4009 | Session timed out | Your session timed out. | true | false | +| 4010 | Invalid shard | You sent us an invalid [shard when identifying](/docs/events/gateway#sharding). | false | false | +| 4011 | Sharding required | The session would have handled too many guilds - you are required to [shard](/docs/events/gateway#sharding) your connection in order to connect. | false | false | +| 4012 | Invalid API version | You sent an invalid version for the gateway. | false | false | +| 4013 | Invalid intent(s) | You sent an invalid intent for a [Gateway Intent](/docs/events/gateway#gateway-intents). You may have incorrectly calculated the bitwise value. | false | false | +| 4014 | Disallowed intent(s) | You sent a disallowed intent for a [Gateway Intent](/docs/events/gateway#gateway-intents). You may have tried to specify an intent that you [have not enabled or are not approved for](/docs/events/gateway#privileged-intents). | false | false | ## Voice