DiscordLua
discorddiscord
v1.2.4
Install

GatewayOpcodes

Enum
On this page

discord.GatewayOpcodes lists the named constants for this enumeration. Prefer these names over hardcoded literals.

Values

discord.GatewayOpcodes.Dispatch
0
Dispatch. Use the symbolic name in bot code rather than the raw value.
discord.GatewayOpcodes.Heartbeat
1
Heartbeat. Use the symbolic name in bot code rather than the raw value.
discord.GatewayOpcodes.Identify
2
Identify. Use the symbolic name in bot code rather than the raw value.
discord.GatewayOpcodes.PresenceUpdate
3
Presence Update. Use the symbolic name in bot code rather than the raw value.
discord.GatewayOpcodes.VoiceStateUpdate
4
Voice State Update. Use the symbolic name in bot code rather than the raw value.
discord.GatewayOpcodes.Resume
6
Resume. Use the symbolic name in bot code rather than the raw value.
discord.GatewayOpcodes.Reconnect
7
Reconnect. Use the symbolic name in bot code rather than the raw value.
discord.GatewayOpcodes.RequestGuildMembers
8
Request Guild Members. Use the symbolic name in bot code rather than the raw value.
discord.GatewayOpcodes.InvalidSession
9
Invalid Session. Use the symbolic name in bot code rather than the raw value.
discord.GatewayOpcodes.Hello
10
Hello. Use the symbolic name in bot code rather than the raw value.
discord.GatewayOpcodes.HeartbeatAck
11
Heartbeat Ack. Use the symbolic name in bot code rather than the raw value.

Usage

Read members as discord.GatewayOpcodes.Name. Do not hard-code numeric literals when a symbolic name exists.

Example

lua
local discord = require("discord")
print(discord.GatewayOpcodes.Dispatch)
Search Ctrl K Navigate Open Esc