1 | <?php |
||
25 | trait Chat |
||
26 | { |
||
27 | abstract protected function execRequest(string $url); |
||
28 | |||
29 | /** |
||
30 | * \addtogroup Api Api Methods |
||
31 | * @{ |
||
32 | */ |
||
33 | |||
34 | /** |
||
35 | * \brief A simple method for testing bot's auth token. |
||
36 | * \details Requires no parameters. Returns basic [information about the bot](https://core.telegram.org/bots/api#getme) |
||
37 | * @return Array|false Bot info |
||
38 | */ |
||
39 | public function getMe() |
||
43 | |||
44 | /** |
||
45 | * \brief Get info about a chat. |
||
46 | * \details Use this method to get 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) |
||
47 | * @param int|string $chat_id Unique identifier for the target chat or username of the target supergroup or channel (in the format <code>@channelusername</code>) |
||
48 | * @return Array|false Information about the chat. |
||
49 | */ |
||
50 | 1 | public function getChat($chat_id) |
|
58 | |||
59 | /** |
||
60 | * \brief Use this method to get the list of chat's administrators. |
||
61 | * @param string $chat_id Unique identifier for the target chat or username of the target supergroup or channel (in the format <code>@channelusername</code>) |
||
62 | * @return Array|false On success, returns an Array of ChatMember objects that contains information about all chat administrators except other bots. If the chat is a group or a supergroup and no administrators were appointed, only the creator will be returned. |
||
63 | */ |
||
64 | public function getChatAdministrators($chat_id) |
||
72 | |||
73 | /** @} */ |
||
74 | |||
75 | /** @} */ |
||
76 | } |
||
77 |