internal static RestIntegration Create(BaseDiscordClient discord, IGuild guild, Model model) { var entity = new RestIntegration(discord, guild, model.Id); entity.Update(model); return(entity); }
internal void Update(Model model) { Id = model.Id; Name = model.Name; Type = model.Type; IsRevoked = model.Revoked.IsSpecified ? model.Revoked.Value : null; Integrations = model.Integrations.IsSpecified ?model.Integrations.Value .Select(intergration => RestIntegration.Create(Discord, null, intergration)).ToImmutableArray() : null; Verified = model.Verified; FriendSync = model.FriendSync; ShowActivity = model.ShowActivity; Visibility = model.Visibility; }