mirror of
https://github.com/danbulant/discord.js
synced 2026-07-13 15:11:02 +00:00
fix(Role) Update usages of highestRole#comparePositionTo to use GuildMemberRoleStore (#2289)
This commit is contained in:
parent
048e147497
commit
16b5de5d52
2 changed files with 2 additions and 2 deletions
|
|
@ -222,7 +222,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;
|
||||
return this.guild.me.highestRole.comparePositionTo(this.highestRole) > 0;
|
||||
return this.guild.me.roles.highest.comparePositionTo(this.roles.highest) > 0;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -118,7 +118,7 @@ class Role extends Base {
|
|||
if (this.managed) return false;
|
||||
const clientMember = this.guild.member(this.client.user);
|
||||
if (!clientMember.permissions.has(Permissions.FLAGS.MANAGE_ROLES)) return false;
|
||||
return clientMember.highestRole.comparePositionTo(this) > 0;
|
||||
return clientMember.roles.highest.comparePositionTo(this) > 0;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Reference in a new issue