mirror of
https://gitlab.com/Kwoth/nadekobot.git
synced 2025-09-11 09:48:26 -04:00
Added .coordreload which will reload coord.yml when using NadekoBot.Coordinator
- bots with more than 1 shard will now use redis strings provider
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace NadekoBot.Services
|
||||
{
|
||||
@@ -10,6 +11,7 @@ namespace NadekoBot.Services
|
||||
bool RestartShard(int shardId);
|
||||
IList<ShardStatus> GetAllShardStatuses();
|
||||
int GetGuildCount();
|
||||
Task Reload();
|
||||
}
|
||||
|
||||
public class ShardStatus
|
||||
|
@@ -79,6 +79,11 @@ namespace NadekoBot.Services
|
||||
return res.Statuses.Sum(x => x.GuildCount);
|
||||
}
|
||||
|
||||
public async Task Reload()
|
||||
{
|
||||
await _coordClient.ReloadAsync(new());
|
||||
}
|
||||
|
||||
public Task OnReadyAsync()
|
||||
{
|
||||
Task.Run(async () =>
|
||||
|
@@ -64,5 +64,10 @@ namespace NadekoBot.Services
|
||||
{
|
||||
return _client.Guilds.Count;
|
||||
}
|
||||
|
||||
public Task Reload()
|
||||
{
|
||||
return Task.CompletedTask;
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user