A lot of these things were designed with the thought in mind that
there used to be many, many issues when running the bot on a large
number of servers. The reason for these bugs turned out to be simple:
the hardware was not fast enough to keep up with everything.
This extra reporting and these extra behaviors have not been
necessary for some time, and it is best to remove them.
-Add command line options for shards
-Set consistent exit codes
-Turn on nullable option and edit code further to conform and reduce warnings
-Update libraries
-New config values ShardRange and ShardTotal
--ShardTotal replaces ShardCount
-New config value QuitOnFails:
--Program quits after enough shards have been removed
The BirthdayBot class has been split up into ShardInstance and
ShardManager. Several other things have been reorganized so that shards
may act independently.
The overall goal of these changes made is to limit failures to sections
that can easily be discarded and replaced.
From testing, it appears DownloadUsersAsync hangs forever and has other
consequences if its corresponding server is not fully connected, or is
struggling to connect. This is despite all attempts to mitigate it and
detect any disconnections shortly before attempting it.
Additionally, birthday updates are now run asynchronously per shard, but
synchronously per guild in an attempt to keep rare instances of rate
limiting under control.
These changes make the bot skip over needlessly collecting information
for guilds in which it is unnecessary, in most cases guilds that have
invited the bot but have not yet invoked any bot command.
All existing VB code was 'translated' to C# as closely as possible, with
minor changes and additional notes. Currently untested and likely
broken.
Further commits will go toward making overall improvements until this
version replaces the currently existing code.