diff --git a/build/structures/Connection.js b/build/structures/Connection.js index f2370d6..1356d3b 100644 --- a/build/structures/Connection.js +++ b/build/structures/Connection.js @@ -39,6 +39,12 @@ class Connection { setStateUpdate(data) { const { session_id, channel_id, self_deaf, self_mute } = data; + // If player is manually disconnected from VC + if(channel_id == null) { + this.player.destroy(); + this.player.emit("playerDestroy", this.player); + } + if (this.player.voiceChannel && channel_id && this.player.voiceChannel !== channel_id) { this.player.emit("playerMove", this.player.voiceChannel, channel_id) this.player.voiceChannel = channel_id; diff --git a/package.json b/package.json index c3352c6..5cf9b22 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "riffy", "description": "Riffy is a pro lavalink client. It is designed to be simple and easy to use, with a focus on stability and more features.", - "version": "1.0.0", + "version": "1.0.1", "main": "build/index.js", "types": "build/index.d.ts", "files": [