PluralKit/PluralKit.Core/Models/SystemGuildSettings.cs

30 lines
770 B
C#
Raw Normal View History

using Newtonsoft.Json.Linq;
2021-10-13 01:02:34 -04: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 string? AvatarUrl { get; }
public string? DisplayName { get; }
}
public static class SystemGuildExt
{
public static JObject ToJson(this SystemGuildSettings settings)
{
var o = new JObject();
o.Add("proxying_enabled", settings.ProxyEnabled);
o.Add("tag", settings.Tag);
o.Add("tag_enabled", settings.TagEnabled);
o.Add("avatar_url", settings.AvatarUrl);
o.Add("display_name", settings.DisplayName);
2021-08-27 11:03:47 -04:00
return o;
}
}