Skip to content

Permission

Implementation of discords Permissions as a Luau builder.

https://discord.com/developers/docs/topics/permissions#permissions

Permission.addedPermissions  :: Permissions }

An array of permissions that have been added to this permission builder.

Permission.removedPermissions  :: Permissions }

An array of permissions that have been removed from this permission builder.

Permission.bitflag  :: number

The numeric representation of the permission bitflag.

Permission : setPermissionBitflag ( bitflag )  -> Permission

Sets the bitflag for this builder.

Parameters

bitflag: string | number

Returns

Permission
Permission : addPermission ( permission )  -> Permission

Adds a specific permission to this permissions builder.

Parameters

permission: Permissions

Returns

Permission
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
Permission . new ( resource )  -> Permission

Responsible for creating a new Permission.

Parameters

resource: {
{ bitflag: (string | number)?, } }

Returns

Permission
Permission . fromPermissions ( permissions )  -> Permission

Enables you to create a permission builder from a list of permissions.

Parameters

permissions: Permissions }

Returns

Permission