diff --git a/CHANGELOG.md b/CHANGELOG.md index 6af7076e..efef9610 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,7 @@ Exclamation symbols (:exclamation:) note something of importance e.g. breaking c - 64 bit PHP installs are required to handle files larger than 2GB! ### Added - Bot API 6.1 (@jyxjjj, @OxMohsen, @noplanman) (#1333, #1338, #1339) +- New Update field helpers for Command class. ### Changed ### Deprecated ### Removed diff --git a/src/Commands/Command.php b/src/Commands/Command.php index b3553f8b..96fa3d27 100644 --- a/src/Commands/Command.php +++ b/src/Commands/Command.php @@ -13,12 +13,15 @@ use Longman\TelegramBot\DB; use Longman\TelegramBot\Entities\CallbackQuery; +use Longman\TelegramBot\Entities\ChatJoinRequest; +use Longman\TelegramBot\Entities\ChatMemberUpdated; use Longman\TelegramBot\Entities\ChosenInlineResult; use Longman\TelegramBot\Entities\InlineQuery; use Longman\TelegramBot\Entities\Message; use Longman\TelegramBot\Entities\Payments\PreCheckoutQuery; use Longman\TelegramBot\Entities\Payments\ShippingQuery; use Longman\TelegramBot\Entities\Poll; +use Longman\TelegramBot\Entities\PollAnswer; use Longman\TelegramBot\Entities\ServerResponse; use Longman\TelegramBot\Entities\Update; use Longman\TelegramBot\Exception\TelegramException; @@ -40,6 +43,10 @@ * @method ShippingQuery getShippingQuery() Optional. New incoming shipping query. Only for invoices with flexible price * @method PreCheckoutQuery getPreCheckoutQuery() Optional. New incoming pre-checkout query. Contains full information about checkout * @method Poll getPoll() Optional. New poll state. Bots receive only updates about polls, which are sent or stopped by the bot + * @method PollAnswer getPollAnswer() Optional. A user changed their answer in a non-anonymous poll. Bots receive new votes only in polls that were sent by the bot itself. + * @method ChatMemberUpdated getMyChatMember() Optional. The bot's chat member status was updated in a chat. For private chats, this update is received only when the bot is blocked or unblocked by the user. + * @method ChatMemberUpdated getChatMember() Optional. 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. + * @method ChatJoinRequest getChatJoinRequest() Optional. 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. */ abstract class Command {