mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-09 16:13:31 +01:00
fix: check if member has admininistrator on moderatable (v13) (#7578)
This commit is contained in:
@@ -300,7 +300,11 @@ class GuildMember extends Base {
|
|||||||
* @readonly
|
* @readonly
|
||||||
*/
|
*/
|
||||||
get moderatable() {
|
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)
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user