mirror of
https://github.com/Tyrrrz/DiscordChatExporter.git
synced 2024-09-19 12:18:48 -04:00
27 lines
877 B
C#
27 lines
877 B
C#
using System.Collections.Generic;
|
|
using System.Threading.Tasks;
|
|
using CliFx.Attributes;
|
|
using CliFx.Infrastructure;
|
|
using DiscordChatExporter.Cli.Commands.Base;
|
|
using DiscordChatExporter.Core.Discord;
|
|
|
|
namespace DiscordChatExporter.Cli.Commands;
|
|
|
|
[Command("export", Description = "Exports one or multiple channels.")]
|
|
public class ExportChannelsCommand : ExportCommandBase
|
|
{
|
|
// TODO: change this to plural (breaking change)
|
|
[CommandOption(
|
|
"channel",
|
|
'c',
|
|
Description = "Channel ID(s). "
|
|
+ "If provided with category ID(s), all channels inside those categories will be exported."
|
|
)]
|
|
public required IReadOnlyList<Snowflake> ChannelIds { get; init; }
|
|
|
|
public override async ValueTask ExecuteAsync(IConsole console)
|
|
{
|
|
await base.ExecuteAsync(console);
|
|
await ExportAsync(console, ChannelIds);
|
|
}
|
|
}
|