Exemple #1
0
 internal void Update(Model model)
 {
     _iconId     = model.Icon;
     IsOwner     = model.Owner;
     Name        = model.Name;
     Permissions = new GuildPermissions(model.Permissions);
 }
Exemple #2
0
        internal static RestUserGuild Create(BaseDiscordClient discord, Model model)
        {
            var entity = new RestUserGuild(discord, model.Id);

            entity.Update(model);
            return(entity);
        }
Exemple #3
0
        public void Update(Model model, UpdateSource source)
        {
            if (source == UpdateSource.Rest && IsAttached)
            {
                return;
            }

            _iconId     = model.Icon;
            IsOwner     = model.Owner;
            Name        = model.Name;
            Permissions = new GuildPermissions(model.Permissions);
        }
Exemple #4
0
 public UserGuild(DiscordRestClient discord, Model model)
     : base(model.Id)
 {
     Discord = discord;
     Update(model, UpdateSource.Creation);
 }