Refer to `Category.Name` explicitly instead of relying on `ToString()`

pull/811/head
Tyrrrz 3 years ago
parent 1db2bb4170
commit 4974fe5292

@ -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);

@ -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}");
}
}
}

@ -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}");
}
}
}

@ -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 @@
</div>
<div class="preamble__entries-container">
<div class="preamble__entry">@Model.ExportContext.Request.Guild.Name</div>
<div class="preamble__entry">@Model.ExportContext.Request.Channel.Category / @Model.ExportContext.Request.Channel.Name</div>
<div class="preamble__entry">@Model.ExportContext.Request.Channel.Category.Name / @Model.ExportContext.Request.Channel.Name</div>
@if (!string.IsNullOrWhiteSpace(Model.ExportContext.Request.Channel.Topic))
{

Loading…
Cancel
Save