mirror of
				https://github.com/warengroup/eximiabots-radiox.git
				synced 2025-10-30 15:11:35 +00:00 
			
		
		
		
	All messages in separate file. (part 2)
This commit is contained in:
		| @@ -1,11 +1,12 @@ | |||||||
| module.exports = function (client, msg, command) { | module.exports = function (client, msg, command) { | ||||||
|  |     let message = {}; | ||||||
|     const radio = client.radio.get(msg.guild.id); |     const radio = client.radio.get(msg.guild.id); | ||||||
|     const permissions = msg.channel.permissionsFor(msg.author); |     const permissions = msg.channel.permissionsFor(msg.author); | ||||||
|     if (!radio || !radio.playing) return msg.channel.send(client.messages.notPlaying); |     if (!radio || !radio.playing) return msg.channel.send(client.messages.notPlaying); | ||||||
|     if (msg.member.voice.channel !== radio.voiceChannel) return msg.channel.send(client.messages.wrongVoiceChannel); |     if (msg.member.voice.channel !== radio.voiceChannel) return msg.channel.send(client.messages.wrongVoiceChannel); | ||||||
|     if (!permissions.has(command.permission)) { |     if (!permissions.has(command.permission)) { | ||||||
|         client.messages.noPerms = client.messages.noPerms.replace("%commands.permissions%", commands.permissions); |         message.noPerms = client.messages.noPerms.replace("%commands.permissions%", commands.permissions); | ||||||
|         msg.channel.send(client.messages.noPerms); |         msg.channel.send(message.noPerms); | ||||||
|         return false; |         return false; | ||||||
|     } else return true; |     } else return true; | ||||||
| }; | }; | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Christer Warén
					Christer Warén