Add messages about war in Ukraine

pull/826/head
Oleksii Holub 2 years ago
parent 08d9af534b
commit b996215e36

@ -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;
}
}

@ -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<Channel>();

@ -15,6 +15,9 @@ public class ExportChannelsCommand : ExportCommandBase
[CommandOption("channel", 'c', IsRequired = true, Description = "Channel ID(s).")]
public IReadOnlyList<Snowflake> ChannelIds { get; init; } = Array.Empty<Snowflake>();
public override async ValueTask ExecuteAsync(IConsole console) =>
public override async ValueTask ExecuteAsync(IConsole console)
{
await base.ExecuteAsync(console);
await base.ExecuteAsync(console, ChannelIds);
}
}

@ -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...");

@ -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...");

@ -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();
}

Loading…
Cancel
Save