Class Role
- Namespace
- NetCord
- Assembly
- NetCord.dll
public class Role : ClientEntity, IEntity, ISpanFormattable, IFormattable, IEquatable<Entity>, IJsonModel<JsonRole>, IComparable<Role>
- Inheritance
-
Role
- Implements
- Inherited Members
Constructors
Role(JsonRole, ulong, RestClient)
public Role(JsonRole jsonModel, ulong guildId, RestClient client)
Parameters
jsonModel
JsonRoleguildId
ulongclient
RestClient
Properties
Color
public Color Color { get; }
Property Value
Flags
public RoleFlags Flags { get; }
Property Value
GuildId
public ulong GuildId { get; }
Property Value
Hoist
public bool Hoist { get; }
Property Value
IconHash
public string? IconHash { get; }
Property Value
Id
The unique identifier for this object.
public override ulong Id { get; }
Property Value
Managed
public bool Managed { get; }
Property Value
Mentionable
public bool Mentionable { get; }
Property Value
Name
public string Name { get; }
Property Value
Permissions
public Permissions Permissions { get; }
Property Value
Position
public int Position { get; }
Property Value
Tags
public RoleTags? Tags { get; }
Property Value
UnicodeEmoji
public string? UnicodeEmoji { get; }
Property Value
Methods
CompareTo(Role?)
public int CompareTo(Role? other)
Parameters
other
Role
Returns
DeleteAsync(ulong, RestRequestProperties?, CancellationToken)
public Task DeleteAsync(ulong roleId, RestRequestProperties? properties = null, CancellationToken cancellationToken = default)
Parameters
roleId
ulongproperties
RestRequestPropertiescancellationToken
CancellationToken
Returns
GetIconUrl(ImageFormat)
public ImageUrl? GetIconUrl(ImageFormat format)
Parameters
format
ImageFormat
Returns
ModifyAsync(ulong, Action<RoleOptions>, RestRequestProperties?, CancellationToken)
public Task<Role> ModifyAsync(ulong roleId, Action<RoleOptions> action, RestRequestProperties? properties = null, CancellationToken cancellationToken = default)
Parameters
roleId
ulongaction
Action<RoleOptions>properties
RestRequestPropertiescancellationToken
CancellationToken
Returns
ToString()
public override string ToString()
Returns
TryFormat(Span<char>, out int, ReadOnlySpan<char>, IFormatProvider?)
public override bool TryFormat(Span<char> destination, out int charsWritten, ReadOnlySpan<char> format = default, IFormatProvider? provider = null)
Parameters
destination
Span<char>charsWritten
intformat
ReadOnlySpan<char>provider
IFormatProvider
Returns
Operators
operator >(Role, Role)
public static bool operator >(Role left, Role right)
Parameters
Returns
operator >=(Role, Role)
public static bool operator >=(Role left, Role right)
Parameters
Returns
operator <(Role, Role)
public static bool operator <(Role left, Role right)
Parameters
Returns
operator <=(Role, Role)
public static bool operator <=(Role left, Role right)