discord.js icon indicating copy to clipboard operation
discord.js copied to clipboard

"undefined" debug message on successful websocket closure

Open Renegade334 opened this issue 1 year ago • 0 comments

Which package is this bug report for?

discord.js

Issue description

Very minor issue, but on a successful closure of a shard's websocket (ie. code 1000), the client will emit "undefined" as a debug event:

[WS => Shard 0] undefined

This happens because at present, in client/websocket/WebSocketManager.js, the close code is only resolved against discord-api-types/v10::GatewayCloseCodes and not also against @discordjs/ws::CloseCodes.

Should ideally be changed to resolve against both.

Code sample

No response

Versions

14.11.0

Issue priority

Low (slightly annoying)

Which partials do you have configured?

Not applicable

Which gateway intents are you subscribing to?

Not applicable

I have tested this issue on a development release

No response

Renegade334 avatar May 24 '23 00:05 Renegade334