From 4e0c56f6cb7194359184dd25c592f7821905f055 Mon Sep 17 00:00:00 2001 From: dusk Date: Wed, 24 Sep 2025 21:36:33 +0000 Subject: [PATCH] fix: add missing parameters ext method, fix SwitchDelete usage --- .gitignore | 1 + .../CommandSystem/Context/ContextParametersExt.cs | 8 ++++++++ PluralKit.Bot/Commands/SystemFront.cs | 2 +- flake.nix | 2 +- 4 files changed, 11 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 31332235..b72e1aaa 100644 --- a/.gitignore +++ b/.gitignore @@ -9,6 +9,7 @@ target/ .idea/ .run/ .vscode/ +.zed/ .mono/ tags/ .DS_Store diff --git a/PluralKit.Bot/CommandSystem/Context/ContextParametersExt.cs b/PluralKit.Bot/CommandSystem/Context/ContextParametersExt.cs index 45efb250..9f0c3f22 100644 --- a/PluralKit.Bot/CommandSystem/Context/ContextParametersExt.cs +++ b/PluralKit.Bot/CommandSystem/Context/ContextParametersExt.cs @@ -20,6 +20,14 @@ public static class ContextParametersExt ); } + public static async Task> ParamResolveMembers(this Context ctx, string param_name) + { + return await ctx.Parameters.ResolveParameter( + ctx, param_name, + param => (param as Parameter.MemberRefs)?.members + ); + } + public static async Task ParamResolveSystem(this Context ctx, string param_name) { return await ctx.Parameters.ResolveParameter( diff --git a/PluralKit.Bot/Commands/SystemFront.cs b/PluralKit.Bot/Commands/SystemFront.cs index f5b06f87..8139d5e4 100644 --- a/PluralKit.Bot/Commands/SystemFront.cs +++ b/PluralKit.Bot/Commands/SystemFront.cs @@ -30,7 +30,7 @@ public class SystemFront { if (ctx.MatchFlag("clear", "c") || ctx.PeekArgument() == "clear") { - await new Switch().SwitchDelete(ctx); + await new Switch().SwitchDelete(ctx, true); return; } diff --git a/flake.nix b/flake.nix index 168b3773..692142a8 100644 --- a/flake.nix +++ b/flake.nix @@ -199,7 +199,7 @@ depends_on.redis.condition = "process_healthy"; depends_on.pluralkit-gateway.condition = "process_log_ready"; # TODO: add liveness check - ready_log_line = "Received Ready"; + ready_log_line = "Connected! All is good (probably)."; availability.restart = "on_failure"; availability.max_restarts = 3; };