mirror of
https://github.com/Tyrrrz/DiscordChatExporter.git
synced 2026-03-20 22:01:29 +00:00
Refactor models and add IHasId/IdBasedEqualityComparer
This commit is contained in:
@@ -2,13 +2,13 @@
|
||||
{
|
||||
// https://discordapp.com/developers/docs/resources/channel#channel-object
|
||||
|
||||
public partial class Channel
|
||||
public partial class Channel : IHasId
|
||||
{
|
||||
public string Id { get; }
|
||||
|
||||
public string? ParentId { get; }
|
||||
|
||||
public string? GuildId { get; }
|
||||
public string GuildId { get; }
|
||||
|
||||
public string Name { get; }
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
|
||||
public ChannelType Type { get; }
|
||||
|
||||
public Channel(string id, string? parentId, string? guildId, string name, string? topic, ChannelType type)
|
||||
public Channel(string id, string? parentId, string guildId, string name, string? topic, ChannelType type)
|
||||
{
|
||||
Id = id;
|
||||
ParentId = parentId;
|
||||
@@ -32,6 +32,6 @@
|
||||
public partial class Channel
|
||||
{
|
||||
public static Channel CreateDeletedChannel(string id) =>
|
||||
new Channel(id, null, null, "deleted-channel", null, ChannelType.GuildTextChat);
|
||||
new Channel(id, null, "unknown-guild", "deleted-channel", null, ChannelType.GuildTextChat);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user