mirror of
https://github.com/danbulant/discord.js
synced 2026-05-24 12:35:53 +00:00
fix permissions not resolving correctly (#1928)
This commit is contained in:
parent
3767b35189
commit
98b81fac38
1 changed files with 2 additions and 2 deletions
|
|
@ -57,7 +57,7 @@ class Permissions {
|
|||
let total = 0;
|
||||
for (let p = permissions.length - 1; p >= 0; p--) {
|
||||
const perm = this.constructor.resolve(permissions[p]);
|
||||
if ((this.bitfield & perm) !== perm) total |= perm;
|
||||
total |= perm;
|
||||
}
|
||||
if (Object.isFrozen(this)) return new this.constructor(this.bitfield | total);
|
||||
this.bitfield |= total;
|
||||
|
|
@ -73,7 +73,7 @@ class Permissions {
|
|||
let total = 0;
|
||||
for (let p = permissions.length - 1; p >= 0; p--) {
|
||||
const perm = this.constructor.resolve(permissions[p]);
|
||||
if ((this.bitfield & perm) === perm) total |= perm;
|
||||
total |= perm;
|
||||
}
|
||||
if (Object.isFrozen(this)) return new this.constructor(this.bitfield & ~total);
|
||||
this.bitfield &= ~total;
|
||||
|
|
|
|||
Loading…
Reference in a new issue