internal void Update(ApplicationModel model) { Name = model.Name; IconHash = model.Icon; Description = model.Description; RpcOrigins = RpcOrigins != null ? model.RpcOrigins.ReadOnly() : ReadOnlyList <string> .Empty; IsBotPublic = model.BotPublic; BotRequiresCodeGrant = model.BotRequireCodeGrant; if (model.Owner != null) { if (Owner == null) { Owner = new RestUser(Client, model.Owner); } else { Owner.Update(model.Owner); } } if (model.Team != null) { Team = new RestTeam(Client, model.Team); } Summary = model.Summary; VerifyKey = model.VerifyKey; PrimarySkuId = model.PrimarySkuId; SlugUrl = model.Slug; CoverImageHash = model.CoverImage; }
internal RestMessage(RestDiscordClient client, MessageModel model) : base(client, model.Id) { ChannelId = model.ChannelId; GuildId = model.GuildId; Author = new RestUser(client, model.Author.Value); }
internal RestDmChannel(RestDiscordClient client, ChannelModel model) : base(client, model) { Recipient = new RestUser(Client, model.Recipients.Value[0]); Update(model); }