mirror of
https://github.com/danbulant/discord.js
synced 2026-05-27 14:02:02 +00: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:
parent
b4e56d3e0e
commit
3f039016af
1 changed files with 1 additions and 0 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue