mirror of
https://gitlab.com/Kwoth/nadekobot.git
synced 2025-09-11 09:48:26 -04:00
change: .keep will also automatically trigger for any new server the bot joins
This commit is contained in:
@@ -159,10 +159,17 @@ public sealed class CleanupService : ICleanupService, IReadyExecutor, INService
|
|||||||
{
|
{
|
||||||
await _pubSub.Sub(_keepTriggerKey, OnKeepTrigger);
|
await _pubSub.Sub(_keepTriggerKey, OnKeepTrigger);
|
||||||
|
|
||||||
|
_client.JoinedGuild += ClientOnJoinedGuild;
|
||||||
|
|
||||||
if (_client.ShardId == 0)
|
if (_client.ShardId == 0)
|
||||||
await _pubSub.Sub(_keepReportKey, OnKeepReport);
|
await _pubSub.Sub(_keepReportKey, OnKeepReport);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private async Task ClientOnJoinedGuild(SocketGuild arg)
|
||||||
|
{
|
||||||
|
await KeepGuild(arg.Id);
|
||||||
|
}
|
||||||
|
|
||||||
private ValueTask OnKeepTrigger(bool arg)
|
private ValueTask OnKeepTrigger(bool arg)
|
||||||
{
|
{
|
||||||
_pubSub.Pub(_keepReportKey,
|
_pubSub.Pub(_keepReportKey,
|
||||||
|
Reference in New Issue
Block a user