mirror of
https://github.com/PluralKit/PluralKit.git
synced 2026-02-08 23:07:54 +00:00
feat(bot): add option for hid capitalization
This commit is contained in:
parent
a3f1601938
commit
1ce9227b7d
7 changed files with 44 additions and 2 deletions
|
|
@ -20,6 +20,7 @@ public class SystemConfigPatch: PatchObject
|
|||
public Partial<bool> CaseSensitiveProxyTags { get; set; }
|
||||
public Partial<bool> ProxyErrorMessageEnabled { get; set; }
|
||||
public Partial<bool> HidDisplaySplit { get; set; }
|
||||
public Partial<bool> HidDisplayCaps { get; set; }
|
||||
|
||||
|
||||
public override Query Apply(Query q) => q.ApplyPatch(wrapper => wrapper
|
||||
|
|
@ -35,6 +36,7 @@ public class SystemConfigPatch: PatchObject
|
|||
.With("case_sensitive_proxy_tags", CaseSensitiveProxyTags)
|
||||
.With("proxy_error_message_enabled", ProxyErrorMessageEnabled)
|
||||
.With("hid_display_split", HidDisplaySplit)
|
||||
.With("hid_display_caps", HidDisplayCaps)
|
||||
);
|
||||
|
||||
public new void AssertIsValid()
|
||||
|
|
@ -93,6 +95,9 @@ public class SystemConfigPatch: PatchObject
|
|||
if (HidDisplaySplit.IsPresent)
|
||||
o.Add("hid_display_split", HidDisplaySplit.Value);
|
||||
|
||||
if (HidDisplayCaps.IsPresent)
|
||||
o.Add("hid_display_caps", HidDisplayCaps.Value);
|
||||
|
||||
return o;
|
||||
}
|
||||
|
||||
|
|
@ -127,6 +132,9 @@ public class SystemConfigPatch: PatchObject
|
|||
if (o.ContainsKey("hid_display_split"))
|
||||
patch.HidDisplaySplit = o.Value<bool>("hid_display_split");
|
||||
|
||||
if (o.ContainsKey("hid_display_caps"))
|
||||
patch.HidDisplayCaps = o.Value<bool>("hid_display_caps");
|
||||
|
||||
return patch;
|
||||
}
|
||||
}
|
||||
|
|
@ -22,6 +22,7 @@ public class SystemConfig
|
|||
public bool CaseSensitiveProxyTags { get; }
|
||||
public bool ProxyErrorMessageEnabled { get; }
|
||||
public bool HidDisplaySplit { get; }
|
||||
public bool HidDisplayCaps { get; }
|
||||
}
|
||||
|
||||
public static class SystemConfigExt
|
||||
|
|
@ -41,6 +42,7 @@ public static class SystemConfigExt
|
|||
o.Add("case_sensitive_proxy_tags", cfg.CaseSensitiveProxyTags);
|
||||
o.Add("proxy_error_message_enabled", cfg.ProxyErrorMessageEnabled);
|
||||
o.Add("hid_display_split", cfg.HidDisplaySplit);
|
||||
o.Add("hid_display_caps", cfg.HidDisplayCaps);
|
||||
|
||||
o.Add("description_templates", JArray.FromObject(cfg.DescriptionTemplates));
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue