|
32 | 32 | use Telepath\Telegram\InputMediaDocument; |
33 | 33 | use Telepath\Telegram\InputMediaPhoto; |
34 | 34 | use Telepath\Telegram\InputMediaVideo; |
| 35 | +use Telepath\Telegram\InputPaidMedia; |
35 | 36 | use Telepath\Telegram\InputPollOption; |
36 | 37 | use Telepath\Telegram\InputSticker; |
37 | 38 | use Telepath\Telegram\LabeledPrice; |
@@ -241,7 +242,7 @@ public function forwardMessages( |
241 | 242 | } |
242 | 243 |
|
243 | 244 | /** |
244 | | - * Use this method to copy messages of any kind. Service messages, giveaway messages, giveaway winners messages, and invoice messages can't be copied. A quiz <a href="https://core.telegram.org/bots/api#poll">poll</a> can be copied only if the value of the field <em>correct_option_id</em> is known to the bot. The method is analogous to the method <a href="https://core.telegram.org/bots/api#forwardmessage">forwardMessage</a>, but the copied message doesn't have a link to the original message. Returns the <a href="https://core.telegram.org/bots/api#messageid">MessageId</a> of the sent message on success. |
| 245 | + * Use this method to copy messages of any kind. Service messages, paid media messages, giveaway messages, giveaway winners messages, and invoice messages can't be copied. A quiz <a href="https://core.telegram.org/bots/api#poll">poll</a> can be copied only if the value of the field <em>correct_option_id</em> is known to the bot. The method is analogous to the method <a href="https://core.telegram.org/bots/api#forwardmessage">forwardMessage</a>, but the copied message doesn't have a link to the original message. Returns the <a href="https://core.telegram.org/bots/api#messageid">MessageId</a> of the sent message on success. |
245 | 246 | * |
246 | 247 | * @param int|string $chat_id Unique identifier for the target chat or username of the target channel (in the format @channelusername) |
247 | 248 | * @param int|string $from_chat_id Unique identifier for the chat where the original message was sent (or channel username in the format @channelusername) |
@@ -276,7 +277,7 @@ public function copyMessage( |
276 | 277 | } |
277 | 278 |
|
278 | 279 | /** |
279 | | - * Use this method to copy messages of any kind. If some of the specified messages can't be found or copied, they are skipped. Service messages, giveaway messages, giveaway winners messages, and invoice messages can't be copied. A quiz <a href="https://core.telegram.org/bots/api#poll">poll</a> can be copied only if the value of the field <em>correct_option_id</em> is known to the bot. The method is analogous to the method <a href="https://core.telegram.org/bots/api#forwardmessages">forwardMessages</a>, but the copied messages don't have a link to the original message. Album grouping is kept for copied messages. On success, an array of <a href="https://core.telegram.org/bots/api#messageid">MessageId</a> of the sent messages is returned. |
| 280 | + * Use this method to copy messages of any kind. If some of the specified messages can't be found or copied, they are skipped. Service messages, paid media messages, giveaway messages, giveaway winners messages, and invoice messages can't be copied. A quiz <a href="https://core.telegram.org/bots/api#poll">poll</a> can be copied only if the value of the field <em>correct_option_id</em> is known to the bot. The method is analogous to the method <a href="https://core.telegram.org/bots/api#forwardmessages">forwardMessages</a>, but the copied messages don't have a link to the original message. Album grouping is kept for copied messages. On success, an array of <a href="https://core.telegram.org/bots/api#messageid">MessageId</a> of the sent messages is returned. |
280 | 281 | * |
281 | 282 | * @param int|string $chat_id Unique identifier for the target chat or username of the target channel (in the format @channelusername) |
282 | 283 | * @param int|string $from_chat_id Unique identifier for the chat where the original messages were sent (or channel username in the format @channelusername) |
@@ -589,6 +590,39 @@ public function sendVideoNote( |
589 | 590 | return $this->raw('sendVideoNote', func_get_args()); |
590 | 591 | } |
591 | 592 |
|
| 593 | + /** |
| 594 | + * Use this method to send paid media to channel chats. On success, the sent <a href="https://core.telegram.org/bots/api#message">Message</a> is returned. |
| 595 | + * |
| 596 | + * @param int|string $chat_id Unique identifier for the target chat or username of the target channel (in the format @channelusername) |
| 597 | + * @param int $star_count The number of Telegram Stars that must be paid to buy access to the media |
| 598 | + * @param InputPaidMedia[] $media A JSON-serialized array describing the media to be sent; up to 10 items |
| 599 | + * @param string $caption Media caption, 0-1024 characters after entities parsing |
| 600 | + * @param ParseMode|string $parse_mode Mode for parsing entities in the media caption. See <a href="https://core.telegram.org/bots/api#formatting-options">formatting options</a> for more details. |
| 601 | + * @param MessageEntity[] $caption_entities A JSON-serialized list of special entities that appear in the caption, which can be specified instead of <em>parse_mode</em> |
| 602 | + * @param bool $show_caption_above_media Pass <em>True</em>, if the caption must be shown above the message media |
| 603 | + * @param bool $disable_notification Sends the message <a href="https://telegram.org/blog/channels-2-0#silent-messages">silently</a>. Users will receive a notification with no sound. |
| 604 | + * @param bool $protect_content Protects the contents of the sent message from forwarding and saving |
| 605 | + * @param ReplyParameters $reply_parameters Description of the message to reply to |
| 606 | + * @param InlineKeyboardMarkup|ReplyKeyboardMarkup|ReplyKeyboardRemove|ForceReply $reply_markup Additional interface options. A JSON-serialized object for an <a href="https://core.telegram.org/bots/features#inline-keyboards">inline keyboard</a>, <a href="https://core.telegram.org/bots/features#keyboards">custom reply keyboard</a>, instructions to remove a reply keyboard or to force a reply from the user |
| 607 | + * |
| 608 | + * @throws TelegramException |
| 609 | + */ |
| 610 | + public function sendPaidMedia( |
| 611 | + int|string $chat_id, |
| 612 | + int $star_count, |
| 613 | + array $media, |
| 614 | + ?string $caption = null, |
| 615 | + ParseMode|string|null $parse_mode = null, |
| 616 | + ?array $caption_entities = null, |
| 617 | + ?bool $show_caption_above_media = null, |
| 618 | + ?bool $disable_notification = null, |
| 619 | + ?bool $protect_content = null, |
| 620 | + ?ReplyParameters $reply_parameters = null, |
| 621 | + InlineKeyboardMarkup|ReplyKeyboardMarkup|ReplyKeyboardRemove|ForceReply|null $reply_markup = null, |
| 622 | + ): Message { |
| 623 | + return $this->raw('sendPaidMedia', func_get_args()); |
| 624 | + } |
| 625 | + |
592 | 626 | /** |
593 | 627 | * Use this method to send a group of photos, videos, documents or audios as an album. Documents and audio files can be only grouped in an album with messages of the same type. On success, an array of <a href="https://core.telegram.org/bots/api#message">Messages</a> that were sent is returned. |
594 | 628 | * |
|
0 commit comments