class PermissionsBitField
extends
BitField<PermissionsString, bigint>export class PermissionsBitField extends BitField<PermissionsString, bigint>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.
staticAll : bigint
Bitfield representing every permission combined
staticDefault : bigint
Bitfield representing the default permissions for users
staticFlags : typeof PermissionFlagsBits
Numeric permission flags.
See also: https://discord.com/developers/docs/topics/permissions#permissions-bitwise-permission-flags
staticStageModerator : bigint
Bitfield representing the permissions required for moderators of stage channels
[Symbol.iterator]() : IterableIterator<PermissionsString>
Inherited from: BitField
add(...bits: BitFieldResolvable<PermissionsString, bigint>[]) : BitField<PermissionsString, bigint>
Adds bits to these ones.
Returns: These bits or new BitField if the instance is frozen.
Inherited from: BitField
any(permission: PermissionResolvablecheckAdmin?: boolean) : boolean
Checks whether the bitfield has a permission, or any of multiple permissions.
freeze() : Readonly<BitField<PermissionsString, bigint>>
Freezes these bits, making them immutable.
Inherited from: BitField
has(permission: PermissionResolvablecheckAdmin?: boolean) : boolean
Checks whether the bitfield has a permission, or multiple permissions.
missing(checkAdmin?: boolean) : PermissionsString[]
Gets all given bits that are missing from the bitfield.
remove(...bits: BitFieldResolvable<PermissionsString, bigint>[]) : BitField<PermissionsString, bigint>
Removes bits from these.
Returns: These bits or new BitField if the instance is frozen.
Inherited from: BitField
static resolve(permission?: PermissionResolvable) : bigint
serialize(hasParams?: boolean) : Record<PermissionsString, boolean>
Gets an object mapping field names to a boolean indicating whether the bit is available.
toArray() : PermissionsString[]
Gets an Array of bitfield names based on the permissions available.