Fix Permissions now that member is deprecated (#1491)

This commit is contained in:
bdistin
2017-05-14 15:40:06 -05:00
committed by Crawl
parent ca926ee404
commit 25096047f1

View File

@@ -244,13 +244,13 @@ class GuildMember {
* @readonly
*/
get permissions() {
if (this.user.id === this.guild.ownerID) return new Permissions(this, Permissions.ALL);
if (this.user.id === this.guild.ownerID) return new Permissions(Permissions.ALL);
let permissions = 0;
const roles = this.roles;
for (const role of roles.values()) permissions |= role.permissions;
return new Permissions(this, permissions);
return new Permissions(permissions);
}
/**