|
@@ -1,9 +1,13 @@ |
|
|
|
|
|
using Discord.API; |
|
|
|
|
|
|
|
|
using Newtonsoft.Json.Linq; |
|
|
using Newtonsoft.Json.Linq; |
|
|
|
|
|
|
|
|
using System; |
|
|
using System; |
|
|
using System.Collections.Generic; |
|
|
using System.Collections.Generic; |
|
|
using System.Collections.Immutable; |
|
|
using System.Collections.Immutable; |
|
|
using System.Linq; |
|
|
using System.Linq; |
|
|
using System.Threading.Tasks; |
|
|
using System.Threading.Tasks; |
|
|
|
|
|
|
|
|
using Model = Discord.API.Message; |
|
|
using Model = Discord.API.Message; |
|
|
|
|
|
|
|
|
namespace Discord.Rest |
|
|
namespace Discord.Rest |
|
@@ -45,6 +49,12 @@ namespace Discord.Rest |
|
|
/// <inheritdoc /> |
|
|
/// <inheritdoc /> |
|
|
public virtual bool MentionedEveryone => false; |
|
|
public virtual bool MentionedEveryone => false; |
|
|
|
|
|
|
|
|
|
|
|
/// <inheritdoc cref="IMessage.Thread"/> |
|
|
|
|
|
public RestThreadChannel Thread { get; private set; } |
|
|
|
|
|
|
|
|
|
|
|
/// <inheritdoc /> |
|
|
|
|
|
IThreadChannel IMessage.Thread => Thread; |
|
|
|
|
|
|
|
|
/// <summary> |
|
|
/// <summary> |
|
|
/// Gets a collection of the <see cref="Attachment"/>'s on the message. |
|
|
/// Gets a collection of the <see cref="Attachment"/>'s on the message. |
|
|
/// </summary> |
|
|
/// </summary> |
|
@@ -80,15 +90,6 @@ namespace Discord.Rest |
|
|
/// <inheritdoc/> |
|
|
/// <inheritdoc/> |
|
|
public MessageType Type { get; private set; } |
|
|
public MessageType Type { get; private set; } |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary> |
|
|
|
|
|
/// Gets the thread that was started from this message. |
|
|
|
|
|
/// </summary> |
|
|
|
|
|
/// <returns> |
|
|
|
|
|
/// A <see cref="RestThreadChannel"/> object if this message has thread attached; otherwise <see langword="null"/>. |
|
|
|
|
|
/// </returns> |
|
|
|
|
|
public RestThreadChannel Thread { get; private set; } |
|
|
|
|
|
|
|
|
|
|
|
/// <inheritdoc /> |
|
|
/// <inheritdoc /> |
|
|
public MessageRoleSubscriptionData RoleSubscriptionData { get; private set; } |
|
|
public MessageRoleSubscriptionData RoleSubscriptionData { get; private set; } |
|
|
|
|
|
|
|
@@ -266,9 +267,7 @@ namespace Discord.Rest |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
if (model.Thread.IsSpecified) |
|
|
if (model.Thread.IsSpecified) |
|
|
{ |
|
|
|
|
|
Thread = RestThreadChannel.Create(Discord, new RestGuild(Discord, model.Thread.Value.GuildId.Value), model.Thread.Value); |
|
|
Thread = RestThreadChannel.Create(Discord, new RestGuild(Discord, model.Thread.Value.GuildId.Value), model.Thread.Value); |
|
|
} |
|
|
|
|
|
} |
|
|
} |
|
|
/// <inheritdoc /> |
|
|
/// <inheritdoc /> |
|
|
public async Task UpdateAsync(RequestOptions options = null) |
|
|
public async Task UpdateAsync(RequestOptions options = null) |
|
@@ -310,7 +309,7 @@ namespace Discord.Rest |
|
|
|
|
|
|
|
|
/// <inheritdoc /> |
|
|
/// <inheritdoc /> |
|
|
IReadOnlyCollection<IStickerItem> IMessage.Stickers => Stickers; |
|
|
IReadOnlyCollection<IStickerItem> IMessage.Stickers => Stickers; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#endregion |
|
|
#endregion |
|
|
|
|
|
|
|
|
/// <inheritdoc /> |
|
|
/// <inheritdoc /> |
|
|