Skip to content

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

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

feat: deprecate VoiceRegion enum in favour of dynamic voice regions#3347
vmphase wants to merge 16 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
@Paillat-dev Paillat-dev self-assigned this Aug 11, 2026
Comment thread discord/guild.py
Comment thread discord/guild.py Outdated
Comment thread discord/channel.py
Comment thread discord/channel.py Outdated
Comment thread discord/channel.py
Comment thread discord/channel.py
Comment thread discord/guild.py
Comment thread discord/guild.py
Comment thread discord/guild.py
Comment thread discord/guild.py
Comment thread discord/guild.py Outdated
Comment thread docs/api/enums.rst Outdated
Co-authored-by: ToothyDev <chosenfate@gmx.de>
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 PA: Maintainers pending

Projects

Status: Todo

Development

Successfully merging this pull request may close these issues.

Refactor VoiceRegion from hardcoded enum to dynamic class

4 participants