| @@ 680-702 (lines=23) @@ | ||
| 677 | * @throws \TelegramBot\Api\InvalidArgumentException |
|
| 678 | * @throws \TelegramBot\Api\Exception |
|
| 679 | */ |
|
| 680 | public function sendVideo( |
|
| 681 | $chatId, |
|
| 682 | $video, |
|
| 683 | $duration = null, |
|
| 684 | $caption = null, |
|
| 685 | $replyToMessageId = null, |
|
| 686 | $replyMarkup = null, |
|
| 687 | $disableNotification = false, |
|
| 688 | $supportsStreaming = false, |
|
| 689 | $parseMode = null |
|
| 690 | ) { |
|
| 691 | return Message::fromResponse($this->call('sendVideo', [ |
|
| 692 | 'chat_id' => $chatId, |
|
| 693 | 'video' => $video, |
|
| 694 | 'duration' => $duration, |
|
| 695 | 'caption' => $caption, |
|
| 696 | 'reply_to_message_id' => $replyToMessageId, |
|
| 697 | 'reply_markup' => is_null($replyMarkup) ? $replyMarkup : $replyMarkup->toJson(), |
|
| 698 | 'disable_notification' => (bool)$disableNotification, |
|
| 699 | 'supports_streaming' => (bool)$supportsStreaming, |
|
| 700 | 'parse_mode' => $parseMode |
|
| 701 | ])); |
|
| 702 | } |
|
| 703 | ||
| 704 | /** |
|
| 705 | * Use this method to send animation files (GIF or H.264/MPEG-4 AVC video without sound), |
|
| @@ 839-861 (lines=23) @@ | ||
| 836 | * @throws \TelegramBot\Api\InvalidArgumentException |
|
| 837 | * @throws \TelegramBot\Api\Exception |
|
| 838 | */ |
|
| 839 | public function sendAudio( |
|
| 840 | $chatId, |
|
| 841 | $audio, |
|
| 842 | $duration = null, |
|
| 843 | $performer = null, |
|
| 844 | $title = null, |
|
| 845 | $replyToMessageId = null, |
|
| 846 | $replyMarkup = null, |
|
| 847 | $disableNotification = false, |
|
| 848 | $parseMode = null |
|
| 849 | ) { |
|
| 850 | return Message::fromResponse($this->call('sendAudio', [ |
|
| 851 | 'chat_id' => $chatId, |
|
| 852 | 'audio' => $audio, |
|
| 853 | 'duration' => $duration, |
|
| 854 | 'performer' => $performer, |
|
| 855 | 'title' => $title, |
|
| 856 | 'reply_to_message_id' => $replyToMessageId, |
|
| 857 | 'reply_markup' => is_null($replyMarkup) ? $replyMarkup : $replyMarkup->toJson(), |
|
| 858 | 'disable_notification' => (bool)$disableNotification, |
|
| 859 | 'parse_mode' => $parseMode |
|
| 860 | ])); |
|
| 861 | } |
|
| 862 | ||
| 863 | /** |
|
| 864 | * Use this method to send photos. On success, the sent Message is returned. |
|