Skip to content

Commit

Permalink
fix: check if member has admininistrator on moderatable (v13) (#7578)
Browse files Browse the repository at this point in the history
  • Loading branch information
BenjammingKirby committed Mar 2, 2022
1 parent 93cdb2f commit 13dd82d
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/structures/GuildMember.js
Expand Up @@ -300,7 +300,11 @@ class GuildMember extends Base {
* @readonly
*/
get moderatable() {
return this.manageable && (this.guild.me?.permissions.has(Permissions.FLAGS.MODERATE_MEMBERS) ?? false);
return (
!this.permissions.has(Permissions.FLAGS.ADMINISTRATOR) &&
this.manageable &&
(this.guild.me?.permissions.has(Permissions.FLAGS.MODERATE_MEMBERS) ?? false)
);
}

/**
Expand Down

0 comments on commit 13dd82d

Please sign in to comment.