diff --git a/Tools/BiblioTech/Commands/AdminCommand.cs b/Tools/BiblioTech/Commands/AdminCommand.cs index 62c38328..5e4d4784 100644 --- a/Tools/BiblioTech/Commands/AdminCommand.cs +++ b/Tools/BiblioTech/Commands/AdminCommand.cs @@ -136,9 +136,6 @@ namespace BiblioTech.Commands protected override async Task onSubCommand(CommandContext context) { var deployments = Program.DeploymentFilesMonitor.GetDeployments(); - - //todo shows old deployments - if (!deployments.Any()) { await context.Followup("No deployments available."); @@ -269,6 +266,11 @@ namespace BiblioTech.Commands await context.Followup("No deployment found."); return default; } + if (deployment.CodexInstances == null || !deployment.CodexInstances.Any()) + { + await context.Followup("No codex instances were deployed."); + return default; + } try { diff --git a/Tools/BiblioTech/DeploymentsFilesMonitor.cs b/Tools/BiblioTech/DeploymentsFilesMonitor.cs index 00920340..6713d79a 100644 --- a/Tools/BiblioTech/DeploymentsFilesMonitor.cs +++ b/Tools/BiblioTech/DeploymentsFilesMonitor.cs @@ -62,9 +62,6 @@ namespace BiblioTech private bool IsDeploymentOk(CodexDeployment? deploy) { if (deploy == null) return false; - if (deploy.CodexInstances == null) return false; - if (!deploy.CodexInstances.Any()) return false; - if (!deploy.CodexInstances.All(i => i.Containers != null && i.Info != null)) return false; if (deploy.GethDeployment == null) return false; if (deploy.GethDeployment.Containers == null) return false; return true;