From 4974fe52929a68fef0fd42104b1afcfdabc95fbf Mon Sep 17 00:00:00 2001 From: Tyrrrz <1935960+Tyrrrz@users.noreply.github.com> Date: Fri, 19 Nov 2021 22:18:15 +0200 Subject: [PATCH] Refer to `Category.Name` explicitly instead of relying on `ToString()` --- DiscordChatExporter.Cli/Commands/Base/ExportCommandBase.cs | 4 ++-- DiscordChatExporter.Cli/Commands/GetChannelsCommand.cs | 2 +- .../Commands/GetDirectMessageChannelsCommand.cs | 2 +- .../Exporting/Writers/Html/PreambleTemplate.cshtml | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/DiscordChatExporter.Cli/Commands/Base/ExportCommandBase.cs b/DiscordChatExporter.Cli/Commands/Base/ExportCommandBase.cs index e7ac0b6..95c8647 100644 --- a/DiscordChatExporter.Cli/Commands/Base/ExportCommandBase.cs +++ b/DiscordChatExporter.Cli/Commands/Base/ExportCommandBase.cs @@ -72,7 +72,7 @@ namespace DiscordChatExporter.Cli.Commands.Base { try { - await progressContext.StartTaskAsync($"{channel.Category} / {channel.Name}", async progress => + await progressContext.StartTaskAsync($"{channel.Category.Name} / {channel.Name}", async progress => { var guild = await Discord.GetGuildAsync(channel.GuildId, cancellationToken); @@ -122,7 +122,7 @@ namespace DiscordChatExporter.Cli.Commands.Base foreach (var (channel, error) in errors) { - await console.Output.WriteAsync($"{channel.Category} / {channel.Name}: "); + await console.Output.WriteAsync($"{channel.Category.Name} / {channel.Name}: "); using (console.WithForegroundColor(ConsoleColor.Red)) await console.Output.WriteLineAsync(error); diff --git a/DiscordChatExporter.Cli/Commands/GetChannelsCommand.cs b/DiscordChatExporter.Cli/Commands/GetChannelsCommand.cs index 23fccb3..df5e573 100644 --- a/DiscordChatExporter.Cli/Commands/GetChannelsCommand.cs +++ b/DiscordChatExporter.Cli/Commands/GetChannelsCommand.cs @@ -38,7 +38,7 @@ namespace DiscordChatExporter.Cli.Commands // Channel category / name using (console.WithForegroundColor(ConsoleColor.White)) - await console.Output.WriteLineAsync($"{channel.Category} / {channel.Name}"); + await console.Output.WriteLineAsync($"{channel.Category.Name} / {channel.Name}"); } } } diff --git a/DiscordChatExporter.Cli/Commands/GetDirectMessageChannelsCommand.cs b/DiscordChatExporter.Cli/Commands/GetDirectMessageChannelsCommand.cs index 9630066..b802685 100644 --- a/DiscordChatExporter.Cli/Commands/GetDirectMessageChannelsCommand.cs +++ b/DiscordChatExporter.Cli/Commands/GetDirectMessageChannelsCommand.cs @@ -35,7 +35,7 @@ namespace DiscordChatExporter.Cli.Commands // Channel category / name using (console.WithForegroundColor(ConsoleColor.White)) - await console.Output.WriteLineAsync($"{channel.Category} / {channel.Name}"); + await console.Output.WriteLineAsync($"{channel.Category.Name} / {channel.Name}"); } } } diff --git a/DiscordChatExporter.Core/Exporting/Writers/Html/PreambleTemplate.cshtml b/DiscordChatExporter.Core/Exporting/Writers/Html/PreambleTemplate.cshtml index 41783ad..a98ac63 100644 --- a/DiscordChatExporter.Core/Exporting/Writers/Html/PreambleTemplate.cshtml +++ b/DiscordChatExporter.Core/Exporting/Writers/Html/PreambleTemplate.cshtml @@ -152,7 +152,7 @@ background-color: @Themed("rgba(88, 101, 242, .3)", "rgba(88, 101, 242, .15)"); font-weight: 500; } - + .mention:hover { background-color: #5865f2; color: #ffffff @@ -715,7 +715,7 @@
@Model.ExportContext.Request.Guild.Name
-
@Model.ExportContext.Request.Channel.Category / @Model.ExportContext.Request.Channel.Name
+
@Model.ExportContext.Request.Channel.Category.Name / @Model.ExportContext.Request.Channel.Name
@if (!string.IsNullOrWhiteSpace(Model.ExportContext.Request.Channel.Topic)) {