Class PermissionMethods
Inherited Members
Namespace: KSharpPlus.Enums
Assembly: KSharpPlus.dll
Syntax
public static class PermissionMethods
Methods
| Improve this Doc View SourceGrant(Permissions, Permissions)
Grants permissions.
Declaration
public static Permissions Grant(this Permissions p, Permissions grant)
Parameters
Type | Name | Description |
---|---|---|
Permissions | p | The permissions to add to. |
Permissions | grant | Permission to add. |
Returns
Type | Description |
---|---|
Permissions | Permissions with the granted permissions. |
HasPermission(Permissions, Permissions)
Calculates whether this permission set contains the given permission.
Declaration
public static bool HasPermission(this Permissions p, Permissions permission)
Parameters
Type | Name | Description |
---|---|---|
Permissions | p | The permissions to calculate from |
Permissions | permission | permission you want to check |
Returns
Type | Description |
---|---|
Boolean | True if the permission contains the given permission, otherwise false. |
Revoke(Permissions, Permissions)
Revokes permissions.
Declaration
public static Permissions Revoke(this Permissions p, Permissions revoke)
Parameters
Type | Name | Description |
---|---|---|
Permissions | p | The permissions to take from. |
Permissions | revoke | Permission to take. |
Returns
Type | Description |
---|---|
Permissions | Permissions without the revoked permissions. |