Table of Contents

Class DiscordRole

Namespace
DisCatSharp.Entities
Assembly
DisCatSharp.dll

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

public class DiscordRole : SnowflakeObject, IEquatable<DiscordRole>
Inheritance
DiscordRole
Implements
Inherited Members
Extension Methods

Properties

Color

Gets the color of this role.

Description

Gets the description of this role.

Flags

Gets the role flags.

Guild

Gets the guild this role belongs to.

IconHash

Gets the role icon's hash.

IconUrl

Gets the role icon's url.

IsHoisted

Gets whether this role is hoisted.

IsManaged

Gets whether this role is managed by an integration.

IsMentionable

Gets whether this role is mentionable.

Members

Gets a list of members that have this role. Requires ServerMembers Intent.

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.

UnicodeEmoji

Gets the unicode emoji.

Version

Gets the version number for this role.

Methods

CheckPermission(Permissions)

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>)

Updates this role.

ModifyAsync(string, Permissions?, DiscordColor?, bool?, bool?, string)

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.