Class DiscordGuildRole
Represents a discord Role Structure API model. Docs: https://discord.com/developers/docs/topics/permissions#role-object-role-structure
Inheritance
System.Object
DiscordGuildRole
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Color_Chan.Discord.Rest.Models.Guild
Assembly: Color-Chan.Discord.Rest.dll
Syntax
public class DiscordGuildRole : IDiscordGuildRole, IEquatable<DiscordGuildRole>
Constructors
| Improve this Doc View SourceDiscordGuildRole(DiscordGuildRoleData)
Initializes a new DiscordGuildRole
Declaration
public DiscordGuildRole(DiscordGuildRoleData data)
Parameters
Type | Name | Description |
---|---|---|
DiscordGuildRoleData | data | The data needed to create the DiscordGuildRole. |
Properties
| Improve this Doc View SourceColor
Integer representation of hexadecimal color code.
Declaration
public Color Color { get; set; }
Property Value
Type | Description |
---|---|
System.Drawing.Color |
Id
Role id.
Declaration
public ulong Id { get; set; }
Property Value
Type | Description |
---|---|
System.UInt64 |
IsHoisted
If this role is pinned in the user listing.
Declaration
public bool IsHoisted { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
Managed
Whether this role is managed by an integration
Declaration
public bool Managed { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
Mentionable
Whether this role is mentionable
Declaration
public bool Mentionable { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
Name
Role name.
Declaration
public string Name { get; set; }
Property Value
Type | Description |
---|---|
System.String |
Permissions
Permission bit set.
Declaration
public DiscordPermission Permissions { get; set; }
Property Value
Type | Description |
---|---|
DiscordPermission |
Position
Position of this role.
Declaration
public int Position { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 |
Methods
| Improve this Doc View SourceToDataModel()
Converts the model back to a discord data model so that it can be send to discord.
Declaration
public DiscordGuildRoleData ToDataModel()
Returns
Type | Description |
---|---|
DiscordGuildRoleData | The converted DiscordGuildRoleData. |
Implements
System.IEquatable<T>