示例#1
0
 internal void Update(ClientState state, PresenceModel model, bool updatePresence)
 {
     if (updatePresence)
     {
         Presence = SocketPresence.Create(model);
         GlobalUser.Update(state, model);
     }
     if (model.Nick.IsSpecified)
     {
         Nickname = model.Nick.Value;
     }
     if (model.Roles.IsSpecified)
     {
         UpdateRoles(model.Roles.Value);
     }
 }
示例#2
0
 internal virtual void Update(ClientState state, PresenceModel model)
 {
     Presence = SocketPresence.Create(model);
     Update(state, model.User);
 }
示例#3
0
 internal void Update(ClientState state, PresenceModel model)
 {
     Presence  = SocketPresence.Create(model);
     DMChannel = state.DMChannels.FirstOrDefault(x => x.Recipient.Id == Id);
 }
示例#4
0
 internal void Update(ClientState state, PresenceModel model)
 {
     Presence = SocketPresence.Create(model);
 }