mirror of
https://github.com/Tyrrrz/DiscordChatExporter.git
synced 2026-02-14 15:53:30 -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 string Id { get; }
|
||||||
|
|
||||||
|
public MessageType Type { get; }
|
||||||
|
|
||||||
public User Author { get; }
|
public User Author { get; }
|
||||||
|
|
||||||
public DateTime TimeStamp { get; }
|
public DateTime TimeStamp { get; }
|
||||||
|
|
@ -23,13 +25,14 @@ namespace DiscordChatExporter.Models
|
||||||
|
|
||||||
public IReadOnlyList<Channel> MentionedChannels { get; }
|
public IReadOnlyList<Channel> MentionedChannels { get; }
|
||||||
|
|
||||||
public Message(string id, User author,
|
public Message(string id, MessageType type, User author,
|
||||||
DateTime timeStamp, DateTime? editedTimeStamp,
|
DateTime timeStamp, DateTime? editedTimeStamp,
|
||||||
string content, IReadOnlyList<Attachment> attachments,
|
string content, IReadOnlyList<Attachment> attachments,
|
||||||
IReadOnlyList<User> mentionedUsers, IReadOnlyList<Role> mentionedRoles,
|
IReadOnlyList<User> mentionedUsers, IReadOnlyList<Role> mentionedRoles,
|
||||||
IReadOnlyList<Channel> mentionedChannels)
|
IReadOnlyList<Channel> mentionedChannels)
|
||||||
{
|
{
|
||||||
Id = id;
|
Id = id;
|
||||||
|
Type = type;
|
||||||
Author = author;
|
Author = author;
|
||||||
TimeStamp = timeStamp;
|
TimeStamp = timeStamp;
|
||||||
EditedTimeStamp = editedTimeStamp;
|
EditedTimeStamp = editedTimeStamp;
|
||||||
|
|
|
||||||
|
|
@ -289,7 +289,7 @@ namespace DiscordChatExporter.Services
|
||||||
.Select(i => channels.GetOrDefault(i) ?? new Channel(i, "deleted-channel", ChannelType.GuildTextChat))
|
.Select(i => channels.GetOrDefault(i) ?? new Channel(i, "deleted-channel", ChannelType.GuildTextChat))
|
||||||
.ToArray();
|
.ToArray();
|
||||||
|
|
||||||
return new Message(id, author, timeStamp, editedTimeStamp, content, attachments,
|
return new Message(id, type, author, timeStamp, editedTimeStamp, content, attachments,
|
||||||
mentionedUsers, mentionedRoles, mentionedChanenls);
|
mentionedUsers, mentionedRoles, mentionedChanenls);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue