mirror of
https://github.com/EnderIce2/SDR-RPC.git
synced 2025-07-12 06:39:14 +00:00
First commit
This commit is contained in:
40
DiscordAPI/Message/SubscribeMessage.cs
Normal file
40
DiscordAPI/Message/SubscribeMessage.cs
Normal file
@ -0,0 +1,40 @@
|
||||
using DiscordRPC.RPC.Payload;
|
||||
|
||||
namespace DiscordRPC.Message
|
||||
{
|
||||
/// <summary>
|
||||
/// Called as validation of a subscribe
|
||||
/// </summary>
|
||||
public class SubscribeMessage : IMessage
|
||||
{
|
||||
/// <summary>
|
||||
/// The type of message received from discord
|
||||
/// </summary>
|
||||
public override MessageType Type { get { return MessageType.Subscribe; } }
|
||||
|
||||
/// <summary>
|
||||
/// The event that was subscribed too.
|
||||
/// </summary>
|
||||
public EventType Event { get; internal set; }
|
||||
|
||||
internal SubscribeMessage(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