From 762a2eca1f43520b009b0b318e07874c983be1ee Mon Sep 17 00:00:00 2001 From: Kwoth Date: Mon, 29 Jul 2024 04:31:09 +0000 Subject: [PATCH] change: .keep will also automatically trigger for any new server the bot joins --- .../Administration/DangerousCommands/CleanupService.cs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/NadekoBot/Modules/Administration/DangerousCommands/CleanupService.cs b/src/NadekoBot/Modules/Administration/DangerousCommands/CleanupService.cs index 5c19d955b..dc24a71f7 100644 --- a/src/NadekoBot/Modules/Administration/DangerousCommands/CleanupService.cs +++ b/src/NadekoBot/Modules/Administration/DangerousCommands/CleanupService.cs @@ -158,11 +158,18 @@ public sealed class CleanupService : ICleanupService, IReadyExecutor, INService public async Task OnReadyAsync() { await _pubSub.Sub(_keepTriggerKey, OnKeepTrigger); + + _client.JoinedGuild += ClientOnJoinedGuild; if (_client.ShardId == 0) await _pubSub.Sub(_keepReportKey, OnKeepReport); } + private async Task ClientOnJoinedGuild(SocketGuild arg) + { + await KeepGuild(arg.Id); + } + private ValueTask OnKeepTrigger(bool arg) { _pubSub.Pub(_keepReportKey,