| @@ 678-700 (lines=23) @@ | ||
| 675 | * @throws \TelegramBot\Api\InvalidArgumentException |
|
| 676 | * @throws \TelegramBot\Api\Exception |
|
| 677 | */ |
|
| 678 | public function sendVideo( |
|
| 679 | $chatId, |
|
| 680 | $video, |
|
| 681 | $duration = null, |
|
| 682 | $caption = null, |
|
| 683 | $replyToMessageId = null, |
|
| 684 | $replyMarkup = null, |
|
| 685 | $disableNotification = false, |
|
| 686 | $supportsStreaming = false, |
|
| 687 | $parseMode = null |
|
| 688 | ) { |
|
| 689 | return Message::fromResponse($this->call('sendVideo', [ |
|
| 690 | 'chat_id' => $chatId, |
|
| 691 | 'video' => $video, |
|
| 692 | 'duration' => $duration, |
|
| 693 | 'caption' => $caption, |
|
| 694 | 'reply_to_message_id' => $replyToMessageId, |
|
| 695 | 'reply_markup' => is_null($replyMarkup) ? $replyMarkup : $replyMarkup->toJson(), |
|
| 696 | 'disable_notification' => (bool)$disableNotification, |
|
| 697 | 'supports_streaming' => (bool)$supportsStreaming, |
|
| 698 | 'parse_mode' => $parseMode |
|
| 699 | ])); |
|
| 700 | } |
|
| 701 | ||
| 702 | /** |
|
| 703 | * Use this method to send audio files, |
|
| @@ 796-818 (lines=23) @@ | ||
| 793 | * @throws \TelegramBot\Api\InvalidArgumentException |
|
| 794 | * @throws \TelegramBot\Api\Exception |
|
| 795 | */ |
|
| 796 | public function sendAudio( |
|
| 797 | $chatId, |
|
| 798 | $audio, |
|
| 799 | $duration = null, |
|
| 800 | $performer = null, |
|
| 801 | $title = null, |
|
| 802 | $replyToMessageId = null, |
|
| 803 | $replyMarkup = null, |
|
| 804 | $disableNotification = false, |
|
| 805 | $parseMode = null |
|
| 806 | ) { |
|
| 807 | return Message::fromResponse($this->call('sendAudio', [ |
|
| 808 | 'chat_id' => $chatId, |
|
| 809 | 'audio' => $audio, |
|
| 810 | 'duration' => $duration, |
|
| 811 | 'performer' => $performer, |
|
| 812 | 'title' => $title, |
|
| 813 | 'reply_to_message_id' => $replyToMessageId, |
|
| 814 | 'reply_markup' => is_null($replyMarkup) ? $replyMarkup : $replyMarkup->toJson(), |
|
| 815 | 'disable_notification' => (bool)$disableNotification, |
|
| 816 | 'parse_mode' => $parseMode |
|
| 817 | ])); |
|
| 818 | } |
|
| 819 | ||
| 820 | /** |
|
| 821 | * Use this method to send photos. On success, the sent Message is returned. |
|