diff options
author | ubq323 <ubq323@ubq323.website> | 2025-02-25 23:36:28 +0000 |
---|---|---|
committer | ubq323 <ubq323@ubq323.website> | 2025-02-25 23:36:28 +0000 |
commit | e03937bbe51f3dd8e0d8ecc732999f5c4578fa94 (patch) | |
tree | 7c4e9c9427eade79d122d1175e273cc1eae170be /discord/consts.lua | |
parent | 7d396195e4f97a094610fecc658aed6a67fd464d (diff) |
mostly getting it to just go, also start on discord
Diffstat (limited to 'discord/consts.lua')
-rw-r--r-- | discord/consts.lua | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/discord/consts.lua b/discord/consts.lua new file mode 100644 index 0000000..4727ef6 --- /dev/null +++ b/discord/consts.lua @@ -0,0 +1,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, +} |