Update class

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

Optional fields may be not returned when irrelevant.

https://core.telegram.org/bots/api#update

Annotations
  • @JsonSerializable.new(includeIfNull: false)

Constructors

Update({int? updateID, Message? message, Message? editedMessage, Message? channelPost, Message? editedChannelPost, InlineQuery? inlineQuery, ChosenInlineResult? chosenInlineResult, CallbackQuery? callbackQuery, ShippingQuery? shippingQuery, PreCheckoutQuery? preCheckoutQuery, Poll? poll, PollAnswer? pollAnswer})
Update.fromJson(Map<String, dynamic> json)
factory

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
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
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<String, dynamic>
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited