@@ 653-675 (lines=23) @@ | ||
650 | * @throws \TelegramBot\Api\InvalidArgumentException |
|
651 | * @throws \TelegramBot\Api\Exception |
|
652 | */ |
|
653 | public function sendVideo( |
|
654 | $chatId, |
|
655 | $video, |
|
656 | $duration = null, |
|
657 | $caption = null, |
|
658 | $replyToMessageId = null, |
|
659 | $replyMarkup = null, |
|
660 | $disableNotification = false, |
|
661 | $supportsStreaming = false, |
|
662 | $parseMode = null |
|
663 | ) { |
|
664 | return Message::fromResponse($this->call('sendVideo', [ |
|
665 | 'chat_id' => $chatId, |
|
666 | 'video' => $video, |
|
667 | 'duration' => $duration, |
|
668 | 'caption' => $caption, |
|
669 | 'reply_to_message_id' => $replyToMessageId, |
|
670 | 'reply_markup' => is_null($replyMarkup) ? $replyMarkup : $replyMarkup->toJson(), |
|
671 | 'disable_notification' => (bool)$disableNotification, |
|
672 | 'supports_streaming' => (bool)$supportsStreaming, |
|
673 | 'parse_mode' => $parseMode |
|
674 | ])); |
|
675 | } |
|
676 | ||
677 | /** |
|
678 | * Use this method to send audio files, |
|
@@ 771-793 (lines=23) @@ | ||
768 | * @throws \TelegramBot\Api\InvalidArgumentException |
|
769 | * @throws \TelegramBot\Api\Exception |
|
770 | */ |
|
771 | public function sendAudio( |
|
772 | $chatId, |
|
773 | $audio, |
|
774 | $duration = null, |
|
775 | $performer = null, |
|
776 | $title = null, |
|
777 | $replyToMessageId = null, |
|
778 | $replyMarkup = null, |
|
779 | $disableNotification = false, |
|
780 | $parseMode = null |
|
781 | ) { |
|
782 | return Message::fromResponse($this->call('sendAudio', [ |
|
783 | 'chat_id' => $chatId, |
|
784 | 'audio' => $audio, |
|
785 | 'duration' => $duration, |
|
786 | 'performer' => $performer, |
|
787 | 'title' => $title, |
|
788 | 'reply_to_message_id' => $replyToMessageId, |
|
789 | 'reply_markup' => is_null($replyMarkup) ? $replyMarkup : $replyMarkup->toJson(), |
|
790 | 'disable_notification' => (bool)$disableNotification, |
|
791 | 'parse_mode' => $parseMode |
|
792 | ])); |
|
793 | } |
|
794 | ||
795 | /** |
|
796 | * Use this method to send photos. On success, the sent Message is returned. |