Skip to content

feat: deprecate VoiceRegion enum in favour of dynamic voice regions - #3347

Open
vmphase wants to merge 31 commits into
masterfrom
feat/dynamic-voice-regions
Open

vmphase wants to merge 31 commits into
masterfrom
feat/dynamic-voice-regions

Conversation

@vmphase

@vmphase vmphase commented Aug 11, 2026

Copy link
Copy Markdown
Member

Summary

Fixes #3343.

This PR deprecates the enum and adds Guild.fetch_voice_regions() as the recommended way to get the available regions. However, the VoiceRegion enum is kept public for backwards compatibility but reduced to the currently available regions.
^ VoiceRegion.us_central or VoiceRegion["us_central"] now emits a DeprecationWarning.

Information

  • This PR fixes an issue.
  • This PR adds something new (e.g. new method or parameters).
  • This PR is a breaking change (e.g. methods or parameters removed/renamed).
  • This PR is not a code change (e.g. documentation, README, typehinting,
    examples, ...).

Checklist

  • I have searched the open pull requests for duplicates.
  • If code changes were made then they have been tested.
    • I have updated the documentation to reflect the changes.
  • If type: ignore comments were used, a comment is also left explaining why.
  • I have updated the changelog to include these changes.
  • I have read the Contributing Guidelines.
  • AI Usage has been disclosed.
    • If AI has been used, I understand fully what the code does

@vmphase
vmphase requested review from a team and Lulalaby August 11, 2026 12:17
@vmphase
vmphase requested a review from NeloBlivion August 11, 2026 12:17
@github-project-automation github-project-automation Bot moved this to Todo in Pycord Aug 11, 2026
@vmphase
vmphase requested a review from JustaSqu1d August 11, 2026 12:17
@vmphase
vmphase requested a review from a team as a code owner August 11, 2026 12:17
@pycord-app

pycord-app Bot commented Aug 11, 2026

Copy link
Copy Markdown

Thanks for opening this pull request!
Please make sure you have read the Contributing Guidelines and Code of Conduct.

This pull request can be checked-out with:

git fetch origin pull/3347/head:pr-3347
git checkout pr-3347

This pull request can be installed with:

pip install git+https://github.com/Pycord-Development/pycord@refs/pull/3347/head

Comment thread discord/enums.py
Comment thread discord/enums.py
@vmphase

vmphase commented Aug 11, 2026 •

Copy link
Copy Markdown
Member Author

FYI try_enum(VoiceRegion, ...) does not warn, as it is used internally (e.g. when parsing channel.rtc_region) and changing it to use the new syntax would be an explicit breaking change.

@vmphase
vmphase requested review from Paillat-dev and Soheab August 11, 2026 13:31
@Paillat-dev Paillat-dev added the hold: testing This pull request requires further testing label Aug 11, 2026
@vmphase

vmphase commented Sep 18, 2026

Copy link
Copy Markdown
Member Author

Since @JustaSqu1d's reviews were addressed, I think it's time to review the PR one more time.

@Paillat-dev
Paillat-dev requested a balanced review from Copilot September 29, 2026 07:45

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot review overview

🟡 Changes recommended

Critical region payload handling and additional compatibility/export issues remain unresolved.

Review effort: Lite
Findings: 1 High severity · 1 Medium severity · 2 Low severity

Open (4)

Comment thread discord/guild.py
Comment thread discord/guild.py
Comment thread discord/channel.py Outdated
Comment thread discord/guild.py Outdated
@vmphase
vmphase force-pushed the feat/dynamic-voice-regions branch from eb2e0da to 5f38f22 Compare September 29, 2026 08:02
@Paillat-dev

Copy link
Copy Markdown
Member

Since JustaSqu1d's reviews were addressed, I think it's time to review the PR one more time.

Where is Squid's review ?

@vmphase

vmphase commented Sep 30, 2026

Copy link
Copy Markdown
Member Author

Since JustaSqu1d's reviews were addressed, I think it's time to review the PR one more time.

Where is Squid's review ?

Oops. Mixed up the two PRs, nevermind.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot review overview

🟡 Changes recommended

Unresolved legacy enum compatibility issues and documentation corrections remain.

Review effort: Lite
Findings: 1 High severity · 1 Low severity

Open (2)
Resolved since last review (4)

Comment thread discord/enums.py Outdated
Comment thread docs/api/enums.rst
@Paillat-dev

Copy link
Copy Markdown
Member

merge conflicts 💔

Signed-off-by: Michael <vmphase.dev@gmail.com>
@vmphase

vmphase commented Oct 5, 2026

Copy link
Copy Markdown
Member Author

merge conflicts 💔

Fixed!

@Paillat-dev Paillat-dev left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Pending squid

Comment thread CHANGELOG.md Outdated
Co-authored-by: Paillat <paillat@pycord.dev>
Signed-off-by: Michael <vmphase.dev@gmail.com>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

hold: testing This pull request requires further testing

Projects

Status: Todo

Development

Successfully merging this pull request may close these issues.

Refactor VoiceRegion from hardcoded enum to dynamic class

5 participants