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.
staticbigint All :
Bitfield representing every permission combined
staticbigint Default :
Bitfield representing the default permissions for users
statictypeof PermissionFlagsBits Flags :
Numeric permission flags.
See also: https://discord.com/developers/docs/topics/permissions#permissions-bitwise-permission-flagsundefined
staticbigint StageModerator :
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
anypermission: PermissionResolvablecheckAdmin?: boolean) : boolean (
Checks whether the bitfield has a permission, or any of multiple permissions.
freezeReadonly<BitField<PermissionsString, bigint>> () :
Freezes these bits, making them immutable.
Inherited from: BitField
haspermission: PermissionResolvablecheckAdmin?: boolean) : boolean (
Checks whether the bitfield has a permission, or multiple permissions.
missingcheckAdmin?: 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 resolvepermission?: PermissionResolvable) : bigint (
serializehasParams?: boolean) : Record<PermissionsString, boolean> (
Gets an object mapping field names to a boolean indicating whether the bit is available.
toArrayPermissionsString[] () :
Gets an Array of bitfield names based on the permissions available.