forked from embee/woomy
more fixes
This commit is contained in:
parent
ee0cf0cce5
commit
df048cb668
2 changed files with 14 additions and 3 deletions
|
@ -40,6 +40,17 @@ exports.run = async (client, message, [action, ...member]) => {
|
||||||
return message.channel.send('lol no');
|
return message.channel.send('lol no');
|
||||||
};
|
};
|
||||||
|
|
||||||
|
if (user.id === message.guild.owner.id) {
|
||||||
|
return message.channel.send("<:error:466995152976871434> You can't blacklist the owner!")
|
||||||
|
};
|
||||||
|
|
||||||
|
let admin = message.guild.member(message.author)
|
||||||
|
if (user.highestRole.position >= admin.highestRole.position && admin.user.id !== message.guild.ownerID) {
|
||||||
|
return message.channel.send(
|
||||||
|
`<:error:466995152976871434> You can't blacklist people higher ranked than yourself!`
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
if(user.id === message.member.id) {
|
if(user.id === message.member.id) {
|
||||||
return message.channel.send('<:error:466995152976871434> You can\'t blacklist yourself!');
|
return message.channel.send('<:error:466995152976871434> You can\'t blacklist yourself!');
|
||||||
};
|
};
|
||||||
|
|
|
@ -65,14 +65,14 @@ exports.run = async (client, message, args) => {
|
||||||
leaveMessage = "`" + settings.leaveMessage + "`";
|
leaveMessage = "`" + settings.leaveMessage + "`";
|
||||||
}
|
}
|
||||||
|
|
||||||
if(settings.blacklisted == "ARRAY") {
|
if(settings.blacklisted == "ARRAY" || settings.blacklisted.length < 1) {
|
||||||
blacklist = "__Disabled__";
|
blacklist = "__Disabled__";
|
||||||
} else {
|
} else {
|
||||||
if(settings.blacklisted.length > 0) {
|
if(settings.blacklisted.length > 0) {
|
||||||
settings.blacklisted.forEach(function(user) {
|
settings.blacklisted.forEach(function(user) {
|
||||||
blacklist += "`" + (client.users.get(user) || user) + "` ,"
|
blacklist += "`" + (client.users.get(user).tag || user.tag) + "`, "
|
||||||
});
|
});
|
||||||
blacklist = blacklist.substr(0, blacklist.length, -3)
|
blacklist = blacklist.substring(0, blacklist.length - 2);
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue