mirror of
https://github.com/EnderIce2/SDR-RPC.git
synced 2025-07-18 09:31:40 +00:00
.github
DiscordAPI
Converters
Exceptions
Helper
IO
Logging
Message
RPC
Commands
CloseCommand.cs
ICommand.cs
PresenceCommand.cs
RespondCommand.cs
SubscribeCommand.cs
Payload
RpcConnection.cs
Registry
Web
Configuration.cs
DiscordRpcClient.cs
EventType.cs
Events.cs
LICENSE.txt
RichPresence.cs
User.cs
Properties
.editorconfig
.gitattributes
.gitignore
LICENSE
LogWriter.cs
MainPlugin.cs
README.md
Register.txt
SDRSharpPlugin.DiscordRPC.csproj
SDRSharpPlugin.DiscordRPC.sln
SettingsPanel.Designer.cs
SettingsPanel.cs
SettingsPanel.resx
TopWindowMessages.Designer.cs
TopWindowMessages.cs
TopWindowMessages.resx
WelcomeForm.Designer.cs
WelcomeForm.cs
WelcomeForm.resx
packages.config
24 lines
481 B
C#
24 lines
481 B
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using DiscordRPC.RPC.Payload;
|
|
|
|
namespace DiscordRPC.RPC.Commands
|
|
{
|
|
internal class SubscribeCommand : ICommand
|
|
{
|
|
public ServerEvent Event { get; set; }
|
|
public bool IsUnsubscribe { get; set; }
|
|
|
|
public IPayload PreparePayload(long nonce)
|
|
{
|
|
return new EventPayload(nonce)
|
|
{
|
|
Command = IsUnsubscribe ? Command.Unsubscribe : Command.Subscribe,
|
|
Event = Event
|
|
};
|
|
}
|
|
}
|
|
}
|