From 59f0a5ec3ee3cf465961b88bce6ed4bee6b72ce3 Mon Sep 17 00:00:00 2001 From: spiral Date: Wed, 1 Dec 2021 17:18:38 -0500 Subject: [PATCH] fix: parse default privacy config commands correctly --- PluralKit.Bot/CommandMeta/CommandTree.cs | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/PluralKit.Bot/CommandMeta/CommandTree.cs b/PluralKit.Bot/CommandMeta/CommandTree.cs index d39f02b1..82baae82 100644 --- a/PluralKit.Bot/CommandMeta/CommandTree.cs +++ b/PluralKit.Bot/CommandMeta/CommandTree.cs @@ -481,9 +481,16 @@ public partial class CommandTree return ctx.Execute(null, m => m.SystemTimezone(ctx)); if (ctx.Match("ping")) return ctx.Execute(null, m => m.SystemPing(ctx)); - if (ctx.MatchMultiple(new[] { "private member" }) || ctx.Match("mp")) + if (ctx.Match("private")) + { + if (ctx.Match("member")) + return ctx.Execute(null, m => m.MemberDefaultPrivacy(ctx)); + if (ctx.Match("group")) + return ctx.Execute(null, m => m.GroupDefaultPrivacy(ctx)); + } + if (ctx.Match("mp")) return ctx.Execute(null, m => m.MemberDefaultPrivacy(ctx)); - if (ctx.MatchMultiple(new[] { "private group" }) || ctx.Match("gp")) + if (ctx.Match("gp")) return ctx.Execute(null, m => m.GroupDefaultPrivacy(ctx)); // todo: maybe add the list of configuration keys here?