From e6571d95eef9378d624dacdbe4bcf5ce9ac13e5c Mon Sep 17 00:00:00 2001 From: 8x4 <46720448+8times4@users.noreply.github.com> Date: Tue, 7 Oct 2025 11:12:52 +0000 Subject: [PATCH] deduplicate channels --- DiscordChatExporter.Cli/Commands/Base/ExportCommandBase.cs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/DiscordChatExporter.Cli/Commands/Base/ExportCommandBase.cs b/DiscordChatExporter.Cli/Commands/Base/ExportCommandBase.cs index 09ab2691..ab42ad3a 100644 --- a/DiscordChatExporter.Cli/Commands/Base/ExportCommandBase.cs +++ b/DiscordChatExporter.Cli/Commands/Base/ExportCommandBase.cs @@ -199,6 +199,10 @@ public abstract class ExportCommandBase : DiscordCommandBase await console.Output.WriteLineAsync($"Fetched {fetchedThreadsCount} thread(s)."); } + + // De-duplicate channels to avoid exporting the same channel multiple times + //https://github.com/Tyrrrz/DiscordChatExporter/issues/1433 + unwrappedChannels = unwrappedChannels.DistinctBy(c => c.Id).ToList(); // Make sure the user does not try to export multiple channels into one file. // Output path must either be a directory or contain template tokens for this to work.