2021-11-27 02:10:56 +00:00
|
|
|
using Newtonsoft.Json.Linq;
|
2021-10-13 05:02:34 +00:00
|
|
|
|
2021-11-27 02:10:56 +00:00
|
|
|
namespace PluralKit.Core;
|
|
|
|
|
|
|
|
public class SystemGuildSettings
|
|
|
|
{
|
|
|
|
public ulong Guild { get; }
|
|
|
|
public SystemId System { get; }
|
|
|
|
public bool ProxyEnabled { get; } = true;
|
|
|
|
public string? Tag { get; }
|
|
|
|
public bool TagEnabled { get; }
|
|
|
|
}
|
|
|
|
|
|
|
|
public static class SystemGuildExt
|
|
|
|
{
|
2022-03-22 03:43:33 +00:00
|
|
|
public static JObject ToJson(this SystemGuildSettings settings)
|
2020-06-13 14:03:57 +00:00
|
|
|
{
|
2021-11-27 02:10:56 +00:00
|
|
|
var o = new JObject();
|
2020-06-13 14:03:57 +00:00
|
|
|
|
2021-11-27 02:10:56 +00:00
|
|
|
o.Add("proxying_enabled", settings.ProxyEnabled);
|
|
|
|
o.Add("tag", settings.Tag);
|
|
|
|
o.Add("tag_enabled", settings.TagEnabled);
|
2021-08-27 15:03:47 +00:00
|
|
|
|
2021-11-27 02:10:56 +00:00
|
|
|
return o;
|
2020-06-13 14:03:57 +00:00
|
|
|
}
|
|
|
|
}
|