-
Notifications
You must be signed in to change notification settings - Fork 144
Permissions
Wrapper for a bitfield that is more specifically used to represent Discord permissions. See the permission
enumeration for acceptable permission values.
Name | Type | Description |
---|---|---|
value | number | The raw decimal value that represents the permissions value. |
Returns a Permissions object with all permissions.
Returns: Permissions
Defines the behavior of the
==
operator. Allows permissions to be directly compared according to their value.Returns: boolean
Defines the behavior of the
tostring
function. Returns a readable list of permissions stored for convenience of introspection.Returns: string
Parameter Type other Permissions Returns a new Permissions object that contains the permissions that are not in
self
, but are inother
(or the set of all permissions if omitted).Returns: Permissions
Returns a new copy of the original permissions object.
Returns: Permissions
Parameter Type ... Permissions-Resolvable Disables a specific permission or permissions. See the
permission
enumeration for acceptable permission values.Returns: nil
Disables all permissions values.
Returns: nil
Parameter Type ... Permissions-Resolvable Enables a specific permission or permissions. See the
permission
enumeration for acceptable permission values.Returns: nil
Enables all permissions values.
Returns: nil
Parameter Type ... Permissions-Resolvable Returns whether this set has a specific permission or permissions. See the
permission
enumeration for acceptable permission values.Returns: boolean
Parameter Type other Permissions Returns a new Permissions object that contains the permissions that are in both
self
andother
(bitwise AND).Returns: Permissions
Parameter Type other Permissions Returns a new Permissions object that contains the permissions that are not in
self
orother
(bitwise XOR).Returns: Permissions
Returns an array of the names of the permissions that this objects represents.
Returns: table
Returns the hexadecimal string that represents the permissions value.
Returns: string
Returns a table that represents the permissions value, where the keys are the permission names and the values are
true
orfalse
.Returns: table
Parameter Type other Permissions Returns a new Permissions object that contains the permissions that are in either
self
orother
(bitwise OR).Returns: Permissions