mirror of
https://github.com/Tyrrrz/DiscordChatExporter.git
synced 2026-02-24 10:13:58 +00:00
Switch from DateTime to DateTimeOffset
This commit is contained in:
@@ -9,21 +9,21 @@ namespace DiscordChatExporter.Core.Models
|
||||
|
||||
public Channel Channel { get; }
|
||||
|
||||
public DateTime? From { get; }
|
||||
public DateTimeOffset? After { get; }
|
||||
|
||||
public DateTime? To { get; }
|
||||
public DateTimeOffset? Before { get; }
|
||||
|
||||
public IReadOnlyList<Message> Messages { get; }
|
||||
|
||||
public Mentionables Mentionables { get; }
|
||||
|
||||
public ChatLog(Guild guild, Channel channel, DateTime? from, DateTime? to,
|
||||
public ChatLog(Guild guild, Channel channel, DateTimeOffset? after, DateTimeOffset? before,
|
||||
IReadOnlyList<Message> messages, Mentionables mentionables)
|
||||
{
|
||||
Guild = guild;
|
||||
Channel = channel;
|
||||
From = from;
|
||||
To = to;
|
||||
After = after;
|
||||
Before = before;
|
||||
Messages = messages;
|
||||
Mentionables = mentionables;
|
||||
}
|
||||
|
||||
@@ -12,7 +12,7 @@ namespace DiscordChatExporter.Core.Models
|
||||
|
||||
public string Url { get; }
|
||||
|
||||
public DateTime? Timestamp { get; }
|
||||
public DateTimeOffset? Timestamp { get; }
|
||||
|
||||
public Color Color { get; }
|
||||
|
||||
@@ -28,7 +28,7 @@ namespace DiscordChatExporter.Core.Models
|
||||
|
||||
public EmbedFooter Footer { get; }
|
||||
|
||||
public Embed(string title, string url, DateTime? timestamp, Color color, EmbedAuthor author, string description,
|
||||
public Embed(string title, string url, DateTimeOffset? timestamp, Color color, EmbedAuthor author, string description,
|
||||
IReadOnlyList<EmbedField> fields, EmbedImage thumbnail, EmbedImage image, EmbedFooter footer)
|
||||
{
|
||||
Title = title;
|
||||
|
||||
@@ -15,9 +15,9 @@ namespace DiscordChatExporter.Core.Models
|
||||
|
||||
public User Author { get; }
|
||||
|
||||
public DateTime Timestamp { get; }
|
||||
public DateTimeOffset Timestamp { get; }
|
||||
|
||||
public DateTime? EditedTimestamp { get; }
|
||||
public DateTimeOffset? EditedTimestamp { get; }
|
||||
|
||||
public string Content { get; }
|
||||
|
||||
@@ -29,8 +29,8 @@ namespace DiscordChatExporter.Core.Models
|
||||
|
||||
public IReadOnlyList<User> MentionedUsers { get; }
|
||||
|
||||
public Message(string id, string channelId, MessageType type, User author, DateTime timestamp,
|
||||
DateTime? editedTimestamp, string content, IReadOnlyList<Attachment> attachments,
|
||||
public Message(string id, string channelId, MessageType type, User author, DateTimeOffset timestamp,
|
||||
DateTimeOffset? editedTimestamp, string content, IReadOnlyList<Attachment> attachments,
|
||||
IReadOnlyList<Embed> embeds, IReadOnlyList<Reaction> reactions, IReadOnlyList<User> mentionedUsers)
|
||||
{
|
||||
Id = id;
|
||||
|
||||
Reference in New Issue
Block a user