summaryrefslogtreecommitdiff
path: root/discord/consts.lua
blob: 4727ef6fe2f96c913dce315ce6e52c17b2410e5d (plain)
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
local function flip(t)
for k,v in pairs(t) do t[v]=k end return t end

local opcodes = flip {
[0] = "dispatch",
[1] = "heartbeat",
[2] = "identify",
[3] = "presence update",
[4] = "voice state update",
[6] = "resume",
[7] = "reconnect",
[8] = "request guild members",
[9] = "invalid session",
[10] = "hello",
[11] = "heartbeat ack",
[31] = "request soundboard sounds",
}

local intents = flip {
guilds = 1 << 0,
guild_members = 1 << 1,
guild_moderation = 1 << 2,
guild_expressions = 1 << 3,
guild_integrations = 1 << 4,
guild_webhooks = 1 << 5,
guild_invites = 1 << 6,
guild_voice_states = 1 << 7,
guild_presences = 1 << 8,
guild_messages = 1 << 9,
guild_message_reactions = 1 << 10,
guild_message_typing = 1 << 11,
direct_messages = 1 << 12,
direct_message_reactions = 1 << 13,
direct_message_typing = 1 << 14,
message_content = 1 << 15,
guild_scheduled_events = 1 << 16,
auto_moderation_configuration = 1 << 20,
auto_moderation_execution = 1 << 21,
guild_message_polls = 1 << 24,
direct_message_polls = 1 << 25,
}
return {
	opcodes = opcodes,
	intents = intents,
}