From b29624cba324349d98e53fa7afb1300868103b81 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christer=20War=C3=A9n?= Date: Wed, 7 Jun 2023 17:47:39 +0300 Subject: [PATCH] Update listStations function --- src/client/funcs/listStations.ts | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/client/funcs/listStations.ts b/src/client/funcs/listStations.ts index 74ed88d..bddb5f1 100644 --- a/src/client/funcs/listStations.ts +++ b/src/client/funcs/listStations.ts @@ -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 = new ActionRowBuilder() .addComponents(