mirror of
https://github.com/PluralKit/PluralKit.git
synced 2026-02-10 15:57:53 +00:00
feat: config setting to automatically set members/groups to private when creating
This commit is contained in:
parent
7c37726afb
commit
1ff6bb76cd
10 changed files with 140 additions and 24 deletions
|
|
@ -481,6 +481,10 @@ public partial class CommandTree
|
|||
return ctx.Execute<Config>(null, m => m.SystemTimezone(ctx));
|
||||
if (ctx.Match("ping"))
|
||||
return ctx.Execute<Config>(null, m => m.SystemPing(ctx));
|
||||
if (ctx.MatchMultiple(new[] { "private member" }) || ctx.Match("mp"))
|
||||
return ctx.Execute<Config>(null, m => m.MemberDefaultPrivacy(ctx));
|
||||
if (ctx.MatchMultiple(new[] { "private group" }) || ctx.Match("gp"))
|
||||
return ctx.Execute<Config>(null, m => m.GroupDefaultPrivacy(ctx));
|
||||
|
||||
// todo: maybe add the list of configuration keys here?
|
||||
return ctx.Reply($"{Emojis.Error} Could not find a setting with that name. Please see `pk;commands config` for the list of possible config settings.");
|
||||
|
|
@ -492,7 +496,6 @@ public partial class CommandTree
|
|||
await ctx.Reply(
|
||||
$"{Emojis.Error} Unknown command `pk;{ctx.FullCommand().Truncate(100)}`. Perhaps you meant to use one of the following commands?\n{commandListStr}\n\nFor a full list of possible commands, see <https://pluralkit.me/commands>.");
|
||||
}
|
||||
|
||||
private async Task PrintCommandExpectedError(Context ctx, params Command[] potentialCommands)
|
||||
{
|
||||
var commandListStr = CreatePotentialCommandList(potentialCommands);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue