Added graceful option to die (kill coordinator without killing shards)

This commit is contained in:
Kwoth
2021-12-01 09:47:41 +01:00
parent 219ca39cd1
commit 59c0f2f4b3
4 changed files with 6 additions and 6 deletions

View File

@@ -7,7 +7,7 @@ namespace NadekoBot.Services
public interface ICoordinator
{
bool RestartBot();
void Die();
void Die(bool graceful);
bool RestartShard(int shardId);
IList<ShardStatus> GetAllShardStatuses();
int GetGuildCount();

View File

@@ -39,11 +39,11 @@ namespace NadekoBot.Services
return true;
}
public void Die()
public void Die(bool graceful)
{
_coordClient.Die(new DieRequest()
{
Graceful = false
Graceful = graceful
});
}

View File

@@ -36,7 +36,7 @@ namespace NadekoBot.Services
return true;
}
public void Die()
public void Die(bool graceful = false)
{
Environment.Exit(5);
}