internal override void Update(PresenceUpdateModel model) { base.Update(model); if (IsBot) { _status = model.Status; _activity = model.Game != null ? Activity.Create(model.Game) : null; } }
internal override void Update(PresenceUpdateModel model) { SharedUser.Update(model); if (IsBot) { // Users cannot have different statuses for different guilds // due to the lack of sharding support. _presence = model.Status != UserStatus.Offline ? new Presence(true, model) : null; } }
internal Presence(bool isBot, PresenceUpdateModel model) { Status = model.Status; Activity = model.Game != null ? Activity.Create(model.Game) : null; if (!isBot) { _statuses = model.ClientStatus.ReadOnly(); _activities = model.Game != null ? model.Activities.ToReadOnlyList(x => Activity.Create(x)) : ReadOnlyList <Activity> .Empty; } }
internal override void Update(PresenceUpdateModel model) => throw new InvalidOperationException();
internal virtual void Update(PresenceUpdateModel model) => SharedUser.Update(model);