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