Eleirbag89 / TelegramBotPHP

A very simple PHP Telegram Bot API for sending messages.
http://eleirbag89.github.io/TelegramBotPHP
MIT License
812 stars 342 forks source link

how send Document file #257

Closed behzadi9667 closed 2 years ago

behzadi9667 commented 2 years ago

HI how can I send Document file example : .rar \ .bin \ .txt ........

behzadi9667 commented 2 years ago

@lyucean @hijera @caco3 @happy-code-com @alefsheen @Yousha please answer to me thanks

caco3 commented 2 years ago

@behzadi9667 Sry. but I don't know, never sent a file

stale[bot] commented 2 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

Eleirbag89 commented 2 years ago

Should be like sendPhoto but using sendDocument instead. $img = curl_file_create('test.png', 'image/png'); $content = ['chat_id' => $chat_id, 'document' => $img]; $telegram->sendDocument($content);

behzadi9667 commented 2 years ago

@Eleirbag89 man i want send a document file(.exe - .pdf - .excl - ......) and your code not work for this formats my problem was solved by my customize code and your library is not work for this ; I suggest to you add this ability to your library ;

stale[bot] commented 2 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

gbenisty commented 1 year ago

@Eleirbag89 man i want send a document file(.exe - .pdf - .excl - ......) and your code not work for this formats my problem was solved by my customize code and your library is not work for this ; I suggest to you add this ability to your library ;

Could you share your code please ? I'm facing the same issue to send HTML, CSV or TXT files