1
Fork 0
mirror of https://gitlab.com/Kwoth/nadekobot.git synced 2024-10-02 12:09:07 +00:00

change: added some logging to .leaveunkeptservers

This commit is contained in:
Kwoth 2024-08-28 04:37:03 +00:00
parent c9ed2cf4b5
commit c033c0e3c8

View file

@ -58,7 +58,7 @@ public sealed class CleanupService : ICleanupService, IReadyExecutor, INService
keepTriggered = true;
try
{
var allGuildIds = _client.Guilds.Select(x => x.Id);
var allGuildIds = _client.Guilds.Select(x => x.Id).ToArray();
HashSet<ulong> dontDelete;
await using (var db = _db.GetDbContext())
@ -74,7 +74,7 @@ public sealed class CleanupService : ICleanupService, IReadyExecutor, INService
dontDelete = dontDeleteList.ToHashSet();
}
guildIds = new();
Log.Information("Leaving {RemainingCount} guilds every {Delay} seconds, {DontDeleteCount} will remain", allGuildIds.Length - dontDelete.Count, delay, dontDelete.Count);
foreach (var guildId in allGuildIds)
{
if (dontDelete.Contains(guildId))