Interface IRole
Represents a generic role object to be given to a guild user.
Assembly: Discord.Net.Core.dll​
View Source​
public interface IRole : ISnowflakeEntity, IEntity<ulong>, IDeletable, IMentionable, IComparable<IRole>
Properties​
Guild​
Gets the guild that owns this role.
View Source​
IGuild Guild { get; }
Color​
Gets the color given to users of this role.
View Source​
Color Color { get; }
IsHoisted​
Gets a value that indicates whether the role can be separated in the user list.
View Source​
bool IsHoisted { get; }
IsManaged​
Gets a value that indicates whether the role is managed by Discord.
View Source​
bool IsManaged { get; }
IsMentionable​
Gets a value that indicates whether the role is mentionable.
View Source​
bool IsMentionable { get; }
Name​
Gets the name of this role.
View Source​
string Name { get; }
Icon​
Gets the icon of this role.
View Source​
string Icon { get; }
Emoji​
Gets the unicode emoji of this role.
View Source​
Emoji Emoji { get; }
Permissions​
Gets the permissions granted to members of this role.
View Source​
GuildPermissions Permissions { get; }
Position​
Gets this role's position relative to other roles in the same guild.
View Source​
int Position { get; }
Tags​
Gets the tags related to this role.
View Source​
RoleTags Tags { get; }
Methods​
ModifyAsync(Action<RoleProperties>, RequestOptions)​
Modifies this role.
View Source​
Task ModifyAsync(Action<RoleProperties> func, RequestOptions options = null)
Returns​
System.Threading.Tasks.Task
:
A task that represents the asynchronous modification operation.
Parameters​
Type | Name | Description |
---|---|---|
System.Action<Discord.RoleProperties> | func | A delegate containing the properties to modify the role with. |
Discord.RequestOptions | options | The options to be used when sending the request. |
GetIconUrl()​
Gets the image url of the icon role.
View Source​
string GetIconUrl()
Returns​
System.String
:
An image url of the icon role.