twilight-rs / twilight

Powerful, flexible, and scalable ecosystem of Rust libraries for the Discord API.
https://discord.gg/twilight-rs
ISC License
653 stars 130 forks source link

Lavalink v4 update will break twilight-lavalink #2192

Open Michael-1001 opened 1 year ago

Michael-1001 commented 1 year ago

I believe Lavalink is going ahead with their v4 update soon and removing their v2 websocket client requests (well, they were deprecated in v3 and from what I gathered in their Discord the choice was made to remove it entirely in v4).

This means while twilight-lavalink will still be able to listen in on websocket notifications (I believe the current version listens into PlayerUpdate and Stats op codes), it won't actually be able to make any requests as they're all being supplemented with REST API calls instead.

I'm happy to try and help contribute if possible but, this bot being my first major Rust project (well excluding my here and there with Serenity recently) I'm unsure anyone wants to see what I might produce.

For more information you can find it here: Their current implementation details for version 3.7.5 can be found here. Their implementation details for 4.0 can be found here.

LinuxDevon commented 5 months ago

I am working on adding support for this. Fixed the current rc first and going to work on adding this support. Implementation overall is going to be a bigger rewrite than expected...

2024-03-04 23:12:54.572 WARN 1 --- [ XNIO-1 I/O-10] lavalink.server.io.WebSocketHandler : Sending websocket commands to Lavalink has been deprecated and will be removed in API version 4. API version 3 will be removed in Lavalink 5. Please use the new REST endpoints instead.

The lavalink bot is written on websockets :face_exhaling:. New link to the implementation details since the original is broken / changed: https://lavalink.dev/api/index.html

LinuxDevon commented 5 months ago

@Michael-1001 if you have some time it would be helpful to have a second set of tests to see if you can also use it. Not sure if you have a bot or not to test on.

Michael-1001 commented 5 months ago

Sorry for the late response!

I made some local additions to twilight-lavalink a while back so I'm running a real mess of code at the moment. I was going to come back to my bot soon (albeit slightly busy at the moment) so I'll give it a try then if no one else beats me to it.

Seeing some great commits though, thanks for looking into this!