From f16e6ee3bba938902aa159256ad57b2739d76052 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christer=20War=C3=A9n?= Date: Tue, 22 Sep 2020 16:47:06 +0300 Subject: [PATCH] Added error message when using play command with URL --- client/commands/play.js | 2 +- client/messages.js | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/client/commands/play.js b/client/commands/play.js index cfa708d..68eb9fa 100644 --- a/client/commands/play.js +++ b/client/commands/play.js @@ -30,7 +30,7 @@ module.exports = { let station; const number = parseInt(args[1] - 1); if (url.startsWith('http')) { - return; + return msg.channel.send(client.messageEmojis["error"] + client.messages.errorStationURL); } else if (!isNaN(number)) { if (number > client.stations.length - 1) { return msg.channel.send(client.messageEmojis["error"] + client.messages.wrongStationNumber); diff --git a/client/messages.js b/client/messages.js index 0337861..c93ad81 100644 --- a/client/messages.js +++ b/client/messages.js @@ -40,5 +40,6 @@ module.exports = { statusField2: "API Latency", statusField3: "Uptime", statusField4: "Version", - statusField5: "Hosted by" + statusField5: "Hosted by", + errorStationURL: "Station can't be URL" }; \ No newline at end of file