-
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathEvents.cs
More file actions
88 lines (76 loc) · 4.37 KB
/
Events.cs
File metadata and controls
88 lines (76 loc) · 4.37 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
using DiscordRPC.Message;
namespace DiscordRPC.Events
{
/// <summary>
/// Called when the Discord Client is ready to send and receive messages.
/// </summary>
/// <param name="sender">The Discord client handler that sent this event</param>
/// <param name="args">The arguments supplied with the event</param>
public delegate void OnReadyEvent(object sender, ReadyMessage args);
/// <summary>
/// Called when connection to the Discord Client is lost. The connection will remain close and unready to accept messages until the Ready event is called again.
/// </summary>
/// <param name="sender">The Discord client handler that sent this event</param>
/// <param name="args">The arguments supplied with the event</param>
public delegate void OnCloseEvent(object sender, CloseMessage args);
/// <summary>
/// Called when a error has occured during the transmission of a message. For example, if a bad Rich Presence payload is sent, this event will be called explaining what went wrong.
/// </summary>
/// <param name="sender">The Discord client handler that sent this event</param>
/// <param name="args">The arguments supplied with the event</param>
public delegate void OnErrorEvent(object sender, ErrorMessage args);
/// <summary>
/// Called when the Discord Client has updated the presence.
/// </summary>
/// <param name="sender">The Discord client handler that sent this event</param>
/// <param name="args">The arguments supplied with the event</param>
public delegate void OnPresenceUpdateEvent(object sender, PresenceMessage args);
/// <summary>
/// Called when the Discord Client has subscribed to an event.
/// </summary>
/// <param name="sender">The Discord client handler that sent this event</param>
/// <param name="args">The arguments supplied with the event</param>
public delegate void OnSubscribeEvent(object sender, SubscribeMessage args);
/// <summary>
/// Called when the Discord Client has unsubscribed from an event.
/// </summary>
/// <param name="sender">The Discord client handler that sent this event</param>
/// <param name="args">The arguments supplied with the event</param>
public delegate void OnUnsubscribeEvent(object sender, UnsubscribeMessage args);
/// <summary>
/// Called when the Discord Client wishes for this process to join a game.
/// </summary>
/// <param name="sender">The Discord client handler that sent this event</param>
/// <param name="args">The arguments supplied with the event</param>
public delegate void OnJoinEvent(object sender, JoinMessage args);
/// <summary>
/// Called when the Discord Client wishes for this process to spectate a game.
/// </summary>
/// <param name="sender">The Discord client handler that sent this event</param>
/// <param name="args">The arguments supplied with the event</param>
public delegate void OnSpectateEvent(object sender, SpectateMessage args);
/// <summary>
/// Called when another discord user requests permission to join this game.
/// </summary>
/// <param name="sender">The Discord client handler that sent this event</param>
/// <param name="args">The arguments supplied with the event</param>
public delegate void OnJoinRequestedEvent(object sender, JoinRequestMessage args);
/// <summary>
/// The connection to the discord client was succesfull. This is called before <see cref="OnReadyEvent"/>.
/// </summary>
/// <param name="sender">The Discord client handler that sent this event</param>
/// <param name="args">The arguments supplied with the event</param>
public delegate void OnConnectionEstablishedEvent(object sender, ConnectionEstablishedMessage args);
/// <summary>
/// Failed to establish any connection with discord. Discord is potentially not running?
/// </summary>
/// <param name="sender">The Discord client handler that sent this event</param>
/// <param name="args">The arguments supplied with the event</param>
public delegate void OnConnectionFailedEvent(object sender, ConnectionFailedMessage args);
/// <summary>
/// A RPC Message is received.
/// </summary>
/// <param name="sender">The handler that sent this event</param>
/// <param name="msg">The raw message from the RPC</param>
public delegate void OnRpcMessageEvent(object sender, IMessage msg);
}