Interface IRole
Represents a generic role object to be given to a guild user.
Inherited Members
Namespace: Discord
Assembly: Discord.Net.Core.dll
Syntax
public interface IRole : ISnowflakeEntity, IEntity<ulong>, IDeletable, IMentionable, IComparable<IRole>
Properties
| Improve this Doc View SourceColor
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. |
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. |
IsHoisted
Gets a value that indicates whether the role can be separated in the user list.
Declaration
bool IsHoisted { get; }
Property Value
| Type | Description |
|---|---|
| System.Boolean |
|
IsManaged
Gets a value that indicates whether the role is managed by Discord.
Declaration
bool IsManaged { get; }
Property Value
| Type | Description |
|---|---|
| System.Boolean |
|
IsMentionable
Gets a value that indicates whether the role is mentionable.
Declaration
bool IsMentionable { get; }
Property Value
| Type | Description |
|---|---|
| System.Boolean |
|
Name
Gets the name of this role.
Declaration
string Name { get; }
Property Value
| Type | Description |
|---|---|
| System.String | A string containing the name of this role. |
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. |
Position
Gets this role's position relative to other roles in the same guild.
Declaration
int Position { get; }
Property Value
| Type | Description |
|---|---|
| System.Int32 | An System.Int32 representing the position of the role in the role list of the guild. |
Methods
| Improve this Doc View SourceModifyAsync(Action<RoleProperties>, RequestOptions)
Modifies this role.
Declaration
Task ModifyAsync(Action<RoleProperties> func, RequestOptions options = null)
Parameters
| Type | Name | Description |
|---|---|---|
| System.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 |
|---|---|
| System.Threading.Tasks.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.