PerformanC / NodeLink

Performant LavaLink alternative written with Node.Js
BSD 2-Clause "Simplified" License
38 stars 23 forks source link

[BUG]: Player reconnect on voiceStateUpdate #49

Closed ZuherLaith closed 4 months ago

ZuherLaith commented 4 months ago

NodeLink version

2.0.1

Description

Currently NL isn't reconnecting when voiceStateUpdate of the player is changed, which basically destroy's the player when player is moved from channel to channel in discord.

Client

FL 2.4.2

Steps to reproduce

Request something on your client, then move the bot to another channel, player will stop sending audio after that until a new player is created.

Example code

No response

Confirmations

Code of Conduct

UnschooledGamer commented 4 months ago

Hi @ZuherLaith ,

I have informed Pedro he'll soon look into this.

I have successfully reproduced the Bug. Marking it as confirmed.

Thanks, UG.

ThePedroo commented 4 months ago

This will be patched with a small commit in NodeLink side, but mostly in @performanc/voice part. This issue is also caused by FastLink, I'll give more information once all gets solved.

ThePedroo commented 4 months ago

https://github.com/PerformanC/voice/commit/a779648cb7ce0d7c114369fcb4cbde6a80c880e6, https://github.com/PerformanC/FastLink/commit/f4f7ac5cc4c40789b8d5a54a2f8eb66aa83e91c1 and https://github.com/PerformanC/NodeLink/commit/a61fde4cc4559e7577aec3188d47369a47bcdadc seems to fix the issue. Can anyone else confirm this?

UnschooledGamer commented 4 months ago

PerformanC/voice@a779648, PerformanC/FastLink@f4f7ac5 and a61fde4 seems to fix the issue. Can anyone else confirm this?

I'll test out later on

UnschooledGamer commented 4 months ago

PerformanC/voice@a779648, PerformanC/FastLink@f4f7ac5 and a61fde4 seems to fix the issue. Can anyone else confirm this?

I'll test out later on

It works Great. But can restore the position too(like not restart the song back from 0)? Something like saving the previous position, Then seeking it to back to original position back after reconnection/moved

ThePedroo commented 4 months ago

🤔 I completely missed that one. Will work on it!

UnschooledGamer commented 4 months ago

🤔 I completely missed that one. Will work on it!

Alright, Good Job.

ThePedroo commented 4 months ago

https://github.com/PerformanC/voice/compare/7271ef71eabd...c84b01d48d4a, https://github.com/PerformanC/NodeLink/commit/45f71ee4257cb71b06e969cff30350ceea6b417e and https://github.com/PerformanC/voice/commit/7271ef71eabde87584c73df80cb0b6777045ea0a should fix bugs related to this issue and this issue itself. Can anyone confirm?

ThePedroo commented 4 months ago

Tested on Discord.