|
@@ 570-584 (lines=15) @@
|
| 567 |
|
* @param $reply_to_message_id <i>Optional</i>. If the message is a reply, ID of the original message. |
| 568 |
|
* @return On success, the sent message is returned. |
| 569 |
|
*/ |
| 570 |
|
public function sendVoice($voice, string $caption, int $duration, string $reply_markup = null, bool $disable_notification, int $reply_to_message_id = 0) { |
| 571 |
|
|
| 572 |
|
$parameters = [ |
| 573 |
|
'chat_id' => $this->chat_id, |
| 574 |
|
'voice' => $voice, |
| 575 |
|
'caption' => $caption, |
| 576 |
|
'duration' => $duration, |
| 577 |
|
'disable_notification', $disable_notification, |
| 578 |
|
'reply_to_message_id' => $reply_to_message_id, |
| 579 |
|
'reply_markup' => $reply_markup |
| 580 |
|
]; |
| 581 |
|
|
| 582 |
|
return $this->exec_curl_request($this->api_url . 'sendVoice?' . http_build_query($parameters)); |
| 583 |
|
|
| 584 |
|
} |
| 585 |
|
|
| 586 |
|
/** |
| 587 |
|
* \brief Say the user what action is the bot doing. |
|
@@ 655-668 (lines=14) @@
|
| 652 |
|
* @param $parse_mode <i>Optional</i>. Send Markdown or HTML. |
| 653 |
|
* @param $disable_web_preview <i>Optional</i>. Disables link previews for links in this message. |
| 654 |
|
*/ |
| 655 |
|
public function editMessageText(int $message_id, $text, $reply_markup = null, string $parse_mode = 'HTML', bool $disable_web_preview = false) { |
| 656 |
|
|
| 657 |
|
$parameters = [ |
| 658 |
|
'chat_id' => $this->chat_id, |
| 659 |
|
'message_id' => $message_id, |
| 660 |
|
'text' => $text, |
| 661 |
|
'reply_markup' => $reply_markup, |
| 662 |
|
'parse_mode' => $parse_mode, |
| 663 |
|
'disable_web_page_preview' => $disable_web_preview, |
| 664 |
|
]; |
| 665 |
|
|
| 666 |
|
return $this->exec_curl_request($this->api_url . 'editMessageText?' . http_build_query($parameters)); |
| 667 |
|
|
| 668 |
|
} |
| 669 |
|
|
| 670 |
|
/** |
| 671 |
|
* \brief Edit text of a message sent via the bot. |