Closed phaticusthiccy closed 2 years ago
When clicks on "video" button, show this on console and the bot crashes.
node:events:368
throw er; // Unhandled 'error' event
^
Error: ENOENT: no such file or directory, open 'C:\git\kelle-telegram-patch-1\src\https:\tikdown.org\download?filename=tikdown.org-24026747680.mp4'
Emitted 'error' event on ReadStream instance at:
at emitErrorNT (node:internal/streams/destroy:157:8)
at emitErrorCloseNT (node:internal/streams/destroy:122:3)
at processTicksAndRejections (node:internal/process/task_queues:83:21) {
errno: -4058,
code: 'ENOENT',
syscall: 'open',
path: 'C:\\git\\kelle-telegram-patch-1\\src\\https:\\tikdown.org\\download?filename=tikdown.org-24026747680.mp4'
}
Okey, i know where the error is. I needed to edit the URI data. I knew this but it slipped my mind. I'll try a slightly different method.
Also you can use $node --trace-warnings
to see full error logs.
Now, it must be work.
Now, it must be work.
Shows this another error when clicks on "video" button and the bot crashes.
node:events:368
throw er; // Unhandled 'error' event
^
Error: ENOENT: no such file or directory, open 'C:\git\kelle-telegram-patch-1\src\40216246635.mp4'
Emitted 'error' event on ReadStream instance at:
at emitErrorNT (node:internal/streams/destroy:157:8)
at emitErrorCloseNT (node:internal/streams/destroy:122:3)
at processTicksAndRejections (node:internal/process/task_queues:83:21) {
errno: -4058,
code: 'ENOENT',
syscall: 'open',
path: 'C:\\git\\kelle-telegram-patch-1\\src\\40216246635.mp4'
}
I think there is a error while creating and reading stream
fs.createReadStream()
Can you try this
{ source: "./src/" + data.server1.video.split("org-")[1] }
by replacing line#59 and line#66. I think it can be solve that. If even it wont work, i will test it directly. Sorry 😅 I thoght code will work perfectly, Thats way ı dont need to test it :)
It show this error and crashes again.
C:\git\kelle-telegram-patch-1\node_modules\telegraf\lib\core\network\client.js:263
throw new error_1.default(data, { method, payload });
^
TelegramError: 400: Bad Request: there is no video in the request
at Telegram.callApi (C:\git\kelle-telegram-patch-1\node_modules\telegraf\lib\core\network\client.js:263:19)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at async C:\git\kelle-telegram-patch-1\index.js:57:13
at async execute (C:\git\kelle-telegram-patch-1\node_modules\telegraf\lib\composer.js:464:17)
at async C:\git\kelle-telegram-patch-1\node_modules\telegraf\lib\composer.js:465:21
at async execute (C:\git\kelle-telegram-patch-1\node_modules\telegraf\lib\composer.js:464:17)
at async execute (C:\git\kelle-telegram-patch-1\node_modules\telegraf\lib\composer.js:464:17)
at async execute (C:\git\kelle-telegram-patch-1\node_modules\telegraf\lib\composer.js:464:17)
at async C:\git\kelle-telegram-patch-1\node_modules\telegraf\lib\composer.js:465:21
at async execute (C:\git\kelle-telegram-patch-1\node_modules\telegraf\lib\composer.js:464:17) {
response: {
ok: false,
error_code: 400,
description: 'Bad Request: there is no video in the request'
},
on: {
method: 'sendVideo',
payload: { chat_id: 1032195659, video: { source: './src/22074570746.mp4' } }
}
}
fs.createReadStream()
(replaced with internal file sender) Bulid: pass Test: pass BufferHealth: + (arraybuffer method)
- Removed
fs.createReadStream()
(replaced with internal file sender)- Added Popularity Colon
- Replaced oldschool fs accsess functions with simple one
Bulid: pass Test: pass BufferHealth: + (arraybuffer method)
It works now but still sending the same video/audio all the time.
Oh sorry, ı just updating the APIs. Lemme check..
Innovations
Fixed Issues
Fixed the issue where videos other than webm type and mpeg encoding were not playing. Fixed the non-buffer data with the audios.
Known Issues
Must be tested an un-publısed local servers.