Fix Roles

This commit is contained in:
Daniel Odendahl Jr
2017-07-28 15:43:28 +00:00
parent 28dceb902b
commit 5c100dc23d
4 changed files with 4 additions and 4 deletions
+1 -1
View File
@@ -37,7 +37,7 @@ module.exports = class BanCommand extends Command {
const modlogs = parseTopic(msg.guild.channels, 'modlog', this.client.user).first();
const { member, reason } = args;
if (!member.bannable) return msg.say('This member is not bannable. Perhaps they have a higher role than me?');
if (member.highestRole.calculatedPosition > msg.member.highestRole.calculatedPosition) {
if (member.highestRole.calculatedPosition > msg.member.highestRole.calculatedPosition - 1) {
return msg.say('Your roles are too low to ban this member.');
}
if (member.id === msg.author.id) return msg.say('I don\'t think you want to ban yourself...');
+1 -1
View File
@@ -37,7 +37,7 @@ module.exports = class KickCommand extends Command {
const modlogs = parseTopic(msg.guild.channels, 'modlog', this.client.user).first();
const { member, reason } = args;
if (!member.kickable) return msg.say('This member is not kickable. Perhaps they have a higher role than me?');
if (member.highestRole.calculatedPosition > msg.member.highestRole.calculatedPosition) {
if (member.highestRole.calculatedPosition > msg.member.highestRole.calculatedPosition - 1) {
return msg.say('Your roles are too low to kick this member.');
}
if (member.id === msg.author.id) return msg.say('I don\'t think you want to kick yourself...');
+1 -1
View File
@@ -37,7 +37,7 @@ module.exports = class SoftbanCommand extends Command {
const modlogs = parseTopic(msg.guild.channels, 'modlog', this.client.user).first();
const { member, reason } = args;
if (!member.bannable) return msg.say('This member is not softbannable. Perhaps they have a higher role than me?');
if (member.highestRole.calculatedPosition > msg.member.highestRole.calculatedPosition) {
if (member.highestRole.calculatedPosition > msg.member.highestRole.calculatedPosition - 1) {
return msg.say('Your roles are too low to softban this member.');
}
if (member.id === msg.author.id) return msg.say('I don\'t think you want to softban yourself...');
+1 -1
View File
@@ -36,7 +36,7 @@ module.exports = class WarnCommand extends Command {
const modlogs = parseTopic(msg.guild.channels, 'modlog', this.client.user).first();
const { member, reason } = args;
if (!member.kickable) return msg.say('This member is not warnable. Perhaps they have a higher role than me?');
if (member.highestRole.calculatedPosition > msg.member.highestRole.calculatedPosition) {
if (member.highestRole.calculatedPosition > msg.member.highestRole.calculatedPosition - 1) {
return msg.say('Your roles are too low to warn this member.');
}
if (member.id === msg.author.id) return msg.say('I don\'t think you want to warn yourself...');