question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Cannot SendSendMedia

See original GitHub issue

Hai Please help me I can’t SendMedia

here’s the error

(node:11228) UnhandledPromiseRejectionWarning: TypeError: Cannot destructure property ‘name’ of ‘file’ as it is undefined. at Object.<anonymous> (D:\NodeJS\Tele\node_modules\telegram\client\uploads.js:38:17) at Generator.next (<anonymous>) at D:\NodeJS\Tele\node_modules\telegram\client\uploads.js:8:71 at new Promise (<anonymous>) at __awaiter (D:\NodeJS\Tele\node_modules\telegram\client\uploads.js:4:12) at Object.uploadFile (D:\NodeJS\Tele\node_modules\telegram\client\uploads.js:35:12) at TelegramClient.uploadFile (D:\NodeJS\Tele\node_modules\telegram\client\TelegramClient.js:193:30) at run (D:\NodeJS\Tele\app.js:21:22) at processTicksAndRejections (internal/process/task_queues.js:95:5) (Use node --trace-warnings ... to show where the warning was created) (node:11228) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag --unhandled-rejections=strict (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1) (node:11228) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code. 1 2

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:1
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
painorcommented, Jun 18, 2021

if you want to use uploadFile you need to use the CustomFile class. you can also just use sendFile https://painor.gitbook.io/gramjs/getting-started/available-methods/uploading-files-1

0reactions
ljs19923commented, Dec 15, 2022

@painor CustomFile is undefined for me… how to define it? Thanks a lot Screen Shot 2022-12-15 at 11 47 05

Read more comments on GitHub >

github_iconTop Results From Across the Web

1.1 Welcome - Agora.io
Hi, and welcome to this course about RTE, RTC, and WebRTC. RTE stands for real-time engagement. Whereas RTC stands for real-time communications.
Read more >
dakshkohli23/Rename-Pro-Bot - Buttons - Heroku Elements
Doesn't need any repeated uploads & downloads for different operations ... start - Check if the Bot is Online send - send media...
Read more >
Samsung DH48D User Manual | Manualzz
Samsung DH48D User Manual · 1 Go to the tabs Device → Time. · 2 Select your device. · 3 Select Clock Set,...
Read more >
TikTok - Cannot Send Messages Due To Privacy Settings (2022)
Let's show you how to fix TikTok not sending Messages due to privacy settings. In this video, I walk you through what to...
Read more >
FIX!!!! Outlook can't send after upgrading to Windows 10 or ...
Outlook can't send after upgrading to Windows 10Error message: ' – Sending' reported error (0x800CCC13): ' Cannot connect to the network.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found