Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Version 1.1 - Major Changes #3

Merged
merged 8 commits into from Jan 28, 2022
Merged

Version 1.1 - Major Changes #3

merged 8 commits into from Jan 28, 2022

Conversation

phaticusthiccy
Copy link
Contributor

Innovations

  1. Replaced direct url with buffer ecosystem
  2. Added Two New Internal Functions
  3. Added Cache ( Send Quickly if Video ın Cache )
  4. Added Lısance Headers
  • pipetofile - convert stream data to binary file
  • deleteallcache - if cache full, refrseh via deleting all

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.

@luisgbr1el
Copy link
Owner

luisgbr1el commented Jan 26, 2022

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'
}

@phaticusthiccy
Copy link
Contributor Author

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.

@phaticusthiccy
Copy link
Contributor Author

phaticusthiccy commented Jan 26, 2022

Also you can use $node --trace-warnings to see full error logs.

@phaticusthiccy
Copy link
Contributor Author

Now, it must be work.

@luisgbr1el
Copy link
Owner

luisgbr1el commented Jan 26, 2022

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'
}

Copy link
Contributor Author

@phaticusthiccy phaticusthiccy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 :)

@luisgbr1el
Copy link
Owner

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' } }
  }
}

@phaticusthiccy
Copy link
Contributor Author

phaticusthiccy commented Jan 26, 2022

  • 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)

@luisgbr1el
Copy link
Owner

luisgbr1el commented Jan 28, 2022

  • 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.

@phaticusthiccy
Copy link
Contributor Author

Oh sorry, ı just updating the APIs. Lemme check..

Changed File Name Attributer
true & false Correction
Added Asynchronous to Non-Continuable `pipetofile()` Function

Needs to be tested.
Operator Fix
@luisgbr1el luisgbr1el merged commit 68c13d6 into luisgbr1el:main Jan 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants