From c3fcd8338bf0980bbdd5f2689f564c09c53e292a Mon Sep 17 00:00:00 2001 From: MatteZ02 <47610069+MatteZ02@users.noreply.github.com> Date: Sat, 4 Jul 2020 23:06:54 +0300 Subject: [PATCH] Chore 3.8.1 --- src/commands/stop.js | 3 +++ src/struct/funcs/check.js | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/commands/stop.js b/src/commands/stop.js index 825e86d9..83861dea 100644 --- a/src/commands/stop.js +++ b/src/commands/stop.js @@ -18,6 +18,9 @@ module.exports = { client.queue.delete(msg.guild.id); return msg.channel.send(client.messages.stop); } + if (!queue || !queue.playing) { + return msg.channel.send(client.messages.noServerQueue); + } queue.songs = []; queue.looping = false; queue.endReason = "stop"; diff --git a/src/struct/funcs/check.js b/src/struct/funcs/check.js index 7da36a15..e92012b5 100644 --- a/src/struct/funcs/check.js +++ b/src/struct/funcs/check.js @@ -1,7 +1,7 @@ module.exports = function (client, msg, command) { const queue = client.queue.get(msg.guild.id); const permissions = msg.channel.permissionsFor(msg.author); - if (!queue || !queue.playing) { + if (!queue || !queue.playing && command.name !== "stop") { msg.channel.send(client.messages.noServerQueue); return false; } @@ -31,4 +31,4 @@ module.exports = function (client, msg, command) { } else return true; } else return true; } else return true; -}; +}; \ No newline at end of file