using System; using System.IO; using System.Threading; using System.Threading.Tasks; using Luski.net.Enums; using Luski.Shared.PublicServers.V1.Enums; namespace Luski.net.Structures.Public; public class ServerProfile { public PublicServer Server { get; init; } = default!; public long ID { get; init; } = default!; public string DisplayName { get; init; } = default!; public PictureType? PictureType { get; init; } = default!; public long[] Controllers { get; internal set; } = default!; public long[] RoleControllers { get; internal set; } = default!; public async Task GetAvatar(CancellationToken CancellationToken) { bool isc = System.IO.File.Exists(Server.Storage.GetStorageDirectory(StorageDirectory.ProfileAvatars) + ID.ToString()); if (!isc) await Server.GetFromServer($"socketprofile/Avatar/{ID}", Server.Storage.GetStorageDirectory(StorageDirectory.ProfileAvatars) + ID.ToString(), CancellationToken); return Server.Storage.GetResourceStream(StorageDirectory.ProfileAvatars, ID.ToString()); } public Task GetUserKeys(CancellationToken CancellationToken) { throw new NotImplementedException(); } }