Class SocketRole
Represents a WebSocket-based role to be given to a guild user.
Inherited Members
Namespace: Kook.WebSocket
Assembly: Kook.Net.WebSocket.dll
Syntax
public class SocketRole : SocketEntity<uint>, IEntity<uint>, IRole, IEntity<uint>, IDeletable, IMentionable, IComparable<IRole>
Properties
Color
Gets the color given to users of this role.
Declaration
public Color Color { get; }
Property Value
Color
A Color struct representing the color of this role. |
Implements
ColorType
Gets the type of the color given to users of this role.
Declaration
public ColorType ColorType { get; }
Property Value
ColorType
A ColorType struct representing the color type of this role. |
Implements
GradientColor
Guild
Gets the guild that owns this role.
Declaration
public SocketGuild Guild { get; }
Property Value
SocketGuild
A SocketGuild representing the parent guild of this role. |
IsEveryone
Returns a value that determines if the role is an @everyone role.
Declaration
public bool IsEveryone { get; }
Property Value
Boolean
|
IsHoisted
IsMentionable
KMarkdownMention
Name
Permissions
Gets the permissions granted to members of this role.
Declaration
public GuildPermissions Permissions { get; }
Property Value
GuildPermissions
A GuildPermissions struct that this role possesses. |
Implements
PlainTextMention
Position
Type
Methods
CompareTo(IRole)
DeleteAsync(RequestOptions)
Declaration
public Task DeleteAsync(RequestOptions options = null)
Parameters
RequestOptions
options
|
Returns
Task
|
GetUsersAsync(RequestOptions)
Gets a collection of users with this role.
Declaration
public IAsyncEnumerable<IReadOnlyCollection<SocketGuildUser>> GetUsersAsync(RequestOptions options = null)
Parameters
RequestOptions
options
The options to be used when sending the request. |
Returns
IAsyncEnumerable<IReadOnlyCollection<SocketGuildUser>>
Paged collection of users with this role. |
Remarks
If the guild this role belongs to does not has all members cached locally by checking HasAllMembers, this method will request the data via REST and update the guild users cache, otherwise it will return the cached data.
ModifyAsync(Action<RoleProperties>, RequestOptions)
Declaration
public Task ModifyAsync(Action<RoleProperties> func, RequestOptions options = null)
Parameters
Action<RoleProperties>
func
|
RequestOptions
options
|
Returns
Task
|
ToString()
Gets the name of the role.
Declaration
public override string ToString()
Returns
String
A string that resolves to Name. |
Explicit Interface Implementations
IRole.Guild
Gets the guild that owns this role.
Declaration
IGuild IRole.Guild { get; }
Returns
IGuild
A guild representing the parent guild of this role. |