GatewayCloseCodes
constGatewayCloseCodes:object
Defined in: packages/ws/src/close-codes.ts:8
Discord Gateway close codes.
Familiar names and numeric values, matching the Discord Gateway protocol. Exposed so consumers can branch on named codes instead of magic numbers; Gateway uses them internally to decide resume/identify/stop.
Type Declaration
Section titled âType DeclarationâAlreadyAuthenticated
Section titled âAlreadyAuthenticatedâ
readonlyAlreadyAuthenticated:4005=4005
AuthenticationFailed
Section titled âAuthenticationFailedâ
readonlyAuthenticationFailed:4004=4004
DecodeError
Section titled âDecodeErrorâ
readonlyDecodeError:4002=4002
DisallowedIntents
Section titled âDisallowedIntentsâ
readonlyDisallowedIntents:4014=4014
InvalidAPIVersion
Section titled âInvalidAPIVersionâ
readonlyInvalidAPIVersion:4012=4012
InvalidIntents
Section titled âInvalidIntentsâ
readonlyInvalidIntents:4013=4013
InvalidSeq
Section titled âInvalidSeqâ
readonlyInvalidSeq:4007=4007
InvalidShard
Section titled âInvalidShardâ
readonlyInvalidShard:4010=4010
NotAuthenticated
Section titled âNotAuthenticatedâ
readonlyNotAuthenticated:4003=4003
RateLimited
Section titled âRateLimitedâ
readonlyRateLimited:4008=4008
SessionTimedOut
Section titled âSessionTimedOutâ
readonlySessionTimedOut:4009=4009
ShardingRequired
Section titled âShardingRequiredâ
readonlyShardingRequired:4011=4011
UnknownError
Section titled âUnknownErrorâ
readonlyUnknownError:4000=4000
UnknownOpcode
Section titled âUnknownOpcodeâ
readonlyUnknownOpcode:4001=4001