#[non_exhaustive]pub enum Update {
NewMessage(Message),
MessageEdited(Message),
MessageDeleted(MessageDeletion),
CallbackQuery(CallbackQuery),
InlineQuery(InlineQuery),
InlineSend(InlineSend),
Raw(Raw),
}Expand description
An update that indicates some event, which may be of interest to the logged-in account, has occured.
Only updates pertaining to messages are guaranteed to be delivered, and can be fetched on-demand if
they occured while the client was offline by enabling catch_up.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
NewMessage(Message)
Occurs whenever a new text message or a message with media is produced.
MessageEdited(Message)
Occurs when a message is updated.
MessageDeleted(MessageDeletion)
Occurs when a message is deleted.
CallbackQuery(CallbackQuery)
Occurs when Telegram calls back into your bot because an inline callback button was pressed.
InlineQuery(InlineQuery)
Occurs whenever you sign in as a bot and a user sends an inline query
such as @bot query.
InlineSend(InlineSend)
Represents an update of user choosing the result of inline query and sending it to their peer partner.
Raw(Raw)
Raw events are not actual events. Instead, they are the raw Update object that Telegram sends. You normally shouldn’t need these.
NOTE: the library can split raw updates into actual Update
variants so use this only as the workaround when such variant is not
available yet.