mirror of
https://github.com/danbulant/discord.js
synced 2026-05-25 13:02:38 +00:00
Fix Permissions now that member is deprecated (#1491)
This commit is contained in:
parent
ca926ee404
commit
25096047f1
1 changed files with 2 additions and 2 deletions
|
|
@ -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);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Reference in a new issue