From 5253d412e63badce87aaa6b7be52045b4e4aba4e Mon Sep 17 00:00:00 2001 From: Filip Strajnar Date: Sun, 16 Jun 2024 01:06:26 +0200 Subject: [PATCH] Added some basic messages to stdout. --- DiscordDelete/Program.cs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/DiscordDelete/Program.cs b/DiscordDelete/Program.cs index 3d58392..9af89c4 100644 --- a/DiscordDelete/Program.cs +++ b/DiscordDelete/Program.cs @@ -8,6 +8,7 @@ string? token = Environment.GetEnvironmentVariable("DISCORD_TOKEN"); if (token == null) { // Exit. + Console.WriteLine("Token is null. Make sure you set the DISCORD_TOKEN environmental variable."); return; } @@ -41,13 +42,17 @@ int finalCode = await CommandLine { // This should never happen as those args are required. if (opt.ChannelId is null || opt.Author is null) + { + Console.WriteLine("Channel or author ID is null."); return 1; + } int totalMessages = 1; int offset = 0; if (opt.GuildId is null) { + Console.WriteLine("Scanning DM messages."); while (true) { // Scanning direct messages. @@ -75,6 +80,7 @@ int finalCode = await CommandLine } else { + Console.WriteLine("Scanning guild messages."); while (offset < totalMessages) { // Scanning guild messages.