added some logging to .leaveunkeptservers
This commit is contained in:
parent
1c53371598
commit
74767e8661
1 changed files with 2 additions and 2 deletions
|
@ -58,7 +58,7 @@ public sealed class CleanupService : ICleanupService, IReadyExecutor, IEService
|
||||||
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, IEService
|
||||||
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))
|
||||||
|
|
Loading…
Reference in a new issue