| @@ 645-659 (lines=15) @@ | ||
| 642 | * @throws \TelegramBot\Api\InvalidArgumentException |
|
| 643 | * @throws \TelegramBot\Api\Exception |
|
| 644 | */ |
|
| 645 | public function sendSticker( |
|
| 646 | $chatId, |
|
| 647 | $sticker, |
|
| 648 | $replyToMessageId = null, |
|
| 649 | $replyMarkup = null, |
|
| 650 | $disableNotification = false |
|
| 651 | ) { |
|
| 652 | return Message::fromResponse($this->call('sendSticker', [ |
|
| 653 | 'chat_id' => $chatId, |
|
| 654 | 'sticker' => $sticker, |
|
| 655 | 'reply_to_message_id' => $replyToMessageId, |
|
| 656 | 'reply_markup' => is_null($replyMarkup) ? $replyMarkup : $replyMarkup->toJson(), |
|
| 657 | 'disable_notification' => (bool)$disableNotification, |
|
| 658 | ])); |
|
| 659 | } |
|
| 660 | ||
| 661 | /** |
|
| 662 | * Use this method to send video files, |
|
| @@ 1129-1143 (lines=15) @@ | ||
| 1126 | * @throws \TelegramBot\Api\InvalidArgumentException |
|
| 1127 | * @throws \TelegramBot\Api\Exception |
|
| 1128 | */ |
|
| 1129 | public function editMessageCaption( |
|
| 1130 | $chatId, |
|
| 1131 | $messageId, |
|
| 1132 | $caption = null, |
|
| 1133 | $replyMarkup = null, |
|
| 1134 | $inlineMessageId = null |
|
| 1135 | ) { |
|
| 1136 | return Message::fromResponse($this->call('editMessageCaption', [ |
|
| 1137 | 'chat_id' => $chatId, |
|
| 1138 | 'message_id' => $messageId, |
|
| 1139 | 'inline_message_id' => $inlineMessageId, |
|
| 1140 | 'caption' => $caption, |
|
| 1141 | 'reply_markup' => is_null($replyMarkup) ? $replyMarkup : $replyMarkup->toJson(), |
|
| 1142 | ])); |
|
| 1143 | } |
|
| 1144 | ||
| 1145 | /** |
|
| 1146 | * Use this method to edit animation, audio, document, photo, or video messages. |
|
| @@ 1162-1176 (lines=15) @@ | ||
| 1159 | * @throws HttpException |
|
| 1160 | * @throws InvalidJsonException |
|
| 1161 | */ |
|
| 1162 | public function editMessageMedia( |
|
| 1163 | $chatId, |
|
| 1164 | $messageId, |
|
| 1165 | InputMedia $media, |
|
| 1166 | $inlineMessageId = null, |
|
| 1167 | $replyMarkup = null |
|
| 1168 | ) { |
|
| 1169 | return Message::fromResponse($this->call('editMessageMedia', [ |
|
| 1170 | 'chat_id' => $chatId, |
|
| 1171 | 'message_id' => $messageId, |
|
| 1172 | 'inline_message_id' => $inlineMessageId, |
|
| 1173 | 'media' => $media->toJson(), |
|
| 1174 | 'reply_markup' => is_null($replyMarkup) ? $replyMarkup : $replyMarkup->toJson(), |
|
| 1175 | ])); |
|
| 1176 | } |
|
| 1177 | ||
| 1178 | /** |
|
| 1179 | * Use this method to edit only the reply markup of messages sent by the bot or via the bot |
|
| @@ 1807-1823 (lines=17) @@ | ||
| 1804 | * @throws \TelegramBot\Api\InvalidArgumentException |
|
| 1805 | * @throws \TelegramBot\Api\Exception |
|
| 1806 | */ |
|
| 1807 | public function sendPoll( |
|
| 1808 | $chatId, |
|
| 1809 | $question, |
|
| 1810 | $options, |
|
| 1811 | $disableNotification = false, |
|
| 1812 | $replyToMessageId = null, |
|
| 1813 | $replyMarkup = null |
|
| 1814 | ) { |
|
| 1815 | return Message::fromResponse($this->call('sendPoll', [ |
|
| 1816 | 'chat_id' => $chatId, |
|
| 1817 | 'question' => $question, |
|
| 1818 | 'options' => json_encode($options), |
|
| 1819 | 'disable_notification' => (bool)$disableNotification, |
|
| 1820 | 'reply_to_message_id' => (int)$replyToMessageId, |
|
| 1821 | 'reply_markup' => is_null($replyMarkup) ? $replyMarkup : $replyMarkup->toJson(), |
|
| 1822 | ])); |
|
| 1823 | } |
|
| 1824 | ||
| 1825 | /** |
|
| 1826 | * Use this method to stop a poll which was sent by the bot. |
|