Table of Contents

Class DiscordRole

Namespace
DSharpPlus.Entities
Assembly
DSharpPlus.dll

Represents a discord role, to which users can be assigned.

public class DiscordRole : SnowflakeObject
Inheritance
object
DiscordRole
Inherited Members

Properties

Color

Gets the color of this role.

Emoji

The emoji associated with this role's icon, if set.

IconHash

The hash of this role's icon, if any.

IconUrl

The url for this role's icon, if set.

IsHoisted

Gets whether this role is hoisted.

IsManaged

Gets whether this role is managed by an integration.

IsMentionable

Gets whether this role is mentionable.

Mention

Gets a mention string for this role. If the role is mentionable, this string will mention all the users that belong to this role.

Name

Gets the name of this role.

Permissions

Gets the permissions set for this role.

Position

Gets the position of this role in the role hierarchy.

Tags

Gets the tags this role has.

Methods

CheckPermission(DiscordPermissions)

Checks whether this role has specific permissions.

DeleteAsync(string?)

Deletes this role.

Equals(DiscordRole)

Checks whether this DiscordRole is equal to another DiscordRole.

Equals(object)

Checks whether this DiscordRole is equal to another object.

GetHashCode()

Gets the hash code for this DiscordRole.

ModifyAsync(Action<RoleEditModel>)
ModifyAsync(string, DiscordPermissions?, DiscordColor?, bool?, bool?, string, Stream, DiscordEmoji)

Updates this role.

ModifyPositionAsync(int, string)

Modifies this role's position.

ToString()

Returns a string representation of this role.

Operators

operator ==(DiscordRole, DiscordRole)

Gets whether the two DiscordRole objects are equal.

operator !=(DiscordRole, DiscordRole)

Gets whether the two DiscordRole objects are not equal.