|
|
|
@ -9,14 +9,21 @@ class missingPermissionsListener extends Listener {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
async exec(message, command, type, missing) {
|
|
|
|
|
if (missing == 'SEND_MESSAGES') return; // If bot can't send messages just do nothing
|
|
|
|
|
|
|
|
|
|
switch(type) {
|
|
|
|
|
case 'client':
|
|
|
|
|
message.reply(`Im missing the required permissions for this command!, \`${missing}\``);
|
|
|
|
|
if (missing == 'SEND_MESSAGES') {
|
|
|
|
|
return message.author.send(`Im missing the required permissions for this command!, \`${missing}\``);
|
|
|
|
|
} else {
|
|
|
|
|
message.reply(`Im missing the required permissions for this command!, \`${missing}\``);
|
|
|
|
|
}
|
|
|
|
|
break;
|
|
|
|
|
case 'user':
|
|
|
|
|
message.reply(`You are missing some permissions to use this command!, \`${missing}\``);
|
|
|
|
|
if (missing == 'SEND_MESSAGES') {
|
|
|
|
|
return message.author.send(`You are missing some permissions to use this command!, \`${missing}\``);
|
|
|
|
|
} else {
|
|
|
|
|
message.reply(`You are missing some permissions to use this command!, \`${missing}\``);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|