DiscordLua
discorddiscord
v1.2.4
Install

GatewayCloseCodes

Enum
On this page

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

Values

discord.GatewayCloseCodes.UnknownError
4000
Unknown Error. Use the symbolic name in bot code rather than the raw value.
discord.GatewayCloseCodes.UnknownOpcode
4001
Unknown Opcode. Use the symbolic name in bot code rather than the raw value.
discord.GatewayCloseCodes.DecodeError
4002
Decode Error. Use the symbolic name in bot code rather than the raw value.
discord.GatewayCloseCodes.NotAuthenticated
4003
Not Authenticated. Use the symbolic name in bot code rather than the raw value.
discord.GatewayCloseCodes.AuthenticationFailed
4004
Authentication Failed. Use the symbolic name in bot code rather than the raw value.
discord.GatewayCloseCodes.AlreadyAuthenticated
4005
Already Authenticated. Use the symbolic name in bot code rather than the raw value.
discord.GatewayCloseCodes.InvalidSeq
4007
Invalid Seq. Use the symbolic name in bot code rather than the raw value.
discord.GatewayCloseCodes.RateLimited
4008
Rate Limited. Use the symbolic name in bot code rather than the raw value.
discord.GatewayCloseCodes.SessionTimedOut
4009
Session Timed Out. Use the symbolic name in bot code rather than the raw value.
discord.GatewayCloseCodes.InvalidShard
4010
Invalid Shard. Use the symbolic name in bot code rather than the raw value.
discord.GatewayCloseCodes.ShardingRequired
4011
Sharding Required. Use the symbolic name in bot code rather than the raw value.
discord.GatewayCloseCodes.InvalidAPIVersion
4012
Invalid APIVersion. Use the symbolic name in bot code rather than the raw value.
discord.GatewayCloseCodes.InvalidIntents
4013
Invalid Intents. Use the symbolic name in bot code rather than the raw value.
discord.GatewayCloseCodes.DisallowedIntents
4014
Disallowed Intents. Use the symbolic name in bot code rather than the raw value.

Usage

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

Example

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