mirror of
				https://github.com/warengroup/eximiabots-radiox.git
				synced 2025-10-31 11:01:36 +00:00 
			
		
		
		
	Updated code
This commit is contained in:
		| @@ -3,21 +3,10 @@ module.exports = { | ||||
|     description: 'Next Station', | ||||
|     permission: 'none', | ||||
|     category: 'info', | ||||
|     async execute(interaction, client) { | ||||
|         let message = {}; | ||||
|     async execute(interaction, client, command) { | ||||
|         if (client.funcs.check(client, interaction, command)) { | ||||
|             const radio = client.radio.get(interaction.guild.id); | ||||
|         if (!radio) return interaction.reply({ | ||||
|             content: 'There is nothing playing.', | ||||
|             ephemeral: true | ||||
|         }); | ||||
|         if(!client.stations) { | ||||
|             message.errorToGetPlaylist = client.messages.errorToGetPlaylist.replace("%client.config.supportGuild%", client.config.supportGuild); | ||||
|             return interaction.reply({ | ||||
|                 content: client.messageEmojis["error"] + message.errorToGetPlaylist, | ||||
|                 ephemeral: true | ||||
|             }); | ||||
|             console.log(client.stations.find(station => station.name == radio.station.name)); | ||||
|         } | ||||
|  | ||||
|          | ||||
|     } | ||||
| } | ||||
| @@ -5,7 +5,7 @@ module.exports = { | ||||
|     description: 'Current Radio Station', | ||||
|     permission: 'none', | ||||
|     category: 'radio', | ||||
|     async execute(interaction, client) { | ||||
|     async execute(interaction, client, command) { | ||||
|         if (client.funcs.check(client, interaction, command)) { | ||||
|             let message = {}; | ||||
|             const radio = client.radio.get(interaction.guild.id); | ||||
|   | ||||
| @@ -4,20 +4,9 @@ module.exports = { | ||||
|     permission: 'none', | ||||
|     category: 'info', | ||||
|     async execute(interaction, client) { | ||||
|         let message = {}; | ||||
|         if (client.funcs.check(client, interaction, command)) { | ||||
|             const radio = client.radio.get(interaction.guild.id); | ||||
|         if (!radio) return interaction.reply({ | ||||
|             content: 'There is nothing playing.', | ||||
|             ephemeral: true | ||||
|         }); | ||||
|         if(!client.stations) { | ||||
|             message.errorToGetPlaylist = client.messages.errorToGetPlaylist.replace("%client.config.supportGuild%", client.config.supportGuild); | ||||
|             return interaction.reply({ | ||||
|                 content: client.messageEmojis["error"] + message.errorToGetPlaylist, | ||||
|                 ephemeral: true | ||||
|             }); | ||||
|             console.log(client.stations.find(station => station.name == radio.station.name)); | ||||
|         } | ||||
|  | ||||
|          | ||||
|     } | ||||
| } | ||||
| @@ -5,7 +5,7 @@ module.exports = { | ||||
|     description: 'Stop radio', | ||||
|     permission: 'none', | ||||
|     category: 'radio', | ||||
|     async execute(interaction, client) { | ||||
|     async execute(interaction, client, command) { | ||||
|         const radio = client.radio.get(interaction.guild.id); | ||||
|         if (client.funcs.check(client, interaction, command)) { | ||||
|             client.funcs.statisticsUpdate(client, interaction.guild, radio); | ||||
|   | ||||
| @@ -25,7 +25,7 @@ module.exports = { | ||||
|             if (!command) return; | ||||
|  | ||||
|             try { | ||||
|                 command.execute(interaction, client); | ||||
|                 command.execute(interaction, client, command); | ||||
|             } catch (error) { | ||||
|                 interaction.reply({ | ||||
|                     content: client.messages.runningCommandFailed, | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Christer Warén
					Christer Warén