.keep will also automatically trigger for any new server the bot joins
This commit is contained in:
parent
e3a4c4bd43
commit
1df8f092fe
1 changed files with 7 additions and 0 deletions
|
@ -159,10 +159,17 @@ public sealed class CleanupService : ICleanupService, IReadyExecutor, IEService
|
||||||
{
|
{
|
||||||
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,
|
||||||
|
|
Loading…
Reference in a new issue