Class SocketRole
Represents a WebSocket-based role to be given to a guild user.
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
|
Improve this Doc
View Source
Guild
Gets the guild that owns this role.
Declaration
public SocketGuild Guild { get; }
Property Value
|
Improve this Doc
View Source
Icon
Declaration
public string Icon { get; }
Property Value
|
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
|
Improve this Doc
View Source
IsManaged
Declaration
public bool IsManaged { get; }
Property Value
|
Improve this Doc
View Source
IsMentionable
Declaration
public bool IsMentionable { get; }
Property Value
|
Improve this Doc
View Source
Members
Declaration
public IEnumerable<SocketGuildUser> Members { get; }
Property Value
|
Improve this Doc
View Source
Mention
Declaration
public string Mention { get; }
Property Value
|
Improve this Doc
View Source
Name
Declaration
public string Name { get; }
Property Value
|
Improve this Doc
View Source
Permissions
Gets the permissions granted to members of this role.
Declaration
public GuildPermissions Permissions { get; }
Property Value
|
Improve this Doc
View Source
Position
Declaration
public int Position { get; }
Property Value
|
Improve this Doc
View Source
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
|
Improve this Doc
View Source
DeleteAsync(RequestOptions)
Declaration
public Task DeleteAsync(RequestOptions options = null)
Parameters
Returns
|
Improve this Doc
View Source
GetIconUrl()
Declaration
public string GetIconUrl()
Returns
|
Improve this Doc
View Source
ModifyAsync(Action<RoleProperties>, RequestOptions)
Declaration
public Task ModifyAsync(Action<RoleProperties> func, RequestOptions options = null)
Parameters
Returns
|
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
IComparable<>