feat: upgrade to .NET 6, refactor everything
This commit is contained in:
@@ -1,26 +1,25 @@
|
||||
using Newtonsoft.Json.Linq;
|
||||
|
||||
#nullable enable
|
||||
namespace PluralKit.Core
|
||||
namespace PluralKit.Core;
|
||||
|
||||
public class MemberGuildSettings
|
||||
{
|
||||
public class MemberGuildSettings
|
||||
public MemberId Member { get; }
|
||||
public ulong Guild { get; }
|
||||
public string? DisplayName { get; }
|
||||
public string? AvatarUrl { get; }
|
||||
}
|
||||
|
||||
public static class MemberGuildExt
|
||||
{
|
||||
public static JObject ToJson(this MemberGuildSettings settings)
|
||||
{
|
||||
public MemberId Member { get; }
|
||||
public ulong Guild { get; }
|
||||
public string? DisplayName { get; }
|
||||
public string? AvatarUrl { get; }
|
||||
}
|
||||
var o = new JObject();
|
||||
|
||||
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);
|
||||
|
||||
o.Add("display_name", settings.DisplayName);
|
||||
o.Add("avatar_url", settings.AvatarUrl);
|
||||
|
||||
return o;
|
||||
}
|
||||
return o;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user