mirror of
				https://github.com/warengroup/eximiabots-radiox.git
				synced 2025-11-04 14:09:33 +00:00 
			
		
		
		
	Updated next & prev command
This commit is contained in:
		@@ -6,7 +6,18 @@ module.exports = {
 | 
				
			|||||||
    async execute(interaction, client, command) {
 | 
					    async execute(interaction, client, command) {
 | 
				
			||||||
        if (client.funcs.check(client, interaction, command)) {
 | 
					        if (client.funcs.check(client, interaction, command)) {
 | 
				
			||||||
            const radio = client.radio.get(interaction.guild.id);
 | 
					            const radio = client.radio.get(interaction.guild.id);
 | 
				
			||||||
            console.log(client.stations.find(station => station.name == radio.station.name));
 | 
					            let station = client.stations[client.stations.findIndex(station => station.name == radio.station.name) + 1];
 | 
				
			||||||
 | 
					            
 | 
				
			||||||
 | 
					            client.funcs.statisticsUpdate(client, interaction.guild, radio);
 | 
				
			||||||
 | 
					            radio.audioPlayer.stop();
 | 
				
			||||||
 | 
					            
 | 
				
			||||||
 | 
					            let date = new Date();
 | 
				
			||||||
 | 
					            radio.station = station;
 | 
				
			||||||
 | 
					            radio.textChannel = interaction.channel;
 | 
				
			||||||
 | 
					            radio.startTime = date.getTime();
 | 
				
			||||||
 | 
					            client.funcs.play(interaction, interaction.guild, client, url);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            return;
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
@@ -6,7 +6,18 @@ module.exports = {
 | 
				
			|||||||
    async execute(interaction, client) {
 | 
					    async execute(interaction, client) {
 | 
				
			||||||
        if (client.funcs.check(client, interaction, command)) {
 | 
					        if (client.funcs.check(client, interaction, command)) {
 | 
				
			||||||
            const radio = client.radio.get(interaction.guild.id);
 | 
					            const radio = client.radio.get(interaction.guild.id);
 | 
				
			||||||
            console.log(client.stations.find(station => station.name == radio.station.name));
 | 
					            let station = client.stations[client.stations.findIndex(station => station.name == radio.station.name) - 1];
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            client.funcs.statisticsUpdate(client, interaction.guild, radio);
 | 
				
			||||||
 | 
					            radio.audioPlayer.stop();
 | 
				
			||||||
 | 
					            
 | 
				
			||||||
 | 
					            let date = new Date();
 | 
				
			||||||
 | 
					            radio.station = station;
 | 
				
			||||||
 | 
					            radio.textChannel = interaction.channel;
 | 
				
			||||||
 | 
					            radio.startTime = date.getTime();
 | 
				
			||||||
 | 
					            client.funcs.play(interaction, interaction.guild, client, url);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            return;
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
		Reference in New Issue
	
	Block a user