2021-11-26 21:10:56 -05:00
|
|
|
using Newtonsoft.Json.Linq;
|
2021-10-13 01:02:34 -04:00
|
|
|
|
2021-11-26 21:10:56 -05: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-21 23:43:33 -04:00
|
|
|
public static JObject ToJson(this SystemGuildSettings settings)
|
2020-06-13 16:03:57 +02:00
|
|
|
{
|
2021-11-26 21:10:56 -05:00
|
|
|
var o = new JObject();
|
2020-06-13 16:03:57 +02:00
|
|
|
|
2021-11-26 21:10:56 -05:00
|
|
|
o.Add("proxying_enabled", settings.ProxyEnabled);
|
|
|
|
o.Add("tag", settings.Tag);
|
|
|
|
o.Add("tag_enabled", settings.TagEnabled);
|
2021-08-27 11:03:47 -04:00
|
|
|
|
2021-11-26 21:10:56 -05:00
|
|
|
return o;
|
2020-06-13 16:03:57 +02:00
|
|
|
}
|
|
|
|
}
|