mirror of
https://gitlab.com/Kwoth/nadekobot.git
synced 2025-09-10 09:18:27 -04:00
change: added some logging to .leaveunkeptservers
This commit is contained in:
@@ -58,7 +58,7 @@ public sealed class CleanupService : ICleanupService, IReadyExecutor, INService
|
|||||||
keepTriggered = true;
|
keepTriggered = true;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
var allGuildIds = _client.Guilds.Select(x => x.Id);
|
var allGuildIds = _client.Guilds.Select(x => x.Id).ToArray();
|
||||||
|
|
||||||
HashSet<ulong> dontDelete;
|
HashSet<ulong> dontDelete;
|
||||||
await using (var db = _db.GetDbContext())
|
await using (var db = _db.GetDbContext())
|
||||||
@@ -74,7 +74,7 @@ public sealed class CleanupService : ICleanupService, IReadyExecutor, INService
|
|||||||
dontDelete = dontDeleteList.ToHashSet();
|
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)
|
foreach (var guildId in allGuildIds)
|
||||||
{
|
{
|
||||||
if (dontDelete.Contains(guildId))
|
if (dontDelete.Contains(guildId))
|
||||||
|
Reference in New Issue
Block a user