mirror of
https://github.com/Tyrrrz/DiscordChatExporter.git
synced 2025-05-21 02:15:08 -04:00
Refactor CLI and add 'exportdm' command to export all direct message channels
This commit is contained in:
parent
e22e1c03fb
commit
13925c69af
8 changed files with 100 additions and 9 deletions
|
@ -37,7 +37,8 @@ namespace DiscordChatExporter.Cli
|
|||
// Get all verb types
|
||||
var verbTypes = new[]
|
||||
{
|
||||
typeof(ExportChatOptions),
|
||||
typeof(ExportChannelOptions),
|
||||
typeof(ExportDirectMessagesOptions),
|
||||
typeof(ExportGuildOptions),
|
||||
typeof(GetChannelsOptions),
|
||||
typeof(GetDirectMessageChannelsOptions),
|
||||
|
@ -48,7 +49,8 @@ namespace DiscordChatExporter.Cli
|
|||
var parsedArgs = Parser.Default.ParseArguments(args, verbTypes);
|
||||
|
||||
// Execute commands
|
||||
parsedArgs.WithParsed<ExportChatOptions>(o => new ExportChatVerb(o).Execute());
|
||||
parsedArgs.WithParsed<ExportChannelOptions>(o => new ExportChannelVerb(o).Execute());
|
||||
parsedArgs.WithParsed<ExportDirectMessagesOptions>(o => new ExportDirectMessagesVerb(o).Execute());
|
||||
parsedArgs.WithParsed<ExportGuildOptions>(o => new ExportGuildVerb(o).Execute());
|
||||
parsedArgs.WithParsed<GetChannelsOptions>(o => new GetChannelsVerb(o).Execute());
|
||||
parsedArgs.WithParsed<GetDirectMessageChannelsOptions>(o => new GetDirectMessageChannelsVerb(o).Execute());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue