diff --git a/PluralKit.Bot/CommandMeta/CommandTree.cs b/PluralKit.Bot/CommandMeta/CommandTree.cs index 7bfef4de..e2626ede 100644 --- a/PluralKit.Bot/CommandMeta/CommandTree.cs +++ b/PluralKit.Bot/CommandMeta/CommandTree.cs @@ -476,16 +476,9 @@ 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.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")) + if (ctx.MatchMultiple(new[] { "private" }, new[] { "member" }) || ctx.Match("mp")) return ctx.Execute(null, m => m.MemberDefaultPrivacy(ctx)); - if (ctx.Match("gp")) + if (ctx.MatchMultiple(new[] { "private" }, new[] { "group" }) || ctx.Match("gp")) return ctx.Execute(null, m => m.GroupDefaultPrivacy(ctx)); if (ctx.MatchMultiple(new[] { "show" }, new[] { "private" }) || ctx.Match("sp")) return ctx.Execute(null, m => m.ShowPrivateInfo(ctx)); diff --git a/PluralKit.Bot/Commands/Config.cs b/PluralKit.Bot/Commands/Config.cs index 9aa0100b..ae62f931 100644 --- a/PluralKit.Bot/Commands/Config.cs +++ b/PluralKit.Bot/Commands/Config.cs @@ -320,10 +320,10 @@ public class Config }); } + // todo: this command parsing is really messy + public async Task MemberDefaultPrivacy(Context ctx) { - ctx.CheckSystem(); - if (!ctx.HasNext()) { if (ctx.Config.MemberDefaultPrivate) { await ctx.Reply("Newly created members will currently have their privacy settings set to private. To change this, type `pk;config private member off`"); } @@ -348,8 +348,6 @@ public class Config public async Task GroupDefaultPrivacy(Context ctx) { - ctx.CheckSystem(); - if (!ctx.HasNext()) { if (ctx.Config.GroupDefaultPrivate) { await ctx.Reply("Newly created groups will currently have their privacy settings set to private. To change this, type `pk;config private group off`"); } @@ -374,8 +372,6 @@ public class Config public async Task ShowPrivateInfo(Context ctx) { - ctx.CheckSystem(); - if (!ctx.HasNext()) { if (ctx.Config.ShowPrivateInfo) await ctx.Reply("Private information is currently **shown** when looking up your own info. Use the `-public` flag to hide it.");