Data structure that makes it easy to interact with a bitfield.
Name | Type | Optional | Description |
---|---|---|---|
bits | BitFieldResolvable<Flags, Type> | Yes | None |
Adds bits to these ones.
Returns
These bits or new BitField if the instance is frozen.Name | Type | Optional | Description |
---|---|---|---|
...bits | BitFieldResolvable<Flags, Type>[] | No | Bits to add |
Checks whether the bitfield has a bit, or any of multiple bits.
Name | Type | Optional | Description |
---|---|---|---|
bit | BitFieldResolvable<Flags, Type> | No | Bit(s) to check for |
Checks if this bitfield equals another
Name | Type | Optional | Description |
---|---|---|---|
bit | BitFieldResolvable<Flags, Type> | No | Bit(s) to check for |
Freezes these bits, making them immutable.
Checks whether the bitfield has a bit, or multiple bits.
Name | Type | Optional | Description |
---|---|---|---|
bit | BitFieldResolvable<Flags, Type> | No | Bit(s) to check for |
Gets all given bits that are missing from the bitfield.
Name | Type | Optional | Description |
---|---|---|---|
bits | BitFieldResolvable<Flags, Type> | No | Bit(s) to check for |
...hasParams | readonly unknown[] | No | Additional parameters for the has method, if any |
Removes bits from these.
Returns
These bits or new BitField if the instance is frozen.Name | Type | Optional | Description |
---|---|---|---|
...bits | BitFieldResolvable<Flags, Type>[] | No | Bits to remove |
Resolves bitfields to their numeric form.
Name | Type | Optional | Description |
---|---|---|---|
bit | BitFieldResolvable<string, number | bigint> | Yes | bit(s) to resolve |
Gets an object mapping field names to a boolean indicating whether the bit is available.
Name | Type | Optional | Description |
---|---|---|---|
...hasParams | readonly unknown[] | No | Additional parameters for the has method, if any |