| @@ 363-387 (lines=25) @@ | ||
| 360 | * @throws HttpException |
|
| 361 | * @throws InvalidJsonException |
|
| 362 | */ |
|
| 363 | public function copyMessage( |
|
| 364 | $chatId, |
|
| 365 | $fromChatId, |
|
| 366 | $messageId, |
|
| 367 | $caption = null, |
|
| 368 | $parseMode = null, |
|
| 369 | $captionEntities = null, |
|
| 370 | $disableNotification = false, |
|
| 371 | $replyToMessageId = null, |
|
| 372 | $allowSendingWithoutReply = false, |
|
| 373 | $replyMarkup = null |
|
| 374 | ) { |
|
| 375 | return Message::fromResponse($this->call('sendMessage', [ |
|
| 376 | 'chat_id' => $chatId, |
|
| 377 | 'from_chat_id' => $fromChatId, |
|
| 378 | 'message_id' => (int)$messageId, |
|
| 379 | 'caption' => $caption, |
|
| 380 | 'parse_mode' => $parseMode, |
|
| 381 | 'caption_entities' => $captionEntities, |
|
| 382 | 'disable_notification' => (bool)$disableNotification, |
|
| 383 | 'reply_to_message_id' => (int)$replyToMessageId, |
|
| 384 | 'allow_sending_without_reply' => (bool)$allowSendingWithoutReply, |
|
| 385 | 'reply_markup' => is_null($replyMarkup) ? $replyMarkup : $replyMarkup->toJson(), |
|
| 386 | ])); |
|
| 387 | } |
|
| 388 | ||
| 389 | /** |
|
| 390 | * Use this method to send phone contacts |
|
| @@ 741-763 (lines=23) @@ | ||
| 738 | * @throws \TelegramBot\Api\InvalidArgumentException |
|
| 739 | * @throws \TelegramBot\Api\Exception |
|
| 740 | */ |
|
| 741 | public function sendVideo( |
|
| 742 | $chatId, |
|
| 743 | $video, |
|
| 744 | $duration = null, |
|
| 745 | $caption = null, |
|
| 746 | $replyToMessageId = null, |
|
| 747 | $replyMarkup = null, |
|
| 748 | $disableNotification = false, |
|
| 749 | $supportsStreaming = false, |
|
| 750 | $parseMode = null |
|
| 751 | ) { |
|
| 752 | return Message::fromResponse($this->call('sendVideo', [ |
|
| 753 | 'chat_id' => $chatId, |
|
| 754 | 'video' => $video, |
|
| 755 | 'duration' => $duration, |
|
| 756 | 'caption' => $caption, |
|
| 757 | 'reply_to_message_id' => $replyToMessageId, |
|
| 758 | 'reply_markup' => is_null($replyMarkup) ? $replyMarkup : $replyMarkup->toJson(), |
|
| 759 | 'disable_notification' => (bool)$disableNotification, |
|
| 760 | 'supports_streaming' => (bool)$supportsStreaming, |
|
| 761 | 'parse_mode' => $parseMode |
|
| 762 | ])); |
|
| 763 | } |
|
| 764 | ||
| 765 | /** |
|
| 766 | * Use this method to send animation files (GIF or H.264/MPEG-4 AVC video without sound), |
|
| @@ 900-922 (lines=23) @@ | ||
| 897 | * @throws \TelegramBot\Api\InvalidArgumentException |
|
| 898 | * @throws \TelegramBot\Api\Exception |
|
| 899 | */ |
|
| 900 | public function sendAudio( |
|
| 901 | $chatId, |
|
| 902 | $audio, |
|
| 903 | $duration = null, |
|
| 904 | $performer = null, |
|
| 905 | $title = null, |
|
| 906 | $replyToMessageId = null, |
|
| 907 | $replyMarkup = null, |
|
| 908 | $disableNotification = false, |
|
| 909 | $parseMode = null |
|
| 910 | ) { |
|
| 911 | return Message::fromResponse($this->call('sendAudio', [ |
|
| 912 | 'chat_id' => $chatId, |
|
| 913 | 'audio' => $audio, |
|
| 914 | 'duration' => $duration, |
|
| 915 | 'performer' => $performer, |
|
| 916 | 'title' => $title, |
|
| 917 | 'reply_to_message_id' => $replyToMessageId, |
|
| 918 | 'reply_markup' => is_null($replyMarkup) ? $replyMarkup : $replyMarkup->toJson(), |
|
| 919 | 'disable_notification' => (bool)$disableNotification, |
|
| 920 | 'parse_mode' => $parseMode |
|
| 921 | ])); |
|
| 922 | } |
|
| 923 | ||
| 924 | /** |
|
| 925 | * Use this method to send photos. On success, the sent Message is returned. |
|