Tomato6966 / lavalink-client

Easy, flexible and feature-rich lavalink@v4 Client. Both for Beginners and Proficients.
https://tomato6966.github.io/lavalink-client/
MIT License
48 stars 13 forks source link

player.destroy() destroys shard and manager #28

Closed siy-uuu closed 4 months ago

siy-uuu commented 4 months ago

A trackStuck event occurred and I ordered player.destroy(); and it destroys my shard

https://sourceb.in/hObR3xz7Rg https://sourceb.in/B7m1sklQ2n

trackStuck.js

module.exports = async (player, track, payload) => {
    return player.destroy();
};
Tomato6966 commented 4 months ago

probably because you load the event like this:

eventFunction(client, player, track, payload);

and thus your "player" is really just "botclient"