Remove Channel.ParentNameWithFallback

This commit is contained in:
Tyrrrz
2023-09-07 16:36:29 +03:00
parent 59344cedbe
commit 5abe74894c
24 changed files with 112 additions and 110 deletions

View File

@@ -200,7 +200,7 @@ public abstract class ExportCommandBase : DiscordCommandBase
try
{
await progressContext.StartTaskAsync(
$"{channel.ParentNameWithFallback} / {channel.Name}",
channel.GetHierarchicalName(),
async progress =>
{
var guild = await Discord.GetGuildAsync(
@@ -263,10 +263,7 @@ public abstract class ExportCommandBase : DiscordCommandBase
foreach (var (channel, error) in errorsByChannel)
{
await console.Error.WriteAsync(
$"{channel.ParentNameWithFallback} / {channel.Name}: "
);
await console.Error.WriteAsync($"{channel.GetHierarchicalName()}: ");
using (console.WithForegroundColor(ConsoleColor.Red))
await console.Error.WriteLineAsync(error);
}
@@ -294,7 +291,7 @@ public abstract class ExportCommandBase : DiscordCommandBase
var channel = await Discord.GetChannelAsync(channelId, cancellationToken);
// Unwrap categories
if (channel.Kind == ChannelKind.GuildCategory)
if (channel.IsCategory)
{
var guildChannels =
channelsByGuild.GetValueOrDefault(channel.GuildId)