You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/BotApi.php
+21-20Lines changed: 21 additions & 20 deletions
Original file line number
Diff line number
Diff line change
@@ -3,6 +3,7 @@
3
3
namespaceTelegramBot\Api;
4
4
5
5
useCURLFile;
6
+
useCURLStringFile;
6
7
useTelegramBot\Api\Types\ArrayOfBotCommand;
7
8
useTelegramBot\Api\Types\ArrayOfChatMemberEntity;
8
9
useTelegramBot\Api\Types\ArrayOfMessageEntity;
@@ -494,7 +495,7 @@ public function getUserProfilePhotos($userId, $offset = 0, $limit = 100)
494
495
* In case of an unsuccessful request, we will give up after a reasonable amount of attempts.
495
496
*
496
497
* @param string $url HTTPS url to send updates to. Use an empty string to remove webhook integration.
497
-
* @param CURLFile|string $certificate Upload your public key certificate so that the root certificate in use can be checked.
498
+
* @param CURLFile|CURLStringFile|string $certificate Upload your public key certificate so that the root certificate in use can be checked.
498
499
* @param array $allowedUpdates A JSON-serialized list of the update types you want your bot to receive. For example, specify [“message”, “edited_channel_post”, “callback_query”] to only receive updates of these types. See Update for a complete list of available update types. Specify an empty list to receive all update types except chat_member (default). If not specified, the previous setting will be used.Please note that this parameter doesn't affect updates created before the call to the setWebhook, so unwanted updates may be received for a short period of time.
499
500
*
500
501
* @return string
@@ -725,7 +726,7 @@ public function sendVenue(
725
726
* Use this method to send .webp stickers. On success, the sent Message is returned.
726
727
*
727
728
* @param int|string $chatId chat_id or @channel_name
@@ -776,7 +777,7 @@ public function getCustomEmojiStickers($customEmojiIds)
776
777
/**
777
778
* Use this method to upload a .PNG file with a sticker for later use in createNewStickerSet and addStickerToSet methods (can be used multiple times). Returns the uploadede File on success
778
779
* @param integer $userId User identifier of sticker file owner
779
-
* @param CURLFile $pngSticker PNG image with the sticker, must be up to 512 kilobytes in size, dimensions must not exceed 512px, and either width or height mush be exactly 512 px.
780
+
* @param CURLFile|CURLStringFile $pngSticker PNG image with the sticker, must be up to 512 kilobytes in size, dimensions must not exceed 512px, and either width or height mush be exactly 512 px.
@@ -788,9 +789,9 @@ public function uploadStickerFile($userId, $pngSticker)
788
789
* @param integer $userId User identifier of created sticker set owner
789
790
* @param string $name Short name og sticker set
790
791
* @param string $title Sticker set title, 1-64 characters
791
-
* @param CURLFile|string $pngSticker PNG image with the sticker
792
-
* @param CURLFile $tgsSticker TGS animation with the sticker
793
-
* @param CURLFile $webmSticker WEBM video with the sticker
792
+
* @param CURLFile|CURLStringFile|string $pngSticker PNG image with the sticker
793
+
* @param CURLFile|CURLStringFile $tgsSticker TGS animation with the sticker
794
+
* @param CURLFile|CURLStringFile $webmSticker WEBM video with the sticker
794
795
* @param string $stickerType Type of stickers in the set, pass 'regular' or 'mask'. Custom emoji sticker sets can't be created via the Bot API at the moment. By default a regular sticker set is created
795
796
* @param string $emojis One or more emoji corresponding to the sticker
796
797
* @param MaskPosition $maskPosition A JSON-Serialized object for position where the mask should be placed on faces
@@ -824,9 +825,9 @@ public function createNewStickerSet(
824
825
* @param integer $userId User identifier of sticker set owner
825
826
* @param string $name Sticker set name
826
827
* @param string $emojis One or more emoji corresponding to the sticker
827
-
* @param CURLFile|string $pngSticker PNG image with the sticker
828
-
* @param CURLFile $tgsSticker TGS animation with the sticker
829
-
* @param CURLFILE $webmSticker WEBM video with the sticker
828
+
* @param CURLFile|CURLStringFile|string $pngSticker PNG image with the sticker
829
+
* @param CURLFile|CURLStringFile $tgsSticker TGS animation with the sticker
830
+
* @param CURLFILE|CURLStringFile $webmSticker WEBM video with the sticker
830
831
* @param MaskPosition $maskPosition A JSON-Serialized object for position where the mask should be placed on faces
831
832
*/
832
833
publicfunctionaddStickerToSet(
@@ -875,7 +876,7 @@ public function deleteStickerFromSet($sticker)
875
876
* Use this method to set the thumbnail of a sticker set. Animated thumbnails can be set for animated sticker sets only. Video thumbnails can be set only for video sticker sets only. Returns True on success.
876
877
* @param string $name Sticker set name
877
878
* @param integer $userId User identifier of the sticker set owner
878
-
* @param CURLFile|string $thumb A PNG image with the thumbnail or a TGS animation or a WEBM video
879
+
* @param CURLFile|CURLStringFile|string $thumb A PNG image with the thumbnail or a TGS animation or a WEBM video
@@ -889,12 +890,12 @@ public function setStickerSetThumb($name, $userId, $thumb = null)
889
890
* Bots can currently send video files of up to 50 MB in size, this limit may be changed in the future.
890
891
*
891
892
* @param int|string $chatId chat_id or @channel_name
892
-
* @param CURLFile|string $video Video to send
893
+
* @param CURLFile|CURLStringFile|string $video Video to send
893
894
* @param int|null $messageThreadId Unique identifier for the target message thread (topic) of the forum; for forum supergroups only
894
895
* @param int|null $duration Duration of sent video in seconds
895
896
* @param int|null $width Video width
896
897
* @param int|null $height Video height
897
-
* @param CURLFile|string|null $thumb Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass “attach://<file_attach_name>” if the thumbnail was uploaded using multipart/form-data under <file_attach_name>. More information on Sending Files »
898
+
* @param CURLFile|CURLStringFile|string|null $thumb Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass “attach://<file_attach_name>” if the thumbnail was uploaded using multipart/form-data under <file_attach_name>. More information on Sending Files »
898
899
* @param string|null $caption Video caption (may also be used when resending videos by file_id), 0-1024 characters after entities parsing
899
900
* @param string|null $parseMode Mode for parsing entities in the video caption.
900
901
* @param ArrayOfMessageEntity|null $captionEntities A JSON-serialized list of special entities that appear in the caption, which can be specified instead of parse_mode
@@ -956,12 +957,12 @@ public function sendVideo(
956
957
* Bots can currently send animation files of up to 50 MB in size, this limit may be changed in the future.
957
958
*
958
959
* @param int|string $chatId chat_id or @channel_name
* @param CURLFile|string|null $thumb TThumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass “attach://<file_attach_name>” if the thumbnail was uploaded using multipart/form-data under <file_attach_name>»
965
+
* @param CURLFile|CURLStringFile|string|null $thumb TThumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass “attach://<file_attach_name>” if the thumbnail was uploaded using multipart/form-data under <file_attach_name>»
965
966
* @param string|null $caption Animation caption (may also be used when resending animation by file_id), 0-1024 characters after entities parsing
966
967
* @param string|null $parseMode Mode for parsing entities in the animation caption. See formatting options for more details.
967
968
* @param ArrayOfMessageEntity|null $captionEntities A JSON-serialized list of special entities that appear in the caption, which can be specified instead of parse_mode
@@ -1023,7 +1024,7 @@ public function sendAnimation(
1023
1024
* Bots can currently send voice messages of up to 50 MB in size, this limit may be changed in the future.
1024
1025
*
1025
1026
* @param int|string $chatId chat_id or @channel_name
0 commit comments