diff --git a/commands/play.js b/commands/play.js index 635d91c..18864e9 100644 --- a/commands/play.js +++ b/commands/play.js @@ -34,6 +34,7 @@ module.exports = { station = client.stations[number]; } } else { + if(args[1].length < 4) return msg.channel.send('<:redx:674263474704220182> station must be over 3 characters!'); const sstation = await client.funcs.searchStation(args.slice(1).join(' '), client); if (!sstation) return msg.channel.send('No stations found!'); url = sstation.stream[sstation.stream.default]; diff --git a/config.js b/config.js index 92d11b2..03429ec 100644 --- a/config.js +++ b/config.js @@ -17,7 +17,7 @@ module.exports = { invite: "https://discordapp.com/api/oauth2/authorize?client_id=684109535312609409&permissions=3427328&scope=bot", //Settings - prefix: "rx>", + prefix: "rx-", volume: 5 -} \ No newline at end of file +} diff --git a/struct/funcs/searchStation.js b/struct/funcs/searchStation.js index a035c4a..c222ded 100644 --- a/struct/funcs/searchStation.js +++ b/struct/funcs/searchStation.js @@ -2,6 +2,8 @@ module.exports = function (key, client) { if (client.stations === null) return false; let foundStations = []; if (!key) return false; + if (key == 'radio') return false; + if (key.startsWith("radio ")) key = key.slice(6); const probabilityIncrement = 100 / key.split(' ').length / 2; for (let i = 0; i < key.split(' ').length; i++) { client.stations.filter(x => x.name.toUpperCase().includes(key.split(' ')[i].toUpperCase()) || x === key).forEach(x => foundStations.push({ station: x, name: x.name, probability: probabilityIncrement }));