mirror of
https://github.com/Tyrrrz/DiscordChatExporter.git
synced 2026-04-22 14:07:07 +00:00
Refactor more
This commit is contained in:
@@ -29,14 +29,14 @@ namespace DiscordChatExporter.Cli.Commands.Base
|
||||
[CommandOption("dateformat", Description = "Date format used in output.")]
|
||||
public string DateFormat { get; set; } = "dd-MMM-yy hh:mm tt";
|
||||
|
||||
protected Exporter GetExporter() => new Exporter(GetDiscordClient());
|
||||
protected ChannelExporter GetChannelExporter() => new ChannelExporter(GetDiscordClient());
|
||||
|
||||
protected async ValueTask ExportAsync(IConsole console, Guild guild, Channel channel)
|
||||
{
|
||||
console.Output.Write($"Exporting channel '{channel.Name}'... ");
|
||||
var progress = console.CreateProgressTicker();
|
||||
|
||||
await GetExporter().ExportChatLogAsync(guild, channel,
|
||||
await GetChannelExporter().ExportAsync(guild, channel,
|
||||
OutputPath, ExportFormat, DateFormat, PartitionLimit,
|
||||
After, Before, progress);
|
||||
|
||||
|
||||
@@ -46,7 +46,7 @@ namespace DiscordChatExporter.Cli.Commands.Base
|
||||
{
|
||||
var guild = await GetDiscordClient().GetGuildAsync(channel.GuildId);
|
||||
|
||||
await GetExporter().ExportChatLogAsync(guild, channel,
|
||||
await GetChannelExporter().ExportAsync(guild, channel,
|
||||
OutputPath, ExportFormat, DateFormat, PartitionLimit,
|
||||
After, Before, operation);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user