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