From 77444bff2e359190dc5f22fbc1d61619d19917d1 Mon Sep 17 00:00:00 2001 From: dusk Date: Wed, 8 Oct 2025 17:57:56 +0000 Subject: [PATCH] add flags for public / private --- PluralKit.Bot/CommandSystem/Context/Context.cs | 2 +- crates/command_definitions/src/lib.rs | 2 ++ crates/commands/src/main.rs | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/PluralKit.Bot/CommandSystem/Context/Context.cs b/PluralKit.Bot/CommandSystem/Context/Context.cs index f179a8a3..3a8f61a2 100644 --- a/PluralKit.Bot/CommandSystem/Context/Context.cs +++ b/PluralKit.Bot/CommandSystem/Context/Context.cs @@ -194,7 +194,7 @@ public class Context public LookupContext LookupContextFor(SystemId systemId, bool? _hasPrivateOverride = null, bool? _hasPublicOverride = null) { - // TODO(yusdacra): these should be passed as a parameter to this method all the way from command tree + // todo(dusk): these should be passed as a parameter ideally bool hasPrivateOverride = _hasPrivateOverride ?? Parameters.HasFlag("private", "priv"); bool hasPublicOverride = _hasPublicOverride ?? Parameters.HasFlag("public", "pub"); diff --git a/crates/command_definitions/src/lib.rs b/crates/command_definitions/src/lib.rs index 0f20ddb9..40617f62 100644 --- a/crates/command_definitions/src/lib.rs +++ b/crates/command_definitions/src/lib.rs @@ -46,6 +46,8 @@ pub fn all() -> impl Iterator { .hidden_flag(("raw", ["r"])) .hidden_flag(("show-embed", ["se"])) .hidden_flag(("by-id", ["id"])) + .hidden_flag(("private", ["priv"])) + .hidden_flag(("public", ["pub"])) }) } diff --git a/crates/commands/src/main.rs b/crates/commands/src/main.rs index 8784b5c2..325fc469 100644 --- a/crates/commands/src/main.rs +++ b/crates/commands/src/main.rs @@ -4,7 +4,7 @@ use command_parser::Tree; use commands::COMMAND_TREE; fn main() { - related(); + parse(); } fn related() {