Eleirbag89/TelegramBotPHP

how send Document file

AABehzad opened this issue · 7 comments

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

caco3 commented

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

stale commented

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.

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

@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 commented

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