Skip to content

Commit

Permalink
Manual Disconnect Player Bug Resolved
Browse files Browse the repository at this point in the history
  • Loading branch information
Elitex07 committed Sep 13, 2023
1 parent e273537 commit 78e2c1c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
6 changes: 6 additions & 0 deletions build/structures/Connection.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -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": [
Expand Down

0 comments on commit 78e2c1c

Please sign in to comment.