internal RestAuditLog(RestDiscordClient client, AuditLogModel log, AuditLogEntryModel entry) : base(client, entry.Id) { ResponsibleUserId = entry.UserId; ResponsibleUser = new RestDownloadable <RestUser>(options => client.GetUserAsync(ResponsibleUserId, options)); var userModel = Array.Find(log.Users, x => x.Id == entry.UserId); if (userModel != null) { ResponsibleUser.SetValue(new RestUser(client, userModel)); } Reason = entry.Reason; }
internal DownloadableOptionalSnowflakeEntity(T value, Snowflake id, RestDownloadableDelegate <TDownloadable> func) : base(value, id) { Downloadable = new RestDownloadable <TDownloadable>(func); }