Show / Hide Table of Contents

Class RestRole

Represents a REST-based role.

Inheritance
System.Object
RestEntity<System.UInt64>
RestRole
Implements
IRole
ISnowflakeEntity
IEntity<System.UInt64>
IDeletable
IMentionable
System.IComparable<IRole>
Inherited Members
RestEntity<UInt64>.Id
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: Discord.Rest
Assembly: Discord.Net.Rest.dll
Syntax
public class RestRole : RestEntity<ulong>, IRole, ISnowflakeEntity, IEntity<ulong>, IDeletable, IMentionable, IComparable<IRole>

Properties

| Improve this Doc View Source

Color

Declaration
public Color Color { get; }
Property Value
Type Description
Color
| Improve this Doc View Source

CreatedAt

Declaration
public DateTimeOffset CreatedAt { get; }
Property Value
Type Description
System.DateTimeOffset
| Improve this Doc View Source

IsEveryone

Gets if this role is the @everyone role of the guild or not.

Declaration
public bool IsEveryone { get; }
Property Value
Type Description
System.Boolean
| Improve this Doc View Source

IsHoisted

Declaration
public bool IsHoisted { get; }
Property Value
Type Description
System.Boolean
| Improve this Doc View Source

IsManaged

Declaration
public bool IsManaged { get; }
Property Value
Type Description
System.Boolean
| Improve this Doc View Source

IsMentionable

Declaration
public bool IsMentionable { get; }
Property Value
Type Description
System.Boolean
| Improve this Doc View Source

Mention

Declaration
public string Mention { get; }
Property Value
Type Description
System.String
| Improve this Doc View Source

Name

Declaration
public string Name { get; }
Property Value
Type Description
System.String
| Improve this Doc View Source

Permissions

Declaration
public GuildPermissions Permissions { get; }
Property Value
Type Description
GuildPermissions
| Improve this Doc View Source

Position

Declaration
public int Position { get; }
Property Value
Type Description
System.Int32

Methods

| Improve this Doc View Source

CompareTo(IRole)

Declaration
public int CompareTo(IRole role)
Parameters
Type Name Description
IRole role
Returns
Type Description
System.Int32
| Improve this Doc View Source

DeleteAsync(RequestOptions)

Declaration
public Task DeleteAsync(RequestOptions options = null)
Parameters
Type Name Description
RequestOptions options
Returns
Type Description
System.Threading.Tasks.Task
| Improve this Doc View Source

ModifyAsync(Action<RoleProperties>, RequestOptions)

Declaration
public Task ModifyAsync(Action<RoleProperties> func, RequestOptions options = null)
Parameters
Type Name Description
System.Action<RoleProperties> func
RequestOptions options
Returns
Type Description
System.Threading.Tasks.Task
| Improve this Doc View Source

ToString()

Gets the name of the role.

Declaration
public override string ToString()
Returns
Type Description
System.String

A string that is the name of the role.

Overrides
System.Object.ToString()

Explicit Interface Implementations

| Improve this Doc View Source

IRole.Guild

Declaration
IGuild IRole.Guild { get; }
Returns
Type Description
IGuild

Implements

IRole
ISnowflakeEntity
IEntity<TId>
IDeletable
IMentionable
System.IComparable<T>
  • Improve this Doc
  • View Source
Back to top Generated by DocFX