2020-03-09 11:29:04 +00:00
|
|
|
module.exports = {
|
|
|
|
name: 'list',
|
|
|
|
alias: 'l',
|
|
|
|
usage: '',
|
|
|
|
description: 'List radio stations.',
|
|
|
|
permission: 'none',
|
|
|
|
category: 'info',
|
|
|
|
execute(msg, args, client, Discord, prefix) {
|
|
|
|
let stations = `${client.stations.map(s => `**#** ${s.name}`).join('\n')}`
|
|
|
|
const hashs = stations.split('**#**').length;
|
|
|
|
for (let i = 0; i < hashs; i++) {
|
|
|
|
stations = stations.replace('**#**', `**${i + 1}**`);
|
|
|
|
}
|
2020-03-12 22:53:23 +00:00
|
|
|
|
2020-03-09 11:29:04 +00:00
|
|
|
const embed = new Discord.MessageEmbed()
|
2020-03-12 22:53:23 +00:00
|
|
|
.setTitle(client.messages.listTitle)
|
2020-03-09 11:29:04 +00:00
|
|
|
.setColor(client.config.embedColor)
|
|
|
|
.setDescription(stations)
|
|
|
|
.setFooter('EximiaBots by Warén Media')
|
|
|
|
return msg.channel.send(embed);
|
|
|
|
}
|
|
|
|
};
|