mirror of
https://github.com/warengroup/eximiabots-radiox.git
synced 2024-12-24 02:23:18 +00:00
34 lines
852 B
JavaScript
34 lines
852 B
JavaScript
import Discord from "discord.js";
|
|
|
|
module.exports = function (client, interaction){
|
|
let stations = new Array();
|
|
let options = new Array();
|
|
|
|
stations = client.stations.forEach(station => {
|
|
if(station.name == "GrooveFM") return;
|
|
station = {
|
|
label: station.name,
|
|
description: station.owner,
|
|
value: station.name
|
|
};
|
|
options.push(station);
|
|
});
|
|
|
|
const menu = new Discord.MessageActionRow()
|
|
.addComponents(
|
|
new Discord.MessageSelectMenu()
|
|
.setCustomId('play')
|
|
.setPlaceholder('Nothing selected')
|
|
.addOptions(options)
|
|
);
|
|
|
|
stations = null;
|
|
options = null;
|
|
|
|
return interaction.reply({
|
|
content: '**Select station:**',
|
|
components: [menu],
|
|
ephemeral: true
|
|
});
|
|
}
|