mirror of
https://github.com/EnderIce2/SDR-RPC.git
synced 2025-05-25 19:54:26 +00:00
33 lines
637 B
C#
33 lines
637 B
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using DiscordRPC.RPC.Payload;
|
|
using Newtonsoft.Json;
|
|
|
|
namespace DiscordRPC.RPC.Commands
|
|
{
|
|
internal class PresenceCommand : ICommand
|
|
{
|
|
/// <summary>
|
|
/// The process ID
|
|
/// </summary>
|
|
[JsonProperty("pid")]
|
|
public int PID { get; set; }
|
|
|
|
/// <summary>
|
|
/// The rich presence to be set. Can be null.
|
|
/// </summary>
|
|
[JsonProperty("activity")]
|
|
public RichPresence Presence { get; set; }
|
|
|
|
public IPayload PreparePayload(long nonce)
|
|
{
|
|
return new ArgumentPayload(this, nonce)
|
|
{
|
|
Command = Command.SetActivity
|
|
};
|
|
}
|
|
}
|
|
}
|