mirror of
https://github.com/warengroup/eximiabots-radiox.git
synced 2024-11-09 23:00:18 +00:00
Create list.js
This commit is contained in:
parent
5fd4af30e7
commit
a0d08224d1
21
commands/list.js
Normal file
21
commands/list.js
Normal file
@ -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);
|
||||||
|
}
|
||||||
|
};
|
Loading…
Reference in New Issue
Block a user