Status code: 416 Error [ERR_UNHANDLED_ERROR]: Unhandled error. (undefined) at PassThrough.emit (events.js:299:17) at errorOrDestroy (internal/streams/destroy.js:108:12) at PassThrough.onerror (_stream_readable.js:729:7) at PassThrough.emit (events.js:310:20) at PassThrough.<anonymous> (E:\KrzysBot\node_modules\ytdl-core\lib\index.js:139:16) at PassThrough.emit (events.js:310:20) at ClientRequest.<anonymous> (E:\KrzysBot\node_modules\miniget\dist\index.js:163:28) at Object.onceWrapper (events.js:417:26) at ClientRequest.emit (events.js:310:20) at HTTPParser.parserOnIncomingClient [as onIncoming] (_http_client.js:596:27) { code: 'ERR_UNHANDLED_ERROR', context: undefined }
i add try cause bot go down
`stream.destroy = () => {
stream._isDestroyed = true;
if (req.abort) req.abort();
req.end();
req.removeListener('data', ondata);
req.unpipe();
};
// Forward events from the request to the stream.
[
'abort', 'request', 'response', 'error', 'retry', 'reconnect',
].forEach(event => {
req.prependListener(event, arg => {
Status code: 416 Error [ERR_UNHANDLED_ERROR]: Unhandled error. (undefined) at PassThrough.emit (events.js:299:17) at errorOrDestroy (internal/streams/destroy.js:108:12) at PassThrough.onerror (_stream_readable.js:729:7) at PassThrough.emit (events.js:310:20) at PassThrough.<anonymous> (E:\KrzysBot\node_modules\ytdl-core\lib\index.js:139:16) at PassThrough.emit (events.js:310:20) at ClientRequest.<anonymous> (E:\KrzysBot\node_modules\miniget\dist\index.js:163:28) at Object.onceWrapper (events.js:417:26) at ClientRequest.emit (events.js:310:20) at HTTPParser.parserOnIncomingClient [as onIncoming] (_http_client.js:596:27) { code: 'ERR_UNHANDLED_ERROR', context: undefined }
i add try cause bot go down `stream.destroy = () => { stream._isDestroyed = true; if (req.abort) req.abort(); req.end(); req.removeListener('data', ondata); req.unpipe(); };// Forward events from the request to the stream. [ 'abort', 'request', 'response', 'error', 'retry', 'reconnect', ].forEach(event => { req.prependListener(event, arg => {
});
req.pipe(stream); };`