diff --git a/src/Discord.Net.Core/Entities/Channels/IForumChannel.cs b/src/Discord.Net.Core/Entities/Channels/IForumChannel.cs
index e6c055779..3b244b1a9 100644
--- a/src/Discord.Net.Core/Entities/Channels/IForumChannel.cs
+++ b/src/Discord.Net.Core/Entities/Channels/IForumChannel.cs
@@ -53,6 +53,15 @@ namespace Discord
///
int DefaultSlowModeInterval { get; }
+ ///
+ /// Gets the emoji to show in the add reaction button on a thread in a forum channel
+ ///
+ ///
+ /// If the emoji is only the will be populated.
+ /// Use to get the emoji.
+ ///
+ IEmote DefaultReactionEmoji { get; }
+
///
/// Modifies this forum channel.
///
diff --git a/src/Discord.Net.Rest/API/Common/Channel.cs b/src/Discord.Net.Rest/API/Common/Channel.cs
index 2cd3b13a9..2c43cc492 100644
--- a/src/Discord.Net.Rest/API/Common/Channel.cs
+++ b/src/Discord.Net.Rest/API/Common/Channel.cs
@@ -82,5 +82,8 @@ namespace Discord.API
[JsonProperty("flags")]
public Optional Flags { get; set; }
+
+ [JsonProperty("default_reaction_emoji")]
+ public Optional DefaultReactionEmoji { get; set; }
}
}
diff --git a/src/Discord.Net.Rest/API/Common/ForumReactionEmoji.cs b/src/Discord.Net.Rest/API/Common/ForumReactionEmoji.cs
new file mode 100644
index 000000000..ba8d78eeb
--- /dev/null
+++ b/src/Discord.Net.Rest/API/Common/ForumReactionEmoji.cs
@@ -0,0 +1,12 @@
+using Newtonsoft.Json;
+
+namespace Discord.API;
+
+public class ForumReactionEmoji
+{
+ [JsonProperty("emoji_id")]
+ public Optional EmojiId { get; set; }
+
+ [JsonProperty("emoji_name")]
+ public Optional EmojiName { get; set; }
+}
diff --git a/src/Discord.Net.Rest/Entities/Channels/RestForumChannel.cs b/src/Discord.Net.Rest/Entities/Channels/RestForumChannel.cs
index d4c82abb8..b8af7bc9f 100644
--- a/src/Discord.Net.Rest/Entities/Channels/RestForumChannel.cs
+++ b/src/Discord.Net.Rest/Entities/Channels/RestForumChannel.cs
@@ -35,6 +35,9 @@ namespace Discord.Rest
///
public ulong? CategoryId { get; private set; }
+ ///
+ public IEmote DefaultReactionEmoji { get; private set; }
+
///
public string Mention => MentionUtils.MentionChannel(Id);
@@ -67,6 +70,16 @@ namespace Discord.Rest
Tags = model.ForumTags.GetValueOrDefault(Array.Empty()).Select(
x => new ForumTag(x.Id, x.Name, x.EmojiId.GetValueOrDefault(null), x.EmojiName.GetValueOrDefault(), x.Moderated)
).ToImmutableArray();
+
+ if (model.DefaultReactionEmoji.IsSpecified)
+ {
+ if (model.DefaultReactionEmoji.Value.EmojiId.IsSpecified && model.DefaultReactionEmoji.Value.EmojiId.Value != 0)
+ DefaultReactionEmoji = new Emote(model.DefaultReactionEmoji.Value.EmojiId.Value, null, false);
+ else if (model.DefaultReactionEmoji.Value.EmojiName.IsSpecified)
+ DefaultReactionEmoji = new Emoji(model.DefaultReactionEmoji.Value.EmojiName.Value);
+ else
+ DefaultReactionEmoji = null;
+ }
}
///
diff --git a/src/Discord.Net.WebSocket/Entities/Channels/SocketForumChannel.cs b/src/Discord.Net.WebSocket/Entities/Channels/SocketForumChannel.cs
index 2b5f24f2d..09745abf8 100644
--- a/src/Discord.Net.WebSocket/Entities/Channels/SocketForumChannel.cs
+++ b/src/Discord.Net.WebSocket/Entities/Channels/SocketForumChannel.cs
@@ -39,6 +39,9 @@ namespace Discord.WebSocket
///
public ulong? CategoryId { get; private set; }
+ ///
+ public IEmote DefaultReactionEmoji { get; private set; }
+
///
/// Gets the parent (category) of this channel in the guild's channel list.
///
@@ -73,6 +76,16 @@ namespace Discord.WebSocket
Tags = model.ForumTags.GetValueOrDefault(Array.Empty()).Select(
x => new ForumTag(x.Id, x.Name, x.EmojiId.GetValueOrDefault(null), x.EmojiName.GetValueOrDefault(), x.Moderated)
).ToImmutableArray();
+
+ if (model.DefaultReactionEmoji.IsSpecified)
+ {
+ if (model.DefaultReactionEmoji.Value.EmojiId.IsSpecified && model.DefaultReactionEmoji.Value.EmojiId.Value != 0)
+ DefaultReactionEmoji = new Emote(model.DefaultReactionEmoji.Value.EmojiId.Value, null, false);
+ else if (model.DefaultReactionEmoji.Value.EmojiName.IsSpecified)
+ DefaultReactionEmoji = new Emoji(model.DefaultReactionEmoji.Value.EmojiName.Value);
+ else
+ DefaultReactionEmoji = null;
+ }
}
///