Files
.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
SDR-RPC/DiscordAPI/RPC/Commands/SubscribeCommand.cs
2020-10-25 16:19:43 +02:00

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
};
}
}
}