@@ 632-641 (lines=10) @@ | ||
629 | * - <code>find_location</code> for location data |
|
630 | * @return True on success. |
|
631 | */ |
|
632 | public function sendChatAction(string $action) : bool { |
|
633 | ||
634 | $parameters = [ |
|
635 | 'chat_id' => $this->chat_id, |
|
636 | 'action' => $action |
|
637 | ]; |
|
638 | ||
639 | return $this->exec_curl_request($this->api_url . 'sendChatAction?' . http_build_query($parameters)); |
|
640 | ||
641 | } |
|
642 | ||
643 | /** |
|
644 | * \brief Get info about a chat. |
|
@@ 648-656 (lines=9) @@ | ||
645 | * \details Use this method to get up to date information about the chat (current name of the user for one-on-one conversations, current username of a user, group or channel, etc.). [Api reference](https://core.telegram.org/bots/api#getchat) |
|
646 | * @param Unique identifier for the target chat or username of the target supergroup or channel (in the format <code>@channelusername</code>) |
|
647 | */ |
|
648 | public function getChat($chat_id) { |
|
649 | ||
650 | $parameters = [ |
|
651 | 'chat_id' => $chat_id, |
|
652 | ]; |
|
653 | ||
654 | return $this->exec_curl_request($this->api_url . 'getChat?' . http_build_query($parameters)); |
|
655 | ||
656 | } |
|
657 | ||
658 | /** |
|
659 | * \brief Use this method to get a list of administrators in a chat. |
|
@@ 755-765 (lines=11) @@ | ||
752 | * $message_id Identifier of the message to edit |
|
753 | * $inline_keyboard Inlike keyboard array (https://core.telegram.org/bots/api#inlinekeyboardmarkup) |
|
754 | */ |
|
755 | public function editMessageReplyMarkup($message_id, $inline_keyboard) { |
|
756 | ||
757 | $parameters = [ |
|
758 | 'chat_id' => $this->chat_id, |
|
759 | 'message_id' => $message_id, |
|
760 | 'reply_markup' => $inline_keyboard, |
|
761 | ]; |
|
762 | ||
763 | return $this->exec_curl_request($this->api_url . 'editMessageReplyMarkup?' . http_build_query($parameters)); |
|
764 | ||
765 | } |
|
766 | ||
767 | /* |
|
768 | * Answer a inline query (when the user write @botusername "Query") with a button, that will make user switch to the private chat with the bot, on the top of the results (https://core.telegram.org/bots/api#answerinlinequery) |