shipgirlproject / Shoukaku

A stable, powerful and updated wrapper around Lavalink
https://guide.shoukaku.shipgirl.moe/
MIT License
287 stars 86 forks source link

Implement bug fix. See below. #16

Closed CirceAurora closed 4 years ago

CirceAurora commented 4 years ago

Bug: ShoukakuPlayer#track is incorrectly null.

Cause: ShoukakuPlayer#playTrack(track, { noReplace: false })

When ShoukakuPlayer#playTrack(track, { noReplace: false } is called, ShoukakuPlayer#track is set correctly to the new track. However, the following end event sets it to null. The end event occurs because of { noReplace: false } provided in the function.

Fix: Listen to the start event and set ShoukakuPlayer#track to the track stored in the event data. This will also help with keeping Shoukaku and LavaLink synced.