mirror of
https://github.com/Tyrrrz/DiscordChatExporter.git
synced 2026-02-26 19:23:48 +00:00
Use nullable
This commit is contained in:
@@ -19,7 +19,7 @@ namespace DiscordChatExporter.Core.Models
|
||||
|
||||
public DateTimeOffset? EditedTimestamp { get; }
|
||||
|
||||
public string Content { get; }
|
||||
public string? Content { get; }
|
||||
|
||||
public IReadOnlyList<Attachment> Attachments { get; }
|
||||
|
||||
@@ -32,7 +32,7 @@ namespace DiscordChatExporter.Core.Models
|
||||
public bool IsPinned { get; }
|
||||
|
||||
public Message(string id, string channelId, MessageType type, User author, DateTimeOffset timestamp,
|
||||
DateTimeOffset? editedTimestamp, string content, IReadOnlyList<Attachment> attachments,
|
||||
DateTimeOffset? editedTimestamp, string? content, IReadOnlyList<Attachment> attachments,
|
||||
IReadOnlyList<Embed> embeds, IReadOnlyList<Reaction> reactions, IReadOnlyList<User> mentionedUsers,
|
||||
bool isPinned)
|
||||
{
|
||||
@@ -50,6 +50,6 @@ namespace DiscordChatExporter.Core.Models
|
||||
IsPinned = isPinned;
|
||||
}
|
||||
|
||||
public override string ToString() => Content;
|
||||
public override string ToString() => Content ?? "<message without content>";
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user