mirror of
https://github.com/Tyrrrz/DiscordChatExporter.git
synced 2026-04-22 05:57:30 +00:00
Cleanup
This commit is contained in:
@@ -32,12 +32,12 @@ namespace DiscordChatExporter.Domain.Discord.Models
|
|||||||
public DateTimeOffset Timestamp { get; }
|
public DateTimeOffset Timestamp { get; }
|
||||||
|
|
||||||
public DateTimeOffset? EditedTimestamp { get; }
|
public DateTimeOffset? EditedTimestamp { get; }
|
||||||
|
|
||||||
public DateTimeOffset? CallEndedTimestamp { get; }
|
public DateTimeOffset? CallEndedTimestamp { get; }
|
||||||
|
|
||||||
public bool IsPinned { get; }
|
public bool IsPinned { get; }
|
||||||
|
|
||||||
public string Content { get; }
|
public string Content { get; }
|
||||||
|
|
||||||
|
|
||||||
public IReadOnlyList<Attachment> Attachments { get; }
|
public IReadOnlyList<Attachment> Attachments { get; }
|
||||||
|
|
||||||
@@ -90,12 +90,12 @@ namespace DiscordChatExporter.Domain.Discord.Models
|
|||||||
var type = (MessageType) json.GetProperty("type").GetInt32();
|
var type = (MessageType) json.GetProperty("type").GetInt32();
|
||||||
var isPinned = json.GetPropertyOrNull("pinned")?.GetBoolean() ?? false;
|
var isPinned = json.GetPropertyOrNull("pinned")?.GetBoolean() ?? false;
|
||||||
|
|
||||||
|
|
||||||
var content = type switch
|
var content = type switch
|
||||||
{
|
{
|
||||||
MessageType.RecipientAdd => "Added a recipient.",
|
MessageType.RecipientAdd => "Added a recipient.",
|
||||||
MessageType.RecipientRemove => "Removed a recipient.",
|
MessageType.RecipientRemove => "Removed a recipient.",
|
||||||
MessageType.Call => $"Started a call that lasted {callEndedTimestamp?.Pipe(t => t - timestamp).Pipe(t => (int) t.TotalMinutes) ?? 0} minutes.",
|
MessageType.Call =>
|
||||||
|
$"Started a call that lasted {callEndedTimestamp?.Pipe(t => t - timestamp).Pipe(t => (int) t.TotalMinutes) ?? 0} minutes.",
|
||||||
MessageType.ChannelNameChange => "Changed the channel name.",
|
MessageType.ChannelNameChange => "Changed the channel name.",
|
||||||
MessageType.ChannelIconChange => "Changed the channel icon.",
|
MessageType.ChannelIconChange => "Changed the channel icon.",
|
||||||
MessageType.ChannelPinnedMessage => "Pinned a message.",
|
MessageType.ChannelPinnedMessage => "Pinned a message.",
|
||||||
@@ -132,8 +132,7 @@ namespace DiscordChatExporter.Domain.Discord.Models
|
|||||||
embeds,
|
embeds,
|
||||||
reactions,
|
reactions,
|
||||||
mentionedUsers
|
mentionedUsers
|
||||||
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -55,6 +55,7 @@ namespace DiscordChatExporter.Domain.Exporting.Writers
|
|||||||
|
|
||||||
await _writer.WriteAsync(CsvEncode(buffer.ToString()));
|
await _writer.WriteAsync(CsvEncode(buffer.ToString()));
|
||||||
}
|
}
|
||||||
|
|
||||||
public override async ValueTask WriteMessageAsync(Message message)
|
public override async ValueTask WriteMessageAsync(Message message)
|
||||||
{
|
{
|
||||||
// Author ID
|
// Author ID
|
||||||
|
|||||||
Reference in New Issue
Block a user