pub enum Update {
Show 143 variants
AuthorizationState(UpdateAuthorizationState),
NewMessage(UpdateNewMessage),
MessageSendAcknowledged(UpdateMessageSendAcknowledged),
MessageSendSucceeded(UpdateMessageSendSucceeded),
MessageSendFailed(UpdateMessageSendFailed),
MessageContent(UpdateMessageContent),
MessageEdited(UpdateMessageEdited),
MessageIsPinned(UpdateMessageIsPinned),
MessageInteractionInfo(UpdateMessageInteractionInfo),
MessageContentOpened(UpdateMessageContentOpened),
MessageMentionRead(UpdateMessageMentionRead),
MessageUnreadReactions(UpdateMessageUnreadReactions),
MessageLiveLocationViewed(UpdateMessageLiveLocationViewed),
NewChat(UpdateNewChat),
ChatTitle(UpdateChatTitle),
ChatPhoto(UpdateChatPhoto),
ChatAccentColors(UpdateChatAccentColors),
ChatPermissions(UpdateChatPermissions),
ChatLastMessage(UpdateChatLastMessage),
ChatPosition(UpdateChatPosition),
ChatAddedToList(UpdateChatAddedToList),
ChatRemovedFromList(UpdateChatRemovedFromList),
ChatReadInbox(UpdateChatReadInbox),
ChatReadOutbox(UpdateChatReadOutbox),
ChatActionBar(UpdateChatActionBar),
ChatBusinessBotManageBar(UpdateChatBusinessBotManageBar),
ChatAvailableReactions(UpdateChatAvailableReactions),
ChatDraftMessage(UpdateChatDraftMessage),
ChatEmojiStatus(UpdateChatEmojiStatus),
ChatMessageSender(UpdateChatMessageSender),
ChatMessageAutoDeleteTime(UpdateChatMessageAutoDeleteTime),
ChatNotificationSettings(UpdateChatNotificationSettings),
ChatPendingJoinRequests(UpdateChatPendingJoinRequests),
ChatReplyMarkup(UpdateChatReplyMarkup),
ChatBackground(UpdateChatBackground),
ChatTheme(UpdateChatTheme),
ChatUnreadMentionCount(UpdateChatUnreadMentionCount),
ChatUnreadReactionCount(UpdateChatUnreadReactionCount),
ChatVideoChat(UpdateChatVideoChat),
ChatDefaultDisableNotification(UpdateChatDefaultDisableNotification),
ChatHasProtectedContent(UpdateChatHasProtectedContent),
ChatIsTranslatable(UpdateChatIsTranslatable),
ChatIsMarkedAsUnread(UpdateChatIsMarkedAsUnread),
ChatViewAsTopics(UpdateChatViewAsTopics),
ChatBlockList(UpdateChatBlockList),
ChatHasScheduledMessages(UpdateChatHasScheduledMessages),
ChatFolders(UpdateChatFolders),
ChatOnlineMemberCount(UpdateChatOnlineMemberCount),
SavedMessagesTopic(UpdateSavedMessagesTopic),
SavedMessagesTopicCount(UpdateSavedMessagesTopicCount),
QuickReplyShortcut(UpdateQuickReplyShortcut),
QuickReplyShortcutDeleted(UpdateQuickReplyShortcutDeleted),
QuickReplyShortcuts(UpdateQuickReplyShortcuts),
QuickReplyShortcutMessages(UpdateQuickReplyShortcutMessages),
ForumTopicInfo(UpdateForumTopicInfo),
ScopeNotificationSettings(UpdateScopeNotificationSettings),
ReactionNotificationSettings(UpdateReactionNotificationSettings),
Notification(UpdateNotification),
NotificationGroup(UpdateNotificationGroup),
ActiveNotifications(UpdateActiveNotifications),
HavePendingNotifications(UpdateHavePendingNotifications),
DeleteMessages(UpdateDeleteMessages),
ChatAction(UpdateChatAction),
UserStatus(UpdateUserStatus),
User(UpdateUser),
BasicGroup(UpdateBasicGroup),
Supergroup(UpdateSupergroup),
SecretChat(UpdateSecretChat),
UserFullInfo(UpdateUserFullInfo),
BasicGroupFullInfo(UpdateBasicGroupFullInfo),
SupergroupFullInfo(UpdateSupergroupFullInfo),
ServiceNotification(UpdateServiceNotification),
File(UpdateFile),
FileGenerationStart(UpdateFileGenerationStart),
FileGenerationStop(UpdateFileGenerationStop),
FileDownloads(UpdateFileDownloads),
FileAddedToDownloads(UpdateFileAddedToDownloads),
FileDownload(UpdateFileDownload),
FileRemovedFromDownloads(UpdateFileRemovedFromDownloads),
Call(UpdateCall),
GroupCall(UpdateGroupCall),
GroupCallParticipant(UpdateGroupCallParticipant),
NewCallSignalingData(UpdateNewCallSignalingData),
UserPrivacySettingRules(UpdateUserPrivacySettingRules),
UnreadMessageCount(UpdateUnreadMessageCount),
UnreadChatCount(UpdateUnreadChatCount),
Story(UpdateStory),
StoryDeleted(UpdateStoryDeleted),
StorySendSucceeded(UpdateStorySendSucceeded),
StorySendFailed(UpdateStorySendFailed),
ChatActiveStories(UpdateChatActiveStories),
StoryListChatCount(UpdateStoryListChatCount),
StoryStealthMode(UpdateStoryStealthMode),
Option(UpdateOption),
StickerSet(UpdateStickerSet),
InstalledStickerSets(UpdateInstalledStickerSets),
TrendingStickerSets(UpdateTrendingStickerSets),
RecentStickers(UpdateRecentStickers),
FavoriteStickers(UpdateFavoriteStickers),
SavedAnimations(UpdateSavedAnimations),
SavedNotificationSounds(UpdateSavedNotificationSounds),
DefaultBackground(UpdateDefaultBackground),
ChatThemes(UpdateChatThemes),
AccentColors(UpdateAccentColors),
ProfileAccentColors(UpdateProfileAccentColors),
LanguagePackStrings(UpdateLanguagePackStrings),
ConnectionState(UpdateConnectionState),
TermsOfService(UpdateTermsOfService),
UsersNearby(UpdateUsersNearby),
UnconfirmedSession(UpdateUnconfirmedSession),
AttachmentMenuBots(UpdateAttachmentMenuBots),
WebAppMessageSent(UpdateWebAppMessageSent),
ActiveEmojiReactions(UpdateActiveEmojiReactions),
DefaultReactionType(UpdateDefaultReactionType),
SavedMessagesTags(UpdateSavedMessagesTags),
ChatRevenueAmount,
SpeechRecognitionTrial(UpdateSpeechRecognitionTrial),
DiceEmojis(UpdateDiceEmojis),
AnimatedEmojiMessageClicked(UpdateAnimatedEmojiMessageClicked),
AnimationSearchParameters(UpdateAnimationSearchParameters),
SuggestedActions(UpdateSuggestedActions),
SpeedLimitNotification(UpdateSpeedLimitNotification),
ContactCloseBirthdays(UpdateContactCloseBirthdays),
AutosaveSettings(UpdateAutosaveSettings),
BusinessConnection(UpdateBusinessConnection),
NewBusinessMessage(UpdateNewBusinessMessage),
BusinessMessageEdited(UpdateBusinessMessageEdited),
BusinessMessagesDeleted(UpdateBusinessMessagesDeleted),
NewInlineQuery(UpdateNewInlineQuery),
NewChosenInlineResult(UpdateNewChosenInlineResult),
NewCallbackQuery(UpdateNewCallbackQuery),
NewInlineCallbackQuery(UpdateNewInlineCallbackQuery),
NewShippingQuery(UpdateNewShippingQuery),
NewPreCheckoutQuery(UpdateNewPreCheckoutQuery),
NewCustomEvent(UpdateNewCustomEvent),
NewCustomQuery(UpdateNewCustomQuery),
Poll(UpdatePoll),
PollAnswer(UpdatePollAnswer),
ChatMember(UpdateChatMember),
NewChatJoinRequest(UpdateNewChatJoinRequest),
ChatBoost(UpdateChatBoost),
MessageReaction(UpdateMessageReaction),
MessageReactions(UpdateMessageReactions),
}
Variants§
AuthorizationState(UpdateAuthorizationState)
The user authorization state has changed
NewMessage(UpdateNewMessage)
A new message was received; can also be an outgoing message
MessageSendAcknowledged(UpdateMessageSendAcknowledged)
A request to send a message has reached the Telegram server. This doesn’t mean that the message will be sent successfully. This update is sent only if the option “use_quick_ack” is set to true. This update may be sent multiple times for the same message
MessageSendSucceeded(UpdateMessageSendSucceeded)
A message has been successfully sent
MessageSendFailed(UpdateMessageSendFailed)
A message failed to send. Be aware that some messages being sent can be irrecoverably deleted, in which case updateDeleteMessages will be received instead of this update
MessageContent(UpdateMessageContent)
The message content has changed
MessageEdited(UpdateMessageEdited)
A message was edited. Changes in the message content will come in a separate updateMessageContent
MessageIsPinned(UpdateMessageIsPinned)
The message pinned state was changed
MessageInteractionInfo(UpdateMessageInteractionInfo)
The information about interactions with a message has changed
MessageContentOpened(UpdateMessageContentOpened)
The message content was opened. Updates voice note messages to “listened”, video note messages to “viewed” and starts the self-destruct timer
MessageMentionRead(UpdateMessageMentionRead)
A message with an unread mention was read
MessageUnreadReactions(UpdateMessageUnreadReactions)
The list of unread reactions added to a message was changed
MessageLiveLocationViewed(UpdateMessageLiveLocationViewed)
A message with a live location was viewed. When the update is received, the application is supposed to update the live location
NewChat(UpdateNewChat)
A new chat has been loaded/created. This update is guaranteed to come before the chat identifier is returned to the application. The chat field changes will be reported through separate updates
ChatTitle(UpdateChatTitle)
The title of a chat was changed
ChatPhoto(UpdateChatPhoto)
A chat photo was changed
ChatAccentColors(UpdateChatAccentColors)
Chat accent colors have changed
ChatPermissions(UpdateChatPermissions)
Chat permissions were changed
ChatLastMessage(UpdateChatLastMessage)
The last message of a chat was changed
ChatPosition(UpdateChatPosition)
The position of a chat in a chat list has changed. An updateChatLastMessage or updateChatDraftMessage update might be sent instead of the update
ChatAddedToList(UpdateChatAddedToList)
A chat was added to a chat list
ChatRemovedFromList(UpdateChatRemovedFromList)
A chat was removed from a chat list
ChatReadInbox(UpdateChatReadInbox)
Incoming messages were read or the number of unread messages has been changed
ChatReadOutbox(UpdateChatReadOutbox)
Outgoing messages were read
ChatActionBar(UpdateChatActionBar)
The chat action bar was changed
ChatBusinessBotManageBar(UpdateChatBusinessBotManageBar)
The bar for managing business bot was changed in a chat
ChatAvailableReactions(UpdateChatAvailableReactions)
The chat available reactions were changed
ChatDraftMessage(UpdateChatDraftMessage)
A chat draft has changed. Be aware that the update may come in the currently opened chat but with old content of the draft. If the user has changed the content of the draft, this update mustn’t be applied
ChatEmojiStatus(UpdateChatEmojiStatus)
Chat emoji status has changed
ChatMessageSender(UpdateChatMessageSender)
The message sender that is selected to send messages in a chat has changed
ChatMessageAutoDeleteTime(UpdateChatMessageAutoDeleteTime)
The message auto-delete or self-destruct timer setting for a chat was changed
ChatNotificationSettings(UpdateChatNotificationSettings)
Notification settings for a chat were changed
ChatPendingJoinRequests(UpdateChatPendingJoinRequests)
The chat pending join requests were changed
ChatReplyMarkup(UpdateChatReplyMarkup)
The default chat reply markup was changed. Can occur because new messages with reply markup were received or because an old reply markup was hidden by the user
ChatBackground(UpdateChatBackground)
The chat background was changed
ChatTheme(UpdateChatTheme)
The chat theme was changed
ChatUnreadMentionCount(UpdateChatUnreadMentionCount)
The chat unread_mention_count has changed
ChatUnreadReactionCount(UpdateChatUnreadReactionCount)
The chat unread_reaction_count has changed
ChatVideoChat(UpdateChatVideoChat)
A chat video chat state has changed
ChatDefaultDisableNotification(UpdateChatDefaultDisableNotification)
The value of the default disable_notification parameter, used when a message is sent to the chat, was changed
ChatHasProtectedContent(UpdateChatHasProtectedContent)
A chat content was allowed or restricted for saving
ChatIsTranslatable(UpdateChatIsTranslatable)
Translation of chat messages was enabled or disabled
ChatIsMarkedAsUnread(UpdateChatIsMarkedAsUnread)
A chat was marked as unread or was read
ChatViewAsTopics(UpdateChatViewAsTopics)
A chat default appearance has changed
ChatBlockList(UpdateChatBlockList)
A chat was blocked or unblocked
ChatHasScheduledMessages(UpdateChatHasScheduledMessages)
A chat’s has_scheduled_messages field has changed
ChatFolders(UpdateChatFolders)
The list of chat folders or a chat folder has changed
ChatOnlineMemberCount(UpdateChatOnlineMemberCount)
The number of online group members has changed. This update with non-zero number of online group members is sent only for currently opened chats. There is no guarantee that it is sent just after the number of online users has changed
SavedMessagesTopic(UpdateSavedMessagesTopic)
Basic information about a Saved Messages topic has changed. This update is guaranteed to come before the topic identifier is returned to the application
SavedMessagesTopicCount(UpdateSavedMessagesTopicCount)
Number of Saved Messages topics has changed
QuickReplyShortcut(UpdateQuickReplyShortcut)
Basic information about a quick reply shortcut has changed. This update is guaranteed to come before the quick shortcut name is returned to the application
QuickReplyShortcutDeleted(UpdateQuickReplyShortcutDeleted)
A quick reply shortcut and all its messages were deleted
QuickReplyShortcuts(UpdateQuickReplyShortcuts)
The list of quick reply shortcuts has changed
QuickReplyShortcutMessages(UpdateQuickReplyShortcutMessages)
The list of quick reply shortcut messages has changed
ForumTopicInfo(UpdateForumTopicInfo)
Basic information about a topic in a forum chat was changed
ScopeNotificationSettings(UpdateScopeNotificationSettings)
Notification settings for some type of chats were updated
ReactionNotificationSettings(UpdateReactionNotificationSettings)
Notification settings for reactions were updated
Notification(UpdateNotification)
A notification was changed
NotificationGroup(UpdateNotificationGroup)
A list of active notifications in a notification group has changed
ActiveNotifications(UpdateActiveNotifications)
Contains active notifications that were shown on previous application launches. This update is sent only if the message database is used. In that case it comes once before any updateNotification and updateNotificationGroup update
HavePendingNotifications(UpdateHavePendingNotifications)
Describes whether there are some pending notification updates. Can be used to prevent application from killing, while there are some pending notifications
DeleteMessages(UpdateDeleteMessages)
Some messages were deleted
ChatAction(UpdateChatAction)
A message sender activity in the chat has changed
UserStatus(UpdateUserStatus)
The user went online or offline
User(UpdateUser)
Some data of a user has changed. This update is guaranteed to come before the user identifier is returned to the application
BasicGroup(UpdateBasicGroup)
Some data of a basic group has changed. This update is guaranteed to come before the basic group identifier is returned to the application
Supergroup(UpdateSupergroup)
Some data of a supergroup or a channel has changed. This update is guaranteed to come before the supergroup identifier is returned to the application
SecretChat(UpdateSecretChat)
Some data of a secret chat has changed. This update is guaranteed to come before the secret chat identifier is returned to the application
UserFullInfo(UpdateUserFullInfo)
Some data in userFullInfo has been changed
BasicGroupFullInfo(UpdateBasicGroupFullInfo)
Some data in basicGroupFullInfo has been changed
SupergroupFullInfo(UpdateSupergroupFullInfo)
Some data in supergroupFullInfo has been changed
ServiceNotification(UpdateServiceNotification)
A service notification from the server was received. Upon receiving this the application must show a popup with the content of the notification
File(UpdateFile)
Information about a file was updated
FileGenerationStart(UpdateFileGenerationStart)
The file generation process needs to be started by the application
FileGenerationStop(UpdateFileGenerationStop)
File generation is no longer needed
FileDownloads(UpdateFileDownloads)
The state of the file download list has changed
FileAddedToDownloads(UpdateFileAddedToDownloads)
A file was added to the file download list. This update is sent only after file download list is loaded for the first time
FileDownload(UpdateFileDownload)
A file download was changed. This update is sent only after file download list is loaded for the first time
FileRemovedFromDownloads(UpdateFileRemovedFromDownloads)
A file was removed from the file download list. This update is sent only after file download list is loaded for the first time
Call(UpdateCall)
New call was created or information about a call was updated
GroupCall(UpdateGroupCall)
Information about a group call was updated
GroupCallParticipant(UpdateGroupCallParticipant)
Information about a group call participant was changed. The updates are sent only after the group call is received through getGroupCall and only if the call is joined or being joined
NewCallSignalingData(UpdateNewCallSignalingData)
New call signaling data arrived
UserPrivacySettingRules(UpdateUserPrivacySettingRules)
Some privacy setting rules have been changed
UnreadMessageCount(UpdateUnreadMessageCount)
Number of unread messages in a chat list has changed. This update is sent only if the message database is used
UnreadChatCount(UpdateUnreadChatCount)
Number of unread chats, i.e. with unread messages or marked as unread, has changed. This update is sent only if the message database is used
Story(UpdateStory)
A story was changed
StoryDeleted(UpdateStoryDeleted)
A story became inaccessible
StorySendSucceeded(UpdateStorySendSucceeded)
A story has been successfully sent
StorySendFailed(UpdateStorySendFailed)
A story failed to send. If the story sending is canceled, then updateStoryDeleted will be received instead of this update
ChatActiveStories(UpdateChatActiveStories)
The list of active stories posted by a specific chat has changed
StoryListChatCount(UpdateStoryListChatCount)
Number of chats in a story list has changed
StoryStealthMode(UpdateStoryStealthMode)
Story stealth mode settings have changed
Option(UpdateOption)
An option changed its value
StickerSet(UpdateStickerSet)
A sticker set has changed
InstalledStickerSets(UpdateInstalledStickerSets)
The list of installed sticker sets was updated
TrendingStickerSets(UpdateTrendingStickerSets)
The list of trending sticker sets was updated or some of them were viewed
RecentStickers(UpdateRecentStickers)
The list of recently used stickers was updated
FavoriteStickers(UpdateFavoriteStickers)
The list of favorite stickers was updated
SavedAnimations(UpdateSavedAnimations)
The list of saved animations was updated
SavedNotificationSounds(UpdateSavedNotificationSounds)
The list of saved notification sounds was updated. This update may not be sent until information about a notification sound was requested for the first time
DefaultBackground(UpdateDefaultBackground)
The default background has changed
ChatThemes(UpdateChatThemes)
The list of available chat themes has changed
AccentColors(UpdateAccentColors)
The list of supported accent colors has changed
ProfileAccentColors(UpdateProfileAccentColors)
The list of supported accent colors for user profiles has changed
LanguagePackStrings(UpdateLanguagePackStrings)
Some language pack strings have been updated
ConnectionState(UpdateConnectionState)
The connection state has changed. This update must be used only to show a human-readable description of the connection state
TermsOfService(UpdateTermsOfService)
New terms of service must be accepted by the user. If the terms of service are declined, then the deleteAccount method must be called with the reason “Decline ToS update”
UsersNearby(UpdateUsersNearby)
The list of users nearby has changed. The update is guaranteed to be sent only 60 seconds after a successful searchChatsNearby request
UnconfirmedSession(UpdateUnconfirmedSession)
The first unconfirmed session has changed
AttachmentMenuBots(UpdateAttachmentMenuBots)
The list of bots added to attachment or side menu has changed
WebAppMessageSent(UpdateWebAppMessageSent)
A message was sent by an opened Web App, so the Web App needs to be closed
ActiveEmojiReactions(UpdateActiveEmojiReactions)
The list of active emoji reactions has changed
DefaultReactionType(UpdateDefaultReactionType)
The type of default reaction has changed
SavedMessagesTags(UpdateSavedMessagesTags)
Tags used in Saved Messages or a Saved Messages topic have changed
ChatRevenueAmount
The revenue earned from sponsored messages in a chat has changed. If chat revenue screen is opened, then getChatRevenueTransactions may be called to fetch new transactions
SpeechRecognitionTrial(UpdateSpeechRecognitionTrial)
The parameters of speech recognition without Telegram Premium subscription has changed
DiceEmojis(UpdateDiceEmojis)
The list of supported dice emojis has changed
AnimatedEmojiMessageClicked(UpdateAnimatedEmojiMessageClicked)
Some animated emoji message was clicked and a big animated sticker must be played if the message is visible on the screen. chatActionWatchingAnimations with the text of the message needs to be sent if the sticker is played
AnimationSearchParameters(UpdateAnimationSearchParameters)
The parameters of animation search through getOption(“animation_search_bot_username”) bot has changed
SuggestedActions(UpdateSuggestedActions)
The list of suggested to the user actions has changed
SpeedLimitNotification(UpdateSpeedLimitNotification)
Download or upload file speed for the user was limited, but it can be restored by subscription to Telegram Premium. The notification can be postponed until a being downloaded or uploaded file is visible to the user Use getOption(“premium_download_speedup”) or getOption(“premium_upload_speedup”) to get expected speedup after subscription to Telegram Premium
ContactCloseBirthdays(UpdateContactCloseBirthdays)
The list of contacts that had birthdays recently or will have birthday soon has changed
AutosaveSettings(UpdateAutosaveSettings)
Autosave settings for some type of chats were updated
BusinessConnection(UpdateBusinessConnection)
A business connection has changed; for bots only
NewBusinessMessage(UpdateNewBusinessMessage)
A new message was added to a business account; for bots only
BusinessMessageEdited(UpdateBusinessMessageEdited)
A message in a business account was edited; for bots only
BusinessMessagesDeleted(UpdateBusinessMessagesDeleted)
Messages in a business account were deleted; for bots only
NewInlineQuery(UpdateNewInlineQuery)
A new incoming inline query; for bots only
NewChosenInlineResult(UpdateNewChosenInlineResult)
The user has chosen a result of an inline query; for bots only
NewCallbackQuery(UpdateNewCallbackQuery)
A new incoming callback query; for bots only
NewInlineCallbackQuery(UpdateNewInlineCallbackQuery)
A new incoming callback query from a message sent via a bot; for bots only
NewShippingQuery(UpdateNewShippingQuery)
A new incoming shipping query; for bots only. Only for invoices with flexible price
NewPreCheckoutQuery(UpdateNewPreCheckoutQuery)
A new incoming pre-checkout query; for bots only. Contains full information about a checkout
NewCustomEvent(UpdateNewCustomEvent)
A new incoming event; for bots only
NewCustomQuery(UpdateNewCustomQuery)
A new incoming query; for bots only
Poll(UpdatePoll)
A poll was updated; for bots only
PollAnswer(UpdatePollAnswer)
A user changed the answer to a poll; for bots only
ChatMember(UpdateChatMember)
User rights changed in a chat; for bots only
NewChatJoinRequest(UpdateNewChatJoinRequest)
A user sent a join request to a chat; for bots only
ChatBoost(UpdateChatBoost)
A chat boost has changed; for bots only
MessageReaction(UpdateMessageReaction)
User changed its reactions on a message with public reactions; for bots only
MessageReactions(UpdateMessageReactions)
Reactions added to a message with anonymous reactions have changed; for bots only