From bf122f1046e4a72211b3caf8305047f5bba8bf99 Mon Sep 17 00:00:00 2001 From: spiral Date: Wed, 19 Jan 2022 17:40:27 -0500 Subject: [PATCH] feat: update command help for pk;autoproxy --- PluralKit.Bot/CommandMeta/CommandHelp.cs | 9 +++++++++ PluralKit.Bot/CommandMeta/CommandTree.cs | 7 +++++-- docs/content/command-list.md | 6 ++++-- 3 files changed, 18 insertions(+), 4 deletions(-) diff --git a/PluralKit.Bot/CommandMeta/CommandHelp.cs b/PluralKit.Bot/CommandMeta/CommandHelp.cs index 97c0139a..642be4f9 100644 --- a/PluralKit.Bot/CommandMeta/CommandHelp.cs +++ b/PluralKit.Bot/CommandMeta/CommandHelp.cs @@ -26,6 +26,10 @@ public partial class CommandTree 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 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"); + public static Command AutoproxyFront = new Command("autoproxy front", "autoproxy front", "Sets your system's autoproxy in this server to proxy the first member currently registered as front"); + public static Command AutoproxyLatch = new Command("autoproxy latch", "autoproxy latch", "Sets your system's autoproxy in this server to proxy the last manually proxied member"); + public static Command AutoproxyMember = new Command("autoproxy member", "autoproxy ", "Sets your system's autoproxy in this server to proxy a specific member"); public static Command MemberInfo = new Command("member", "member ", "Looks up information about a member"); public static Command MemberNew = new Command("member new", "member new ", "Creates a new member"); public static Command MemberRename = new Command("member rename", "member rename ", "Renames a member"); @@ -131,6 +135,11 @@ public partial class CommandTree ConfigMemberDefaultPrivacy, ConfigGroupDefaultPrivacy }; + public static Command[] AutoproxyCommands = + { + AutoproxyOff, AutoproxyFront, AutoproxyLatch, AutoproxyMember + }; + public static Command[] LogCommands = { LogChannel, LogChannelClear, LogEnable, LogDisable }; public static Command[] BlacklistCommands = { BlacklistAdd, BlacklistRemove, BlacklistShow }; diff --git a/PluralKit.Bot/CommandMeta/CommandTree.cs b/PluralKit.Bot/CommandMeta/CommandTree.cs index c5105a45..f381ce28 100644 --- a/PluralKit.Bot/CommandMeta/CommandTree.cs +++ b/PluralKit.Bot/CommandMeta/CommandTree.cs @@ -395,7 +395,7 @@ public partial class CommandTree if (!ctx.HasNext()) { await ctx.Reply( - "Available command help targets: `system`, `member`, `group`, `switch`, `autoproxy`, `log`, `blacklist`." + "Available command help targets: `system`, `member`, `group`, `switch`, `config`, `autoproxy`, `log`, `blacklist`." + "\n- **pk;commands ** - *View commands related to a help target.*" + "\n\nFor the full list of commands, see the website: "); return; @@ -435,7 +435,10 @@ public partial class CommandTree case "cfg": await PrintCommandList(ctx, "settings", ConfigCommands); break; - // todo: are there any commands that still need to be added? + case "autoproxy": + case "ap": + await PrintCommandList(ctx, "autoproxy", AutoproxyCommands); + break; default: await ctx.Reply("For the full list of commands, see the website: "); break; diff --git a/docs/content/command-list.md b/docs/content/command-list.md index ebce0c80..dfe93be7 100644 --- a/docs/content/command-list.md +++ b/docs/content/command-list.md @@ -52,7 +52,6 @@ Some arguments indicate the use of specific Discord features. These include: - `pk;system [system] list -full` - Shows a paginated list of a system's members, with increased detail. - `pk;find ` - Searches members by name. - `pk;system [system] find ` - (same as above, but for a specific system) -- `pk;autoproxy [off|front|latch|member]` - Updates the system's autoproxy settings for a given server. ## Member commands *Replace `` with a member's name, 5-character ID or display name. For most commands, adding `-clear` will clear/delete the field.* @@ -103,7 +102,10 @@ Some arguments indicate the use of specific Discord features. These include: - `pk;switch delete all` - Deletes all logged switches. ## Autoproxy commands -- `pk;autoproxy [off|front|latch|]` - Sets your system's autoproxy mode for the current server. +- `pk;autoproxy off` - Disables autoproxying for your system in the current server. +- `pk;autoproxy front` - Sets your system's autoproxy in this server to proxy the first member currently registered as front. +- `pk;autoproxy latch` - Sets your system's autoproxy in this server to proxy the last manually proxied member. +- `pk;autoproxy \` - Sets your system's autoproxy in this server to proxy a specific member. ## Config commands - `pk;config timezone [location]` - Changes the time zone of your system.