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