mirror of
				https://github.com/warengroup/eximiabots-radiox.git
				synced 2025-10-31 22:21:34 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			13 lines
		
	
	
		
			638 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
			
		
		
	
	
			13 lines
		
	
	
		
			638 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
| module.exports = function (client, msg, command) {
 | |
|     let message = {};
 | |
|     const radio = client.radio.get(msg.guild.id);
 | |
|     const permissions = msg.channel.permissionsFor(msg.author);
 | |
|     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 (!permissions.has(command.permission)) {
 | |
|         message.noPerms = client.messages.noPerms.replace("%commands.permissions%", commands.permissions);
 | |
|         msg.channel.send(message.noPerms);
 | |
|         return false;
 | |
|     } else return true;
 | |
| };
 | 
