diff --git a/src/Discord.Net/API/Common.cs b/src/Discord.Net/API/Common.cs
index 0e97c5d70..d85e773f4 100644
--- a/src/Discord.Net/API/Common.cs
+++ b/src/Discord.Net/API/Common.cs
@@ -260,9 +260,13 @@ namespace Discord.API
public class RoleInfo
{
[JsonProperty("permissions")]
- public uint Permissions;
+ public uint? Permissions;
[JsonProperty("name")]
public string Name;
+ [JsonProperty("hoist")]
+ public bool? Hoist;
+ [JsonProperty("color")]
+ public uint? Color;
[JsonProperty("id")]
public string Id;
}
diff --git a/src/Discord.Net/Models/Role.cs b/src/Discord.Net/Models/Role.cs
index 3fa473f1c..38140a658 100644
--- a/src/Discord.Net/Models/Role.cs
+++ b/src/Discord.Net/Models/Role.cs
@@ -12,6 +12,10 @@ namespace Discord
public string Id { get; }
/// Returns the name of this role.
public string Name { get; private set; }
+ /// If true, this role is displayed isolated from other users.
+ public bool Hoist { get; private set; }
+ /// Returns the color of this role.
+ public uint Color { get; private set; }
/// Returns the the permissions contained by this role.
public PackedServerPermissions Permissions { get; }
@@ -41,8 +45,14 @@ namespace Discord
internal void Update(API.RoleInfo model)
{
- Name = model.Name;
- Permissions.SetRawValue(model.Permissions);
+ if (model.Name != null)
+ Name = model.Name;
+ if (model.Hoist != null)
+ Hoist = model.Hoist.Value;
+ if (model.Color != null)
+ Color = model.Color.Value;
+ if (model.Permissions != null)
+ Permissions.SetRawValue(model.Permissions.Value);
foreach (var member in Members)
member.UpdatePermissions();