|
@@ 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. |
|
@@ 1163-1177 (lines=15) @@
|
| 1160 |
|
* @throws HttpException |
| 1161 |
|
* @throws InvalidJsonException |
| 1162 |
|
*/ |
| 1163 |
|
public function editMessageMedia( |
| 1164 |
|
$chatId, |
| 1165 |
|
$messageId, |
| 1166 |
|
InputMedia $media, |
| 1167 |
|
$inlineMessageId = null, |
| 1168 |
|
$replyMarkup = null |
| 1169 |
|
) { |
| 1170 |
|
return Message::fromResponse($this->call('editMessageMedia', [ |
| 1171 |
|
'chat_id' => $chatId, |
| 1172 |
|
'message_id' => $messageId, |
| 1173 |
|
'inline_message_id' => $inlineMessageId, |
| 1174 |
|
'media' => $media->toJson(), |
| 1175 |
|
'reply_markup' => is_null($replyMarkup) ? $replyMarkup : $replyMarkup->toJson(), |
| 1176 |
|
])); |
| 1177 |
|
} |
| 1178 |
|
|
| 1179 |
|
/** |
| 1180 |
|
* Use this method to edit only the reply markup of messages sent by the bot or via the bot |
|
@@ 1861-1873 (lines=13) @@
|
| 1858 |
|
* @throws HttpException |
| 1859 |
|
* @throws InvalidJsonException |
| 1860 |
|
*/ |
| 1861 |
|
public function sendDice( |
| 1862 |
|
$chatId, |
| 1863 |
|
$disableNotification = false, |
| 1864 |
|
$replyToMessageId = null, |
| 1865 |
|
$replyMarkup = null |
| 1866 |
|
) { |
| 1867 |
|
return Message::fromResponse($this->call('sendDice', [ |
| 1868 |
|
'chat_id' => $chatId, |
| 1869 |
|
'disable_notification' => (bool) $disableNotification, |
| 1870 |
|
'reply_to_message_id' => (int) $replyToMessageId, |
| 1871 |
|
'reply_markup' => $replyMarkup === null ? $replyMarkup : $replyMarkup->toJson(), |
| 1872 |
|
])); |
| 1873 |
|
} |
| 1874 |
|
|
| 1875 |
|
/** |
| 1876 |
|
* Use this method to stop a poll which was sent by the bot. |