From f543cd32672882efefb72fa8603684d20dfc4268 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christer=20War=C3=A9n?= Date: Wed, 4 Aug 2021 12:48:59 +0300 Subject: [PATCH] Removed radio.voiceChannel.leave() and replaced with radio.connection.destroy() --- src/client/commands/play.js | 4 ++-- src/client/commands/stop.js | 1 - 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/client/commands/play.js b/src/client/commands/play.js index 753c069..96e2c94 100644 --- a/src/client/commands/play.js +++ b/src/client/commands/play.js @@ -135,13 +135,13 @@ function play(guild, client, url) { .on("finish", () => { console.log("Stream finished"); client.funcs.statisticsUpdate(client, guild, radio); - radio.voiceChannel.leave(); + radio.connection.destroy(); client.radio.delete(guild.id); return; }) .on("error", error => { console.error(error); - radio.voiceChannel.leave(); + radio.connection.destroy(); client.radio.delete(guild.id); return radio.textChannel.send(client.messages.errorPlaying); }); diff --git a/src/client/commands/stop.js b/src/client/commands/stop.js index 6cc9a72..d87757f 100644 --- a/src/client/commands/stop.js +++ b/src/client/commands/stop.js @@ -10,7 +10,6 @@ module.exports = { if (client.funcs.check(client, msg, command)) { client.funcs.statisticsUpdate(client, msg.guild, radio); radio.connection.destroy(); - radio.voiceChannel.leave(); client.radio.delete(msg.guild.id); msg.channel.send(client.messageEmojis["stop"] + client.messages.stop); }