Constructor
Permission instances to create the Permissions instance from.
ReadonlymaskPermission bitmask.
Since permissions are Uint64 bitmasks it must be represented
as a bigint. Watch out for number type coercion if
reading this property directly.
While it is possible to use bitwise operations on the mask, to determine
the permissions, it is better to use the provided methods such as hasAny and hasAll.
Checks if mask has all of the specified permissions.
Permissions to compare with mask.
true if mask holds all of the specified permissions.
Checks if mask has any of the specified permissions.
Permissions to compare with mask.
true if mask holds any of the specified permissions.
Converts the Permission object to a JSON representation.
The JSON representation of the Permission object.
Converts to a human readable string.
Human readable string.
StaticcopyCopies the permissions defined by permissions to the dst.permissions property.
Permission to copy to dst.permissions property.
Change to use.
Reference to dst.
StaticfromCreate a Permissions instance from a permission mask represented as a bigint string. This is how permissions are represented in JSON as it is not possible to send 64bit integers in JSON.
If a real bigint string then it is converted to a Permissions instance.
If it is a falsy returns a Permissions instance without any permissions.
If it is a truthy but not a bigint string then a exception is generated.
Permissions instance.
StaticjoinJoin one or more permissions into a single numeric permission mask. Permissions are bitwise OR:ed together.
Permissions to join.
Numeric permission mask. Can be compared directly with mask. Can also be used in constructor of Permissions.
StatictoConverts a number of Permission instances into a human readable string.
Permissions to convert.
Human readable string.
Represents a set of permissions.