using Luski.net.JsonTypes.BaseTypes; using System.Linq; using System.Text.Json.Serialization; using System.Threading; namespace Luski.net.Structures.Main; public class MainSocketDMChannel : MainSocketTextChannel { public MainSocketRemoteUser User { get { if (_user is null) { var list = MemberIdList.ToList(); list.Remove(Server.User.Id); _user = Server.GetUser(list.FirstOrDefault(), CancellationToken.None).Result; } return _user; } } public MainSocketRemoteUser _user = null!; } [JsonSerializable(typeof(MainSocketDMChannel))] [JsonSourceGenerationOptions( GenerationMode = JsonSourceGenerationMode.Default, PropertyNamingPolicy = JsonKnownNamingPolicy.CamelCase, WriteIndented = false)] internal partial class MainSocketDMChannelContext : JsonSerializerContext { }