diff --git a/DiscordChatExporter.Cli/Program.cs b/DiscordChatExporter.Cli/Program.cs index 6b8fa2a..cab543a 100644 --- a/DiscordChatExporter.Cli/Program.cs +++ b/DiscordChatExporter.Cli/Program.cs @@ -43,8 +43,7 @@ namespace DiscordChatExporter.Cli typeof(ExportChatOptions), typeof(GetChannelsOptions), typeof(GetDirectMessageChannelsOptions), - typeof(GetGuildsOptions), - //typeof(UpdateAppOptions) + typeof(GetGuildsOptions) }; // Parse command line arguments @@ -55,7 +54,6 @@ namespace DiscordChatExporter.Cli parsedArgs.WithParsed(o => new GetChannelsVerb(o).Execute()); parsedArgs.WithParsed(o => new GetDirectMessageChannelsVerb(o).Execute()); parsedArgs.WithParsed(o => new GetGuildsVerb(o).Execute()); - parsedArgs.WithParsed(o => new UpdateAppVerb(o).Execute()); // Show token help if help requested or no verb specified parsedArgs.WithNotParsed(errs => diff --git a/DiscordChatExporter.Cli/Verbs/Options/UpdateAppOptions.cs b/DiscordChatExporter.Cli/Verbs/Options/UpdateAppOptions.cs deleted file mode 100644 index fbb4392..0000000 --- a/DiscordChatExporter.Cli/Verbs/Options/UpdateAppOptions.cs +++ /dev/null @@ -1,9 +0,0 @@ -using CommandLine; - -namespace DiscordChatExporter.Cli.Verbs.Options -{ - [Verb("update", HelpText = "Updates this application to the latest version.")] - public class UpdateAppOptions - { - } -} \ No newline at end of file diff --git a/DiscordChatExporter.Cli/Verbs/UpdateAppVerb.cs b/DiscordChatExporter.Cli/Verbs/UpdateAppVerb.cs deleted file mode 100644 index 3367ad7..0000000 --- a/DiscordChatExporter.Cli/Verbs/UpdateAppVerb.cs +++ /dev/null @@ -1,38 +0,0 @@ -using System; -using System.Threading.Tasks; -using DiscordChatExporter.Cli.Verbs.Options; -using DiscordChatExporter.Core.Services; - -namespace DiscordChatExporter.Cli.Verbs -{ - public class UpdateAppVerb : Verb - { - public UpdateAppVerb(UpdateAppOptions options) - : base(options) - { - } - - public override async Task ExecuteAsync() - { - // Get update service - var container = new Container(); - var updateService = container.Resolve(); - - // TODO: this is configured only for GUI - // Get update version - var updateVersion = await updateService.CheckPrepareUpdateAsync(); - - if (updateVersion != null) - { - Console.WriteLine($"Updating to version {updateVersion}"); - - updateService.NeedRestart = false; - updateService.FinalizeUpdate(); - } - else - { - Console.WriteLine("There are no application updates available."); - } - } - } -} \ No newline at end of file