Added error message when using play command with URL

This commit is contained in:
Christer Warén 2020-09-22 16:47:06 +03:00
parent 8caca9e210
commit f16e6ee3bb
2 changed files with 3 additions and 2 deletions

View File

@ -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);

View File

@ -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"
};