From f26f1c963f029c71b2d1b622c476297f4fe1ef51 Mon Sep 17 00:00:00 2001 From: netkas Date: Sun, 3 Nov 2024 17:28:51 -0500 Subject: [PATCH] Update documentation com --- src/TgBotLib/Events/ChatBoostEvent.php | 2 ++ src/TgBotLib/Events/ChatJoinRequestEvent.php | 6 +++++- src/TgBotLib/Events/ChatMemberUpdatedEvent.php | 3 ++- src/TgBotLib/Events/ChosenInlineResultEvent.php | 2 +- src/TgBotLib/Events/InlineQueryEvent.php | 2 +- src/TgBotLib/Events/PollEvent.php | 5 +++-- src/TgBotLib/Events/RemovedChatBoostEvent.php | 2 +- 7 files changed, 15 insertions(+), 7 deletions(-) diff --git a/src/TgBotLib/Events/ChatBoostEvent.php b/src/TgBotLib/Events/ChatBoostEvent.php index 0a87d41..685a16c 100644 --- a/src/TgBotLib/Events/ChatBoostEvent.php +++ b/src/TgBotLib/Events/ChatBoostEvent.php @@ -17,6 +17,8 @@ } /** + * A chat boost was added or changed. The bot must be an administrator in the chat to receive these updates. + * * @return ChatBoostUpdated The updated chat boost information. */ protected function getChatBoost(): ChatBoostUpdated diff --git a/src/TgBotLib/Events/ChatJoinRequestEvent.php b/src/TgBotLib/Events/ChatJoinRequestEvent.php index 599042c..2efca36 100644 --- a/src/TgBotLib/Events/ChatJoinRequestEvent.php +++ b/src/TgBotLib/Events/ChatJoinRequestEvent.php @@ -9,13 +9,17 @@ abstract class ChatJoinRequestEvent extends UpdateEvent { + /** + * @inheritDoc + */ public static function getEventType(): UpdateEventType { return UpdateEventType::CHAT_JOIN_REQUEST_EVENT; } /** - * Retrieves the chat join request from the update. + * A request to join the chat has been sent. The bot must have the can_invite_users + * administrator right in the chat to receive these updates. * * @return ChatJoinRequest The chat join request data. */ diff --git a/src/TgBotLib/Events/ChatMemberUpdatedEvent.php b/src/TgBotLib/Events/ChatMemberUpdatedEvent.php index cb1c62d..08d1222 100644 --- a/src/TgBotLib/Events/ChatMemberUpdatedEvent.php +++ b/src/TgBotLib/Events/ChatMemberUpdatedEvent.php @@ -18,7 +18,8 @@ } /** - * Retrieves the updated chat member information from the update object. + * A chat member's status was updated in a chat. The bot must be an administrator in the chat and must + * explicitly specify "chat_member" in the list of allowed_updates to receive these updates. * * @return ChatMemberUpdated The updated chat member instance. */ diff --git a/src/TgBotLib/Events/ChosenInlineResultEvent.php b/src/TgBotLib/Events/ChosenInlineResultEvent.php index cc67ab8..5687fe1 100644 --- a/src/TgBotLib/Events/ChosenInlineResultEvent.php +++ b/src/TgBotLib/Events/ChosenInlineResultEvent.php @@ -18,7 +18,7 @@ } /** - * Retrieves the chosen inline result from the current update. + * The result of an inline query that was chosen by a user and sent to their chat partner. * * @return ChosenInlineResult The chosen inline result associated with the current update. */ diff --git a/src/TgBotLib/Events/InlineQueryEvent.php b/src/TgBotLib/Events/InlineQueryEvent.php index dd9835e..86bd397 100644 --- a/src/TgBotLib/Events/InlineQueryEvent.php +++ b/src/TgBotLib/Events/InlineQueryEvent.php @@ -17,7 +17,7 @@ return UpdateEventType::INLINE_QUERY; } - /** + /**C * New incoming inline query * * @return InlineQuery diff --git a/src/TgBotLib/Events/PollEvent.php b/src/TgBotLib/Events/PollEvent.php index 372024b..b965f7b 100644 --- a/src/TgBotLib/Events/PollEvent.php +++ b/src/TgBotLib/Events/PollEvent.php @@ -18,9 +18,10 @@ } /** - * New poll state. Bots receive only updates about manually stopped polls and polls, which are sent by the bot + * A user changed their answer in a non-anonymous poll. + * Bots receive new votes only in polls that were sent by the bot itself. * - * @return Poll + * @return Poll The poll. */ protected function getPoll(): Poll { diff --git a/src/TgBotLib/Events/RemovedChatBoostEvent.php b/src/TgBotLib/Events/RemovedChatBoostEvent.php index 5910a77..2ae20a5 100644 --- a/src/TgBotLib/Events/RemovedChatBoostEvent.php +++ b/src/TgBotLib/Events/RemovedChatBoostEvent.php @@ -17,7 +17,7 @@ } /** - * Retrieves the removed chat boost from the update. + * A boost was removed from a chat. The bot must be an administrator in the chat to receive these updates. * * @return ChatBoostRemoved The chat boost that was removed. */