mirror of
https://github.com/Tyrrrz/DiscordChatExporter.git
synced 2026-02-03 00:29:20 +00:00
Add messages about war in Ukraine
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user