Increase padding in output to accomodate longer snowflakes

pull/1040/head
Tyrrrz 1 year ago
parent c48899e0b1
commit 6582e26cd3

@ -36,17 +36,19 @@ public class GetChannelsCommand : DiscordCommandBase
.ThenBy(c => c.Name)
.ToArray();
var threads = IncludeThreads
? (await Discord.GetGuildThreadsAsync(GuildId, cancellationToken))
.OrderBy(c => c.Name)
.ToArray()
: Array.Empty<ChannelThread>();
var threads = Array.Empty<ChannelThread>();
if (IncludeThreads)
{
threads = (await Discord.GetGuildThreadsAsync(GuildId, cancellationToken))
.OrderBy(c => c.Name)
.ToArray();
}
foreach (var channel in channels)
{
// Channel ID
await console.Output.WriteAsync(
channel.Id.ToString().PadRight(18, ' ')
channel.Id.ToString().PadRight(20, ' ')
);
// Separator
@ -64,7 +66,7 @@ public class GetChannelsCommand : DiscordCommandBase
// Thread ID
await console.Output.WriteAsync(
thread.Id.ToString().PadRight(18, ' ')
thread.Id.ToString().PadRight(20, ' ')
);
// Separator

@ -26,7 +26,7 @@ public class GetDirectChannelsCommand : DiscordCommandBase
{
// Channel ID
await console.Output.WriteAsync(
channel.Id.ToString().PadRight(18, ' ')
channel.Id.ToString().PadRight(20, ' ')
);
// Separator

@ -19,13 +19,14 @@ public class GetGuildsCommand : DiscordCommandBase
var guilds = (await Discord.GetUserGuildsAsync(cancellationToken))
// Show direct messages first
.OrderByDescending(g => g.Id == Guild.DirectMessages.Id)
.ThenBy(g => g.Name);
.ThenBy(g => g.Name)
.ToArray();
foreach (var guild in guilds)
{
// Guild ID
await console.Output.WriteAsync(
guild.Id.ToString().PadRight(18, ' ')
guild.Id.ToString().PadRight(20, ' ')
);
// Separator

Loading…
Cancel
Save