mirror of
https://github.com/warengroup/eximiabots-radiox.git
synced 2024-12-23 03:13:20 +00:00
Fixed stop & volume commands by modifying things in struct/check.js
This commit is contained in:
parent
58accb21e5
commit
d0d6841353
@ -2,8 +2,14 @@ module.exports = function (client, msg, command) {
|
|||||||
let message = {};
|
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){
|
||||||
if (msg.member.voice.channel !== radio.voiceChannel) return msg.channel.send(client.messages.wrongVoiceChannel);
|
msg.channel.send(client.messages.notPlaying);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if (msg.member.voice.channel !== radio.voiceChannel){
|
||||||
|
msg.channel.send(client.messages.wrongVoiceChannel);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
if (!permissions.has(command.permission)) {
|
if (!permissions.has(command.permission)) {
|
||||||
message.noPerms = client.messages.noPerms.replace("%commands.permissions%", commands.permissions);
|
message.noPerms = client.messages.noPerms.replace("%commands.permissions%", commands.permissions);
|
||||||
msg.channel.send(message.noPerms);
|
msg.channel.send(message.noPerms);
|
||||||
|
Loading…
Reference in New Issue
Block a user