Update
class Update
This object represents an incoming update.At most one of the optional parameters can be present in any given update.
Methods
No description
The update's unique identifier. Update identifiers start from a certain positive number and increase sequentially. This ID becomes especially handy if you're using webhooks, since it allows you to ignore repeated updates or to restore the correct update sequence, should they get out of order. If there are no new updates for at least a week, then identifier of the next update will be chosen randomly instead of sequentially.
Optional. New incoming message of any kind - text, photo, sticker, etc.
Optional. New version of a message that is known to the bot and was edited.
Optional. New incoming channel post of any kind - text, photo, sticker, etc.
Optional. New version of a channel post that is known to the bot and was edited.
Optional. New incoming inline query.
Optional. The result of an inline query that was chosen by a user and sent to their chat partner. Please see our documentation on the feedback collecting for details on how to enable these updates for your bot.
Optional. New incoming callback query.
Optional. New incoming shipping query. Only for invoices with flexible price.
Optional. New incoming pre-checkout query. Contains full information about checkout.
Optional. New poll state. Bots receive only updates about stopped polls and polls, which are sent by the bot.
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.
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.
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.
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.
Details
at line 27
__construct(int $update_id, Message|null $message = null, Message|null $edited_message = null, Message|null $channel_post = null, Message|null $edited_channel_post = null, InlineQuery|null $inline_query = null, ChosenInlineResult|null $chosen_inline_result = null, CallbackQuery|null $callback_query = null, ShippingQuery|null $shipping_query = null, PreCheckoutQuery|null $pre_checkout_query = null, Poll|null $poll = null, PollAnswer|null $poll_answer = null, ChatMemberUpdated|null $my_chat_member = null, ChatMemberUpdated|null $chat_member = null, ChatJoinRequest|null $chat_join_request = null)
No description
at line 49
int
getUpdateId()
The update's unique identifier. Update identifiers start from a certain positive number and increase sequentially. This ID becomes especially handy if you're using webhooks, since it allows you to ignore repeated updates or to restore the correct update sequence, should they get out of order. If there are no new updates for at least a week, then identifier of the next update will be chosen randomly instead of sequentially.
at line 57
Message|null
getMessage()
Optional. New incoming message of any kind - text, photo, sticker, etc.
at line 65
Message|null
getEditedMessage()
Optional. New version of a message that is known to the bot and was edited.
at line 73
Message|null
getChannelPost()
Optional. New incoming channel post of any kind - text, photo, sticker, etc.
at line 81
Message|null
getEditedChannelPost()
Optional. New version of a channel post that is known to the bot and was edited.
at line 89
InlineQuery|null
getInlineQuery()
Optional. New incoming inline query.
at line 97
ChosenInlineResult|null
getChosenInlineResult()
Optional. The result of an inline query that was chosen by a user and sent to their chat partner. Please see our documentation on the feedback collecting for details on how to enable these updates for your bot.
at line 105
CallbackQuery|null
getCallbackQuery()
Optional. New incoming callback query.
at line 113
ShippingQuery|null
getShippingQuery()
Optional. New incoming shipping query. Only for invoices with flexible price.
at line 121
PreCheckoutQuery|null
getPreCheckoutQuery()
Optional. New incoming pre-checkout query. Contains full information about checkout.
at line 129
Poll|null
getPoll()
Optional. New poll state. Bots receive only updates about stopped polls and polls, which are sent by the bot.
at line 137
PollAnswer|null
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.
at line 145
ChatMemberUpdated|null
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.
at line 153
ChatMemberUpdated|null
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.
at line 161
ChatJoinRequest|null
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.