| @@ 706-720 (lines=15) @@ | ||
| 703 | * @throws \TelegramBot\Api\InvalidArgumentException |
|
| 704 | * @throws \TelegramBot\Api\Exception |
|
| 705 | */ |
|
| 706 | public function sendSticker( |
|
| 707 | $chatId, |
|
| 708 | $sticker, |
|
| 709 | $replyToMessageId = null, |
|
| 710 | $replyMarkup = null, |
|
| 711 | $disableNotification = false |
|
| 712 | ) { |
|
| 713 | return Message::fromResponse($this->call('sendSticker', [ |
|
| 714 | 'chat_id' => $chatId, |
|
| 715 | 'sticker' => $sticker, |
|
| 716 | 'reply_to_message_id' => $replyToMessageId, |
|
| 717 | 'reply_markup' => is_null($replyMarkup) ? $replyMarkup : $replyMarkup->toJson(), |
|
| 718 | 'disable_notification' => (bool)$disableNotification, |
|
| 719 | ])); |
|
| 720 | } |
|
| 721 | ||
| 722 | /** |
|
| 723 | * Use this method to send video files, |
|
| @@ 1224-1240 (lines=17) @@ | ||
| 1221 | * @throws \TelegramBot\Api\InvalidArgumentException |
|
| 1222 | * @throws \TelegramBot\Api\Exception |
|
| 1223 | */ |
|
| 1224 | public function editMessageCaption( |
|
| 1225 | $chatId, |
|
| 1226 | $messageId, |
|
| 1227 | $caption = null, |
|
| 1228 | $replyMarkup = null, |
|
| 1229 | $inlineMessageId = null, |
|
| 1230 | $parseMode = null |
|
| 1231 | ) { |
|
| 1232 | return Message::fromResponse($this->call('editMessageCaption', [ |
|
| 1233 | 'chat_id' => $chatId, |
|
| 1234 | 'message_id' => $messageId, |
|
| 1235 | 'inline_message_id' => $inlineMessageId, |
|
| 1236 | 'caption' => $caption, |
|
| 1237 | 'reply_markup' => is_null($replyMarkup) ? $replyMarkup : $replyMarkup->toJson(), |
|
| 1238 | 'parse_mode' => $parseMode |
|
| 1239 | ])); |
|
| 1240 | } |
|
| 1241 | ||
| 1242 | /** |
|
| 1243 | * Use this method to edit animation, audio, document, photo, or video messages. |
|
| @@ 1260-1274 (lines=15) @@ | ||
| 1257 | * @throws HttpException |
|
| 1258 | * @throws InvalidJsonException |
|
| 1259 | */ |
|
| 1260 | public function editMessageMedia( |
|
| 1261 | $chatId, |
|
| 1262 | $messageId, |
|
| 1263 | InputMedia $media, |
|
| 1264 | $inlineMessageId = null, |
|
| 1265 | $replyMarkup = null |
|
| 1266 | ) { |
|
| 1267 | return Message::fromResponse($this->call('editMessageMedia', [ |
|
| 1268 | 'chat_id' => $chatId, |
|
| 1269 | 'message_id' => $messageId, |
|
| 1270 | 'inline_message_id' => $inlineMessageId, |
|
| 1271 | 'media' => $media->toJson(), |
|
| 1272 | 'reply_markup' => is_null($replyMarkup) ? $replyMarkup : $replyMarkup->toJson(), |
|
| 1273 | ])); |
|
| 1274 | } |
|
| 1275 | ||
| 1276 | /** |
|
| 1277 | * Use this method to edit only the reply markup of messages sent by the bot or via the bot |
|
| @@ 1958-1970 (lines=13) @@ | ||
| 1955 | * @throws HttpException |
|
| 1956 | * @throws InvalidJsonException |
|
| 1957 | */ |
|
| 1958 | public function sendDice( |
|
| 1959 | $chatId, |
|
| 1960 | $disableNotification = false, |
|
| 1961 | $replyToMessageId = null, |
|
| 1962 | $replyMarkup = null |
|
| 1963 | ) { |
|
| 1964 | return Message::fromResponse($this->call('sendDice', [ |
|
| 1965 | 'chat_id' => $chatId, |
|
| 1966 | 'disable_notification' => (bool) $disableNotification, |
|
| 1967 | 'reply_to_message_id' => (int) $replyToMessageId, |
|
| 1968 | 'reply_markup' => $replyMarkup === null ? $replyMarkup : $replyMarkup->toJson(), |
|
| 1969 | ])); |
|
| 1970 | } |
|
| 1971 | ||
| 1972 | /** |
|
| 1973 | * Use this method to stop a poll which was sent by the bot. |
|