mirror of
https://gitlab.com/Kwoth/nadekobot.git
synced 2025-09-10 17:28:27 -04:00
change: .keep will also automatically trigger for any new server the bot joins
This commit is contained in:
@@ -158,11 +158,18 @@ public sealed class CleanupService : ICleanupService, IReadyExecutor, INService
|
|||||||
public async Task OnReadyAsync()
|
public async Task OnReadyAsync()
|
||||||
{
|
{
|
||||||
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