From 11470937889ddb8e8d0d5c2a292f245c2e109fd9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christer=20War=C3=A9n?= Date: Thu, 2 Apr 2020 10:28:43 +0300 Subject: [PATCH] Changes --- client/commands/play.js | 1 + client/messages.js | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/client/commands/play.js b/client/commands/play.js index 0269dc4..938b726 100644 --- a/client/commands/play.js +++ b/client/commands/play.js @@ -14,6 +14,7 @@ module.exports = { } else { if (voiceChannel !== radio.voiceChannel) return msg.channel.send(client.messageEmojis["error"] + client.messages.wrongVoiceChannel); } + if(!client.stations) return msg.channel.send(client.messageEmojis["error"] + client.messages.errorToGetPlaylist); if (!args[1]) return msg.channel.send(client.messages.noQuery); const permissions = voiceChannel.permissionsFor(msg.client.user); if (!permissions.has('CONNECT')) { diff --git a/client/messages.js b/client/messages.js index c2bd248..a849837 100644 --- a/client/messages.js +++ b/client/messages.js @@ -31,5 +31,6 @@ module.exports = { newVolume: "Volume is now: **%volume%**", statisticsTitle: "Statistics", maintenanceTitle: "Maintenance", - maintenanceDescription: "This command is not ready to be used by anyone." + maintenanceDescription: "This command is not ready to be used by anyone.", + errorToGetPlaylist: "There is no playlist which this bot can use to play radio." }; \ No newline at end of file