mirror of
https://gitlab.com/Kwoth/nadekobot.git
synced 2025-09-11 09:48:26 -04:00
- NadekoBot class renamed to Bot
- Implemented grpc based coordinator. Supports restarting, killing single or all shards, as well as getting current shard statuses. (Adaptation of the one used by the public bot) - Coord is setup via coord.yml file - Methods from SelfService which deal with shard/bot restart etc have been moved to ICoordinator (with GrpcRemoteCoordinator being the default implementation atm) - Vastly simplified NadekoBot/Program.cs
This commit is contained in:
22
src/NadekoBot/Services/ICoordinator.cs
Normal file
22
src/NadekoBot/Services/ICoordinator.cs
Normal file
@@ -0,0 +1,22 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace NadekoBot.Services
|
||||
{
|
||||
public interface ICoordinator
|
||||
{
|
||||
bool RestartBot();
|
||||
void Die();
|
||||
bool RestartShard(int shardId);
|
||||
IEnumerable<ShardStatus> GetAllShardStatuses();
|
||||
int GetGuildCount();
|
||||
}
|
||||
|
||||
public class ShardStatus
|
||||
{
|
||||
public Discord.ConnectionState ConnectionState { get; set; }
|
||||
public DateTime Time { get; set; }
|
||||
public int ShardId { get; set; }
|
||||
public int Guilds { get; set; }
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user