Permissions - truemedian/Discordia GitHub Wiki
Wrapper for a bitfield that is more specifically used to represent Discord permissions. See the permission
enumeration for acceptable permission values.
enable
disable
has
enableAll
disableAll
toHex
toTable
toArray
union
intersection
name
complement
copy
Enables a specific permission or permissions. See the
permission
enumeration for acceptable permission values.
Name Type ... Permissions Resolvable Returns: nil
Disables a specific permission or permissions. See the
permission
enumeration for acceptable permission values.
Name Type ... Permissions Resolvable Returns: nil
Returns whether this set has a specific permission or permissions. See the
permission
enumeration for acceptable permission values.
Name Type ... Permissions Resolvable Returns: boolean
Enables all permissions values.
Returns: nil
Disables all permissions values.
Returns: nil
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
Returns an array of the names of the permissions that this objects represents.
Returns: table
Returns a new Permissions object that contains the permissions that are in either
self
orother
(bitwise OR).
Name Type other Permissions Returns: Permissions
Returns a new Permissions object that contains the permissions that are in both
self
andother
(bitwise AND).
Name Type other Permissions Returns: Permissions
Returns a new Permissions object that contains the permissions that are not in
self
orother
(bitwise XOR).
Name Type other Permissions Returns: 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).
Name Type other Permissions Returns: Permissions
Returns a new copy of the original permissions object.
Returns: Permissions
The raw decimal value that represents the permissions value.
Type: number