From 16b5de5d522b882b2d9485cd8fd6e5b36fa98c7d Mon Sep 17 00:00:00 2001 From: Dragon Fire Date: Wed, 24 Jan 2018 07:34:11 -0500 Subject: [PATCH] fix(Role) Update usages of highestRole#comparePositionTo to use GuildMemberRoleStore (#2289) --- src/structures/GuildMember.js | 2 +- src/structures/Role.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/structures/GuildMember.js b/src/structures/GuildMember.js index 530970f4c..19373adac 100644 --- a/src/structures/GuildMember.js +++ b/src/structures/GuildMember.js @@ -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; } /** diff --git a/src/structures/Role.js b/src/structures/Role.js index a0209b20f..5712b27ee 100644 --- a/src/structures/Role.js +++ b/src/structures/Role.js @@ -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; } /**