[Resolved]Discord Bot Not Starting


#1

I moved my discord bot glitch but I get this error
_closeFrameReceived: false, 3:31 PM _closeFrameSent: false, 3:31 PM _closeMessage: '', 3:31 PM _closeTimer: null, 3:31 PM _finalized: true, 3:31 PM _closeCode: 1006, 3:31 PM _extensions: {}, 3:31 PM _isServer: false, 3:31 PM _receiver: 3:31 PM Receiver { 3:31 PM _binaryType: 'nodebuffer', 3:31 PM _extensions: null, 3:31 PM _maxPayload: 0, 3:31 PM _bufferedBytes: 0, 3:31 PM _buffers: null, 3:31 PM _compressed: false, 3:31 PM _payloadLength: 3298, 3:31 PM _fragmented: 0, 3:31 PM _masked: false, 3:31 PM _fin: true, 3:31 PM _mask: null, 3:31 PM _opcode: 2, 3:31 PM _totalPayloadLength: 0, 3:31 PM _messageLength: 0, 3:31 PM _fragments: null, 3:31 PM _cleanupCallback: null, 3:31 PM _isCleaningUp: false, 3:31 PM _hadError: false, 3:31 PM _loop: false, 3:31 PM add: [Function: bound add], 3:31 PM onmessage: null, 3:31 PM onclose: null, 3:31 PM onerror: null, 3:31 PM onping: null, 3:31 PM onpong: null, 3:31 PM _state: 0 }, 3:31 PM _sender: 3:31 PM Sender { 3:31 PM _extensions: {}, 3:31 PM _socket: [Object], 3:31 PM _firstFragment: true, 3:31 PM _compress: false, 3:31 PM _bufferedBytes: 0, 3:31 PM _deflating: false, 3:31 PM _queue: [] }, 3:31 PM _socket: 3:31 PM TLSSocket { 3:31 PM _tlsOptions: [Object], 3:31 PM _secureEstablished: true, 3:31 PM _securePending: false, 3:31 PM _newSessionPending: false, 3:31 PM _controlReleased: true, 3:31 PM _SNICallback: null, 3:31 PM servername: null, 3:31 PM npnProtocol: false, 3:31 PM alpnProtocol: false, 3:31 PM authorized: true, 3:31 PM authorizationError: null, 3:31 PM encrypted: true, 3:31 PM _events: [Object], 3:31 PM _eventsCount: 7, 3:31 PM connecting: false, 3:31 PM _hadError: false, 3:31 PM _handle: null, 3:31 PM _parent: null, 3:31 PM _host: 'gateway.discord.gg', 3:31 PM _readableState: [Object], 3:31 PM readable: false, 3:31 PM domain: null, 3:31 PM _maxListeners: undefined, 3:31 PM _writableState: [Object], 3:31 PM writable: false, 3:31 PM allowHalfOpen: false, 3:31 PM destroyed: true, 3:31 PM _bytesDispatched: 797, 3:31 PM _sockname: null, 3:31 PM _pendingData: null, 3:31 PM _pendingEncoding: '', 3:31 PM server: undefined, 3:31 PM _server: null, 3:31 PM ssl: null, 3:31 PM _requestCert: true, 3:31 PM _rejectUnauthorized: true, 3:31 PM parser: null, 3:31 PM _httpMessage: null, 3:31 PM read: [Function], 3:31 PM _consuming: true, 3:31 PM _idleNext: null, 3:31 PM _idlePrev: null, 3:31 PM _idleTimeout: -1 }, 3:31 PM _error: null, 3:31 PM url: 'wss://gateway.discord.gg/?v=6&encoding=json', 3:31 PM _req: null }, 3:31 PM type: 'error', 3:31 PM message: 'write ECONNRESET', 3:31 PM error: 3:31 PM { Error: write ECONNRESET 3:31 PM at exports._errnoException (util.js:1020:11) 3:31 PM at WriteWrap.afterWrite (net.js:806:14) code: 'ECONNRESET', errno: 'ECONNRESET', syscall: 'write' } } 3:31 PM


#2

It doesn’t give us much to go on as you can get ECONNRESET errors for a number of reasons. It would be helpful to view the code. Let us know your project’s name. If you project is private, then either make it public or DM me a join link so I can take a look. Thanks


#3

I send dm.

Full error code:
ErrorEvent {
target:
WebSocket {
domain: null,
_events:
{ message: [Object],
open: [Object],
error: [Object],
close: [Object] },
_eventsCount: 4,
_maxListeners: undefined,
readyState: 2,
protocol: ‘’,
_binaryType: ‘nodebuffer’,
_finalize: [Function: bound finalize],
_closeFrameReceived: false,
_closeFrameSent: false,
_closeMessage: ‘’,
_closeTimer: null,
_finalized: true,
_closeCode: 1006,
_extensions: {},
_isServer: false,
_receiver:
Receiver {
_binaryType: ‘nodebuffer’,
_extensions: null,
_maxPayload: 0,
_bufferedBytes: 2044,
_buffers: null,
_compressed: false,
_payloadLength: 2926,
_fragmented: 0,
_masked: false,
_fin: true,
_mask: null,
_opcode: 2,
_totalPayloadLength: 0,
_messageLength: 0,
_fragments: null,
_cleanupCallback: null,
_isCleaningUp: false,
_hadError: false,
_loop: false,
add: [Function: bound add],
onmessage: null,
onclose: null,
onerror: null,
onping: null,
onpong: null,
_state: 4 },
_sender:
Sender {
_extensions: {},
_socket: [Object],
_firstFragment: true,
_compress: false,
_bufferedBytes: 0,
_deflating: false,
_queue: [] },
_socket:
TLSSocket {
_tlsOptions: [Object],
_secureEstablished: true,
_securePending: false,
_newSessionPending: false,
_controlReleased: true,
_SNICallback: null,
servername: null,
npnProtocol: false,
alpnProtocol: false,
authorized: true,
authorizationError: null,
encrypted: true,
_events: [Object],
_eventsCount: 7,
connecting: false,
_hadError: false,
_handle: null,
_parent: null,
_host: ‘gateway.discord.gg’,
_readableState: [Object],
readable: false,
domain: null,
_maxListeners: undefined,
_writableState: [Object],
writable: false,
allowHalfOpen: false,
destroyed: true,
_bytesDispatched: 601,
_sockname: null,
_pendingData: null,
_pendingEncoding: ‘’,
server: undefined,
_server: null,
ssl: null,
_requestCert: true,
_rejectUnauthorized: true,
parser: null,
_httpMessage: [Object],
read: [Function],
_consuming: true,
_idleNext: null,
_idlePrev: null,
_idleTimeout: -1 },
_error: null,
url: ‘wss://gateway.discord.gg/?v=6&encoding=json’,
_req: null },
type: ‘error’,
message: ‘write ECONNRESET’,
error:
{ Error: write ECONNRESET
at exports._errnoException (util.js:1022:11)
at WriteWrap.afterWrite (net.js:801:14) code: ‘ECONNRESET’, errno: ‘ECONNRESET’, syscall: ‘write’ } }
events.js:160
throw er; // Unhandled ‘error’ event
^


#4

Can you dm me your project link, I would like to inspect it, Thanks.


#5

Thank you,

I finally solved the error.