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