mirror of
https://github.com/Tyrrrz/DiscordChatExporter.git
synced 2026-04-27 00:12:57 +00:00
[CLI] Update CliFx and use Spectre.Console for progress reporting
This commit is contained in:
@@ -1,7 +1,8 @@
|
||||
using System.Linq;
|
||||
using System;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using CliFx;
|
||||
using CliFx.Attributes;
|
||||
using CliFx.Infrastructure;
|
||||
using DiscordChatExporter.Cli.Commands.Base;
|
||||
using DiscordChatExporter.Core.Utils.Extensions;
|
||||
|
||||
@@ -16,9 +17,18 @@ namespace DiscordChatExporter.Cli.Commands
|
||||
|
||||
foreach (var guild in guilds.OrderBy(g => g.Name))
|
||||
{
|
||||
await console.Output.WriteLineAsync(
|
||||
$"{guild.Id} | {guild.Name}"
|
||||
);
|
||||
// Guild ID
|
||||
await console.Output.WriteAsync(guild.Id.ToString());
|
||||
|
||||
// Separator
|
||||
using (console.WithForegroundColor(ConsoleColor.DarkGray))
|
||||
await console.Output.WriteAsync(" | ");
|
||||
|
||||
// Guild name
|
||||
using (console.WithForegroundColor(ConsoleColor.White))
|
||||
await console.Output.WriteAsync(guild.Name);
|
||||
|
||||
await console.Output.WriteLineAsync();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user