Commit graph

19 commits

Author SHA1 Message Date
Noi
c727bead98 Better handling of program shutdown
It now knows what a SIGTERM is.
Additionally, made some small tweaks to the file's structure
and removed some unnecessary details.
2023-06-11 18:10:46 -07:00
Noi
f4d5bfecd0 Reduce shard health report complexity
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.
2022-11-21 19:32:46 -08:00
Noi
b9604dadfe Remove text-based commands 2022-08-29 12:22:42 -07:00
Noi
a1302fb594 Switch logging to local time 2022-08-09 18:52:51 -07:00
Noi
261d54197d Load database config on initialization
Adapted from RegexBot.
This allows `dotnet ef` tools to make use of actual SQL credentials
rather than dummy ones.
2022-08-09 17:37:29 -07:00
Noi
f52d8c81c8 Remove incorrect use of migrations 2022-03-19 18:07:30 -07:00
Noi
135a554bc5 Add migrations 2022-03-19 14:51:41 -07:00
Noi
16ac294fe3 Several improvements for program loading
-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
2021-10-22 17:55:30 -07:00
Noi
ca0dd74bae Move bot uptime property from Common to Program
Additionally, update code style in Common
2021-10-18 16:58:22 -07:00
Noi
fdffa5425c Set up useful exit codes
Additionally, updated style on affected files and cleaned up certain parts of the code in each.
2021-10-18 00:26:25 -07:00
Noi
eb33e55aad Add support for separate shard ranges per instance
-New config values ShardRange and ShardTotal
--ShardTotal replaces ShardCount
-New config value QuitOnFails:
--Program quits after enough shards have been removed
2021-06-15 19:29:35 -07:00
Noi
5fcf69136d Have program attempt to stop itself after 5 failures 2021-05-30 10:05:33 -07:00
Noi
d08fc45774 Move database initialization to program start 2020-10-29 00:53:18 -07:00
Noi
2f0fe8641a Implement own sharding system
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.
2020-10-04 21:40:38 -07:00
Noi
657181ec3e Less async birthday updates; download users on connect
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.
2020-07-27 22:30:15 -07:00
Noi
8f84b09b21 Reduce amount of automatic processing
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.
2020-07-22 19:43:45 -07:00
Noi
99786a7b70 Suppress unneeded log messages 2020-06-02 23:11:34 -07:00
Noi
14b3219ee6 Add missing word 2020-04-09 22:48:59 -07:00
Noi
ddcde10e09 First commit for C# rewrite
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.
2020-04-02 11:38:26 -07:00