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

This commit is contained in:
Tyrrrz 2021-11-19 22:18:15 +02:00
parent 1db2bb4170
commit 4974fe5292
4 changed files with 6 additions and 6 deletions

View file

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

View file

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

View file

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

View file

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