@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
Prop | Type | Description |
---|---|---|
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
Returns
ret1
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
Returns
ret1
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
Returns
ret1
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
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.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
Returns
ret1
Last updated on