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