@@ 635-649 (lines=15) @@ | ||
632 | * @param $reply_to_message_id <i>Optional</i>. If the message is a reply, ID of the original message. |
|
633 | * @return On success, the sent message is returned. |
|
634 | */ |
|
635 | public function sendVoice($voice, string $caption, int $duration, string $reply_markup = null, bool $disable_notification, int $reply_to_message_id = 0) { |
|
636 | ||
637 | $parameters = [ |
|
638 | 'chat_id' => $this->_chat_id, |
|
639 | 'voice' => $voice, |
|
640 | 'caption' => $caption, |
|
641 | 'duration' => $duration, |
|
642 | 'disable_notification', $disable_notification, |
|
643 | 'reply_to_message_id' => $reply_to_message_id, |
|
644 | 'reply_markup' => $reply_markup |
|
645 | ]; |
|
646 | ||
647 | return $this->exec_curl_request('sendVoice?' . http_build_query($parameters)); |
|
648 | ||
649 | } |
|
650 | ||
651 | /** |
|
652 | * \brief Say the user what action is the bot doing. |
|
@@ 742-755 (lines=14) @@ | ||
739 | * @param $parse_mode <i>Optional</i>. Send Markdown or HTML. |
|
740 | * @param $disable_web_preview <i>Optional</i>. Disables link previews for links in this message. |
|
741 | */ |
|
742 | public function editMessageText(int $message_id, $text, $reply_markup = null, string $parse_mode = 'HTML', bool $disable_web_preview = true) { |
|
743 | ||
744 | $parameters = [ |
|
745 | 'chat_id' => $this->_chat_id, |
|
746 | 'message_id' => $message_id, |
|
747 | 'text' => $text, |
|
748 | 'reply_markup' => $reply_markup, |
|
749 | 'parse_mode' => $parse_mode, |
|
750 | 'disable_web_page_preview' => $disable_web_preview, |
|
751 | ]; |
|
752 | ||
753 | return $this->exec_curl_request('editMessageText?' . http_build_query($parameters)); |
|
754 | ||
755 | } |
|
756 | ||
757 | /** |
|
758 | * \brief Edit text of a message sent via the bot. |