class PermissionsBitField

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.

static
All : bigint

Bitfield representing every permission combined

bitfield : bigint

Bitfield of the packed bits

Inherited from: BitField

static
Default : bigint

Bitfield representing the default permissions for users

static
StageModerator : bigint

Bitfield representing the permissions required for moderators of stage channels

[Symbol.iterator]() : IterableIterator<PermissionsString>

Inherited from: BitField

Adds bits to these ones.

Returns: These bits or new BitField if the instance is frozen.

Inherited from: BitField

any(
checkAdmin?: boolean
) : boolean

Checks whether the bitfield has a permission, or any of multiple permissions.

Checks if this bitfield equals another

Inherited from: BitField

Freezes these bits, making them immutable.

Inherited from: BitField

has(
checkAdmin?: boolean
) : boolean

Checks whether the bitfield has a permission, or multiple permissions.

Gets all given bits that are missing from the bitfield.

Removes bits from these.

Returns: These bits or new BitField if the instance is frozen.

Inherited from: BitField

static
resolve() : 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.

toJSON() : bigint extends number ? number : string

Inherited from: BitField

valueOf() : bigint

Inherited from: BitField