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