mirror of
https://github.com/EnderIce2/SDR-RPC.git
synced 2025-07-12 15:29:15 +00:00
First commit
This commit is contained in:
32
DiscordAPI/RPC/Commands/RespondCommand.cs
Normal file
32
DiscordAPI/RPC/Commands/RespondCommand.cs
Normal file
@ -0,0 +1,32 @@
|
||||
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 RespondCommand : ICommand
|
||||
{
|
||||
/// <summary>
|
||||
/// The user ID that we are accepting / rejecting
|
||||
/// </summary>
|
||||
[JsonProperty("user_id")]
|
||||
public string UserID { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// If true, the user will be allowed to connect.
|
||||
/// </summary>
|
||||
[JsonIgnore]
|
||||
public bool Accept { get; set; }
|
||||
|
||||
public IPayload PreparePayload(long nonce)
|
||||
{
|
||||
return new ArgumentPayload(this, nonce)
|
||||
{
|
||||
Command = Accept ? Command.SendActivityJoinInvite : Command.CloseActivityJoinRequest
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user