Skip to content

Conversation

@jovolopez
Copy link

@jovolopez jovolopez commented Jun 5, 2025

Hi! Discord recently introduced two new voice close event codes, now documented at https://discord.com/developers/docs/topics/opcodes-and-status-codes#voice-close-event-codes.

This PR adds explicit handling for:

  • 4021: Voice connection dropped due to rate limiting.
  • 4022: Call terminated (e.g., channel deleted, voice server changed, or call ended).

When these codes are received, the client will now not attempt to re-establish the voice connection, since these cases represent intentional or unrecoverable closures.

The original PR text mentioned they were undocumented, but it has been updated now that the official documentation is available.

@jovolopez
Copy link
Author

@jovolopez jovolopez changed the title Support new '4022' voice close event code Support new voice close event codes (4021, 4022) Aug 13, 2025
@jovolopez
Copy link
Author

Closes #1655

@RadCraftplay RadCraftplay mentioned this pull request Nov 1, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants