@@ 660-674 (lines=15) @@ | ||
657 | * @throws \TelegramBot\Api\InvalidArgumentException |
|
658 | * @throws \TelegramBot\Api\Exception |
|
659 | */ |
|
660 | public function sendSticker( |
|
661 | $chatId, |
|
662 | $sticker, |
|
663 | $replyToMessageId = null, |
|
664 | $replyMarkup = null, |
|
665 | $disableNotification = false |
|
666 | ) { |
|
667 | return Message::fromResponse($this->call('sendSticker', [ |
|
668 | 'chat_id' => $chatId, |
|
669 | 'sticker' => $sticker, |
|
670 | 'reply_to_message_id' => $replyToMessageId, |
|
671 | 'reply_markup' => is_null($replyMarkup) ? $replyMarkup : $replyMarkup->toJson(), |
|
672 | 'disable_notification' => (bool)$disableNotification, |
|
673 | ])); |
|
674 | } |
|
675 | ||
676 | /** |
|
677 | * Use this method to send video files, |
|
@@ 1144-1158 (lines=15) @@ | ||
1141 | * @throws \TelegramBot\Api\InvalidArgumentException |
|
1142 | * @throws \TelegramBot\Api\Exception |
|
1143 | */ |
|
1144 | public function editMessageCaption( |
|
1145 | $chatId, |
|
1146 | $messageId, |
|
1147 | $caption = null, |
|
1148 | $replyMarkup = null, |
|
1149 | $inlineMessageId = null |
|
1150 | ) { |
|
1151 | return Message::fromResponse($this->call('editMessageCaption', [ |
|
1152 | 'chat_id' => $chatId, |
|
1153 | 'message_id' => $messageId, |
|
1154 | 'inline_message_id' => $inlineMessageId, |
|
1155 | 'caption' => $caption, |
|
1156 | 'reply_markup' => is_null($replyMarkup) ? $replyMarkup : $replyMarkup->toJson(), |
|
1157 | ])); |
|
1158 | } |
|
1159 | ||
1160 | /** |
|
1161 | * Use this method to edit animation, audio, document, photo, or video messages. |
|
@@ 1178-1192 (lines=15) @@ | ||
1175 | * @throws HttpException |
|
1176 | * @throws InvalidJsonException |
|
1177 | */ |
|
1178 | public function editMessageMedia( |
|
1179 | $chatId, |
|
1180 | $messageId, |
|
1181 | InputMedia $media, |
|
1182 | $inlineMessageId = null, |
|
1183 | $replyMarkup = null |
|
1184 | ) { |
|
1185 | return Message::fromResponse($this->call('editMessageMedia', [ |
|
1186 | 'chat_id' => $chatId, |
|
1187 | 'message_id' => $messageId, |
|
1188 | 'inline_message_id' => $inlineMessageId, |
|
1189 | 'media' => $media->toJson(), |
|
1190 | 'reply_markup' => is_null($replyMarkup) ? $replyMarkup : $replyMarkup->toJson(), |
|
1191 | ])); |
|
1192 | } |
|
1193 | ||
1194 | /** |
|
1195 | * Use this method to edit only the reply markup of messages sent by the bot or via the bot |
|
@@ 1876-1888 (lines=13) @@ | ||
1873 | * @throws HttpException |
|
1874 | * @throws InvalidJsonException |
|
1875 | */ |
|
1876 | public function sendDice( |
|
1877 | $chatId, |
|
1878 | $disableNotification = false, |
|
1879 | $replyToMessageId = null, |
|
1880 | $replyMarkup = null |
|
1881 | ) { |
|
1882 | return Message::fromResponse($this->call('sendDice', [ |
|
1883 | 'chat_id' => $chatId, |
|
1884 | 'disable_notification' => (bool) $disableNotification, |
|
1885 | 'reply_to_message_id' => (int) $replyToMessageId, |
|
1886 | 'reply_markup' => $replyMarkup === null ? $replyMarkup : $replyMarkup->toJson(), |
|
1887 | ])); |
|
1888 | } |
|
1889 | ||
1890 | /** |
|
1891 | * Use this method to stop a poll which was sent by the bot. |