This object represents an incoming update. Objects of this class are comparable in terms of equality. Two objects of this class are considered equal, if their :attr:`update_id` is equal. Note: At most one of the optional parameters can be present in any given update. .. se
| 45 | |
| 46 | |
| 47 | class Update(TelegramObject): |
| 48 | """This object represents an incoming update. |
| 49 | |
| 50 | Objects of this class are comparable in terms of equality. Two objects of this class are |
| 51 | considered equal, if their :attr:`update_id` is equal. |
| 52 | |
| 53 | Note: |
| 54 | At most one of the optional parameters can be present in any given update. |
| 55 | |
| 56 | .. seealso:: :wiki:`Your First Bot <Extensions---Your-first-Bot>` |
| 57 | |
| 58 | Args: |
| 59 | update_id (:obj:`int`): The update's unique identifier. Update identifiers start from a |
| 60 | certain positive number and increase sequentially. This ID becomes especially handy if |
| 61 | you're using Webhooks, since it allows you to ignore repeated updates or to restore the |
| 62 | correct update sequence, should they get out of order. If there are no new updates for |
| 63 | at least a week, then identifier of the next update will be chosen randomly instead of |
| 64 | sequentially. |
| 65 | message (:class:`telegram.Message`, optional): New incoming message of any kind - text, |
| 66 | photo, sticker, etc. |
| 67 | edited_message (:class:`telegram.Message`, optional): New version of a message that is |
| 68 | known to the bot and was edited. This update may at times be triggered by changes to |
| 69 | message fields that are either unavailable or not actively used by your bot. |
| 70 | channel_post (:class:`telegram.Message`, optional): New incoming channel post of any kind |
| 71 | - text, photo, sticker, etc. |
| 72 | edited_channel_post (:class:`telegram.Message`, optional): New version of a channel post |
| 73 | that is known to the bot and was edited. This update may at times be triggered by |
| 74 | changes to message fields that are either unavailable or not actively used by your bot. |
| 75 | inline_query (:class:`telegram.InlineQuery`, optional): New incoming inline query. |
| 76 | chosen_inline_result (:class:`telegram.ChosenInlineResult`, optional): The result of an |
| 77 | inline query that was chosen by a user and sent to their chat partner. |
| 78 | callback_query (:class:`telegram.CallbackQuery`, optional): New incoming callback query. |
| 79 | shipping_query (:class:`telegram.ShippingQuery`, optional): New incoming shipping query. |
| 80 | Only for invoices with flexible price. |
| 81 | pre_checkout_query (:class:`telegram.PreCheckoutQuery`, optional): New incoming |
| 82 | pre-checkout query. Contains full information about checkout. |
| 83 | poll (:class:`telegram.Poll`, optional): New poll state. Bots receive only updates about |
| 84 | manually stopped polls and polls, which are sent by the bot. |
| 85 | poll_answer (:class:`telegram.PollAnswer`, optional): A user changed their answer |
| 86 | in a non-anonymous poll. Bots receive new votes only in polls that were sent |
| 87 | by the bot itself. |
| 88 | my_chat_member (:class:`telegram.ChatMemberUpdated`, optional): The bot's chat member |
| 89 | status was updated in a chat. For private chats, this update is received only when the |
| 90 | bot is blocked or unblocked by the user. |
| 91 | |
| 92 | .. versionadded:: 13.4 |
| 93 | chat_member (:class:`telegram.ChatMemberUpdated`, optional): A chat member's status was |
| 94 | updated in a chat. The bot must be an administrator in the chat and must explicitly |
| 95 | specify :attr:`CHAT_MEMBER` in the list of |
| 96 | :paramref:`telegram.ext.Application.run_polling.allowed_updates` to receive these |
| 97 | updates (see :meth:`telegram.Bot.get_updates`, :meth:`telegram.Bot.set_webhook`, |
| 98 | :meth:`telegram.ext.Application.run_polling` and |
| 99 | :meth:`telegram.ext.Application.run_webhook`). |
| 100 | |
| 101 | .. versionadded:: 13.4 |
| 102 | chat_join_request (:class:`telegram.ChatJoinRequest`, optional): A request to join the |
| 103 | chat has been sent. The bot must have the |
| 104 | :attr:`telegram.ChatPermissions.can_invite_users` administrator right in the chat to |
no outgoing calls
searching dependent graphs…