From a0d08224d1bbb93ab1ae1e0d683cc58d489db024 Mon Sep 17 00:00:00 2001 From: MatteZ02 <47610069+MatteZ02@users.noreply.github.com> Date: Mon, 9 Mar 2020 13:29:04 +0200 Subject: [PATCH] Create list.js --- commands/list.js | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 commands/list.js diff --git a/commands/list.js b/commands/list.js new file mode 100644 index 0000000..37efab7 --- /dev/null +++ b/commands/list.js @@ -0,0 +1,21 @@ +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}**`); + } + const embed = new Discord.MessageEmbed() + .setTitle(`📻 Radio Stations`) + .setColor(client.config.embedColor) + .setDescription(stations) + .setFooter('EximiaBots by Warén Media') + return msg.channel.send(embed); + } +}; \ No newline at end of file