This commit is contained in:
Daniel Odendahl Jr
2017-07-28 15:50:11 +00:00
parent 5c100dc23d
commit 4c1c8ff1c7
4 changed files with 4 additions and 4 deletions
+1 -1
View File
@@ -36,11 +36,11 @@ module.exports = class BanCommand extends Command {
async run(msg, args) {
const modlogs = parseTopic(msg.guild.channels, 'modlog', this.client.user).first();
const { member, reason } = args;
if (member.id === msg.author.id) return msg.say('I don\'t think you want to ban yourself...');
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 - 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...');
await msg.say(`Are you sure you want to ban ${member.user.tag} (${member.id})?`);
const msgs = await msg.channel.awaitMessages(res => res.author.id === msg.author.id, {
max: 1,
+1 -1
View File
@@ -36,11 +36,11 @@ module.exports = class KickCommand extends Command {
async run(msg, args) {
const modlogs = parseTopic(msg.guild.channels, 'modlog', this.client.user).first();
const { member, reason } = args;
if (member.id === msg.author.id) return msg.say('I don\'t think you want to kick yourself...');
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 - 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...');
await msg.say(`Are you sure you want to kick ${member.user.tag} (${member.id})?`);
const msgs = await msg.channel.awaitMessages(res => res.author.id === msg.author.id, {
max: 1,
+1 -1
View File
@@ -36,11 +36,11 @@ module.exports = class SoftbanCommand extends Command {
async run(msg, args) {
const modlogs = parseTopic(msg.guild.channels, 'modlog', this.client.user).first();
const { member, reason } = args;
if (member.id === msg.author.id) return msg.say('I don\'t think you want to softban yourself...');
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 - 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...');
await msg.say(`Are you sure you want to softban ${member.user.tag} (${member.id})?`);
const msgs = await msg.channel.awaitMessages(res => res.author.id === msg.author.id, {
max: 1,
+1 -1
View File
@@ -35,11 +35,11 @@ module.exports = class WarnCommand extends Command {
async run(msg, args) {
const modlogs = parseTopic(msg.guild.channels, 'modlog', this.client.user).first();
const { member, reason } = args;
if (member.id === msg.author.id) return msg.say('I don\'t think you want to warn yourself...');
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 - 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...');
await msg.say(`Are you sure you want to warn ${member.user.tag} (${member.id})?`);
const msgs = await msg.channel.awaitMessages(res => res.author.id === msg.author.id, {
max: 1,