mirror of
https://github.com/EnderIce2/SDR-RPC.git
synced 2025-07-12 08:09:13 +00:00
First commit
This commit is contained in:
39
DiscordAPI/Message/UnsubscribeMsesage.cs
Normal file
39
DiscordAPI/Message/UnsubscribeMsesage.cs
Normal file
@ -0,0 +1,39 @@
|
||||
using DiscordRPC.RPC.Payload;
|
||||
|
||||
namespace DiscordRPC.Message
|
||||
{
|
||||
/// <summary>
|
||||
/// Called as validation of a subscribe
|
||||
/// </summary>
|
||||
public class UnsubscribeMessage : IMessage
|
||||
{
|
||||
/// <summary>
|
||||
/// The type of message received from discord
|
||||
/// </summary>
|
||||
public override MessageType Type { get { return MessageType.Unsubscribe; } }
|
||||
|
||||
/// <summary>
|
||||
/// The event that was subscribed too.
|
||||
/// </summary>
|
||||
public EventType Event { get; internal set; }
|
||||
|
||||
internal UnsubscribeMessage(ServerEvent evt)
|
||||
{
|
||||
switch (evt)
|
||||
{
|
||||
default:
|
||||
case ServerEvent.ActivityJoin:
|
||||
Event = EventType.Join;
|
||||
break;
|
||||
|
||||
case ServerEvent.ActivityJoinRequest:
|
||||
Event = EventType.JoinRequest;
|
||||
break;
|
||||
|
||||
case ServerEvent.ActivitySpectate:
|
||||
Event = EventType.Spectate;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user