diff --git a/commands/moderation/ban.js b/commands/moderation/ban.js index a066b8e6..fc7c6d39 100644 --- a/commands/moderation/ban.js +++ b/commands/moderation/ban.js @@ -32,7 +32,7 @@ module.exports = class BanCommand extends Command { hasPermission(msg) { const staffRole = msg.guild.roles.get(msg.guild.settings.get('staffRole')); - if (staffRole && !msg.member.roles.has(staffRole)) return `You do not have the ${staffRole.name} role.`; + if (staffRole && !msg.member.roles.has(staffRole.id)) return `You do not have the ${staffRole.name} role.`; else if (!msg.member.hasPermission('BAN_MEMBERS')) return 'You do not have the `Ban Members` Permission.'; else return true; } diff --git a/commands/moderation/kick.js b/commands/moderation/kick.js index a2c5ab42..a7d33d50 100644 --- a/commands/moderation/kick.js +++ b/commands/moderation/kick.js @@ -31,7 +31,7 @@ module.exports = class KickCommand extends Command { hasPermission(msg) { const staffRole = msg.guild.roles.get(msg.guild.settings.get('staffRole')); - if (staffRole && !msg.member.roles.has(staffRole)) return `You do not have the ${staffRole.name} role.`; + if (staffRole && !msg.member.roles.has(staffRole.id)) return `You do not have the ${staffRole.name} role.`; else if (!msg.member.hasPermission('KICK_MEMBERS')) return 'You do not have the `Kick Members` Permission.'; else return true; } diff --git a/commands/moderation/lockdown.js b/commands/moderation/lockdown.js index 1fc5d240..d77a8ed6 100644 --- a/commands/moderation/lockdown.js +++ b/commands/moderation/lockdown.js @@ -27,7 +27,7 @@ module.exports = class LockdownCommand extends Command { hasPermission(msg) { const staffRole = msg.guild.roles.get(msg.guild.settings.get('staffRole')); - if (staffRole && !msg.member.roles.has(staffRole)) return `You do not have the ${staffRole.name} role.`; + if (staffRole && !msg.member.roles.has(staffRole.id)) return `You do not have the ${staffRole.name} role.`; else if (!msg.member.hasPermission('ADMINISTRATOR')) return 'You do not have the `Administrator` Permission.'; else return true; } diff --git a/commands/moderation/prune.js b/commands/moderation/prune.js index 531e3130..a93c9c34 100644 --- a/commands/moderation/prune.js +++ b/commands/moderation/prune.js @@ -29,7 +29,7 @@ module.exports = class PruneCommand extends Command { hasPermission(msg) { const staffRole = msg.guild.roles.get(msg.guild.settings.get('staffRole')); - if (staffRole && !msg.member.roles.has(staffRole)) return `You do not have the ${staffRole.name} role.`; + if (staffRole && !msg.member.roles.has(staffRole.id)) return `You do not have the ${staffRole.name} role.`; else if (!msg.member.hasPermission('MANAGE_MESSAGES')) return 'You do not have the `Manage Messages` Permission.'; else return true; } diff --git a/commands/moderation/softban.js b/commands/moderation/softban.js index 22bb5d7a..ba641973 100644 --- a/commands/moderation/softban.js +++ b/commands/moderation/softban.js @@ -32,7 +32,7 @@ module.exports = class SoftbanCommand extends Command { hasPermission(msg) { const staffRole = msg.guild.roles.get(msg.guild.settings.get('staffRole')); - if (staffRole && !msg.member.roles.has(staffRole)) return `You do not have the ${staffRole.name} role.`; + if (staffRole && !msg.member.roles.has(staffRole.id)) return `You do not have the ${staffRole.name} role.`; else if (!msg.member.hasPermission('KICK_MEMBERS')) return 'You do not have the `Kick Members` Permission.'; else return true; } diff --git a/commands/moderation/unban.js b/commands/moderation/unban.js index ea32e100..0ba5a259 100644 --- a/commands/moderation/unban.js +++ b/commands/moderation/unban.js @@ -32,7 +32,7 @@ module.exports = class UnbanCommand extends Command { hasPermission(msg) { const staffRole = msg.guild.roles.get(msg.guild.settings.get('staffRole')); - if (staffRole && !msg.member.roles.has(staffRole)) return `You do not have the ${staffRole.name} role.`; + if (staffRole && !msg.member.roles.has(staffRole.id)) return `You do not have the ${staffRole.name} role.`; else if (!msg.member.hasPermission('BAN_MEMBERS')) return 'You do not have the `Ban Members` Permission.'; else return true; } diff --git a/commands/moderation/warn.js b/commands/moderation/warn.js index a2a6df75..f1fc82e1 100644 --- a/commands/moderation/warn.js +++ b/commands/moderation/warn.js @@ -31,7 +31,7 @@ module.exports = class WarnCommand extends Command { hasPermission(msg) { const staffRole = msg.guild.roles.get(msg.guild.settings.get('staffRole')); - if (staffRole && !msg.member.roles.has(staffRole)) return `You do not have the ${staffRole.name} role.`; + if (staffRole && !msg.member.roles.has(staffRole.id)) return `You do not have the ${staffRole.name} role.`; else if (!msg.member.hasPermission('KICK_MEMBERS')) return 'You do not have the `Kick Members` Permission.'; else return true; }