Interface IRole
- Namespace
- Discord
- Assembly
- Discord.Net.Core.dll
Represents a generic role object to be given to a guild user.
public interface IRole : ISnowflakeEntity, IEntity<ulong>, IDeletable, IMentionable, IComparable<IRole>
- Inherited Members
Properties
Color
Gets the color given to users of this role.
Color Color { get; }
Property Value
Emoji
Gets the unicode emoji of this role.
Emoji Emoji { get; }
Property Value
Remarks
This field is mutually exclusive with Icon, either icon is set or emoji is set.
Flags
Gets flags related to this role.
RoleFlags Flags { get; }
Property Value
Guild
Gets the guild that owns this role.
IGuild Guild { get; }
Property Value
- IGuild
A guild representing the parent guild of this role.
Icon
Gets the icon of this role.
string Icon { get; }
Property Value
- string
A string containing the hash of this role's icon.
IsHoisted
Gets a value that indicates whether the role can be separated in the user list.
bool IsHoisted { get; }
Property Value
IsManaged
Gets a value that indicates whether the role is managed by Discord.
bool IsManaged { get; }
Property Value
IsMentionable
Gets a value that indicates whether the role is mentionable.
bool IsMentionable { get; }
Property Value
Name
Gets the name of this role.
string Name { get; }
Property Value
- string
A string containing the name of this role.
Permissions
Gets the permissions granted to members of this role.
GuildPermissions Permissions { get; }
Property Value
- GuildPermissions
A GuildPermissions struct that this role possesses.
Position
Gets this role's position relative to other roles in the same guild.
int Position { get; }
Property Value
Tags
Gets the tags related to this role.
RoleTags Tags { get; }
Property Value
Methods
GetIconUrl()
Gets the image url of the icon role.
string GetIconUrl()
Returns
- string
An image url of the icon role.
ModifyAsync(Action<RoleProperties>, RequestOptions)
Modifies this role.
Task ModifyAsync(Action<RoleProperties> func, RequestOptions options = null)
Parameters
func
Action<RoleProperties>A delegate containing the properties to modify the role with.
options
RequestOptionsThe options to be used when sending the request.
Returns
- 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.