mirror of
https://onedev.fprog.nl/DiscordClient
synced 2025-12-30 10:18:36 +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)
|
if (token == null)
|
||||||
{
|
{
|
||||||
// Exit.
|
// Exit.
|
||||||
|
Console.WriteLine("Token is null. Make sure you set the DISCORD_TOKEN environmental variable.");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -41,13 +42,17 @@ int finalCode = await CommandLine
|
||||||
{
|
{
|
||||||
// This should never happen as those args are required.
|
// This should never happen as those args are required.
|
||||||
if (opt.ChannelId is null || opt.Author is null)
|
if (opt.ChannelId is null || opt.Author is null)
|
||||||
|
{
|
||||||
|
Console.WriteLine("Channel or author ID is null.");
|
||||||
return 1;
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
int totalMessages = 1;
|
int totalMessages = 1;
|
||||||
int offset = 0;
|
int offset = 0;
|
||||||
|
|
||||||
if (opt.GuildId is null)
|
if (opt.GuildId is null)
|
||||||
{
|
{
|
||||||
|
Console.WriteLine("Scanning DM messages.");
|
||||||
while (true)
|
while (true)
|
||||||
{
|
{
|
||||||
// Scanning direct messages.
|
// Scanning direct messages.
|
||||||
|
|
@ -75,6 +80,7 @@ int finalCode = await CommandLine
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
Console.WriteLine("Scanning guild messages.");
|
||||||
while (offset < totalMessages)
|
while (offset < totalMessages)
|
||||||
{
|
{
|
||||||
// Scanning guild messages.
|
// Scanning guild messages.
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue