LogoAntiRaid

@discord-types/builders/permission

API reference for @discord-types/builders/permission

@discord-types/builders/permission

Types

Permission

Raw Type
type Permission = Permission.Prototype, & {
	bitflag: typesext.U64,

	addedPermissions: {permissionTypes.Permissions},

	removedPermissions: {permissionTypes.Permissions}
}

Intersection with variants:

Variant 2
PropTypeDescription
bitflag
-
addedPermissions
-
removedPermissions
-

JSON

Raw Type
type JSON = Permission.Prototype.build(nil :: any),

Functions

Permission.Prototype.setPermissionBitflag

[[ set the bitflag for this builder. ]]

Function Signature
--[[
	set the bitflag for this builder.
]]
function Permission.Prototype.setPermissionBitflag(self: Permission, bitflag: typesext.U64Convertibles) -> Permission end

Arguments

bitflag

typesext.U64Convertibles

Returns

ret1

Permission

Permission.Prototype.addPermission

[[ add a specific permission to this permissions builder. ]]

Function Signature
--[[
	add a specific permission to this permissions builder.
]]
function Permission.Prototype.addPermission(self: Permission, permission: permissionTypes.Permissions) -> Permission end

Arguments

permission

permissionTypes.Permissions

Returns

ret1

Permission

Permission.Prototype.removePermission

[[ remove a specific permission to this permissions builder. ]]

Function Signature
--[[
	remove a specific permission to this permissions builder.
]]
function Permission.Prototype.removePermission(self: Permission, permission: permissionTypes.Permissions) -> Permission end

Arguments

permission

permissionTypes.Permissions

Returns

ret1

Permission

Permission.Prototype.build

[[ Returns the bitflag representation of the permission. ]]

Function Signature
--[[
	Returns the bitflag representation of the permission.
]]
function Permission.Prototype.build(self: Permission) -> JSON end

Returns

ret1

JSON

Permission.Interface.new

[[ Responsible for creating a new Permission.

```lua

``` ]]

Function Signature
--[[
	Responsible for creating a new Permission.

	\`\`\`lua
	
	\`\`\`
]]
function Permission.Interface.new(resource: {
		bitflag: (string | number)?
	}?) -> Permission end

Arguments

resource

This field is optional and may not be specified

{bitflag: (string | number)?}?

Returns

ret1

Permission

Permission.Interface.fromPermissions

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

Function Signature
--[[
	Enables you to create a permission builder from a list of permissions.
]]
function Permission.Interface.fromPermissions(permissions: {permissionTypes.Permissions}) -> Permission end

Arguments

permissions

{permissionTypes.Permissions}

Returns

ret1

Permission

Last updated on