Closed 9382 closed 4 months ago
Turns out the bug is something related to specifically play, and how PlayerManager decides which message object it's meant to reply to. Ran into it yesterday when doing testing with insert.
Currently, only the play command declares which message is replied to (PlayerManager.message = event;
, who thought this was a good idea to store the message??). This means anything else that triggers a sendembed track loading (or just 2 very closely timed play commands (this means this is a potential cross-server issue!)) would load correctly but reply to the wrong message. See image attached below, where insert at an index more than queue size causes a standard load.
Solution: Either pass the event to loadAndPlay (probably worth doing this as a replacement for the guild channel variable, since then we don't add even more args) or not use 1 variable for every single reply we ever intend to do
https://github.com/ZeNyfh/gigavibe-java-edition/assets/49820045/8b3ab452-2b72-4ca1-920c-e27243bae67d