Merge remote-tracking branch 'upstream/main' into rust-command-parser

This commit is contained in:
dusk 2025-09-26 15:16:54 +00:00
commit b353dcbda2
No known key found for this signature in database
94 changed files with 2575 additions and 738 deletions

View file

@ -123,6 +123,13 @@ public class Config
"off"
));
items.Add(new(
"show color",
"Whether to show color codes in system/member/group cards",
EnabledDisabled(ctx.Config.CardShowColorHex),
"disabled"
));
items.Add(new(
"Proxy Switch",
"Switching behavior when proxy tags are used",
@ -575,6 +582,20 @@ public class Config
else throw new PKError(badInputError);
}
public async Task CardShowColorHex(Context ctx)
{
if (!ctx.HasNext())
{
var msg = $"Showing color codes on system/member/group cards is currently **{EnabledDisabled(ctx.Config.CardShowColorHex)}**.";
await ctx.Reply(msg);
return;
}
var newVal = ctx.MatchToggle(false);
await ctx.Repository.UpdateSystemConfig(ctx.System.Id, new() { CardShowColorHex = newVal });
await ctx.Reply($"Showing color codes on system/member/group cards is now {EnabledDisabled(newVal)}.");
}
public async Task ProxySwitch(Context ctx)
{
if (!ctx.HasNext())