This repository was archived by the owner on Aug 15, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathGatewayOpcode.cs
More file actions
63 lines (52 loc) · 1.52 KB
/
GatewayOpcode.cs
File metadata and controls
63 lines (52 loc) · 1.52 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
namespace SimpleDiscord;
/// <summary>
/// Represents an opcode that is used in the WebSocket connection with Discord in the <see cref="DiscordClient"/> class.
/// </summary>
/// <seealso href="https://discord.com/developers/docs/topics/opcodes-and-status-codes#gateway-opcodes"/>
enum GatewayOpcode
{
/// <summary>
/// An event was dispatched.
/// </summary>
Dispatch = 0,
/// <summary>
/// Fired periodically by the client to keep the connection alive.
/// </summary>
Heartbeat = 1,
/// <summary>
/// Starts a new session during the initial handshake.
/// </summary>
Identify = 2,
/// <summary>
/// Update the client's presence.
/// </summary>
PresenceUpdate = 3,
/// <summary>
/// Used to join/leave or move between voice channels.
/// </summary>
VoiceStateUpdate = 4,
/// <summary>
/// Resume a previous session that was disconnected.
/// </summary>
Resume = 6,
/// <summary>
/// You should attempt to reconnect and resume immediately.
/// </summary>
Reconnect = 7,
/// <summary>
/// Request information about offline guild members in a large guild.
/// </summary>
RequestGuildMembers = 8,
/// <summary>
/// The session has been invalidated. You should reconnect and identify/resume accordingly.
/// </summary>
InvalidSession = 9,
/// <summary>
/// Sent immediately after connecting, contains the <c>heartbeat_interval</c> to use.
/// </summary>
Hello = 10,
/// <summary>
/// Sent in response to receiving a heartbeat to acknowledge that it has been received.
/// </summary>
HeartbeatAck = 11
}