@@ 696-718 (lines=23) @@ | ||
693 | * @throws \TelegramBot\Api\InvalidArgumentException |
|
694 | * @throws \TelegramBot\Api\Exception |
|
695 | */ |
|
696 | public function sendVideo( |
|
697 | $chatId, |
|
698 | $video, |
|
699 | $duration = null, |
|
700 | $caption = null, |
|
701 | $replyToMessageId = null, |
|
702 | $replyMarkup = null, |
|
703 | $disableNotification = false, |
|
704 | $supportsStreaming = false, |
|
705 | $parseMode = null |
|
706 | ) { |
|
707 | return Message::fromResponse($this->call('sendVideo', [ |
|
708 | 'chat_id' => $chatId, |
|
709 | 'video' => $video, |
|
710 | 'duration' => $duration, |
|
711 | 'caption' => $caption, |
|
712 | 'reply_to_message_id' => $replyToMessageId, |
|
713 | 'reply_markup' => is_null($replyMarkup) ? $replyMarkup : $replyMarkup->toJson(), |
|
714 | 'disable_notification' => (bool)$disableNotification, |
|
715 | 'supports_streaming' => (bool)$supportsStreaming, |
|
716 | 'parse_mode' => $parseMode |
|
717 | ])); |
|
718 | } |
|
719 | ||
720 | /** |
|
721 | * Use this method to send animation files (GIF or H.264/MPEG-4 AVC video without sound), |
|
@@ 739-759 (lines=21) @@ | ||
736 | * @throws \TelegramBot\Api\InvalidArgumentException |
|
737 | * @throws \TelegramBot\Api\Exception |
|
738 | */ |
|
739 | public function sendAnimation( |
|
740 | $chatId, |
|
741 | $animation, |
|
742 | $duration = null, |
|
743 | $caption = null, |
|
744 | $replyToMessageId = null, |
|
745 | $replyMarkup = null, |
|
746 | $disableNotification = false, |
|
747 | $parseMode = null |
|
748 | ) { |
|
749 | return Message::fromResponse($this->call('sendAnimation', [ |
|
750 | 'chat_id' => $chatId, |
|
751 | 'animation' => $animation, |
|
752 | 'duration' => $duration, |
|
753 | 'caption' => $caption, |
|
754 | 'reply_to_message_id' => $replyToMessageId, |
|
755 | 'reply_markup' => is_null($replyMarkup) ? $replyMarkup : $replyMarkup->toJson(), |
|
756 | 'disable_notification' => (bool)$disableNotification, |
|
757 | 'parse_mode' => $parseMode |
|
758 | ])); |
|
759 | } |
|
760 | ||
761 | /** |
|
762 | * Use this method to send audio files, |
|
@@ 855-877 (lines=23) @@ | ||
852 | * @throws \TelegramBot\Api\InvalidArgumentException |
|
853 | * @throws \TelegramBot\Api\Exception |
|
854 | */ |
|
855 | public function sendAudio( |
|
856 | $chatId, |
|
857 | $audio, |
|
858 | $duration = null, |
|
859 | $performer = null, |
|
860 | $title = null, |
|
861 | $replyToMessageId = null, |
|
862 | $replyMarkup = null, |
|
863 | $disableNotification = false, |
|
864 | $parseMode = null |
|
865 | ) { |
|
866 | return Message::fromResponse($this->call('sendAudio', [ |
|
867 | 'chat_id' => $chatId, |
|
868 | 'audio' => $audio, |
|
869 | 'duration' => $duration, |
|
870 | 'performer' => $performer, |
|
871 | 'title' => $title, |
|
872 | 'reply_to_message_id' => $replyToMessageId, |
|
873 | 'reply_markup' => is_null($replyMarkup) ? $replyMarkup : $replyMarkup->toJson(), |
|
874 | 'disable_notification' => (bool)$disableNotification, |
|
875 | 'parse_mode' => $parseMode |
|
876 | ])); |
|
877 | } |
|
878 | ||
879 | /** |
|
880 | * Use this method to send photos. On success, the sent Message is returned. |