diff --git a/commands/moderation/ban.js b/commands/moderation/ban.js index 9d67cbb6..1ae0b3df 100644 --- a/commands/moderation/ban.js +++ b/commands/moderation/ban.js @@ -57,7 +57,7 @@ module.exports = class BanCommand extends Command { reason: `${msg.author.tag}: ${reason}` }); await msg.say(`Successfully banned ${member.user.tag}.`); - if (!modlogs || !modlogs.permissionsFor(this.client.user.has('SEND_MESSAGES'))) { + if (!modlogs || !modlogs.permissionsFor(this.client.user).has('SEND_MESSAGES')) { return msg.say('Could not log the ban to the mod logs.'); } else if (!modlogs.permissionsFor(this.client.user).has('EMBED_LINKS')) { return modlogs.send(stripIndents` @@ -79,7 +79,6 @@ module.exports = class BanCommand extends Command { return modlogs.send({ embed }); } } catch (err) { - console.log(err); return msg.say('Aborting Ban.'); } } diff --git a/commands/moderation/kick.js b/commands/moderation/kick.js index 5adf1732..7b57639a 100644 --- a/commands/moderation/kick.js +++ b/commands/moderation/kick.js @@ -54,7 +54,7 @@ module.exports = class KickCommand extends Command { } await member.kick({ reason: `${msg.author.tag}: ${reason}` }); await msg.say(`Successfully kicked ${member.user.tag}.`); - if (!modlogs || !modlogs.permissionsFor(this.client.user.has('SEND_MESSAGES'))) { + if (!modlogs || !modlogs.permissionsFor(this.client.user).has('SEND_MESSAGES')) { return msg.say('Could not log the kick to the mod logs.'); } else if (!modlogs.permissionsFor(this.client.user).has('EMBED_LINKS')) { return modlogs.send(stripIndents` diff --git a/commands/moderation/softban.js b/commands/moderation/softban.js index 8f79dcc8..03d30423 100644 --- a/commands/moderation/softban.js +++ b/commands/moderation/softban.js @@ -58,7 +58,7 @@ module.exports = class SoftbanCommand extends Command { }); await msg.guild.unban(member.user, 'Softban'); await msg.say(`Successfully softbanned ${member.user.tag}.`); - if (!modlogs || !modlogs.permissionsFor(this.client.user.has('SEND_MESSAGES'))) { + if (!modlogs || !modlogs.permissionsFor(this.client.user).has('SEND_MESSAGES')) { return msg.say('Could not log the softban to the mod logs.'); } else if (!modlogs.permissionsFor(this.client.user).has('EMBED_LINKS')) { return modlogs.send(stripIndents` diff --git a/commands/moderation/unban.js b/commands/moderation/unban.js index 019efdc1..ee24a4fb 100644 --- a/commands/moderation/unban.js +++ b/commands/moderation/unban.js @@ -48,7 +48,7 @@ module.exports = class UnbanCommand extends Command { if (!['y', 'yes'].includes(collected.first().content.toLowerCase())) return msg.say('Aborting Unban.'); await msg.guild.unban(member, `${msg.author.tag}: ${reason}`); await msg.say(`Successfully unbanned ${member.user.tag}.`); - if (!modlogs || !modlogs.permissionsFor(this.client.user.has('SEND_MESSAGES'))) { + if (!modlogs || !modlogs.permissionsFor(this.client.user).has('SEND_MESSAGES')) { return msg.say('Could not log the unban to the mod logs.'); } else if (!modlogs.permissionsFor(this.client.user).has('EMBED_LINKS')) { return modlogs.send(stripIndents` diff --git a/commands/moderation/warn.js b/commands/moderation/warn.js index fc89dce0..be5e20e7 100644 --- a/commands/moderation/warn.js +++ b/commands/moderation/warn.js @@ -51,7 +51,7 @@ module.exports = class WarnCommand extends Command { await msg.say('Failed to Send DM.'); } await msg.say(`Successfully warned ${member.user.tag}.`); - if (!modlogs || !modlogs.permissionsFor(this.client.user.has('SEND_MESSAGES'))) { + if (!modlogs || !modlogs.permissionsFor(this.client.user).has('SEND_MESSAGES')) { return msg.say('Could not log the warn to the mod logs.'); } else if (!modlogs.permissionsFor(this.client.user).has('EMBED_LINKS')) { return modlogs.send(stripIndents`