|
|
@ -10,7 +10,7 @@ using JsonExtensions.Reading;
|
|
|
|
namespace DiscordChatExporter.Core.Discord.Data;
|
|
|
|
namespace DiscordChatExporter.Core.Discord.Data;
|
|
|
|
|
|
|
|
|
|
|
|
// https://discord.com/developers/docs/resources/channel#message-object
|
|
|
|
// https://discord.com/developers/docs/resources/channel#message-object
|
|
|
|
public partial record Message(
|
|
|
|
public record Message(
|
|
|
|
Snowflake Id,
|
|
|
|
Snowflake Id,
|
|
|
|
MessageKind Kind,
|
|
|
|
MessageKind Kind,
|
|
|
|
User Author,
|
|
|
|
User Author,
|
|
|
@ -26,16 +26,6 @@ public partial record Message(
|
|
|
|
IReadOnlyList<User> MentionedUsers,
|
|
|
|
IReadOnlyList<User> MentionedUsers,
|
|
|
|
MessageReference? Reference,
|
|
|
|
MessageReference? Reference,
|
|
|
|
Message? ReferencedMessage) : IHasId
|
|
|
|
Message? ReferencedMessage) : IHasId
|
|
|
|
{
|
|
|
|
|
|
|
|
public bool IsEmpty =>
|
|
|
|
|
|
|
|
Kind == MessageKind.Default &&
|
|
|
|
|
|
|
|
string.IsNullOrEmpty(Content) &&
|
|
|
|
|
|
|
|
!Attachments.Any() &&
|
|
|
|
|
|
|
|
!Embeds.Any() &&
|
|
|
|
|
|
|
|
!Stickers.Any();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public partial record Message
|
|
|
|
|
|
|
|
{
|
|
|
|
{
|
|
|
|
private static IReadOnlyList<Embed> NormalizeEmbeds(IReadOnlyList<Embed> embeds)
|
|
|
|
private static IReadOnlyList<Embed> NormalizeEmbeds(IReadOnlyList<Embed> embeds)
|
|
|
|
{
|
|
|
|
{
|
|
|
|