예제 #1
0
        internal void Update(GuildMembersChunkModel model)
        {
            Update(model.Members);

            if (model.Presences != null)
            {
                Update(model.Presences);
            }
        }
예제 #2
0
        internal void Update(GuildMembersChunkModel model)
        {
            for (var i = 0; i < model.Members.Length; i++)
            {
                var memberModel = model.Members[i];
                _members.AddOrUpdate(memberModel.User.Id,
                    _ => Client.GetOrCreateMember(this, memberModel, memberModel.User, true),
                    (_, x) =>
                    {
                        x.Update(memberModel);
                        return x;
                    });
            }

            if (model.Presences != null)
                Update(model.Presences);
        }