mirror of
https://github.com/EnderIce2/SDR-RPC.git
synced 2025-05-25 20:34:26 +00:00
40 lines
821 B
C#
40 lines
821 B
C#
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;
|
|
}
|
|
}
|
|
}
|
|
}
|