mirror of
https://github.com/Tyrrrz/DiscordChatExporter.git
synced 2026-03-08 07:56:07 +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.Discord.Data;
|
||||
using DiscordChatExporter.Core.Utils.Extensions;
|
||||
@@ -17,9 +18,18 @@ namespace DiscordChatExporter.Cli.Commands
|
||||
|
||||
foreach (var channel in channels.OrderBy(c => c.Name))
|
||||
{
|
||||
await console.Output.WriteLineAsync(
|
||||
$"{channel.Id} | {channel.Category} / {channel.Name}"
|
||||
);
|
||||
// Channel ID
|
||||
await console.Output.WriteAsync(channel.Id.ToString());
|
||||
|
||||
// Separator
|
||||
using (console.WithForegroundColor(ConsoleColor.DarkGray))
|
||||
await console.Output.WriteAsync(" | ");
|
||||
|
||||
// Channel category / name
|
||||
using (console.WithForegroundColor(ConsoleColor.White))
|
||||
await console.Output.WriteAsync($"{channel.Category} / {channel.Name}");
|
||||
|
||||
await console.Output.WriteLineAsync();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user