mirror of
				https://github.com/warengroup/eximiabots-radiox.git
				synced 2025-11-04 06:49:32 +00:00 
			
		
		
		
	Updated listStations function
This commit is contained in:
		@@ -2,27 +2,16 @@ import Discord from "discord.js";
 | 
			
		||||
 | 
			
		||||
module.exports = function (client, interaction){
 | 
			
		||||
    let stations = new Array();
 | 
			
		||||
 | 
			
		||||
    let options = new Array();
 | 
			
		||||
    options[1] = new Array();
 | 
			
		||||
    options[2] = new Array();
 | 
			
		||||
 | 
			
		||||
    stations[1] = client.stations.slice(0,24).forEach(station => {
 | 
			
		||||
    stations = client.stations.forEach(station => {
 | 
			
		||||
        if(station.name == "GrooveFM") return;
 | 
			
		||||
        station = {
 | 
			
		||||
            label: station.name,
 | 
			
		||||
            description: station.owner,
 | 
			
		||||
            value: station.name
 | 
			
		||||
        };
 | 
			
		||||
        options[1].push(station);
 | 
			
		||||
    });
 | 
			
		||||
 | 
			
		||||
    stations[2] = client.stations.slice(25).forEach(station => {
 | 
			
		||||
        station = {
 | 
			
		||||
            label: station.name,
 | 
			
		||||
            description: station.owner,
 | 
			
		||||
            value: station.name
 | 
			
		||||
        };
 | 
			
		||||
        options[2].push(station);
 | 
			
		||||
        options.push(station);
 | 
			
		||||
    });
 | 
			
		||||
 | 
			
		||||
    const menu = new Discord.MessageActionRow()
 | 
			
		||||
@@ -30,8 +19,7 @@ module.exports = function (client, interaction){
 | 
			
		||||
            new Discord.MessageSelectMenu()
 | 
			
		||||
                .setCustomId('play')
 | 
			
		||||
                .setPlaceholder('Nothing selected')
 | 
			
		||||
                .addOptions(options[1])
 | 
			
		||||
                .addOptions(options[2])
 | 
			
		||||
                .addOptions(options)
 | 
			
		||||
        );
 | 
			
		||||
 | 
			
		||||
    stations = null;
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user