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