mirror of
https://github.com/PluralKit/PluralKit.git
synced 2026-02-04 04:56:49 +00:00
feat(bot): config setting to pad 5-character ids in lists
This commit is contained in:
parent
0a6d4bcb76
commit
6d49961daf
7 changed files with 86 additions and 3 deletions
|
|
@ -23,6 +23,14 @@ public class SystemConfig
|
|||
public bool ProxyErrorMessageEnabled { get; }
|
||||
public bool HidDisplaySplit { get; }
|
||||
public bool HidDisplayCaps { get; }
|
||||
public HidPadFormat HidListPadding { get; }
|
||||
|
||||
public enum HidPadFormat
|
||||
{
|
||||
None = 0,
|
||||
Left = 1,
|
||||
Right = 2,
|
||||
}
|
||||
}
|
||||
|
||||
public static class SystemConfigExt
|
||||
|
|
@ -43,9 +51,16 @@ public static class SystemConfigExt
|
|||
o.Add("proxy_error_message_enabled", cfg.ProxyErrorMessageEnabled);
|
||||
o.Add("hid_display_split", cfg.HidDisplaySplit);
|
||||
o.Add("hid_display_caps", cfg.HidDisplayCaps);
|
||||
o.Add("hid_list_padding", cfg.HidListPadding.ToUserString());
|
||||
|
||||
o.Add("description_templates", JArray.FromObject(cfg.DescriptionTemplates));
|
||||
|
||||
return o;
|
||||
}
|
||||
|
||||
public static string ToUserString(this SystemConfig.HidPadFormat val)
|
||||
{
|
||||
if (val == SystemConfig.HidPadFormat.None) return "off";
|
||||
return val.ToString().ToLower();
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue