mirror of
https://github.com/Tyrrrz/DiscordChatExporter.git
synced 2025-06-03 16:18:53 -04:00
Refactor more
This commit is contained in:
parent
dc79813ad7
commit
88a4fa792b
26 changed files with 117 additions and 99 deletions
|
@ -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);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue