Permission
Implementation of discords Permissions as a Luau builder.
https://discord.com/developers/docs/topics/permissions#permissions
Summary
Properties
Permission.addedPermissions :: { apiTypes.Permissions }Permission.removedPermissions :: { apiTypes.Permissions }Permission.bitflag :: numberProperties
Section titled “Properties”addedPermissions
Section titled “addedPermissions” Permission.addedPermissions :: Permissions }
An array of permissions that have been added to this permission builder.
removedPermissions
Section titled “removedPermissions” Permission.removedPermissions :: Permissions }
An array of permissions that have been removed from this permission builder.
bitflag
Section titled “bitflag”The numeric representation of the permission bitflag.
Methods
Section titled “Methods”setPermissionBitflag
Section titled “setPermissionBitflag”Permission : setPermissionBitflag ( bitflag ) -> Permission
Sets the bitflag for this builder.
Parameters
| bitflag: string | number |
Returns
| Permission |
addPermission
Section titled “addPermission”Permission : addPermission ( permission ) -> Permission
Adds a specific permission to this permissions builder.
Parameters
| permission: Permissions |
Returns
| Permission |
removePermission
Section titled “removePermission”Permission : removePermission ( permission ) -> Permission
Removes a specific permission from this permissions builder.
Parameters
| permission: Permissions |
Returns
| Permission |
Permission : build ( ) -> JSON
Returns the bitflag representation of the permission.
Returns
| JSON |
Functions
Section titled “Functions”Permission . new ( resource ) -> Permission
Responsible for creating a new Permission.
Parameters
| resource: { { bitflag: (string | number)?, } } |
Returns
| Permission |
fromPermissions
Section titled “fromPermissions”Permission . fromPermissions ( permissions ) -> Permission
Enables you to create a permission builder from a list of permissions.
Parameters
| permissions: Permissions } |
Returns
| Permission |