fix(lavalink): Update Lavalink configuration and enhance healthcheck with plugin management

This commit is contained in:
2025-04-24 01:50:06 +08:00
parent ca9e531541
commit 8f8ff6aa81
3 changed files with 39 additions and 15 deletions

View File

@@ -102,9 +102,12 @@ class MusicPlayer {
// Destroy the player and disconnect
destroy() {
this.client.shoukaku.leaveVoiceChannel(this.guild);
musicPlayer.players.delete(this.guild);
return this;
// Use the main Shoukaku instance to leave the channel
this.client.shoukaku.leaveVoiceChannel(this.guild);
// Remove the player instance from the manager's map
musicPlayer.players.delete(this.guild);
logger.debug(`Destroyed player for guild ${this.guild}`);
return this; // Return this for potential chaining, though unlikely needed here
},
// Add a track to the queue or play it if nothing is playing