Fix for a small hasPermission error (#1971)

This commit is contained in:
Dragon Fire
2017-09-24 12:41:06 -04:00
committed by Crawl
parent f89ec00b30
commit 82841c6ce1

View File

@@ -306,7 +306,7 @@ class GuildMember extends Base {
if (typeof checkAdmin === 'undefined') checkAdmin = !explicit; if (typeof checkAdmin === 'undefined') checkAdmin = !explicit;
if (typeof checkOwner === 'undefined') checkOwner = !explicit; if (typeof checkOwner === 'undefined') checkOwner = !explicit;
if (checkOwner && this.user.id === this.guild.ownerID) return true; if (checkOwner && this.user.id === this.guild.ownerID) return true;
return this.roles.some(r => r.hasPermission(permission, undefined, checkAdmin)); return this.roles.some(r => r.permissions.has(permission, undefined, checkAdmin));
} }
/** /**