First commit

This commit is contained in:
EnderIce2
2020-10-25 16:19:43 +02:00
parent 9d78d84acb
commit b91db81473
73 changed files with 7634 additions and 0 deletions

View File

@ -0,0 +1,47 @@

namespace DiscordRPC.Message
{
/// <summary>
/// Representation of the message received by discord when the presence has been updated.
/// </summary>
public class PresenceMessage : IMessage
{
/// <summary>
/// The type of message received from discord
/// </summary>
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;
}
}
/// <summary>
/// The rich presence Discord has set
/// </summary>
public RichPresence Presence { get; internal set; }
/// <summary>
/// The name of the application Discord has set it for
/// </summary>
public string Name { get; internal set; }
/// <summary>
/// The ID of the application discord has set it for
/// </summary>
public string ApplicationID { get; internal set; }
}
}