Skip to content

Conversation

kikkia
Copy link
Contributor

@kikkia kikkia commented Jun 16, 2025

New cloudflare based endpoints have a new format that is not parseable by our current voice region parser (e.g "c-lhr14-eb603bad.discord.media:2096")

It seems to follow the pattern of "c-" + 3 letter IATA code, and there are a lot.

This PR adds a new field to the voice region enum that is a list of strings of all of the airport codes in the region of the existing region. There were still a ton of codes leftover that didn't match any existing regions, so I added some new generic ones that handle large amounts of these datacenter codes.

I have seen a few thousand of these and they all begin with c- which is why I chose to use that way of determining which to use.

The airport codes were translated to lat/long coordinates then those were just bucketed together based on general region. So it should be decently accurate but it's 2am and I haven't double checked them.

Also had the thought about making the discord IDs also a list and trimming down a bunch of these 1 city regions into countries at the very least but that could be a follow up.

@duncte123
Copy link
Collaborator

Sorry for the late reply, was busy IRL

@duncte123 duncte123 merged commit a313f9f into lavalink-devs:main Jul 30, 2025
2 checks passed
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