|
@@ 646-660 (lines=15) @@
|
| 643 |
|
* @throws \TelegramBot\Api\InvalidArgumentException |
| 644 |
|
* @throws \TelegramBot\Api\Exception |
| 645 |
|
*/ |
| 646 |
|
public function sendSticker( |
| 647 |
|
$chatId, |
| 648 |
|
$sticker, |
| 649 |
|
$replyToMessageId = null, |
| 650 |
|
$replyMarkup = null, |
| 651 |
|
$disableNotification = false |
| 652 |
|
) { |
| 653 |
|
return Message::fromResponse($this->call('sendSticker', [ |
| 654 |
|
'chat_id' => $chatId, |
| 655 |
|
'sticker' => $sticker, |
| 656 |
|
'reply_to_message_id' => $replyToMessageId, |
| 657 |
|
'reply_markup' => is_null($replyMarkup) ? $replyMarkup : $replyMarkup->toJson(), |
| 658 |
|
'disable_notification' => (bool)$disableNotification, |
| 659 |
|
])); |
| 660 |
|
} |
| 661 |
|
|
| 662 |
|
/** |
| 663 |
|
* Use this method to send video files, |
|
@@ 1130-1144 (lines=15) @@
|
| 1127 |
|
* @throws \TelegramBot\Api\InvalidArgumentException |
| 1128 |
|
* @throws \TelegramBot\Api\Exception |
| 1129 |
|
*/ |
| 1130 |
|
public function editMessageCaption( |
| 1131 |
|
$chatId, |
| 1132 |
|
$messageId, |
| 1133 |
|
$caption = null, |
| 1134 |
|
$replyMarkup = null, |
| 1135 |
|
$inlineMessageId = null |
| 1136 |
|
) { |
| 1137 |
|
return Message::fromResponse($this->call('editMessageCaption', [ |
| 1138 |
|
'chat_id' => $chatId, |
| 1139 |
|
'message_id' => $messageId, |
| 1140 |
|
'inline_message_id' => $inlineMessageId, |
| 1141 |
|
'caption' => $caption, |
| 1142 |
|
'reply_markup' => is_null($replyMarkup) ? $replyMarkup : $replyMarkup->toJson(), |
| 1143 |
|
])); |
| 1144 |
|
} |
| 1145 |
|
|
| 1146 |
|
/** |
| 1147 |
|
* Use this method to edit only the reply markup of messages sent by the bot or via the bot |
|
@@ 1775-1791 (lines=17) @@
|
| 1772 |
|
* @throws \TelegramBot\Api\InvalidArgumentException |
| 1773 |
|
* @throws \TelegramBot\Api\Exception |
| 1774 |
|
*/ |
| 1775 |
|
public function sendPoll( |
| 1776 |
|
$chatId, |
| 1777 |
|
$question, |
| 1778 |
|
$options, |
| 1779 |
|
$disableNotification = false, |
| 1780 |
|
$replyToMessageId = null, |
| 1781 |
|
$replyMarkup = null |
| 1782 |
|
) { |
| 1783 |
|
return Message::fromResponse($this->call('sendPoll', [ |
| 1784 |
|
'chat_id' => $chatId, |
| 1785 |
|
'question' => $question, |
| 1786 |
|
'options' => json_encode($options), |
| 1787 |
|
'disable_notification' => (bool)$disableNotification, |
| 1788 |
|
'reply_to_message_id' => (int)$replyToMessageId, |
| 1789 |
|
'reply_markup' => is_null($replyMarkup) ? $replyMarkup : $replyMarkup->toJson(), |
| 1790 |
|
])); |
| 1791 |
|
} |
| 1792 |
|
|
| 1793 |
|
/** |
| 1794 |
|
* Use this method to stop a poll which was sent by the bot. |