mirror of
https://github.com/warengroup/eximiabots-radiox.git
synced 2024-12-22 21:33:17 +00:00
Update listStations function
This commit is contained in:
parent
938f8ab69b
commit
b29624cba3
@ -1,20 +1,18 @@
|
||||
import { ActionRowBuilder, ButtonInteraction, ChatInputCommandInteraction, SelectMenuComponentOptionData, StringSelectMenuBuilder, StringSelectMenuInteraction } from "discord.js";
|
||||
import RadioClient from "../../Client";
|
||||
import { station } from "../classes/Stations";
|
||||
|
||||
export default function listStations(client: RadioClient, interaction: ButtonInteraction | ChatInputCommandInteraction | StringSelectMenuInteraction){
|
||||
if(!client.stations) return;
|
||||
|
||||
let options : SelectMenuComponentOptionData[] = new Array();
|
||||
|
||||
client.stations.forEach((station: station) => {
|
||||
if(station.name == "GrooveFM") return;
|
||||
for (const station of client.stations){
|
||||
options.push({
|
||||
label: station.name,
|
||||
description: station.owner,
|
||||
value: station.name
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
const menu: ActionRowBuilder<any> = new ActionRowBuilder()
|
||||
.addComponents(
|
||||
|
Loading…
Reference in New Issue
Block a user