diff --git a/DiscordChatExporter.Cli/Commands/Base/ExportCommandBase.cs b/DiscordChatExporter.Cli/Commands/Base/ExportCommandBase.cs index b1e090c..de3042c 100644 --- a/DiscordChatExporter.Cli/Commands/Base/ExportCommandBase.cs +++ b/DiscordChatExporter.Cli/Commands/Base/ExportCommandBase.cs @@ -166,4 +166,16 @@ public abstract class ExportCommandBase : TokenCommandBase await ExecuteAsync(console, channels); } + + public override ValueTask ExecuteAsync(IConsole console) + { + // War in Ukraine message + console.Output.WriteLine("=================================================="); + console.Output.WriteLine("⚠ UKRAINE IS AT WAR!"); + console.Output.WriteLine("LEARN MORE & HELP: https://tyrrrz.me"); + console.Output.WriteLine("=================================================="); + console.Output.WriteLine(""); + + return default; + } } \ No newline at end of file diff --git a/DiscordChatExporter.Cli/Commands/ExportAllCommand.cs b/DiscordChatExporter.Cli/Commands/ExportAllCommand.cs index 4ec6343..a88ed09 100644 --- a/DiscordChatExporter.Cli/Commands/ExportAllCommand.cs +++ b/DiscordChatExporter.Cli/Commands/ExportAllCommand.cs @@ -15,6 +15,8 @@ public class ExportAllCommand : ExportCommandBase public override async ValueTask ExecuteAsync(IConsole console) { + await base.ExecuteAsync(console); + var cancellationToken = console.RegisterCancellationHandler(); var channels = new List(); diff --git a/DiscordChatExporter.Cli/Commands/ExportChannelsCommand.cs b/DiscordChatExporter.Cli/Commands/ExportChannelsCommand.cs index 17c12d1..d22a7a3 100644 --- a/DiscordChatExporter.Cli/Commands/ExportChannelsCommand.cs +++ b/DiscordChatExporter.Cli/Commands/ExportChannelsCommand.cs @@ -15,6 +15,9 @@ public class ExportChannelsCommand : ExportCommandBase [CommandOption("channel", 'c', IsRequired = true, Description = "Channel ID(s).")] public IReadOnlyList ChannelIds { get; init; } = Array.Empty(); - public override async ValueTask ExecuteAsync(IConsole console) => + public override async ValueTask ExecuteAsync(IConsole console) + { + await base.ExecuteAsync(console); await base.ExecuteAsync(console, ChannelIds); + } } \ No newline at end of file diff --git a/DiscordChatExporter.Cli/Commands/ExportDirectMessagesCommand.cs b/DiscordChatExporter.Cli/Commands/ExportDirectMessagesCommand.cs index 4d4b408..6b91c01 100644 --- a/DiscordChatExporter.Cli/Commands/ExportDirectMessagesCommand.cs +++ b/DiscordChatExporter.Cli/Commands/ExportDirectMessagesCommand.cs @@ -13,6 +13,8 @@ public class ExportDirectMessagesCommand : ExportCommandBase { public override async ValueTask ExecuteAsync(IConsole console) { + await base.ExecuteAsync(console); + var cancellationToken = console.RegisterCancellationHandler(); await console.Output.WriteLineAsync("Fetching channels..."); diff --git a/DiscordChatExporter.Cli/Commands/ExportGuildCommand.cs b/DiscordChatExporter.Cli/Commands/ExportGuildCommand.cs index edcb65d..4228e1a 100644 --- a/DiscordChatExporter.Cli/Commands/ExportGuildCommand.cs +++ b/DiscordChatExporter.Cli/Commands/ExportGuildCommand.cs @@ -16,6 +16,8 @@ public class ExportGuildCommand : ExportCommandBase public override async ValueTask ExecuteAsync(IConsole console) { + await base.ExecuteAsync(console); + var cancellationToken = console.RegisterCancellationHandler(); await console.Output.WriteLineAsync("Fetching channels..."); diff --git a/DiscordChatExporter.Gui/ViewModels/RootViewModel.cs b/DiscordChatExporter.Gui/ViewModels/RootViewModel.cs index 7afaa00..fcf8d3f 100644 --- a/DiscordChatExporter.Gui/ViewModels/RootViewModel.cs +++ b/DiscordChatExporter.Gui/ViewModels/RootViewModel.cs @@ -118,6 +118,19 @@ public class RootViewModel : Screen App.SetLightTheme(); } + // War in Ukraine message + Notifications.Enqueue( + "⚠ UKRAINE IS AT WAR!", + "LEARN MORE & HELP", _ => + { + ProcessEx.StartShellExecute("https://tyrrrz.me"); + }, + null, + true, + true, + TimeSpan.FromMinutes(1) + ); + await CheckForUpdatesAsync(); }