2021-10-13 05:02:34 +00:00
|
|
|
using Newtonsoft.Json.Linq;
|
|
|
|
|
2021-08-27 15:03:47 +00:00
|
|
|
#nullable enable
|
2020-06-13 14:03:57 +00:00
|
|
|
namespace PluralKit.Core
|
|
|
|
{
|
|
|
|
public class MemberGuildSettings
|
|
|
|
{
|
2020-06-14 19:37:04 +00:00
|
|
|
public MemberId Member { get; }
|
2020-06-13 14:03:57 +00:00
|
|
|
public ulong Guild { get; }
|
|
|
|
public string? DisplayName { get; }
|
|
|
|
public string? AvatarUrl { get; }
|
|
|
|
}
|
2021-10-13 05:02:34 +00:00
|
|
|
|
|
|
|
public static class MemberGuildExt
|
|
|
|
{
|
|
|
|
public static JObject ToJson(this MemberGuildSettings settings)
|
|
|
|
{
|
|
|
|
var o = new JObject();
|
|
|
|
|
|
|
|
o.Add("display_name", settings.DisplayName);
|
|
|
|
o.Add("avatar_url", settings.AvatarUrl);
|
|
|
|
|
|
|
|
return o;
|
|
|
|
}
|
|
|
|
}
|
2020-06-13 14:03:57 +00:00
|
|
|
}
|