mirror of
https://github.com/Tyrrrz/DiscordChatExporter.git
synced 2026-04-28 00:36:00 +00:00
Pad outputs from guilds, channels, dm to have more aligned columns
Closes #877
This commit is contained in:
@@ -25,18 +25,18 @@ public class GetChannelsCommand : TokenCommandBase
|
||||
{
|
||||
var cancellationToken = console.RegisterCancellationHandler();
|
||||
|
||||
var channels = await Discord.GetGuildChannelsAsync(GuildId, cancellationToken);
|
||||
|
||||
var textChannels = channels
|
||||
var channels = (await Discord.GetGuildChannelsAsync(GuildId, cancellationToken))
|
||||
.Where(c => c.Kind.IsText())
|
||||
.OrderBy(c => c.Category.Position)
|
||||
.ThenBy(c => c.Name)
|
||||
.ToArray();
|
||||
|
||||
foreach (var channel in textChannels)
|
||||
foreach (var channel in channels)
|
||||
{
|
||||
// Channel ID
|
||||
await console.Output.WriteAsync(channel.Id.ToString());
|
||||
await console.Output.WriteAsync(
|
||||
channel.Id.ToString().PadRight(18, ' ')
|
||||
);
|
||||
|
||||
// Separator
|
||||
using (console.WithForegroundColor(ConsoleColor.DarkGray))
|
||||
|
||||
Reference in New Issue
Block a user