From ced77c1dd2789d3386437d7d610d43811ec57d07 Mon Sep 17 00:00:00 2001 From: rladenson Date: Thu, 5 Dec 2024 18:09:28 -0700 Subject: [PATCH] chore: change default alias to proxy switch new from proxy switch on --- PluralKit.Bot/CommandMeta/CommandHelp.cs | 2 +- PluralKit.Bot/Commands/Config.cs | 6 +++--- docs/content/command-list.md | 2 +- docs/content/user-guide.md | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/PluralKit.Bot/CommandMeta/CommandHelp.cs b/PluralKit.Bot/CommandMeta/CommandHelp.cs index 5dc4102e..54c004e1 100644 --- a/PluralKit.Bot/CommandMeta/CommandHelp.cs +++ b/PluralKit.Bot/CommandMeta/CommandHelp.cs @@ -30,7 +30,7 @@ public partial class CommandTree public static Command ConfigShowPrivate = new Command("config show private", "config show private [on|off]", "Sets whether private information is shown to linked accounts by default"); public static Command ConfigMemberDefaultPrivacy = new("config private member", "config private member [on|off]", "Sets whether member privacy is automatically set to private when creating a new member"); public static Command ConfigGroupDefaultPrivacy = new("config private group", "config private group [on|off]", "Sets whether group privacy is automatically set to private when creating a new group"); - public static Command ConfigProxySwitch = new Command("config proxyswitch", "config proxyswitch [on|add|off]", "Sets whether to log a switch every time a proxy tag is used"); + public static Command ConfigProxySwitch = new Command("config proxyswitch", "config proxyswitch [new|add|off]", "Switching behavior when proxy tags are used"); public static Command ConfigNameFormat = new Command("config nameformat", "config nameformat [format]", "Changes your system's username formatting"); public static Command AutoproxySet = new Command("autoproxy", "autoproxy [off|front|latch|member]", "Sets your system's autoproxy mode for the current server"); public static Command AutoproxyOff = new Command("autoproxy off", "autoproxy off", "Disables autoproxying for your system in the current server"); diff --git a/PluralKit.Bot/Commands/Config.cs b/PluralKit.Bot/Commands/Config.cs index 7abb548a..593af15d 100644 --- a/PluralKit.Bot/Commands/Config.cs +++ b/PluralKit.Bot/Commands/Config.cs @@ -125,7 +125,7 @@ public class Config items.Add(new( "Proxy Switch", - "Whether using a proxy tag logs a switch", + "Switching behavior when proxy tags are used", ctx.Config.ProxySwitch.ToUserString(), "off" )); @@ -566,9 +566,9 @@ public class Config return; } - // toggle = false means off, toggle = true means on, otherwise if they said add that means add. If none of those, error + // toggle = false means off, toggle = true means new, otherwise if they said add that means add or if they said new they mean new. If none of those, error var toggle = ctx.MatchToggleOrNull(false); - var newVal = toggle == false ? SystemConfig.ProxySwitchAction.Off : toggle == true ? SystemConfig.ProxySwitchAction.New : ctx.Match("add", "a") ? SystemConfig.ProxySwitchAction.Add : throw new PKError("You must pass either \"on\" or \"off\" to this command."); + var newVal = toggle == false ? SystemConfig.ProxySwitchAction.Off : toggle == true ? SystemConfig.ProxySwitchAction.New : ctx.Match("add", "a") ? SystemConfig.ProxySwitchAction.Add : ctx.Match("new", "n") ? SystemConfig.ProxySwitchAction.New : throw new PKError("You must pass either \"new\", \"add\", or \"off\" to this command."); await ctx.Repository.UpdateSystemConfig(ctx.System.Id, new() { ProxySwitch = newVal }); switch (newVal) diff --git a/docs/content/command-list.md b/docs/content/command-list.md index 17263733..de58dc45 100644 --- a/docs/content/command-list.md +++ b/docs/content/command-list.md @@ -148,7 +148,7 @@ You can have a space after `pk;`, e.g. `pk;system` and `pk; system` will do the - `pk;config split IDs [on|off]` - Toggles whether to display 6-letter IDs with a hyphen, to ease readability. - `pk;config capitalize IDs [on|off]` - Toggles whether to display IDs as capital letters, to ease readability. - `pk;config pad IDs [left|right|off]` - Toggles whether to pad (add a space) 5-character IDs in lists. -- `pk;config proxy switch [on|add|off]` - Toggles whether to log a switch whenever you proxy as a different member (or add member to recent switch in add mode). +- `pk;config proxy switch [new|add|off]` - Toggles whether to log a switch whenever you proxy as a different member (or add member to recent switch in add mode). - `pk;config name format [format]` - Changes your system's username formatting. ## Server owner commands diff --git a/docs/content/user-guide.md b/docs/content/user-guide.md index cfa01980..0cf6475a 100644 --- a/docs/content/user-guide.md +++ b/docs/content/user-guide.md @@ -551,7 +551,7 @@ If you want to specify a member with multiple words in their name, remember to e ### Automatic Switching If you want PluralKit to automatically log a new switch whenever you [proxy](/guide/#proxying), you can tell it do so using the following command: - pk;config proxy switch on + pk;config proxy switch new Alternatively, if you want PluralKit to *add* the proxied member to the current switch instead of logging a new one, you can use this command: