namespace DiscordRPC.Message { /// /// Representation of the message received by discord when the presence has been updated. /// public class PresenceMessage : IMessage { /// /// The type of message received from discord /// public override MessageType Type { get { return MessageType.PresenceUpdate; } } internal PresenceMessage() : this(null) { } internal PresenceMessage(RichPresenceResponse rpr) { if (rpr == null) { Presence = null; Name = "No Rich Presence"; ApplicationID = ""; } else { Presence = (RichPresence)rpr; Name = rpr.Name; ApplicationID = rpr.ClientID; } } /// /// The rich presence Discord has set /// public RichPresence Presence { get; internal set; } /// /// The name of the application Discord has set it for /// public string Name { get; internal set; } /// /// The ID of the application discord has set it for /// public string ApplicationID { get; internal set; } } }