internal void UpdateWith(TransportActivity rawActivity) { this.Name = rawActivity?.Name; this.ActivityType = rawActivity != null ? rawActivity.ActivityType : ActivityType.Playing; this.StreamUrl = rawActivity?.StreamUrl; if (rawActivity?.IsRichPresence() == true && this.RichPresence != null) { this.RichPresence.UpdateWith(rawActivity); } else { this.RichPresence = rawActivity?.IsRichPresence() == true ? new DiscordRichPresence(rawActivity) : null; } if (rawActivity?.IsCustomStatus() == true && this.CustomStatus != null) { this.CustomStatus.UpdateWith(rawActivity.State, rawActivity.Emoji); } else { this.CustomStatus = rawActivity?.IsCustomStatus() == true ? new DiscordCustomStatus { Name = rawActivity.State, Emoji = rawActivity.Emoji } } : null; } }
internal DiscordActivity(DiscordActivity other) { this.Name = other.Name; this.ActivityType = other.ActivityType; this.StreamUrl = other.StreamUrl; this.RichPresence = new DiscordRichPresence(other.RichPresence); this.CustomStatus = new DiscordCustomStatus(other.CustomStatus); }
internal DiscordCustomStatus(DiscordCustomStatus other) { this.Name = other.Name; this.Emoji = other.Emoji; }