Search Results for

    Show / Hide Table of Contents

    Interface IRole

    Represents a generic role object to be given to a guild user.

    Inherited Members
    ISnowflakeEntity.CreatedAt
    IEntity<UInt64>.Id
    IDeletable.DeleteAsync(RequestOptions)
    IMentionable.Mention
    Namespace: Discord
    Assembly: Discord.Net.Core.dll
    Syntax
    public interface IRole : ISnowflakeEntity, IEntity<ulong>, IDeletable, IMentionable, IComparable<IRole>

    Properties

    | Improve this Doc View Source

    Color

    Gets the color given to users of this role.

    Declaration
    Color Color { get; }
    Property Value
    Type Description
    Color

    A Color struct representing the color of this role.

    | Improve this Doc View Source

    Emoji

    Gets the unicode emoji of this role.

    Declaration
    Emoji Emoji { get; }
    Property Value
    Type Description
    Emoji
    Remarks

    This field is mutually exclusive with Icon, either icon is set or emoji is set.

    | Improve this Doc View Source

    Guild

    Gets the guild that owns this role.

    Declaration
    IGuild Guild { get; }
    Property Value
    Type Description
    IGuild

    A guild representing the parent guild of this role.

    | Improve this Doc View Source

    Icon

    Gets the icon of this role.

    Declaration
    string Icon { get; }
    Property Value
    Type Description
    String

    A string containing the hash of this role's icon.

    | Improve this Doc View Source

    IsHoisted

    Gets a value that indicates whether the role can be separated in the user list.

    Declaration
    bool IsHoisted { get; }
    Property Value
    Type Description
    Boolean

    true if users of this role are separated in the user list; otherwise false.

    | Improve this Doc View Source

    IsManaged

    Gets a value that indicates whether the role is managed by Discord.

    Declaration
    bool IsManaged { get; }
    Property Value
    Type Description
    Boolean

    true if this role is automatically managed by Discord; otherwise false.

    | Improve this Doc View Source

    IsMentionable

    Gets a value that indicates whether the role is mentionable.

    Declaration
    bool IsMentionable { get; }
    Property Value
    Type Description
    Boolean

    true if this role may be mentioned in messages; otherwise false.

    | Improve this Doc View Source

    Name

    Gets the name of this role.

    Declaration
    string Name { get; }
    Property Value
    Type Description
    String

    A string containing the name of this role.

    | Improve this Doc View Source

    Permissions

    Gets the permissions granted to members of this role.

    Declaration
    GuildPermissions Permissions { get; }
    Property Value
    Type Description
    GuildPermissions

    A GuildPermissions struct that this role possesses.

    | Improve this Doc View Source

    Position

    Gets this role's position relative to other roles in the same guild.

    Declaration
    int Position { get; }
    Property Value
    Type Description
    Int32

    An representing the position of the role in the role list of the guild.

    | Improve this Doc View Source

    Tags

    Gets the tags related to this role.

    Declaration
    RoleTags Tags { get; }
    Property Value
    Type Description
    RoleTags

    A RoleTags object containing all tags related to this role.

    Methods

    | Improve this Doc View Source

    GetIconUrl()

    Gets the image url of the icon role.

    Declaration
    string GetIconUrl()
    Returns
    Type Description
    String

    An image url of the icon role.

    | Improve this Doc View Source

    ModifyAsync(Action<RoleProperties>, RequestOptions)

    Modifies this role.

    Declaration
    Task ModifyAsync(Action<RoleProperties> func, RequestOptions options = null)
    Parameters
    Type Name Description
    Action<RoleProperties> func

    A delegate containing the properties to modify the role with.

    RequestOptions options

    The options to be used when sending the request.

    Returns
    Type Description
    Task

    A task that represents the asynchronous modification operation.

    Remarks

    This method modifies this role with the specified properties. To see an example of this method and what properties are available, please refer to RoleProperties.

    Theme

    • Improve this Doc
    • View Source
    In This Article
    Back to top Discord.Net (c) 2015-2022 3.9.0