From 774b4d46940c989f2a59f04f36532f1f1b14c0a3 Mon Sep 17 00:00:00 2001 From: Schuyler Cebulskie Date: Mon, 12 Sep 2016 00:08:12 -0400 Subject: [PATCH] Fix GuildMember.hasPermission(s) explicit for owner --- src/structures/GuildMember.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/structures/GuildMember.js b/src/structures/GuildMember.js index 651df29d3..9bf6e8047 100644 --- a/src/structures/GuildMember.js +++ b/src/structures/GuildMember.js @@ -185,7 +185,7 @@ class GuildMember { * @returns {boolean} */ hasPermission(permission, explicit = false) { - if (this.guild.owner.id === this.user.id) return true; + if (!explicit && this.guild.owner.id === this.user.id) return true; return this.roles.some(r => r.hasPermission(permission, explicit)); } @@ -196,7 +196,7 @@ class GuildMember { * @returns {boolean} */ hasPermissions(permissions, explicit = false) { - if (this.guild.owner.id === this.user.id) return true; + if (!explicit && this.guild.owner.id === this.user.id) return true; return permissions.map(p => this.hasPermission(p, explicit)).every(v => v); }