Exemplo n.º 1
0
        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;
        }
Exemplo n.º 2
0
 internal RestTeamMember(RestTeam team, TeamMemberModel model) : base(team.Client, model.User)
 {
     Team            = team;
     MembershipState = model.MembershipState;
     Permissions     = model.Permissions.ReadOnly();
 }