PluralKit/PluralKit.Core/Models/MemberGuildSettings.cs

25 lines
528 B
C#
Raw Normal View History

2021-10-13 05:02:34 +00:00
using Newtonsoft.Json.Linq;
2021-08-27 15:03:47 +00:00
#nullable enable
namespace PluralKit.Core;
public class MemberGuildSettings
{
public MemberId Member { get; }
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)
2021-10-13 05:02:34 +00:00
{
var o = new JObject();
2021-10-13 05:02:34 +00:00
o.Add("display_name", settings.DisplayName);
o.Add("avatar_url", settings.AvatarUrl);
2021-10-13 05:02:34 +00:00
return o;
2021-10-13 05:02:34 +00:00
}
}