Update class
This object represents an incoming update. At most one of the optional parameters can be present in any given update.
Constructors
- Update({required int updateId, Message? message, Message? editedMessage, Message? channelPost, Message? editedChannelPost, InlineQuery? inlineQuery, ChosenInlineResult? chosenInlineResult, CallbackQuery? callbackQuery, ShippingQuery? shippingQuery, PreCheckoutQuery? preCheckoutQuery, Poll? poll, PollAnswer? pollAnswer, ChatMemberUpdated? myChatMember, ChatMemberUpdated? chatMember, ChatJoinRequest? chatJoinRequest})
- Basic constructor
Properties
- callbackQuery ↔ CallbackQuery?
-
Optional.
New incoming callback query
getter/setter pair
- channelPost ↔ Message?
-
Optional.
New incoming channel post of any kind - text, photo, sticker, etc.
getter/setter pair
- chatJoinRequest ↔ ChatJoinRequest?
-
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.
getter/setter pair
- chatMember ↔ ChatMemberUpdated?
-
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.
getter/setter pair
- chosenInlineResult ↔ ChosenInlineResult?
-
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.
getter/setter pair
- editedChannelPost ↔ Message?
-
Optional.
New version of a channel post that is known to the bot and was edited
getter/setter pair
- editedMessage ↔ Message?
-
Optional.
New version of a message that is known to the bot and was edited
getter/setter pair
- hashCode → int
-
The hash code for this object.
no setterinherited
- inlineQuery ↔ InlineQuery?
-
Optional.
New incoming inline query
getter/setter pair
- message ↔ Message?
-
Optional.
New incoming message of any kind - text, photo, sticker, etc.
getter/setter pair
- myChatMember ↔ ChatMemberUpdated?
-
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.
getter/setter pair
- poll ↔ Poll?
-
Optional.
New poll state.
Bots receive only updates about stopped polls and polls,
which are sent by the bot
getter/setter pair
- pollAnswer ↔ PollAnswer?
-
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.
getter/setter pair
- preCheckoutQuery ↔ PreCheckoutQuery?
-
Optional.
New incoming pre-checkout query. Contains full information about checkout
getter/setter pair
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- shippingQuery ↔ ShippingQuery?
-
Optional.
New incoming shipping query. Only for invoices with flexible price
getter/setter pair
- updateId ↔ int
-
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.
getter/setter pair
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Map - Creates a json from the object
-
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited