From be73f0b92c2e25de4a7247ff2cab7e67cb3f7bd7 Mon Sep 17 00:00:00 2001 From: Alexey Golub Date: Mon, 27 Apr 2020 00:01:37 +0300 Subject: [PATCH] [CLI] Show channel categories Closes 195 --- DiscordChatExporter.Cli/Commands/Base/ExportCommandBase.cs | 2 +- DiscordChatExporter.Cli/Commands/GetChannelsCommand.cs | 4 ++-- .../Commands/GetDirectMessageChannelsCommand.cs | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/DiscordChatExporter.Cli/Commands/Base/ExportCommandBase.cs b/DiscordChatExporter.Cli/Commands/Base/ExportCommandBase.cs index 45f74dd..adb8434 100644 --- a/DiscordChatExporter.Cli/Commands/Base/ExportCommandBase.cs +++ b/DiscordChatExporter.Cli/Commands/Base/ExportCommandBase.cs @@ -33,7 +33,7 @@ namespace DiscordChatExporter.Cli.Commands.Base protected async ValueTask ExportAsync(IConsole console, Guild guild, Channel channel) { - console.Output.Write($"Exporting channel '{channel.Name}'... "); + console.Output.Write($"Exporting channel '{channel.Category} / {channel.Name}'... "); var progress = console.CreateProgressTicker(); await GetChannelExporter().ExportAsync(guild, channel, diff --git a/DiscordChatExporter.Cli/Commands/GetChannelsCommand.cs b/DiscordChatExporter.Cli/Commands/GetChannelsCommand.cs index 86da571..d2ae0fc 100644 --- a/DiscordChatExporter.Cli/Commands/GetChannelsCommand.cs +++ b/DiscordChatExporter.Cli/Commands/GetChannelsCommand.cs @@ -17,8 +17,8 @@ namespace DiscordChatExporter.Cli.Commands { var guildChannels = await GetDiscordClient().GetGuildChannelsAsync(GuildId); - foreach (var channel in guildChannels.OrderBy(c => c.Name)) - console.Output.WriteLine($"{channel.Id} | {channel.Name}"); + foreach (var channel in guildChannels.OrderBy(c => c.Category).ThenBy(c => c.Name)) + console.Output.WriteLine($"{channel.Id} | {channel.Category} / {channel.Name}"); } } } \ No newline at end of file diff --git a/DiscordChatExporter.Cli/Commands/GetDirectMessageChannelsCommand.cs b/DiscordChatExporter.Cli/Commands/GetDirectMessageChannelsCommand.cs index 12bc32c..817467e 100644 --- a/DiscordChatExporter.Cli/Commands/GetDirectMessageChannelsCommand.cs +++ b/DiscordChatExporter.Cli/Commands/GetDirectMessageChannelsCommand.cs @@ -15,8 +15,8 @@ namespace DiscordChatExporter.Cli.Commands { var dmChannels = await GetDiscordClient().GetGuildChannelsAsync(Guild.DirectMessages.Id); - foreach (var channel in dmChannels.OrderBy(c => c.Name)) - console.Output.WriteLine($"{channel.Id} | {channel.Name}"); + foreach (var channel in dmChannels.OrderBy(c => c.Category).ThenBy(c => c.Name)) + console.Output.WriteLine($"{channel.Id} | {channel.Category} / {channel.Name}"); } } } \ No newline at end of file