From fc45d356f86c70d0ba6e48704201a20588f9e177 Mon Sep 17 00:00:00 2001 From: Jake Fulmine Date: Fri, 11 Aug 2023 11:39:00 +0200 Subject: [PATCH] fix: make clearing server keepproxy more obvious --- PluralKit.Bot/CommandMeta/CommandHelp.cs | 2 +- PluralKit.Bot/Commands/MemberEdit.cs | 18 +++++++++--------- docs/content/command-list.md | 2 +- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/PluralKit.Bot/CommandMeta/CommandHelp.cs b/PluralKit.Bot/CommandMeta/CommandHelp.cs index 8a08635f..abfb9e35 100644 --- a/PluralKit.Bot/CommandMeta/CommandHelp.cs +++ b/PluralKit.Bot/CommandMeta/CommandHelp.cs @@ -55,7 +55,7 @@ public partial class CommandTree public static Command MemberAutoproxy = new Command("member autoproxy", "member autoproxy [on|off]", "Sets whether a member will be autoproxied when autoproxy is set to latch or front mode."); public static Command MemberKeepProxy = new Command("member keepproxy", "member keepproxy [on|off]", "Sets whether to include a member's proxy tags when proxying"); public static Command MemberTts = new Command("member text-to-speech", "member text-to-speech [on|off]", "Sets whether to send a member's messages as text-to-speech messages."); - public static Command MemberServerKeepProxy = new Command("member server keepproxy", "member serverkeepproxy [on|off]", "Sets whether to include a member's proxy tags when proxying in the current server."); + public static Command MemberServerKeepProxy = new Command("member server keepproxy", "member serverkeepproxy [on|off|clear]", "Sets whether to include a member's proxy tags when proxying in the current server."); public static Command MemberRandom = new Command("system random", "system [system] random", "Shows the info card of a randomly selected member in a system."); public static Command MemberId = new Command("member id", "member [member] id", "Prints a member's id."); public static Command MemberPrivacy = new Command("member privacy", "member privacy ", "Changes a members's privacy settings"); diff --git a/PluralKit.Bot/Commands/MemberEdit.cs b/PluralKit.Bot/Commands/MemberEdit.cs index 35f7704d..fdb43edd 100644 --- a/PluralKit.Bot/Commands/MemberEdit.cs +++ b/PluralKit.Bot/Commands/MemberEdit.cs @@ -519,9 +519,9 @@ public class MemberEdit keepProxyStatusMessage += "This member has keepproxy **disabled**. Proxy tags will **not** be included in the resulting message when proxying."; if (memberGuildConfig.KeepProxy.HasValue && memberGuildConfig.KeepProxy.Value) - keepProxyStatusMessage += $"\n{Emojis.Warn} This member has keepproxy **enabled in this server**, which means proxy tags will **always** be included when proxying in this server, regardless of the global keepproxy."; + keepProxyStatusMessage += $"\n{Emojis.Warn} This member has keepproxy **enabled in this server**, which means proxy tags will **always** be included when proxying in this server, regardless of the global keepproxy. To clear this setting in this server, type `pk;m serverkeepproxy clear`."; else if (memberGuildConfig.KeepProxy.HasValue && !memberGuildConfig.KeepProxy.Value) - keepProxyStatusMessage += $"\n{Emojis.Warn} This member has keepproxy **disabled in this server**, which means proxy tags will **never** be included when proxying in this server, regardless of the global keepproxy."; + keepProxyStatusMessage += $"\n{Emojis.Warn} This member has keepproxy **disabled in this server**, which means proxy tags will **never** be included when proxying in this server, regardless of the global keepproxy. To clear this setting in this server, type `pk;m serverkeepproxy clear`."; await ctx.Reply(keepProxyStatusMessage); return; @@ -540,9 +540,9 @@ public class MemberEdit keepProxyUpdateMessage += $"{Emojis.Success} this member now has keepproxy **disabled**. Member proxy tags will be **included** in the resulting message when proxying."; if (memberGuildConfig.KeepProxy.HasValue && memberGuildConfig.KeepProxy.Value) - keepProxyUpdateMessage += $"\n{Emojis.Warn} This member has keepproxy **enabled in this server**, which means proxy tags will **always** be included when proxying in this server, regardless of the global keepproxy."; + keepProxyUpdateMessage += $"\n{Emojis.Warn} This member has keepproxy **enabled in this server**, which means proxy tags will **always** be included when proxying in this server, regardless of the global keepproxy. To clear this setting in this server, type `pk;m serverkeepproxy clear`."; else if (memberGuildConfig.KeepProxy.HasValue && !memberGuildConfig.KeepProxy.Value) - keepProxyUpdateMessage += $"\n{Emojis.Warn} This member has keepproxy **disabled in this server**, which means proxy tags will **never** be included when proxying in this server, regardless of the global keepproxy."; + keepProxyUpdateMessage += $"\n{Emojis.Warn} This member has keepproxy **disabled in this server**, which means proxy tags will **never** be included when proxying in this server, regardless of the global keepproxy. To clear this setting in this server, type `pk;m serverkeepproxy clear`."; await ctx.Reply(keepProxyUpdateMessage); } @@ -569,17 +569,17 @@ public class MemberEdit } else if (ctx.HasNext()) { - throw new PKSyntaxError("You must pass either \"on\" or \"off\"."); + throw new PKSyntaxError("You must pass either \"on\", \"off\" or \"clear\"."); } else { if (memberGuildConfig.KeepProxy.HasValue) if (memberGuildConfig.KeepProxy.Value) await ctx.Reply( - "This member has keepproxy **enabled** in the current server, which means proxy tags will be **included** in the resulting message when proxying."); + "This member has keepproxy **enabled** in the current server, which means proxy tags will be **included** in the resulting message when proxying. To clear this setting in this server, type `pk;m serverkeepproxy clear`."); else await ctx.Reply( - "This member has keepproxy **disabled** in the current server, which means proxy tags will **not** be included in the resulting message when proxying."); + "This member has keepproxy **disabled** in the current server, which means proxy tags will **not** be included in the resulting message when proxying. To clear this setting in this server, type `pk;m serverkeepproxy clear`."); else { var noServerKeepProxySetMessage = "This member does not have a server keepproxy override set."; @@ -599,10 +599,10 @@ public class MemberEdit if (newValue.HasValue) if (newValue.Value) await ctx.Reply( - $"{Emojis.Success} Member proxy tags will now be **included** in the resulting message when proxying **in the current server**."); + $"{Emojis.Success} Member proxy tags will now be **included** in the resulting message when proxying **in the current server**. To clear this setting in this server, type `pk;m serverkeepproxy clear`."); else await ctx.Reply( - $"{Emojis.Success} Member proxy tags will now **not** be included in the resulting message when proxying **in the current server**."); + $"{Emojis.Success} Member proxy tags will now **not** be included in the resulting message when proxying **in the current server**. To clear this setting in this server, type `pk;m serverkeepproxy clear`."); else { var serverKeepProxyClearedMessage = $"{Emojis.Success} Cleared server keepproxy settings for this member."; diff --git a/docs/content/command-list.md b/docs/content/command-list.md index 30cc254e..bab26200 100644 --- a/docs/content/command-list.md +++ b/docs/content/command-list.md @@ -92,7 +92,7 @@ You can have a space after `pk;`, e.g. `pk;system` and `pk; system` will do the - `pk;member proxy remove [tags]` - Removes a proxy tag from a member. - `pk;member autoproxy [on|off]` - Sets whether a member will be autoproxied when autoproxy is set to latch or front mode. - `pk;member keepproxy [on|off]` - Sets whether to include a member's proxy tags in the proxied message. -- `pk;member serverkeepproxy [on|off]` - Sets whether to include a member's proxy tag in the proxied message in a specific server. +- `pk;member serverkeepproxy [on|off|clear]` - Sets whether to include a member's proxy tag in the proxied message in a specific server. - `pk;member tts [on|off]` - Sets whether to send a member's messages as text-to-speech messages. - `pk;member pronouns [pronouns]` - Changes the pronouns of a member. - `pk;member color [color]` - Changes the color of a member.