mirror of
https://github.com/Tyrrrz/DiscordChatExporter.git
synced 2026-02-14 07:43:31 -07:00
Add message type to message object
This commit is contained in:
parent
5d6edfd937
commit
107c9de265
|
|
@ -7,6 +7,8 @@ namespace DiscordChatExporter.Models
|
|||
{
|
||||
public string Id { get; }
|
||||
|
||||
public MessageType Type { get; }
|
||||
|
||||
public User Author { get; }
|
||||
|
||||
public DateTime TimeStamp { get; }
|
||||
|
|
@ -23,13 +25,14 @@ namespace DiscordChatExporter.Models
|
|||
|
||||
public IReadOnlyList<Channel> MentionedChannels { get; }
|
||||
|
||||
public Message(string id, User author,
|
||||
public Message(string id, MessageType type, User author,
|
||||
DateTime timeStamp, DateTime? editedTimeStamp,
|
||||
string content, IReadOnlyList<Attachment> attachments,
|
||||
IReadOnlyList<User> mentionedUsers, IReadOnlyList<Role> mentionedRoles,
|
||||
IReadOnlyList<Channel> mentionedChannels)
|
||||
{
|
||||
Id = id;
|
||||
Type = type;
|
||||
Author = author;
|
||||
TimeStamp = timeStamp;
|
||||
EditedTimeStamp = editedTimeStamp;
|
||||
|
|
|
|||
|
|
@ -289,7 +289,7 @@ namespace DiscordChatExporter.Services
|
|||
.Select(i => channels.GetOrDefault(i) ?? new Channel(i, "deleted-channel", ChannelType.GuildTextChat))
|
||||
.ToArray();
|
||||
|
||||
return new Message(id, author, timeStamp, editedTimeStamp, content, attachments,
|
||||
return new Message(id, type, author, timeStamp, editedTimeStamp, content, attachments,
|
||||
mentionedUsers, mentionedRoles, mentionedChanenls);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue