-
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.
Parameter | Type | Optional |
---|---|---|
value | number | ✔ |
Name | Type | Description |
---|---|---|
value | number | The raw decimal value that represents the permissions value. |
Returns a Permissions object with all permissions.
This method only operates on data in memory.
Returns: Permissions
Parameter | Type |
---|---|
... | Permission-Resolvables |
Returns a Permissions object with all of the defined permissions.
This method only operates on data in memory.
Returns: Permissions
Defines the behavior of the ==
operator. Allows permissions to be directly compared according to their value.
This method only operates on data in memory.
Returns: boolean
Defines the behavior of the tostring
function. Returns a readable list of permissions stored for convenience of introspection.
This method only operates on data in memory.
Returns: string
Parameter | Type |
---|---|
other | Permissions |
Returns a new Permissions object that contains the permissions that are not in self
, but are in other
(or the set of all permissions if omitted).
This method only operates on data in memory.
Returns: Permissions
Returns a new copy of the original permissions object.
This method only operates on data in memory.
Returns: Permissions
Parameter | Type |
---|---|
other | Permissions |
Returns a new Permissions object that contains the permissions that are not in self
or other
(bitwise XOR).
This method only operates on data in memory.
Returns: Permissions
Parameter | Type |
---|---|
... | Permission-Resolvables |
Disables a specific permission or permissions. See the permission
enumeration for acceptable permission values.
This method only operates on data in memory.
Returns: nil
Disables all permissions values.
This method only operates on data in memory.
Returns: nil
Parameter | Type |
---|---|
... | Permission-Resolvables |
Enables a specific permission or permissions. See the permission
enumeration for acceptable permission values.
This method only operates on data in memory.
Returns: nil
Enables all permissions values.
This method only operates on data in memory.
Returns: nil
Parameter | Type |
---|---|
... | Permission-Resolvables |
Returns whether this set has a specific permission or permissions. See the permission
enumeration for acceptable permission values.
This method only operates on data in memory.
Returns: boolean
Parameter | Type |
---|---|
other | Permissions |
Returns a new Permissions object that contains the permissions that are in both self
and other
(bitwise AND).
This method only operates on data in memory.
Returns: Permissions
Returns an array of the names of the permissions that this object represents.
This method only operates on data in memory.
Returns: table
Returns the hexadecimal string that represents the permissions value.
This method only operates on data in memory.
Returns: string
Returns a table that represents the permissions value, where the keys are the permission names and the values are true
or false
.
This method only operates on data in memory.
Returns: table
Parameter | Type |
---|---|
other | Permissions |
Returns a new Permissions object that contains the permissions that are in either self
or other
(bitwise OR).
This method only operates on data in memory.
Returns: Permissions