class Update

This object represents an incoming update.At most one of the optional parameters can be present in any given update.

Methods

__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

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.

Message|null
getMessage()

Optional. New incoming message of any kind - text, photo, sticker, etc.

Message|null
getEditedMessage()

Optional. New version of a message that is known to the bot and was edited.

Message|null
getChannelPost()

Optional. New incoming channel post of any kind - text, photo, sticker, etc.

Message|null
getEditedChannelPost()

Optional. New version of a channel post that is known to the bot and was edited.

InlineQuery|null
getInlineQuery()

Optional. New incoming inline query.

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.

CallbackQuery|null
getCallbackQuery()

Optional. New incoming callback query.

ShippingQuery|null
getShippingQuery()

Optional. New incoming shipping query. Only for invoices with flexible price.

PreCheckoutQuery|null
getPreCheckoutQuery()

Optional. New incoming pre-checkout query. Contains full information about checkout.

Poll|null
getPoll()

Optional. New poll state. Bots receive only updates about stopped polls and polls, which are sent by the bot.

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.

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.

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.

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.

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

Parameters

int $update_id
Message|null $message
Message|null $edited_message
Message|null $channel_post
Message|null $edited_channel_post
InlineQuery|null $inline_query
ChosenInlineResult|null $chosen_inline_result
CallbackQuery|null $callback_query
ShippingQuery|null $shipping_query
PreCheckoutQuery|null $pre_checkout_query
Poll|null $poll
PollAnswer|null $poll_answer
ChatMemberUpdated|null $my_chat_member
ChatMemberUpdated|null $chat_member
ChatJoinRequest|null $chat_join_request

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.

Return Value

int

at line 57
Message|null getMessage()

Optional. New incoming message of any kind - text, photo, sticker, etc.

Return Value

Message|null

at line 65
Message|null getEditedMessage()

Optional. New version of a message that is known to the bot and was edited.

Return Value

Message|null

at line 73
Message|null getChannelPost()

Optional. New incoming channel post of any kind - text, photo, sticker, etc.

Return Value

Message|null

at line 81
Message|null getEditedChannelPost()

Optional. New version of a channel post that is known to the bot and was edited.

Return Value

Message|null

at line 89
InlineQuery|null getInlineQuery()

Optional. New incoming inline query.

Return Value

InlineQuery|null

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.

Return Value

ChosenInlineResult|null

at line 105
CallbackQuery|null getCallbackQuery()

Optional. New incoming callback query.

Return Value

CallbackQuery|null

at line 113
ShippingQuery|null getShippingQuery()

Optional. New incoming shipping query. Only for invoices with flexible price.

Return Value

ShippingQuery|null

at line 121
PreCheckoutQuery|null getPreCheckoutQuery()

Optional. New incoming pre-checkout query. Contains full information about checkout.

Return Value

PreCheckoutQuery|null

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.

Return Value

Poll|null

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.

Return Value

PollAnswer|null

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.

Return Value

ChatMemberUpdated|null

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.

Return Value

ChatMemberUpdated|null

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.

Return Value

ChatJoinRequest|null