Closed WeaveAche closed 3 years ago
Hey man, sorry I completely missed this until now. The issue is the client for Discord.js expires in that time frame, so you'll need to use something like a cronjob to reinitialize the client then send a message and kill the client every x amount of minutes/hours/whatever.
Let me know if that doesn't make any sense and I can try to upload a code example.
Oh ok. Makes sense.
Hi, the bot works fine for some time (usually about 30 min) and then gives me an error like this-
PS C:\Users\vivek\Desktop\project\spambot> node bot.js --message "hi" --setTime 60000 --prune Ready to level up! There was an error! Did you update the config.json file? If you did, let me know what the error message says in an issue on the repo on GitHub. Error: read ECONNRESET at TLSWrap.onStreamRead (internal/stream_base_commons.js:209:20) { errno: -4077, code: 'ECONNRESET', syscall: 'read', request: <ref 1> ClientRequest { _events: [Object: null prototype] { abort: [Function], response: [Function] }, _eventsCount: 2, _maxListeners: undefined, outputData: [], outputSize: 0, writable: true, destroyed: false, _last: false, chunkedEncoding: false, shouldKeepAlive: true, _defaultKeepAlive: true, useChunkedEncodingByDefault: true, sendDate: false, _removedConnection: false, _removedContLen: false, _removedTE: false, _contentLength: 16, _hasBody: true, _trailer: '', finished: true, _headerSent: true, socket: TLSSocket { _tlsOptions: [Object], _secureEstablished: false, _securePending: false, _newSessionPending: false, _controlReleased: true, secureConnecting: true, _SNICallback: null, servername: null, alpnProtocol: null, authorized: false, authorizationError: null, encrypted: true, _events: [Object: null prototype], _eventsCount: 10, connecting: false, _hadError: true, _parent: null, _host: 'discordapp.com', _readableState: [ReadableState], _maxListeners: undefined, _writableState: [WritableState], allowHalfOpen: false, _sockname: null, _pendingData: null, _pendingEncoding: '', server: undefined, _server: null, ssl: null, _requestCert: true, _rejectUnauthorized: true, parser: null, _httpMessage: [Circular 1],
} } PS C:\Users\vivek\Desktop\project\spambot>