Skip to main content

Interface IRole

Represents a generic role object to be given to a guild user.

Assembly: Discord.Net.Core.dll​
View Source​
Declaration
public interface IRole : ISnowflakeEntity, IEntity<ulong>, IDeletable, IMentionable, IComparable<IRole>

Properties​

Guild​

Gets the guild that owns this role.

View Source​
Declaration
IGuild Guild { get; }

Color​

Gets the color given to users of this role.

View Source​
Declaration
Color Color { get; }

IsHoisted​

Gets a value that indicates whether the role can be separated in the user list.

View Source​
Declaration
bool IsHoisted { get; }

IsManaged​

Gets a value that indicates whether the role is managed by Discord.

View Source​
Declaration
bool IsManaged { get; }

IsMentionable​

Gets a value that indicates whether the role is mentionable.

View Source​
Declaration
bool IsMentionable { get; }

Name​

Gets the name of this role.

View Source​
Declaration
string Name { get; }

Icon​

Gets the icon of this role.

View Source​
Declaration
string Icon { get; }

Emoji​

Gets the unicode emoji of this role.

View Source​
Declaration
Emoji Emoji { get; }

Permissions​

Gets the permissions granted to members of this role.

View Source​
Declaration
GuildPermissions Permissions { get; }

Position​

Gets this role's position relative to other roles in the same guild.

View Source​
Declaration
int Position { get; }

Tags​

Gets the tags related to this role.

View Source​
Declaration
RoleTags Tags { get; }

Methods​

ModifyAsync(Action<RoleProperties>, RequestOptions)​

Modifies this role.

View Source​
Declaration
Task ModifyAsync(Action<RoleProperties> func, RequestOptions options = null)
Returns​

System.Threading.Tasks.Task: A task that represents the asynchronous modification operation.

Parameters​
TypeNameDescription
System.Action<Discord.RoleProperties>funcA delegate containing the properties to modify the role with.
Discord.RequestOptionsoptionsThe options to be used when sending the request.

GetIconUrl()​

Gets the image url of the icon role.

View Source​
Declaration
string GetIconUrl()
Returns​

System.String: An image url of the icon role.