fix(BitField): resolve the bit before checking

This commit is contained in:
invalidCards 2021-02-01 20:46:39 +01:00
parent dbb80f30b4
commit 96bba8d68e

View file

@ -27,7 +27,8 @@ export class BitField {
has(bit: BitFieldResolvable, ...args: any[]): boolean { has(bit: BitFieldResolvable, ...args: any[]): boolean {
if (Array.isArray(bit)) return (bit.every as any)((p: any) => this.has(p)) if (Array.isArray(bit)) return (bit.every as any)((p: any) => this.has(p))
return (this.bitfield & BitField.resolve(this.flags, bit)) === bit bit = BitField.resolve(this.flags, bit);
return (this.bitfield & bit) === bit
} }
missing(bits: any, ...hasParams: any[]): string[] { missing(bits: any, ...hasParams: any[]): string[] {