diff --git a/src/Discord.Net.Core/Entities/Roles/IRole.cs b/src/Discord.Net.Core/Entities/Roles/IRole.cs
index c9e7ffef7..9461dadd3 100644
--- a/src/Discord.Net.Core/Entities/Roles/IRole.cs
+++ b/src/Discord.Net.Core/Entities/Roles/IRole.cs
@@ -58,6 +58,13 @@ namespace Discord
/// A string containing the hash of this role's icon.
///
string Icon { get; }
+ ///
+ /// Gets the unicode emoji of this role.
+ ///
+ ///
+ /// This field is mutually exclusive with , either icon is set or emoji is set.
+ ///
+ Emoji Emoji { get; }
///
/// Gets the permissions granted to members of this role.
///
diff --git a/src/Discord.Net.Rest/API/Common/Role.cs b/src/Discord.Net.Rest/API/Common/Role.cs
index 09fb99885..81f54ccc0 100644
--- a/src/Discord.Net.Rest/API/Common/Role.cs
+++ b/src/Discord.Net.Rest/API/Common/Role.cs
@@ -9,7 +9,9 @@ namespace Discord.API
[JsonProperty("name")]
public string Name { get; set; }
[JsonProperty("icon")]
- public string Icon { get; set; }
+ public Optional Icon { get; set; }
+ [JsonProperty("unicode_emoji")]
+ public Optional Emoji { get; set; }
[JsonProperty("color")]
public uint Color { get; set; }
[JsonProperty("hoist")]
diff --git a/src/Discord.Net.Rest/Entities/Roles/RestRole.cs b/src/Discord.Net.Rest/Entities/Roles/RestRole.cs
index 8866fd282..26772fcdc 100644
--- a/src/Discord.Net.Rest/Entities/Roles/RestRole.cs
+++ b/src/Discord.Net.Rest/Entities/Roles/RestRole.cs
@@ -25,6 +25,8 @@ namespace Discord.Rest
public string Name { get; private set; }
///
public string Icon { get; private set; }
+ /// />
+ public Emoji Emoji { get; private set; }
///
public GuildPermissions Permissions { get; private set; }
///
@@ -55,7 +57,6 @@ namespace Discord.Rest
internal void Update(Model model)
{
Name = model.Name;
- Icon = model.Icon;
IsHoisted = model.Hoist;
IsManaged = model.Managed;
IsMentionable = model.Mentionable;
@@ -64,6 +65,16 @@ namespace Discord.Rest
Permissions = new GuildPermissions(model.Permissions);
if (model.Tags.IsSpecified)
Tags = model.Tags.Value.ToEntity();
+
+ if (model.Icon.IsSpecified)
+ {
+ Icon = model.Icon.Value;
+ }
+
+ if (model.Emoji.IsSpecified)
+ {
+ Emoji = new Emoji(model.Emoji.Value);
+ }
}
///
diff --git a/src/Discord.Net.WebSocket/Entities/Roles/SocketRole.cs b/src/Discord.Net.WebSocket/Entities/Roles/SocketRole.cs
index 40dc057cd..b2691248d 100644
--- a/src/Discord.Net.WebSocket/Entities/Roles/SocketRole.cs
+++ b/src/Discord.Net.WebSocket/Entities/Roles/SocketRole.cs
@@ -33,6 +33,8 @@ namespace Discord.WebSocket
public bool IsMentionable { get; private set; }
///
public string Name { get; private set; }
+ ///
+ public Emoji Emoji { get; private set; }
///
public string Icon { get; private set; }
///
@@ -74,7 +76,6 @@ namespace Discord.WebSocket
internal void Update(ClientState state, Model model)
{
Name = model.Name;
- Icon = model.Icon;
IsHoisted = model.Hoist;
IsManaged = model.Managed;
IsMentionable = model.Mentionable;
@@ -83,6 +84,16 @@ namespace Discord.WebSocket
Permissions = new GuildPermissions(model.Permissions);
if (model.Tags.IsSpecified)
Tags = model.Tags.Value.ToEntity();
+
+ if (model.Icon.IsSpecified)
+ {
+ Icon = model.Icon.Value;
+ }
+
+ if (model.Emoji.IsSpecified)
+ {
+ Emoji = new Emoji(model.Emoji.Value);
+ }
}
///