diff --git a/src/Discord.Net.Core/Discord.Net.Core.xml b/src/Discord.Net.Core/Discord.Net.Core.xml
index a28214712..bdcea9de9 100644
--- a/src/Discord.Net.Core/Discord.Net.Core.xml
+++ b/src/Discord.Net.Core/Discord.Net.Core.xml
@@ -1085,6 +1085,21 @@
A sticker was deleted.
+
+
+ A thread was created.
+
+
+
+
+ A thread was updated.
+
+
+
+
+ A thread was deleted.
+
+
Represents data applied to an .
@@ -4981,7 +4996,7 @@
- The allowed channel types for this option.
+ The allowed channel types for this option.
@@ -8286,15 +8301,15 @@
The message is an inline reply.
- Only available in API v8
+ Only available in API v8.
- The message is an Application Command
+ The message is an Application Command.
- Only available in API v8
+ Only available in API v8.
@@ -8302,12 +8317,17 @@
The message that starts a thread.
- Only available in API v9
+ Only available in API v9.
- The message for a invite reminder
+ The message for a invite reminder.
+
+
+
+
+ The message for a context menu command.
diff --git a/src/Discord.Net.Core/Entities/Messages/MessageType.cs b/src/Discord.Net.Core/Entities/Messages/MessageType.cs
index de30d8047..b83f88434 100644
--- a/src/Discord.Net.Core/Entities/Messages/MessageType.cs
+++ b/src/Discord.Net.Core/Entities/Messages/MessageType.cs
@@ -81,26 +81,30 @@ namespace Discord
/// The message is an inline reply.
///
///
- /// Only available in API v8
+ /// Only available in API v8.
///
Reply = 19,
///
- /// The message is an Application Command
+ /// The message is an Application Command.
///
///
- /// Only available in API v8
+ /// Only available in API v8.
///
ApplicationCommand = 20,
///
/// The message that starts a thread.
///
///
- /// Only available in API v9
+ /// Only available in API v9.
///
ThreadStarterMessage = 21,
///
- /// The message for a invite reminder
+ /// The message for a invite reminder.
///
- GuildInviteReminder = 22
+ GuildInviteReminder = 22,
+ ///
+ /// The message for a context menu command.
+ ///
+ ContextMenuCommand = 23,
}
}
diff --git a/src/Discord.Net.Rest/API/Common/Message.cs b/src/Discord.Net.Rest/API/Common/Message.cs
index 3b9e5379a..c19dc8942 100644
--- a/src/Discord.Net.Rest/API/Common/Message.cs
+++ b/src/Discord.Net.Rest/API/Common/Message.cs
@@ -32,7 +32,7 @@ namespace Discord.API
[JsonProperty("mention_everyone")]
public Optional MentionEveryone { get; set; }
[JsonProperty("mentions")]
- public Optional[]> UserMentions { get; set; }
+ public Optional UserMentions { get; set; }
[JsonProperty("mention_roles")]
public Optional RoleMentions { get; set; }
[JsonProperty("attachments")]
diff --git a/src/Discord.Net.Rest/Discord.Net.Rest.xml b/src/Discord.Net.Rest/Discord.Net.Rest.xml
index 4352d4f1f..52da1a0bd 100644
--- a/src/Discord.Net.Rest/Discord.Net.Rest.xml
+++ b/src/Discord.Net.Rest/Discord.Net.Rest.xml
@@ -1507,6 +1507,96 @@
A role information object containing the role information after the changes were made.
+
+
+ Represents information for a stage.
+
+
+
+
+ Gets the topic of the stage channel.
+
+
+
+
+ Gets the privacy level of the stage channel.
+
+
+
+
+ Gets the user who started the stage channel.
+
+
+
+
+ Contains a piece of audit log data related to a stage going live.
+
+
+
+
+ Gets the topic of the stage channel.
+
+
+
+
+ Gets the privacy level of the stage channel.
+
+
+
+
+ Gets the user who started the stage channel.
+
+
+
+
+ Gets the Id of the stage channel.
+
+
+
+
+ Contains a piece of audit log data related to a stage instance deleted.
+
+
+
+
+ Gets the topic of the stage channel.
+
+
+
+
+ Gets the privacy level of the stage channel.
+
+
+
+
+ Gets the user who started the stage channel.
+
+
+
+
+ Gets the Id of the stage channel.
+
+
+
+
+ Contains a piece of audit log data related to a stage instance update.
+
+
+
+
+ Gets the Id of the stage channel.
+
+
+
+
+ Gets the stage information before the changes.
+
+
+
+
+ Gets the stage information after the changes.
+
+
Contains a piece of audit log data related to an unban.
@@ -4031,7 +4121,7 @@
- The allowed channel types for this option.
+ The allowed channel types for this option.
@@ -4341,11 +4431,6 @@
-
-
- Gets a collection of the mentioned users in the message.
-
-
@@ -4373,6 +4458,11 @@
+
+
+ Gets a collection of the mentioned users in the message.
+
+
@@ -4478,9 +4568,6 @@
-
-
-
diff --git a/src/Discord.Net.Rest/Entities/Messages/RestMessage.cs b/src/Discord.Net.Rest/Entities/Messages/RestMessage.cs
index d9bcc938e..22b109549 100644
--- a/src/Discord.Net.Rest/Entities/Messages/RestMessage.cs
+++ b/src/Discord.Net.Rest/Entities/Messages/RestMessage.cs
@@ -15,6 +15,7 @@ namespace Discord.Rest
{
private long _timestampTicks;
private ImmutableArray _reactions = ImmutableArray.Create();
+ private ImmutableArray _userMentions = ImmutableArray.Create();
///
public IMessageChannel Channel { get; }
@@ -56,10 +57,6 @@ namespace Discord.Rest
public virtual IReadOnlyCollection MentionedChannelIds => ImmutableArray.Create();
///
public virtual IReadOnlyCollection MentionedRoleIds => ImmutableArray.Create();
- ///
- /// Gets a collection of the mentioned users in the message.
- ///
- public virtual IReadOnlyCollection MentionedUsers => ImmutableArray.Create();
///
public virtual IReadOnlyCollection Tags => ImmutableArray.Create();
///
@@ -80,6 +77,10 @@ namespace Discord.Rest
///
public IReadOnlyCollection Components { get; private set; }
+ ///
+ /// Gets a collection of the mentioned users in the message.
+ ///
+ public IReadOnlyCollection MentionedUsers => _userMentions;
internal RestMessage(BaseDiscordClient discord, ulong id, IMessageChannel channel, IUser author, MessageSource source)
: base(discord, id)
@@ -210,6 +211,22 @@ namespace Discord.Rest
}
else
_reactions = ImmutableArray.Create();
+
+ if (model.UserMentions.IsSpecified)
+ {
+ var value = model.UserMentions.Value;
+ if (value.Length > 0)
+ {
+ var newMentions = ImmutableArray.CreateBuilder(value.Length);
+ for (int i = 0; i < value.Length; i++)
+ {
+ var val = value[i];
+ if (val != null)
+ newMentions.Add(RestUser.Create(Discord, val));
+ }
+ _userMentions = newMentions.ToImmutable();
+ }
+ }
}
///
public async Task UpdateAsync(RequestOptions options = null)
diff --git a/src/Discord.Net.Rest/Entities/Messages/RestUserMessage.cs b/src/Discord.Net.Rest/Entities/Messages/RestUserMessage.cs
index e6f3ac30d..083a8e72c 100644
--- a/src/Discord.Net.Rest/Entities/Messages/RestUserMessage.cs
+++ b/src/Discord.Net.Rest/Entities/Messages/RestUserMessage.cs
@@ -20,7 +20,6 @@ namespace Discord.Rest
private ImmutableArray