Hunter シ
Hunter シ
DIAdiscord.js - Imagine an app
Created by Hunter シ on 12/23/2023 in #djs-questions
Anyone Know how to catch this error so the bot doesn't go offline?
Error: WebSocket was closed before the connection was established
at WebSocket.close (C:\Users\Admin\Desktop\Discord Bot 3\node_modules\ws\lib\websocket.js:287:7)
at WebSocketShard.destroy (C:\Users\Admin\Desktop\Discord Bot 3\node_modules\discord.js\src\client\websocket\WebSocketShard.js:728:27)
at WebSocketShard._send (C:\Users\Admin\Desktop\Discord Bot 3\node_modules\discord.js\src\client\websocket\WebSocketShard.js:668:12)
at WebSocketShard.processQueue (C:\Users\Admin\Desktop\Discord Bot 3\node_modules\discord.js\src\client\websocket\WebSocketShard.js:694:12)
at WebSocketShard.send (C:\Users\Admin\Desktop\Discord Bot 3\node_modules\discord.js\src\client\websocket\WebSocketShard.js:656:10)
at WebSocketManager.broadcast (C:\Users\Admin\Desktop\Discord Bot 3\node_modules\discord.js\src\client\websocket\WebSocketManager.js:313:53)
at ClientPresence.set (C:\Users\Admin\Desktop\Discord Bot 3\node_modules\discord.js\src\structures\ClientPresence.js:25:22)
at ClientUser.setPresence (C:\Users\Admin\Desktop\Discord Bot 3\node_modules\discord.js\src\structures\ClientUser.js:120:33)
at ClientUser.setActivity (C:\Users\Admin\Desktop\Discord Bot 3\node_modules\discord.js\src\structures\ClientUser.js:167:17)
at Timeout._onTimeout (C:\Users\Admin\Desktop\Discord Bot 3\index.js:54:19)
Emitted 'error' event on WebSocket instance at:
at emitErrorAndClose (C:\Users\Admin\Desktop\Discord Bot 3\node_modules\ws\lib\websocket.js:1016:13)
at process.processTicksAndRejections (node:internal/process/task_queues:82:21)
Error: WebSocket was closed before the connection was established
at WebSocket.close (C:\Users\Admin\Desktop\Discord Bot 3\node_modules\ws\lib\websocket.js:287:7)
at WebSocketShard.destroy (C:\Users\Admin\Desktop\Discord Bot 3\node_modules\discord.js\src\client\websocket\WebSocketShard.js:728:27)
at WebSocketShard._send (C:\Users\Admin\Desktop\Discord Bot 3\node_modules\discord.js\src\client\websocket\WebSocketShard.js:668:12)
at WebSocketShard.processQueue (C:\Users\Admin\Desktop\Discord Bot 3\node_modules\discord.js\src\client\websocket\WebSocketShard.js:694:12)
at WebSocketShard.send (C:\Users\Admin\Desktop\Discord Bot 3\node_modules\discord.js\src\client\websocket\WebSocketShard.js:656:10)
at WebSocketManager.broadcast (C:\Users\Admin\Desktop\Discord Bot 3\node_modules\discord.js\src\client\websocket\WebSocketManager.js:313:53)
at ClientPresence.set (C:\Users\Admin\Desktop\Discord Bot 3\node_modules\discord.js\src\structures\ClientPresence.js:25:22)
at ClientUser.setPresence (C:\Users\Admin\Desktop\Discord Bot 3\node_modules\discord.js\src\structures\ClientUser.js:120:33)
at ClientUser.setActivity (C:\Users\Admin\Desktop\Discord Bot 3\node_modules\discord.js\src\structures\ClientUser.js:167:17)
at Timeout._onTimeout (C:\Users\Admin\Desktop\Discord Bot 3\index.js:54:19)
Emitted 'error' event on WebSocket instance at:
at emitErrorAndClose (C:\Users\Admin\Desktop\Discord Bot 3\node_modules\ws\lib\websocket.js:1016:13)
at process.processTicksAndRejections (node:internal/process/task_queues:82:21)
4 replies