mirror of
https://onedev.fprog.nl/DiscordClient
synced 2025-12-30 06:38:37 +01:00
Added some basic messages to stdout.
This commit is contained in:
parent
1c80b540e6
commit
5253d412e6
|
|
@ -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.
|
||||
|
|
|
|||
Loading…
Reference in a new issue