Discord Bot错误(错误:读取ECONNRESET)

时间:2020-05-18 19:37:55

标签: javascript node.js error-handling discord discord.js

我有一个不和谐的bot,它几乎每天都会由于错误而崩溃,该错误似乎与我的代码没有特别关系。我不知道为什么会发生以及如何解决它。请帮助我

    ErrorEvent {
  target: WebSocket {
    _events: [Object: null prototype] {
      message: [Function],
      open: [Function],
      error: [Function],
      close: [Function]
    },
    _eventsCount: 4,
    _maxListeners: undefined,
    readyState: 2,
    protocol: '',
    _binaryType: 'nodebuffer',
    _closeFrameReceived: false,
    _closeFrameSent: false,
    _closeMessage: '',
    _closeTimer: null,
    _closeCode: 1006,
    _extensions: {},
    _receiver: null,
    _sender: null,
    _socket: null,
    _isServer: false,
    _redirects: 0,
    url: 'wss://gateway.discord.gg/?v=6&encoding=json',
    _req: null
  },
  type: 'error',
  message: 'read ECONNRESET',
  error: Error: read ECONNRESET
      at TLSWrap.onStreamRead (internal/stream_base_commons.js:200:27) {
    errno: 'ECONNRESET',
    code: 'ECONNRESET',
    syscall: 'read'
  }
}

0 个答案:

没有答案