mirror of
https://github.com/PluralKit/PluralKit.git
synced 2026-02-07 22:37:54 +00:00
chore: change default alias to proxy switch new from proxy switch on
This commit is contained in:
parent
f6a9a32d45
commit
ced77c1dd2
4 changed files with 6 additions and 6 deletions
|
|
@ -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");
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue