Search Results for

    Show / Hide Table of Contents

    Class PermissionMethods

    Inheritance
    Object
    PermissionMethods
    Inherited Members
    Object.Equals(Object)
    Object.Equals(Object, Object)
    Object.GetHashCode()
    Object.GetType()
    Object.MemberwiseClone()
    Object.ReferenceEquals(Object, Object)
    Object.ToString()
    Namespace: KSharpPlus.Enums
    Assembly: KSharpPlus.dll
    Syntax
    public static class PermissionMethods

    Methods

    | Improve this Doc View Source

    Grant(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.

    | Improve this Doc View Source

    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.

    | Improve this Doc View Source

    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.

    • Improve this Doc
    • View Source
    In This Article
    Back to top © 2023 KSharpPlus Contributors