Data structure that makes it easy to interact with a permission bitfield. All GuildMembers have a set of permissions in their guild, and each channel in the guild may also have PermissionOverwrites for the member that override their default permissions.
Extends
BitField<PermissionsString, bigint>Bitfield of the packed bits
Inherited from BitFieldAdds bits to these ones.
Returns
These bits or new BitField if the instance is frozen.Name | Type | Optional | Description |
---|---|---|---|
...bits | BitFieldResolvable<S, N>[] | No | Bits to add |
Checks whether the bitfield has a permission, or any of multiple permissions.
Name | Type | Optional | Description |
---|---|---|---|
permission | PermissionResolvable | No | Permission(s) to check for |
checkAdmin | boolean | Yes | Whether to allow the administrator permission to override |
Checks if this bitfield equals another
Name | Type | Optional | Description |
---|---|---|---|
bit | BitFieldResolvable<S, N> | No | Bit(s) to check for |
Freezes these bits, making them immutable.
Inherited from BitFieldChecks whether the bitfield has a permission, or multiple permissions.
Name | Type | Optional | Description |
---|---|---|---|
permission | PermissionResolvable | No | Permission(s) to check for |
checkAdmin | boolean | Yes | Whether to allow the administrator permission to override |
Gets all given bits that are missing from the bitfield.
Name | Type | Optional | Description |
---|---|---|---|
bits | BitFieldResolvable<PermissionsString, bigint> | No | Bit(s) to check for |
checkAdmin | boolean | Yes | Whether to allow the administrator permission to override |
Removes bits from these.
Returns
These bits or new BitField if the instance is frozen.Name | Type | Optional | Description |
---|---|---|---|
...bits | BitFieldResolvable<S, N>[] | No | Bits to remove |
Name | Type | Optional | Description |
---|---|---|---|
permission | PermissionResolvable | Yes | None |
Gets an object mapping field names to a indicating whether the bit is available.
Name | Type | Optional | Description |
---|---|---|---|
hasParams | boolean | Yes | Additional parameters for the has method, if any |
Gets an of bitfield names based on the permissions available.