@@ 630-644 (lines=15) @@ | ||
627 | * @throws \TelegramBot\Api\InvalidArgumentException |
|
628 | * @throws \TelegramBot\Api\Exception |
|
629 | */ |
|
630 | public function sendSticker( |
|
631 | $chatId, |
|
632 | $sticker, |
|
633 | $replyToMessageId = null, |
|
634 | $replyMarkup = null, |
|
635 | $disableNotification = false |
|
636 | ) { |
|
637 | return Message::fromResponse($this->call('sendSticker', [ |
|
638 | 'chat_id' => $chatId, |
|
639 | 'sticker' => $sticker, |
|
640 | 'reply_to_message_id' => $replyToMessageId, |
|
641 | 'reply_markup' => is_null($replyMarkup) ? $replyMarkup : $replyMarkup->toJson(), |
|
642 | 'disable_notification' => (bool)$disableNotification, |
|
643 | ])); |
|
644 | } |
|
645 | ||
646 | /** |
|
647 | * Use this method to send video files, |
|
@@ 746-762 (lines=17) @@ | ||
743 | * @throws \TelegramBot\Api\InvalidArgumentException |
|
744 | * @throws \TelegramBot\Api\Exception |
|
745 | */ |
|
746 | public function sendPoll( |
|
747 | $chatId, |
|
748 | $question, |
|
749 | $options = array(), |
|
750 | $replyToMessageId = null, |
|
751 | $replyMarkup = null, |
|
752 | $disableNotification = false |
|
753 | ) { |
|
754 | return Message::fromResponse($this->call('sendPoll', [ |
|
755 | 'chat_id' => $chatId, |
|
756 | 'question' => $question, |
|
757 | 'options' => json_encode($options), |
|
758 | 'reply_to_message_id' => (int)$replyToMessageId, |
|
759 | 'reply_markup' => is_null($replyMarkup) ? $replyMarkup : $replyMarkup->toJson(), |
|
760 | 'disable_notification' => (bool)$disableNotification |
|
761 | ])); |
|
762 | } |
|
763 | ||
764 | /** |
|
765 | * Use this method to stop polling. On success, the sent \TelegramBot\Api\Types\Poll is returned. |
|
@@ 1130-1144 (lines=15) @@ | ||
1127 | * @throws \TelegramBot\Api\InvalidArgumentException |
|
1128 | * @throws \TelegramBot\Api\Exception |
|
1129 | */ |
|
1130 | public function editMessageCaption( |
|
1131 | $chatId, |
|
1132 | $messageId, |
|
1133 | $caption = null, |
|
1134 | $replyMarkup = null, |
|
1135 | $inlineMessageId = null |
|
1136 | ) { |
|
1137 | return Message::fromResponse($this->call('editMessageCaption', [ |
|
1138 | 'chat_id' => $chatId, |
|
1139 | 'message_id' => $messageId, |
|
1140 | 'inline_message_id' => $inlineMessageId, |
|
1141 | 'caption' => $caption, |
|
1142 | 'reply_markup' => is_null($replyMarkup) ? $replyMarkup : $replyMarkup->toJson(), |
|
1143 | ])); |
|
1144 | } |
|
1145 | ||
1146 | /** |
|
1147 | * Use this method to edit only the reply markup of messages sent by the bot or via the bot |