@@ 712-734 (lines=23) @@ | ||
709 | * @throws \TelegramBot\Api\InvalidArgumentException |
|
710 | * @throws \TelegramBot\Api\Exception |
|
711 | */ |
|
712 | public function sendVideo( |
|
713 | $chatId, |
|
714 | $video, |
|
715 | $duration = null, |
|
716 | $caption = null, |
|
717 | $replyToMessageId = null, |
|
718 | $replyMarkup = null, |
|
719 | $disableNotification = false, |
|
720 | $supportsStreaming = false, |
|
721 | $parseMode = null |
|
722 | ) { |
|
723 | return Message::fromResponse($this->call('sendVideo', [ |
|
724 | 'chat_id' => $chatId, |
|
725 | 'video' => $video, |
|
726 | 'duration' => $duration, |
|
727 | 'caption' => $caption, |
|
728 | 'reply_to_message_id' => $replyToMessageId, |
|
729 | 'reply_markup' => is_null($replyMarkup) ? $replyMarkup : $replyMarkup->toJson(), |
|
730 | 'disable_notification' => (bool)$disableNotification, |
|
731 | 'supports_streaming' => (bool)$supportsStreaming, |
|
732 | 'parse_mode' => $parseMode |
|
733 | ])); |
|
734 | } |
|
735 | ||
736 | /** |
|
737 | * Use this method to send animation files (GIF or H.264/MPEG-4 AVC video without sound), |
|
@@ 755-775 (lines=21) @@ | ||
752 | * @throws \TelegramBot\Api\InvalidArgumentException |
|
753 | * @throws \TelegramBot\Api\Exception |
|
754 | */ |
|
755 | public function sendAnimation( |
|
756 | $chatId, |
|
757 | $animation, |
|
758 | $duration = null, |
|
759 | $caption = null, |
|
760 | $replyToMessageId = null, |
|
761 | $replyMarkup = null, |
|
762 | $disableNotification = false, |
|
763 | $parseMode = null |
|
764 | ) { |
|
765 | return Message::fromResponse($this->call('sendAnimation', [ |
|
766 | 'chat_id' => $chatId, |
|
767 | 'animation' => $animation, |
|
768 | 'duration' => $duration, |
|
769 | 'caption' => $caption, |
|
770 | 'reply_to_message_id' => $replyToMessageId, |
|
771 | 'reply_markup' => is_null($replyMarkup) ? $replyMarkup : $replyMarkup->toJson(), |
|
772 | 'disable_notification' => (bool)$disableNotification, |
|
773 | 'parse_mode' => $parseMode |
|
774 | ])); |
|
775 | } |
|
776 | ||
777 | /** |
|
778 | * Use this method to send audio files, |
|
@@ 871-893 (lines=23) @@ | ||
868 | * @throws \TelegramBot\Api\InvalidArgumentException |
|
869 | * @throws \TelegramBot\Api\Exception |
|
870 | */ |
|
871 | public function sendAudio( |
|
872 | $chatId, |
|
873 | $audio, |
|
874 | $duration = null, |
|
875 | $performer = null, |
|
876 | $title = null, |
|
877 | $replyToMessageId = null, |
|
878 | $replyMarkup = null, |
|
879 | $disableNotification = false, |
|
880 | $parseMode = null |
|
881 | ) { |
|
882 | return Message::fromResponse($this->call('sendAudio', [ |
|
883 | 'chat_id' => $chatId, |
|
884 | 'audio' => $audio, |
|
885 | 'duration' => $duration, |
|
886 | 'performer' => $performer, |
|
887 | 'title' => $title, |
|
888 | 'reply_to_message_id' => $replyToMessageId, |
|
889 | 'reply_markup' => is_null($replyMarkup) ? $replyMarkup : $replyMarkup->toJson(), |
|
890 | 'disable_notification' => (bool)$disableNotification, |
|
891 | 'parse_mode' => $parseMode |
|
892 | ])); |
|
893 | } |
|
894 | ||
895 | /** |
|
896 | * Use this method to send photos. On success, the sent Message is returned. |