diff --git a/src/Telegram/InputMedia.php b/src/Telegram/InputMedia.php index 18d02a4..5df4e6c 100644 --- a/src/Telegram/InputMedia.php +++ b/src/Telegram/InputMedia.php @@ -18,7 +18,7 @@ abstract class InputMedia extends Type implements Factory public string $type; /** File to send. Pass a file_id to send a file that exists on the Telegram servers (recommended), pass an HTTP URL for Telegram to get a file from the Internet, or pass “attach://” to upload a new one using multipart/form-data under name. More info on Sending Files » */ - public string $media; + public string|\Tii\Telepath\Types\InputFile $media; /** Optional. Caption of the animation to be sent, 0-1024 characters after entities parsing */ public ?string $caption = null; diff --git a/src/Telegram/InputMediaAnimation.php b/src/Telegram/InputMediaAnimation.php index 8cd0d7b..a055b49 100644 --- a/src/Telegram/InputMediaAnimation.php +++ b/src/Telegram/InputMediaAnimation.php @@ -27,7 +27,7 @@ class InputMediaAnimation extends InputMedia public ?int $duration = null; /** - * @param string $media File to send. Pass a file_id to send a file that exists on the Telegram servers (recommended), pass an HTTP URL for Telegram to get a file from the Internet, or pass “attach://” to upload a new one using multipart/form-data under name. More info on Sending Files » + * @param string|\Tii\Telepath\Types\InputFile $media File to send. Pass a file_id to send a file that exists on the Telegram servers (recommended), pass an HTTP URL for Telegram to get a file from the Internet, or pass “attach://” to upload a new one using multipart/form-data under name. More info on Sending Files » * @param \Tii\Telepath\Types\InputFile|string $thumb Optional. 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://” if the thumbnail was uploaded using multipart/form-data under . More info on Sending Files » * @param string $caption Optional. Caption of the animation to be sent, 0-1024 characters after entities parsing * @param string $parse_mode Optional. Mode for parsing entities in the animation caption. See formatting options for more details. @@ -37,7 +37,7 @@ class InputMediaAnimation extends InputMedia * @param int $duration Optional. Animation duration in seconds */ public static function make( - string $media, + string|\Tii\Telepath\Types\InputFile $media, \Tii\Telepath\Types\InputFile|string|null $thumb = null, ?string $caption = null, ?string $parse_mode = null, diff --git a/src/Telegram/InputMediaAudio.php b/src/Telegram/InputMediaAudio.php index 5793cbd..b4a06a8 100644 --- a/src/Telegram/InputMediaAudio.php +++ b/src/Telegram/InputMediaAudio.php @@ -27,7 +27,7 @@ class InputMediaAudio extends InputMedia public ?string $title = null; /** - * @param string $media File to send. Pass a file_id to send a file that exists on the Telegram servers (recommended), pass an HTTP URL for Telegram to get a file from the Internet, or pass “attach://” to upload a new one using multipart/form-data under name. More info on Sending Files » + * @param string|\Tii\Telepath\Types\InputFile $media File to send. Pass a file_id to send a file that exists on the Telegram servers (recommended), pass an HTTP URL for Telegram to get a file from the Internet, or pass “attach://” to upload a new one using multipart/form-data under name. More info on Sending Files » * @param \Tii\Telepath\Types\InputFile|string $thumb Optional. 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://” if the thumbnail was uploaded using multipart/form-data under . More info on Sending Files » * @param string $caption Optional. Caption of the audio to be sent, 0-1024 characters after entities parsing * @param string $parse_mode Optional. Mode for parsing entities in the audio caption. See formatting options for more details. @@ -37,7 +37,7 @@ class InputMediaAudio extends InputMedia * @param string $title Optional. Title of the audio */ public static function make( - string $media, + string|\Tii\Telepath\Types\InputFile $media, \Tii\Telepath\Types\InputFile|string|null $thumb = null, ?string $caption = null, ?string $parse_mode = null, diff --git a/src/Telegram/InputMediaDocument.php b/src/Telegram/InputMediaDocument.php index 7002d4a..9ffad89 100644 --- a/src/Telegram/InputMediaDocument.php +++ b/src/Telegram/InputMediaDocument.php @@ -21,7 +21,7 @@ class InputMediaDocument extends InputMedia public ?bool $disable_content_type_detection = null; /** - * @param string $media File to send. Pass a file_id to send a file that exists on the Telegram servers (recommended), pass an HTTP URL for Telegram to get a file from the Internet, or pass “attach://” to upload a new one using multipart/form-data under name. More info on Sending Files » + * @param string|\Tii\Telepath\Types\InputFile $media File to send. Pass a file_id to send a file that exists on the Telegram servers (recommended), pass an HTTP URL for Telegram to get a file from the Internet, or pass “attach://” to upload a new one using multipart/form-data under name. More info on Sending Files » * @param \Tii\Telepath\Types\InputFile|string $thumb Optional. 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://” if the thumbnail was uploaded using multipart/form-data under . More info on Sending Files » * @param string $caption Optional. Caption of the document to be sent, 0-1024 characters after entities parsing * @param string $parse_mode Optional. Mode for parsing entities in the document caption. See formatting options for more details. @@ -29,7 +29,7 @@ class InputMediaDocument extends InputMedia * @param bool $disable_content_type_detection Optional. Disables automatic server-side content type detection for files uploaded using multipart/form-data. Always True, if the document is sent as part of an album. */ public static function make( - string $media, + string|\Tii\Telepath\Types\InputFile $media, \Tii\Telepath\Types\InputFile|string|null $thumb = null, ?string $caption = null, ?string $parse_mode = null, diff --git a/src/Telegram/InputMediaPhoto.php b/src/Telegram/InputMediaPhoto.php index e32005b..261a6f6 100644 --- a/src/Telegram/InputMediaPhoto.php +++ b/src/Telegram/InputMediaPhoto.php @@ -15,13 +15,13 @@ class InputMediaPhoto extends InputMedia public string $type = 'photo'; /** - * @param string $media File to send. Pass a file_id to send a file that exists on the Telegram servers (recommended), pass an HTTP URL for Telegram to get a file from the Internet, or pass “attach://” to upload a new one using multipart/form-data under name. More info on Sending Files » + * @param string|\Tii\Telepath\Types\InputFile $media File to send. Pass a file_id to send a file that exists on the Telegram servers (recommended), pass an HTTP URL for Telegram to get a file from the Internet, or pass “attach://” to upload a new one using multipart/form-data under name. More info on Sending Files » * @param string $caption Optional. Caption of the photo to be sent, 0-1024 characters after entities parsing * @param string $parse_mode Optional. Mode for parsing entities in the photo caption. See formatting options for more details. * @param MessageEntity[] $caption_entities Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode */ public static function make( - string $media, + string|\Tii\Telepath\Types\InputFile $media, ?string $caption = null, ?string $parse_mode = null, ?array $caption_entities = null diff --git a/src/Telegram/InputMediaVideo.php b/src/Telegram/InputMediaVideo.php index 1ce1abf..7c92e5c 100644 --- a/src/Telegram/InputMediaVideo.php +++ b/src/Telegram/InputMediaVideo.php @@ -30,7 +30,7 @@ class InputMediaVideo extends InputMedia public ?bool $supports_streaming = null; /** - * @param string $media File to send. Pass a file_id to send a file that exists on the Telegram servers (recommended), pass an HTTP URL for Telegram to get a file from the Internet, or pass “attach://” to upload a new one using multipart/form-data under name. More info on Sending Files » + * @param string|\Tii\Telepath\Types\InputFile $media File to send. Pass a file_id to send a file that exists on the Telegram servers (recommended), pass an HTTP URL for Telegram to get a file from the Internet, or pass “attach://” to upload a new one using multipart/form-data under name. More info on Sending Files » * @param \Tii\Telepath\Types\InputFile|string $thumb Optional. 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://” if the thumbnail was uploaded using multipart/form-data under . More info on Sending Files » * @param string $caption Optional. Caption of the video to be sent, 0-1024 characters after entities parsing * @param string $parse_mode Optional. Mode for parsing entities in the video caption. See formatting options for more details. @@ -41,7 +41,7 @@ class InputMediaVideo extends InputMedia * @param bool $supports_streaming Optional. Pass True, if the uploaded video is suitable for streaming */ public static function make( - string $media, + string|\Tii\Telepath\Types\InputFile $media, \Tii\Telepath\Types\InputFile|string|null $thumb = null, ?string $caption = null, ?string $parse_mode = null, diff --git a/telepathy b/telepathy index dca7f87..770ac5f 100755 Binary files a/telepathy and b/telepathy differ