forked from embee/woomy
Fixed perms message
This commit is contained in:
parent
ccaba7d925
commit
018d8e515e
1 changed files with 14 additions and 13 deletions
|
@ -128,19 +128,6 @@ module.exports = async (client, message) => {
|
|||
blacklisted = true;
|
||||
}
|
||||
});
|
||||
if(blacklisted == true) {
|
||||
try {
|
||||
return message.author.send(
|
||||
`<:denied:466995195150336020> You have been blacklisted from using commands in \`${message.guild.name}\``
|
||||
);
|
||||
} catch(err) {
|
||||
client.logger.log(err, "error")
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
if (!perms.has('SEND_MESSAGES')) {
|
||||
return message.author.send(`<:error:466995152976871434> I don't have permission to speak in **#${message.channel.name}**, Please ask a moderator to give me the send messages permission!`);
|
||||
};
|
||||
};
|
||||
|
||||
|
@ -165,6 +152,20 @@ module.exports = async (client, message) => {
|
|||
|
||||
if (!cmd) return;
|
||||
|
||||
if (!perms.has('SEND_MESSAGES')) {
|
||||
return message.author.send(`<:error:466995152976871434> I don't have permission to speak in **#${message.channel.name}**, Please ask a moderator to give me the send messages permission!`);
|
||||
};
|
||||
|
||||
if(message.guild && blacklisted == true) {
|
||||
try {
|
||||
return message.author.send(
|
||||
`<:denied:466995195150336020> You have been blacklisted from using commands in \`${message.guild.name}\``
|
||||
);
|
||||
} catch(err) {
|
||||
client.logger.log(err, "error")
|
||||
};
|
||||
};
|
||||
|
||||
if (cmd && !message.guild && cmd.conf.guildOnly)
|
||||
return message.channel.send("<:denied:466995195150336020> This command is unavailable in DM's. Try running it in a server I'm in!");
|
||||
|
||||
|
|
Loading…
Reference in a new issue