mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-10 00:23:30 +01:00
Fix Permissions now that member is deprecated (#1491)
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user