在我的三个discord.js机器人中,每个机器人总是出现以下错误,我绝对不知道它可能是什么以及如何调试它:
复制粘贴:
events.js:179
throw err; // Unhandled 'error' event
^
Error [ERR_UNHANDLED_ERROR]: Unhandled error. ([object Object])
at Client.emit (events.js:177:17)
at WebSocketConnection.onError (H:\njs\tosbot\node_modules\di
ient\websocket\WebSocketConnection.js:374:17)
at WebSocket.onError (H:\njs\tosbot\node_modules\ws\lib\event
16)
at WebSocket.emit (events.js:188:13)
at _receiver.cleanup (H:\njs\tosbot\node_modules\ws\lib\webso
at Receiver.cleanup (H:\njs\tosbot\node_modules\ws\lib\receiv
at WebSocket.finalize (H:\njs\tosbot\node_modules\ws\lib\webs
)
at TLSSocket.emit (events.js:188:13)
at emitErrorNT (internal/streams/destroy.js:82:8)
at emitErrorAndCloseNT (internal/streams/destroy.js:50:3)
当然,我不能在此处发布完整的代码,但是如果您有兴趣或需要查看它,则我在GitHub上同时有this one和this one都因该错误而崩溃。>