Search Results for

    Show / Hide Table of Contents

    Class SocketRole

    Represents a WebSocket-based role to be given to a guild user.

    Inheritance
    Object
    SocketEntity<UInt64>
    SocketRole
    Implements
    IEntity<UInt64>
    IRole
    ISnowflakeEntity
    IEntity<UInt64>
    IDeletable
    IMentionable
    IComparable<IRole>
    Inherited Members
    SocketEntity<UInt64>.Id
    Namespace: Discord.WebSocket
    Assembly: Discord.Net.WebSocket.dll
    Syntax
    public class SocketRole : SocketEntity<ulong>, IEntity<ulong>, 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
    public Color Color { get; }
    Property Value
    Type Description
    Color

    A Color struct representing the color of this role.

    | Improve this Doc View Source

    CreatedAt

    Declaration
    public DateTimeOffset CreatedAt { get; }
    Property Value
    Type Description
    DateTimeOffset
    | Improve this Doc View Source

    Emoji

    Gets the unicode emoji of this role.

    Declaration
    public 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
    public SocketGuild Guild { get; }
    Property Value
    Type Description
    SocketGuild

    A SocketGuild representing the parent guild of this role.

    | Improve this Doc View Source

    Icon

    Declaration
    public string Icon { get; }
    Property Value
    Type Description
    String
    | Improve this Doc View Source

    IsEveryone

    Returns a value that determines if the role is an @everyone role.

    Declaration
    public bool IsEveryone { get; }
    Property Value
    Type Description
    Boolean

    true if the role is @everyone; otherwise false.

    | Improve this Doc View Source

    IsHoisted

    Declaration
    public bool IsHoisted { get; }
    Property Value
    Type Description
    Boolean
    | Improve this Doc View Source

    IsManaged

    Declaration
    public bool IsManaged { get; }
    Property Value
    Type Description
    Boolean
    | Improve this Doc View Source

    IsMentionable

    Declaration
    public bool IsMentionable { get; }
    Property Value
    Type Description
    Boolean
    | Improve this Doc View Source

    Members

    Returns an IEnumerable containing all SocketGuildUser that have this role.

    Declaration
    public IEnumerable<SocketGuildUser> Members { get; }
    Property Value
    Type Description
    IEnumerable<SocketGuildUser>
    | Improve this Doc View Source

    Mention

    Declaration
    public string Mention { get; }
    Property Value
    Type Description
    String
    | Improve this Doc View Source

    Name

    Declaration
    public string Name { get; }
    Property Value
    Type Description
    String
    | Improve this Doc View Source

    Permissions

    Gets the permissions granted to members of this role.

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

    A GuildPermissions struct that this role possesses.

    | Improve this Doc View Source

    Position

    Declaration
    public int Position { get; }
    Property Value
    Type Description
    Int32
    | Improve this Doc View Source

    Tags

    Gets the tags related to this role.

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

    A RoleTags object containing all tags related to this role.

    Methods

    | Improve this Doc View Source

    CompareTo(IRole)

    Declaration
    public int CompareTo(IRole role)
    Parameters
    Type Name Description
    IRole role
    Returns
    Type Description
    Int32
    | Improve this Doc View Source

    DeleteAsync(RequestOptions)

    Declaration
    public Task DeleteAsync(RequestOptions options = null)
    Parameters
    Type Name Description
    RequestOptions options
    Returns
    Type Description
    Task
    | Improve this Doc View Source

    GetIconUrl()

    Declaration
    public string GetIconUrl()
    Returns
    Type Description
    String
    | Improve this Doc View Source

    ModifyAsync(Action<RoleProperties>, RequestOptions)

    Declaration
    public Task ModifyAsync(Action<RoleProperties> func, RequestOptions options = null)
    Parameters
    Type Name Description
    Action<RoleProperties> func
    RequestOptions options
    Returns
    Type Description
    Task
    | Improve this Doc View Source

    ToString()

    Gets the name of the role.

    Declaration
    public override string ToString()
    Returns
    Type Description
    String

    A string that resolves to Name.

    Explicit Interface Implementations

    | Improve this Doc View Source

    IRole.Guild

    Gets the guild that owns this role.

    Declaration
    IGuild IRole.Guild { get; }
    Returns
    Type Description
    IGuild

    A guild representing the parent guild of this role.

    Implements

    IEntity<TId>
    IRole
    ISnowflakeEntity
    IEntity<TId>
    IDeletable
    IMentionable
    IComparable<>

    Theme

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