lavacord / Lavacord

A easy to use Lavalink client that can be used with any discord api wrapper
Apache License 2.0
78 stars 21 forks source link

Add the option for selecting nodes based off VOICE_SERVER_UPDATE endpoint region #118

Closed PapiOphidian closed 1 year ago

PapiOphidian commented 2 years ago

For whatever reason, git decided to include the commit where I updated the links to freyacodes/LavaLink in this PR, but shouldn't be too much of an issue with a squash merge.

This has been tested to work.

This does require the user to define regions and does not offer fallback to a random node because it may be unintentional, although not all of the regions shown through the VOICE_SERVER_UPDATE endpoint field are displayed somewhere. I plan to create a table of regions I personally have seen. Although, the lib will display the region it could not select, so new nodes could be added to the map as they're created

PapiOphidian commented 1 year ago

It seems as though this approach is no longer recommended as Discord selects a voice region which is central to everyone in the voice channel and only adds extra async overhead.