| @@ 705-719 (lines=15) @@ | ||
| 702 | * @throws \TelegramBot\Api\InvalidArgumentException | |
| 703 | * @throws \TelegramBot\Api\Exception | |
| 704 | */ | |
| 705 | public function sendSticker( | |
| 706 | $chatId, | |
| 707 | $sticker, | |
| 708 | $replyToMessageId = null, | |
| 709 | $replyMarkup = null, | |
| 710 | $disableNotification = false | |
| 711 |     ) { | |
| 712 |         return Message::fromResponse($this->call('sendSticker', [ | |
| 713 | 'chat_id' => $chatId, | |
| 714 | 'sticker' => $sticker, | |
| 715 | 'reply_to_message_id' => $replyToMessageId, | |
| 716 | 'reply_markup' => is_null($replyMarkup) ? $replyMarkup : $replyMarkup->toJson(), | |
| 717 | 'disable_notification' => (bool)$disableNotification, | |
| 718 | ])); | |
| 719 | } | |
| 720 | ||
| 721 | /** | |
| 722 | * Use this method to send video files, | |
| @@ 1190-1206 (lines=17) @@ | ||
| 1187 | * @throws \TelegramBot\Api\InvalidArgumentException | |
| 1188 | * @throws \TelegramBot\Api\Exception | |
| 1189 | */ | |
| 1190 | public function editMessageCaption( | |
| 1191 | $chatId, | |
| 1192 | $messageId, | |
| 1193 | $caption = null, | |
| 1194 | $replyMarkup = null, | |
| 1195 | $inlineMessageId = null, | |
| 1196 | $parseMode = null | |
| 1197 |     ) { | |
| 1198 |         return Message::fromResponse($this->call('editMessageCaption', [ | |
| 1199 | 'chat_id' => $chatId, | |
| 1200 | 'message_id' => $messageId, | |
| 1201 | 'inline_message_id' => $inlineMessageId, | |
| 1202 | 'caption' => $caption, | |
| 1203 | 'reply_markup' => is_null($replyMarkup) ? $replyMarkup : $replyMarkup->toJson(), | |
| 1204 | 'parse_mode' => $parseMode | |
| 1205 | ])); | |
| 1206 | } | |
| 1207 | ||
| 1208 | /** | |
| 1209 | * Use this method to edit animation, audio, document, photo, or video messages. | |
| @@ 1226-1240 (lines=15) @@ | ||
| 1223 | * @throws HttpException | |
| 1224 | * @throws InvalidJsonException | |
| 1225 | */ | |
| 1226 | public function editMessageMedia( | |
| 1227 | $chatId, | |
| 1228 | $messageId, | |
| 1229 | InputMedia $media, | |
| 1230 | $inlineMessageId = null, | |
| 1231 | $replyMarkup = null | |
| 1232 |     ) { | |
| 1233 |         return Message::fromResponse($this->call('editMessageMedia', [ | |
| 1234 | 'chat_id' => $chatId, | |
| 1235 | 'message_id' => $messageId, | |
| 1236 | 'inline_message_id' => $inlineMessageId, | |
| 1237 | 'media' => $media->toJson(), | |
| 1238 | 'reply_markup' => is_null($replyMarkup) ? $replyMarkup : $replyMarkup->toJson(), | |
| 1239 | ])); | |
| 1240 | } | |
| 1241 | ||
| 1242 | /** | |
| 1243 | * Use this method to edit only the reply markup of messages sent by the bot or via the bot | |
| @@ 1924-1936 (lines=13) @@ | ||
| 1921 | * @throws HttpException | |
| 1922 | * @throws InvalidJsonException | |
| 1923 | */ | |
| 1924 | public function sendDice( | |
| 1925 | $chatId, | |
| 1926 | $disableNotification = false, | |
| 1927 | $replyToMessageId = null, | |
| 1928 | $replyMarkup = null | |
| 1929 |     ) { | |
| 1930 |         return Message::fromResponse($this->call('sendDice', [ | |
| 1931 | 'chat_id' => $chatId, | |
| 1932 | 'disable_notification' => (bool) $disableNotification, | |
| 1933 | 'reply_to_message_id' => (int) $replyToMessageId, | |
| 1934 | 'reply_markup' => $replyMarkup === null ? $replyMarkup : $replyMarkup->toJson(), | |
| 1935 | ])); | |
| 1936 | } | |
| 1937 | ||
| 1938 | /** | |
| 1939 | * Use this method to stop a poll which was sent by the bot. | |