mirror of
				https://github.com/warengroup/eximiabots-radiox.git
				synced 2025-11-04 11:29:33 +00:00 
			
		
		
		
	Fixing indentations in multiple commands
This commit is contained in:
		@@ -7,10 +7,10 @@ module.exports = {
 | 
				
			|||||||
    category: 'radio',
 | 
					    category: 'radio',
 | 
				
			||||||
    execute(interaction, client, Discord, command) {
 | 
					    execute(interaction, client, Discord, command) {
 | 
				
			||||||
        let message = {};
 | 
					        let message = {};
 | 
				
			||||||
		if(!client.stations) {
 | 
					        if(!client.stations) {
 | 
				
			||||||
			message.errorToGetPlaylist = client.messages.errorToGetPlaylist.replace("%client.config.supportGuild%", client.config.supportGuild);
 | 
					            message.errorToGetPlaylist = client.messages.errorToGetPlaylist.replace("%client.config.supportGuild%", client.config.supportGuild);
 | 
				
			||||||
			return interaction.reply(client.messageEmojis["error"] + message.errorToGetPlaylist);
 | 
					            return interaction.reply(client.messageEmojis["error"] + message.errorToGetPlaylist);
 | 
				
			||||||
		}
 | 
					        }
 | 
				
			||||||
        let stations = `${client.stations.map(s => `**#** ${s.name}`).join('\n')}`
 | 
					        let stations = `${client.stations.map(s => `**#** ${s.name}`).join('\n')}`
 | 
				
			||||||
        const hashs = stations.split('**#**').length;
 | 
					        const hashs = stations.split('**#**').length;
 | 
				
			||||||
        for (let i = 0; i < hashs; i++) {
 | 
					        for (let i = 0; i < hashs; i++) {
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -9,10 +9,10 @@ module.exports = {
 | 
				
			|||||||
        let message = {};
 | 
					        let message = {};
 | 
				
			||||||
        const radio = client.radio.get(interaction.guild.id);
 | 
					        const radio = client.radio.get(interaction.guild.id);
 | 
				
			||||||
        if (!radio) return interaction.reply('There is nothing playing.');
 | 
					        if (!radio) return interaction.reply('There is nothing playing.');
 | 
				
			||||||
		if(!client.stations) {
 | 
					        if(!client.stations) {
 | 
				
			||||||
			message.errorToGetPlaylist = client.messages.errorToGetPlaylist.replace("%client.config.supportGuild%", client.config.supportGuild);
 | 
					            message.errorToGetPlaylist = client.messages.errorToGetPlaylist.replace("%client.config.supportGuild%", client.config.supportGuild);
 | 
				
			||||||
			return interaction.reply(client.messageEmojis["error"] + message.errorToGetPlaylist);
 | 
					            return interaction.reply(client.messageEmojis["error"] + message.errorToGetPlaylist);
 | 
				
			||||||
		}
 | 
					        }
 | 
				
			||||||
        const completed = (radio.connection.dispatcher.streamTime.toFixed(0));
 | 
					        const completed = (radio.connection.dispatcher.streamTime.toFixed(0));
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        message.nowplayingDescription = client.messages.nowplayingDescription.replace("%radio.station.name%", radio.station.name);
 | 
					        message.nowplayingDescription = client.messages.nowplayingDescription.replace("%radio.station.name%", radio.station.name);
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -11,10 +11,10 @@ module.exports = {
 | 
				
			|||||||
        let currentGuild = client.datastore.getEntry(interaction.guild.id);
 | 
					        let currentGuild = client.datastore.getEntry(interaction.guild.id);
 | 
				
			||||||
        let statistics = "";
 | 
					        let statistics = "";
 | 
				
			||||||
        
 | 
					        
 | 
				
			||||||
		if(!client.stations) {
 | 
					        if(!client.stations) {
 | 
				
			||||||
			message.errorToGetPlaylist = client.messages.errorToGetPlaylist.replace("%client.config.supportGuild%", client.config.supportGuild);
 | 
					            message.errorToGetPlaylist = client.messages.errorToGetPlaylist.replace("%client.config.supportGuild%", client.config.supportGuild);
 | 
				
			||||||
			return interaction.reply(client.messageEmojis["error"] + message.errorToGetPlaylist);
 | 
					            return interaction.reply(client.messageEmojis["error"] + message.errorToGetPlaylist);
 | 
				
			||||||
		}
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        if(!currentGuild || currentGuild && !currentGuild.statistics){
 | 
					        if(!currentGuild || currentGuild && !currentGuild.statistics){
 | 
				
			||||||
            statistics = "You have not listened any radio station";
 | 
					            statistics = "You have not listened any radio station";
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,19 +1,19 @@
 | 
				
			|||||||
module.exports = {
 | 
					module.exports = {
 | 
				
			||||||
	name: 'stop',
 | 
					    name: 'stop',
 | 
				
			||||||
	description: 'Stop radio',
 | 
					    description: 'Stop radio',
 | 
				
			||||||
	alias: 's',
 | 
					    alias: 's',
 | 
				
			||||||
	usage: '',
 | 
					    usage: '',
 | 
				
			||||||
	permission: 'none',
 | 
					    permission: 'none',
 | 
				
			||||||
	category: 'radio',
 | 
					    category: 'radio',
 | 
				
			||||||
	execute(interaction, client, Discord, command) {
 | 
					    execute(interaction, client, Discord, command) {
 | 
				
			||||||
		const radio = client.radio.get(interaction.guild.id);
 | 
					        const radio = client.radio.get(interaction.guild.id);
 | 
				
			||||||
		if (client.funcs.check(client, interaction, command)) {
 | 
					        if (client.funcs.check(client, interaction, command)) {
 | 
				
			||||||
            client.funcs.statisticsUpdate(client, interaction.guild, radio);
 | 
					            client.funcs.statisticsUpdate(client, interaction.guild, radio);
 | 
				
			||||||
			radio.connection?.destroy();
 | 
					            radio.connection?.destroy();
 | 
				
			||||||
			radio.audioPlayer?.stop();
 | 
					            radio.audioPlayer?.stop();
 | 
				
			||||||
			client.funcs.logger('Radio', 'Stream stopped' + " / " + interaction.guild.id);
 | 
					            client.funcs.logger('Radio', 'Stream stopped' + " / " + interaction.guild.id);
 | 
				
			||||||
			client.radio.delete(interaction.guild.id);
 | 
					            client.radio.delete(interaction.guild.id);
 | 
				
			||||||
			interaction.reply(client.messageEmojis["stop"] + client.messages.stop);
 | 
					            interaction.reply(client.messageEmojis["stop"] + client.messages.stop);
 | 
				
			||||||
		}
 | 
					        }
 | 
				
			||||||
	}
 | 
					    }
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
		Reference in New Issue
	
	Block a user