mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-12 09:33:32 +01:00
fix(GuildMember): manageable - let owner override (#3765)
* if the bot is owner of the guild the target is managebale * even though both roles are on the same position
This commit is contained in:
@@ -216,6 +216,7 @@ class GuildMember extends Base {
|
||||
get manageable() {
|
||||
if (this.user.id === this.guild.ownerID) return false;
|
||||
if (this.user.id === this.client.user.id) return false;
|
||||
if (this.client.user.id === this.guild.ownerID) return true;
|
||||
if (!this.guild.me) throw new Error('GUILD_UNCACHED_ME');
|
||||
return this.guild.me.roles.highest.comparePositionTo(this.roles.highest) > 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user