File tree 1 file changed +21
-0
lines changed 1 file changed +21
-0
lines changed Original file line number Diff line number Diff line change @@ -22,6 +22,7 @@ Telegram Bot PHP is a PHP Library for interaction with [Telegram Bot API](https:
22
22
- [ Example] ( #example )
23
23
- [ Error] ( #error )
24
24
- [ Request] ( #request )
25
+ - [ Download File] ( #download-file )
25
26
- [ Helper] ( #helper )
26
27
- [ Format] ( #format )
27
28
- [ Exceptions] ( #exceptions )
@@ -640,6 +641,26 @@ $response->getRequestMethod(); // get request method name (sendMessage)
640
641
$response->getRequestParameters(); // get request parameters as an array (['chat_id' => '184171927', 'text' => 'Example Text'])
641
642
642
643
```
644
+
645
+ # Download File
646
+ ``` php
647
+
648
+ $bot->downloadFile('documents/example.txt', __DIR__ . '/documents/example.txt');
649
+
650
+ // or
651
+
652
+ Bot::downloadFile('documents/example.txt', __DIR__ . '/documents/example.txt');
653
+
654
+ // download file by file_id
655
+
656
+ $bot->downloadFileByFileId('BQACAgQAAxkBAAJ0T2EJUDHTeXGcSBUrqFMgzZCQ0OJGAAIhCQACg2tJUEqm6016cXE9IAQ', __DIR__ . '/documents/example.txt');
657
+
658
+ // or
659
+
660
+ Bot::downloadFileByFileId('BQACAgQAAxkBAAJ0T2EJUDHTeXGcSBUrqFMgzZCQ0OJGAAIhCQACg2tJUEqm6016cXE9IAQ', __DIR__ . '/documents/example.txt');
661
+
662
+ ```
663
+
643
664
## Helper
644
665
Helpers are auxiliary functions for receiving certain values or checking some items or doing certain tasks
645
666
You can’t perform that action at this time.
0 commit comments