Extract thread status and improve CLI output

This commit is contained in:
Tyrrrz
2023-06-09 01:20:32 +03:00
parent 609ca0fc0d
commit 11d34109a7
4 changed files with 46 additions and 14 deletions

View File

@@ -22,11 +22,16 @@ public class GetDirectChannelsCommand : DiscordCommandBase
.ThenBy(c => c.Name)
.ToArray();
var channelIdMaxLength = channels
.Select(c => c.Id.ToString().Length)
.OrderDescending()
.FirstOrDefault();
foreach (var channel in channels)
{
// Channel ID
await console.Output.WriteAsync(
channel.Id.ToString().PadRight(20, ' ')
channel.Id.ToString().PadRight(channelIdMaxLength, ' ')
);
// Separator