diff --git a/commands/play.js b/commands/play.js index e1ae10a..635d91c 100644 --- a/commands/play.js +++ b/commands/play.js @@ -35,7 +35,7 @@ module.exports = { } } else { const sstation = await client.funcs.searchStation(args.slice(1).join(' '), client); - if (sstation === false) return msg.channel.send('No stations found!'); + if (!sstation) return msg.channel.send('No stations found!'); url = sstation.stream[sstation.stream.default]; station = sstation } diff --git a/struct/funcs/searchStation.js b/struct/funcs/searchStation.js index 716cd2b..a035c4a 100644 --- a/struct/funcs/searchStation.js +++ b/struct/funcs/searchStation.js @@ -1,4 +1,5 @@ module.exports = function (key, client) { + if (client.stations === null) return false; let foundStations = []; if (!key) return false; const probabilityIncrement = 100 / key.split(' ').length / 2;