Update to TDLib 1.8.23

This commit is contained in:
c0re100 2023-12-30 05:43:03 +08:00
parent af41176160
commit e30af65ec7
No known key found for this signature in database
GPG key ID: 7C3B3004FE745AAF
4 changed files with 1865 additions and 587 deletions

View file

@ -1313,7 +1313,7 @@ type GetRepliedMessageRequest struct {
MessageId int64 `json:"message_id"` MessageId int64 `json:"message_id"`
} }
// Returns information about a non-bundled message that is replied by a given message. Also, returns the pinned message, the game message, the invoice message, the message with a previously set same background, and the topic creation message for messages of the types messagePinMessage, messageGameScore, messagePaymentSuccessful, messageChatSetBackground and topic messages without non-bundled replied message respectively // Returns information about a non-bundled message that is replied by a given message. Also, returns the pinned message, the game message, the invoice message, the message with a previously set same background, the giveaway message, and the topic creation message for messages of the types messagePinMessage, messageGameScore, messagePaymentSuccessful, messageChatSetBackground, messagePremiumGiveawayCompleted and topic messages without non-bundled replied message respectively
func (client *Client) GetRepliedMessage(req *GetRepliedMessageRequest) (*Message, error) { func (client *Client) GetRepliedMessage(req *GetRepliedMessageRequest) (*Message, error) {
result, err := client.Send(Request{ result, err := client.Send(Request{
meta: meta{ meta: meta{
@ -1784,6 +1784,35 @@ func (client *Client) GetChatSimilarChatCount(req *GetChatSimilarChatCountReques
return UnmarshalCount(result.Data) return UnmarshalCount(result.Data)
} }
type OpenChatSimilarChatRequest struct {
// Identifier of the original chat, which similar chats were requested
ChatId int64 `json:"chat_id"`
// Identifier of the opened chat
OpenedChatId int64 `json:"opened_chat_id"`
}
// Informs TDLib that a chat was opened from the list of similar chats. The method is independent from openChat and closeChat methods
func (client *Client) OpenChatSimilarChat(req *OpenChatSimilarChatRequest) (*Ok, error) {
result, err := client.Send(Request{
meta: meta{
Type: "openChatSimilarChat",
},
Data: map[string]interface{}{
"chat_id": req.ChatId,
"opened_chat_id": req.OpenedChatId,
},
})
if err != nil {
return nil, err
}
if result.Type == "error" {
return nil, buildResponseError(result.Data)
}
return UnmarshalOk(result.Data)
}
type GetTopChatsRequest struct { type GetTopChatsRequest struct {
// Category of chats to be returned // Category of chats to be returned
Category TopChatCategory `json:"category"` Category TopChatCategory `json:"category"`
@ -4414,6 +4443,41 @@ func (client *Client) RemoveMessageReaction(req *RemoveMessageReactionRequest) (
return UnmarshalOk(result.Data) return UnmarshalOk(result.Data)
} }
type SetMessageReactionsRequest struct {
// Identifier of the chat to which the message belongs
ChatId int64 `json:"chat_id"`
// Identifier of the message
MessageId int64 `json:"message_id"`
// Types of the reaction to set
ReactionTypes []ReactionType `json:"reaction_types"`
// Pass true if the reactions are added with a big animation
IsBig bool `json:"is_big"`
}
// Sets reactions on a message; for bots only
func (client *Client) SetMessageReactions(req *SetMessageReactionsRequest) (*Ok, error) {
result, err := client.Send(Request{
meta: meta{
Type: "setMessageReactions",
},
Data: map[string]interface{}{
"chat_id": req.ChatId,
"message_id": req.MessageId,
"reaction_types": req.ReactionTypes,
"is_big": req.IsBig,
},
})
if err != nil {
return nil, err
}
if result.Type == "error" {
return nil, buildResponseError(result.Data)
}
return UnmarshalOk(result.Data)
}
type GetMessageAddedReactionsRequest struct { type GetMessageAddedReactionsRequest struct {
// Identifier of the chat to which the message belongs // Identifier of the chat to which the message belongs
ChatId int64 `json:"chat_id"` ChatId int64 `json:"chat_id"`
@ -5105,30 +5169,30 @@ func (client *Client) GetLoginUrl(req *GetLoginUrlRequest) (*HttpUrl, error) {
return UnmarshalHttpUrl(result.Data) return UnmarshalHttpUrl(result.Data)
} }
type ShareUserWithBotRequest struct { type ShareUsersWithBotRequest struct {
// Identifier of the chat with the bot // Identifier of the chat with the bot
ChatId int64 `json:"chat_id"` ChatId int64 `json:"chat_id"`
// Identifier of the message with the button // Identifier of the message with the button
MessageId int64 `json:"message_id"` MessageId int64 `json:"message_id"`
// Identifier of the button // Identifier of the button
ButtonId int32 `json:"button_id"` ButtonId int32 `json:"button_id"`
// Identifier of the shared user // Identifiers of the shared users
SharedUserId int64 `json:"shared_user_id"` SharedUserIds []int64 `json:"shared_user_ids"`
// Pass true to check that the user can be shared by the button instead of actually sharing them // Pass true to check that the users can be shared by the button instead of actually sharing them
OnlyCheck bool `json:"only_check"` OnlyCheck bool `json:"only_check"`
} }
// Shares a user after pressing a keyboardButtonTypeRequestUser button with the bot // Shares users after pressing a keyboardButtonTypeRequestUsers button with the bot
func (client *Client) ShareUserWithBot(req *ShareUserWithBotRequest) (*Ok, error) { func (client *Client) ShareUsersWithBot(req *ShareUsersWithBotRequest) (*Ok, error) {
result, err := client.Send(Request{ result, err := client.Send(Request{
meta: meta{ meta: meta{
Type: "shareUserWithBot", Type: "shareUsersWithBot",
}, },
Data: map[string]interface{}{ Data: map[string]interface{}{
"chat_id": req.ChatId, "chat_id": req.ChatId,
"message_id": req.MessageId, "message_id": req.MessageId,
"button_id": req.ButtonId, "button_id": req.ButtonId,
"shared_user_id": req.SharedUserId, "shared_user_ids": req.SharedUserIds,
"only_check": req.OnlyCheck, "only_check": req.OnlyCheck,
}, },
}) })
@ -6101,6 +6165,9 @@ func (client *Client) GetInternalLinkType(req *GetInternalLinkTypeRequest) (Inte
case TypeInternalLinkTypePremiumFeatures: case TypeInternalLinkTypePremiumFeatures:
return UnmarshalInternalLinkTypePremiumFeatures(result.Data) return UnmarshalInternalLinkTypePremiumFeatures(result.Data)
case TypeInternalLinkTypePremiumGift:
return UnmarshalInternalLinkTypePremiumGift(result.Data)
case TypeInternalLinkTypePremiumGiftCode: case TypeInternalLinkTypePremiumGiftCode:
return UnmarshalInternalLinkTypePremiumGiftCode(result.Data) return UnmarshalInternalLinkTypePremiumGiftCode(result.Data)
@ -7235,13 +7302,13 @@ func (client *Client) SetChatPhoto(req *SetChatPhotoRequest) (*Ok, error) {
type SetChatAccentColorRequest struct { type SetChatAccentColorRequest struct {
// Chat identifier // Chat identifier
ChatId int64 `json:"chat_id"` ChatId int64 `json:"chat_id"`
// Identifier of the accent color to use // Identifier of the accent color to use. The chat must have at least accentColor.min_chat_boost_level boost level to pass the corresponding color
AccentColorId int32 `json:"accent_color_id"` AccentColorId int32 `json:"accent_color_id"`
// Identifier of a custom emoji to be shown on the reply header background; 0 if none // Identifier of a custom emoji to be shown on the reply header and link preview background; 0 if none. Use chatBoostLevelFeatures.can_set_background_custom_emoji to check whether a custom emoji can be set
BackgroundCustomEmojiId JsonInt64 `json:"background_custom_emoji_id"` BackgroundCustomEmojiId JsonInt64 `json:"background_custom_emoji_id"`
} }
// Changes accent color and background custom emoji of a chat. Supported only for channels with getOption("channel_custom_accent_color_boost_level_min") boost level. Requires can_change_info administrator right // Changes accent color and background custom emoji of a chat. Requires can_change_info administrator right
func (client *Client) SetChatAccentColor(req *SetChatAccentColorRequest) (*Ok, error) { func (client *Client) SetChatAccentColor(req *SetChatAccentColorRequest) (*Ok, error) {
result, err := client.Send(Request{ result, err := client.Send(Request{
meta: meta{ meta: meta{
@ -7264,6 +7331,38 @@ func (client *Client) SetChatAccentColor(req *SetChatAccentColorRequest) (*Ok, e
return UnmarshalOk(result.Data) return UnmarshalOk(result.Data)
} }
type SetChatProfileAccentColorRequest struct {
// Chat identifier
ChatId int64 `json:"chat_id"`
// Identifier of the accent color to use for profile; pass -1 if none. The chat must have at least profileAccentColor.min_chat_boost_level boost level to pass the corresponding color
ProfileAccentColorId int32 `json:"profile_accent_color_id"`
// Identifier of a custom emoji to be shown on the chat's profile photo background; 0 if none. Use chatBoostLevelFeatures.can_set_profile_background_custom_emoji to check whether a custom emoji can be set
ProfileBackgroundCustomEmojiId JsonInt64 `json:"profile_background_custom_emoji_id"`
}
// Changes accent color and background custom emoji for profile of a chat. Requires can_change_info administrator right
func (client *Client) SetChatProfileAccentColor(req *SetChatProfileAccentColorRequest) (*Ok, error) {
result, err := client.Send(Request{
meta: meta{
Type: "setChatProfileAccentColor",
},
Data: map[string]interface{}{
"chat_id": req.ChatId,
"profile_accent_color_id": req.ProfileAccentColorId,
"profile_background_custom_emoji_id": req.ProfileBackgroundCustomEmojiId,
},
})
if err != nil {
return nil, err
}
if result.Type == "error" {
return nil, buildResponseError(result.Data)
}
return UnmarshalOk(result.Data)
}
type SetChatMessageAutoDeleteTimeRequest struct { type SetChatMessageAutoDeleteTimeRequest struct {
// Chat identifier // Chat identifier
ChatId int64 `json:"chat_id"` ChatId int64 `json:"chat_id"`
@ -7293,6 +7392,35 @@ func (client *Client) SetChatMessageAutoDeleteTime(req *SetChatMessageAutoDelete
return UnmarshalOk(result.Data) return UnmarshalOk(result.Data)
} }
type SetChatEmojiStatusRequest struct {
// Chat identifier
ChatId int64 `json:"chat_id"`
// New emoji status; pass null to remove emoji status
EmojiStatus *EmojiStatus `json:"emoji_status"`
}
// Changes the emoji status of a chat. Use chatBoostLevelFeatures.can_set_emoji_status to check whether an emoji status can be set. Requires can_change_info administrator right
func (client *Client) SetChatEmojiStatus(req *SetChatEmojiStatusRequest) (*Ok, error) {
result, err := client.Send(Request{
meta: meta{
Type: "setChatEmojiStatus",
},
Data: map[string]interface{}{
"chat_id": req.ChatId,
"emoji_status": req.EmojiStatus,
},
})
if err != nil {
return nil, err
}
if result.Type == "error" {
return nil, buildResponseError(result.Data)
}
return UnmarshalOk(result.Data)
}
type SetChatPermissionsRequest struct { type SetChatPermissionsRequest struct {
// Chat identifier // Chat identifier
ChatId int64 `json:"chat_id"` ChatId int64 `json:"chat_id"`
@ -7325,17 +7453,17 @@ func (client *Client) SetChatPermissions(req *SetChatPermissionsRequest) (*Ok, e
type SetChatBackgroundRequest struct { type SetChatBackgroundRequest struct {
// Chat identifier // Chat identifier
ChatId int64 `json:"chat_id"` ChatId int64 `json:"chat_id"`
// The input background to use; pass null to create a new filled background // The input background to use; pass null to create a new filled or chat theme background
Background InputBackground `json:"background"` Background InputBackground `json:"background"`
// Background type; pass null to use default background type for the chosen background // Background type; pass null to use default background type for the chosen background; backgroundTypeChatTheme isn't supported for private and secret chats. Use chatBoostLevelFeatures.chat_theme_background_count and chatBoostLevelFeatures.can_set_custom_background to check whether the background type can be set in the boosted chat
Type BackgroundType `json:"type"` Type BackgroundType `json:"type"`
// Dimming of the background in dark themes, as a percentage; 0-100 // Dimming of the background in dark themes, as a percentage; 0-100. Applied only to Wallpaper and Fill types of background
DarkThemeDimming int32 `json:"dark_theme_dimming"` DarkThemeDimming int32 `json:"dark_theme_dimming"`
// Pass true to set background only for self; pass false to set background for both chat users. Background can be set for both users only by Telegram Premium users and if set background isn't of the type inputBackgroundPrevious // Pass true to set background only for self; pass false to set background for all chat users. Always false for backgrounds set in boosted chats. Background can be set for both users only by Telegram Premium users and if set background isn't of the type inputBackgroundPrevious
OnlyForSelf bool `json:"only_for_self"` OnlyForSelf bool `json:"only_for_self"`
} }
// Sets the background in a specific chat. Supported only in private and secret chats with non-deleted users // Sets the background in a specific chat. Supported only in private and secret chats with non-deleted users, and in chats with sufficient boost level and can_change_info administrator right
func (client *Client) SetChatBackground(req *SetChatBackgroundRequest) (*Ok, error) { func (client *Client) SetChatBackground(req *SetChatBackgroundRequest) (*Ok, error) {
result, err := client.Send(Request{ result, err := client.Send(Request{
meta: meta{ meta: meta{
@ -9128,31 +9256,34 @@ func (client *Client) SetStoryReaction(req *SetStoryReactionRequest) (*Ok, error
return UnmarshalOk(result.Data) return UnmarshalOk(result.Data)
} }
type GetStoryViewersRequest struct { type GetStoryInteractionsRequest struct {
// Story identifier // Story identifier
StoryId int32 `json:"story_id"` StoryId int32 `json:"story_id"`
// Query to search for in names and usernames of the viewers; may be empty to get all relevant viewers // Query to search for in names, usernames and titles; may be empty to get all relevant interactions
Query string `json:"query"` Query string `json:"query"`
// Pass true to get only contacts; pass false to get all relevant viewers // Pass true to get only interactions by contacts; pass false to get all relevant interactions
OnlyContacts bool `json:"only_contacts"` OnlyContacts bool `json:"only_contacts"`
// Pass true to get viewers with reaction first; pass false to get viewers sorted just by view_date // Pass true to get forwards and reposts first, then reactions, then other views; pass false to get interactions sorted just by interaction date
PreferForwards bool `json:"prefer_forwards"`
// Pass true to get interactions with reaction first; pass false to get interactions sorted just by interaction date. Ignored if prefer_forwards == true
PreferWithReaction bool `json:"prefer_with_reaction"` PreferWithReaction bool `json:"prefer_with_reaction"`
// Offset of the first entry to return as received from the previous request; use empty string to get the first chunk of results // Offset of the first entry to return as received from the previous request; use empty string to get the first chunk of results
Offset string `json:"offset"` Offset string `json:"offset"`
// The maximum number of story viewers to return // The maximum number of story interactions to return
Limit int32 `json:"limit"` Limit int32 `json:"limit"`
} }
// Returns viewers of a story. The method can be called only for stories posted on behalf of the current user // Returns interactions with a story. The method can be called only for stories posted on behalf of the current user
func (client *Client) GetStoryViewers(req *GetStoryViewersRequest) (*StoryViewers, error) { func (client *Client) GetStoryInteractions(req *GetStoryInteractionsRequest) (*StoryInteractions, error) {
result, err := client.Send(Request{ result, err := client.Send(Request{
meta: meta{ meta: meta{
Type: "getStoryViewers", Type: "getStoryInteractions",
}, },
Data: map[string]interface{}{ Data: map[string]interface{}{
"story_id": req.StoryId, "story_id": req.StoryId,
"query": req.Query, "query": req.Query,
"only_contacts": req.OnlyContacts, "only_contacts": req.OnlyContacts,
"prefer_forwards": req.PreferForwards,
"prefer_with_reaction": req.PreferWithReaction, "prefer_with_reaction": req.PreferWithReaction,
"offset": req.Offset, "offset": req.Offset,
"limit": req.Limit, "limit": req.Limit,
@ -9166,7 +9297,48 @@ func (client *Client) GetStoryViewers(req *GetStoryViewersRequest) (*StoryViewer
return nil, buildResponseError(result.Data) return nil, buildResponseError(result.Data)
} }
return UnmarshalStoryViewers(result.Data) return UnmarshalStoryInteractions(result.Data)
}
type GetChatStoryInteractionsRequest struct {
// The identifier of the sender of the story
StorySenderChatId int64 `json:"story_sender_chat_id"`
// Story identifier
StoryId int32 `json:"story_id"`
// Pass the default heart reaction or a suggested reaction type to receive only interactions with the specified reaction type; pass null to receive all interactions
ReactionType ReactionType `json:"reaction_type"`
// Pass true to get forwards and reposts first, then reactions, then other views; pass false to get interactions sorted just by interaction date
PreferForwards bool `json:"prefer_forwards"`
// Offset of the first entry to return as received from the previous request; use empty string to get the first chunk of results
Offset string `json:"offset"`
// The maximum number of story interactions to return
Limit int32 `json:"limit"`
}
// Returns interactions with a story posted in a chat. Can be used only if story is posted on behalf of a chat and the user is an administrator in the chat
func (client *Client) GetChatStoryInteractions(req *GetChatStoryInteractionsRequest) (*StoryInteractions, error) {
result, err := client.Send(Request{
meta: meta{
Type: "getChatStoryInteractions",
},
Data: map[string]interface{}{
"story_sender_chat_id": req.StorySenderChatId,
"story_id": req.StoryId,
"reaction_type": req.ReactionType,
"prefer_forwards": req.PreferForwards,
"offset": req.Offset,
"limit": req.Limit,
},
})
if err != nil {
return nil, err
}
if result.Type == "error" {
return nil, buildResponseError(result.Data)
}
return UnmarshalStoryInteractions(result.Data)
} }
type ReportStoryRequest struct { type ReportStoryRequest struct {
@ -9235,7 +9407,7 @@ type GetStoryPublicForwardsRequest struct {
} }
// Returns forwards of a story as a message to public chats and reposts by public channels. Can be used only if the story is posted on behalf of the current user or story.can_get_statistics == true. For optimal performance, the number of returned messages and stories is chosen by TDLib // Returns forwards of a story as a message to public chats and reposts by public channels. Can be used only if the story is posted on behalf of the current user or story.can_get_statistics == true. For optimal performance, the number of returned messages and stories is chosen by TDLib
func (client *Client) GetStoryPublicForwards(req *GetStoryPublicForwardsRequest) (*StoryPublicForwards, error) { func (client *Client) GetStoryPublicForwards(req *GetStoryPublicForwardsRequest) (*PublicForwards, error) {
result, err := client.Send(Request{ result, err := client.Send(Request{
meta: meta{ meta: meta{
Type: "getStoryPublicForwards", Type: "getStoryPublicForwards",
@ -9255,7 +9427,52 @@ func (client *Client) GetStoryPublicForwards(req *GetStoryPublicForwardsRequest)
return nil, buildResponseError(result.Data) return nil, buildResponseError(result.Data)
} }
return UnmarshalStoryPublicForwards(result.Data) return UnmarshalPublicForwards(result.Data)
}
type GetChatBoostLevelFeaturesRequest struct {
// Chat boost level
Level int32 `json:"level"`
}
// Returns list of features available on the specific chat boost level; this is an offline request
func (client *Client) GetChatBoostLevelFeatures(req *GetChatBoostLevelFeaturesRequest) (*ChatBoostLevelFeatures, error) {
result, err := client.Send(Request{
meta: meta{
Type: "getChatBoostLevelFeatures",
},
Data: map[string]interface{}{
"level": req.Level,
},
})
if err != nil {
return nil, err
}
if result.Type == "error" {
return nil, buildResponseError(result.Data)
}
return UnmarshalChatBoostLevelFeatures(result.Data)
}
// Returns list of features available on the first 10 chat boost levels; this is an offline request
func (client *Client) GetChatBoostFeatures() (*ChatBoostFeatures, error) {
result, err := client.Send(Request{
meta: meta{
Type: "getChatBoostFeatures",
},
Data: map[string]interface{}{},
})
if err != nil {
return nil, err
}
if result.Type == "error" {
return nil, buildResponseError(result.Data)
}
return UnmarshalChatBoostFeatures(result.Data)
} }
// Returns the list of available chat boost slots for the current user // Returns the list of available chat boost slots for the current user
@ -9506,7 +9723,7 @@ func (client *Client) ToggleBotIsAddedToAttachmentMenu(req *ToggleBotIsAddedToAt
return UnmarshalOk(result.Data) return UnmarshalOk(result.Data)
} }
// Returns up to 8 emoji statuses, which must be shown right after the default Premium Badge in the emoji status list // Returns up to 8 emoji statuses, which must be shown right after the default Premium Badge in the emoji status list for self status
func (client *Client) GetThemedEmojiStatuses() (*EmojiStatuses, error) { func (client *Client) GetThemedEmojiStatuses() (*EmojiStatuses, error) {
result, err := client.Send(Request{ result, err := client.Send(Request{
meta: meta{ meta: meta{
@ -9525,7 +9742,7 @@ func (client *Client) GetThemedEmojiStatuses() (*EmojiStatuses, error) {
return UnmarshalEmojiStatuses(result.Data) return UnmarshalEmojiStatuses(result.Data)
} }
// Returns recent emoji statuses // Returns recent emoji statuses for self status
func (client *Client) GetRecentEmojiStatuses() (*EmojiStatuses, error) { func (client *Client) GetRecentEmojiStatuses() (*EmojiStatuses, error) {
result, err := client.Send(Request{ result, err := client.Send(Request{
meta: meta{ meta: meta{
@ -9544,7 +9761,7 @@ func (client *Client) GetRecentEmojiStatuses() (*EmojiStatuses, error) {
return UnmarshalEmojiStatuses(result.Data) return UnmarshalEmojiStatuses(result.Data)
} }
// Returns default emoji statuses // Returns default emoji statuses for self status
func (client *Client) GetDefaultEmojiStatuses() (*EmojiStatuses, error) { func (client *Client) GetDefaultEmojiStatuses() (*EmojiStatuses, error) {
result, err := client.Send(Request{ result, err := client.Send(Request{
meta: meta{ meta: meta{
@ -9563,7 +9780,7 @@ func (client *Client) GetDefaultEmojiStatuses() (*EmojiStatuses, error) {
return UnmarshalEmojiStatuses(result.Data) return UnmarshalEmojiStatuses(result.Data)
} }
// Clears the list of recently used emoji statuses // Clears the list of recently used emoji statuses for self status
func (client *Client) ClearRecentEmojiStatuses() (*Ok, error) { func (client *Client) ClearRecentEmojiStatuses() (*Ok, error) {
result, err := client.Send(Request{ result, err := client.Send(Request{
meta: meta{ meta: meta{
@ -9582,6 +9799,63 @@ func (client *Client) ClearRecentEmojiStatuses() (*Ok, error) {
return UnmarshalOk(result.Data) return UnmarshalOk(result.Data)
} }
// Returns up to 8 emoji statuses, which must be shown in the emoji status list for chats
func (client *Client) GetThemedChatEmojiStatuses() (*EmojiStatuses, error) {
result, err := client.Send(Request{
meta: meta{
Type: "getThemedChatEmojiStatuses",
},
Data: map[string]interface{}{},
})
if err != nil {
return nil, err
}
if result.Type == "error" {
return nil, buildResponseError(result.Data)
}
return UnmarshalEmojiStatuses(result.Data)
}
// Returns default emoji statuses for chats
func (client *Client) GetDefaultChatEmojiStatuses() (*EmojiStatuses, error) {
result, err := client.Send(Request{
meta: meta{
Type: "getDefaultChatEmojiStatuses",
},
Data: map[string]interface{}{},
})
if err != nil {
return nil, err
}
if result.Type == "error" {
return nil, buildResponseError(result.Data)
}
return UnmarshalEmojiStatuses(result.Data)
}
// Returns the list of emoji statuses, which can't be used as chat emoji status, even they are from a sticker set with is_allowed_as_chat_emoji_status == true
func (client *Client) GetDisallowedChatEmojiStatuses() (*EmojiStatuses, error) {
result, err := client.Send(Request{
meta: meta{
Type: "getDisallowedChatEmojiStatuses",
},
Data: map[string]interface{}{},
})
if err != nil {
return nil, err
}
if result.Type == "error" {
return nil, buildResponseError(result.Data)
}
return UnmarshalEmojiStatuses(result.Data)
}
type DownloadFileRequest struct { type DownloadFileRequest struct {
// Identifier of the file to download // Identifier of the file to download
FileId int32 `json:"file_id"` FileId int32 `json:"file_id"`
@ -13368,7 +13642,7 @@ func (client *Client) DeleteProfilePhoto(req *DeleteProfilePhotoRequest) (*Ok, e
type SetAccentColorRequest struct { type SetAccentColorRequest struct {
// Identifier of the accent color to use // Identifier of the accent color to use
AccentColorId int32 `json:"accent_color_id"` AccentColorId int32 `json:"accent_color_id"`
// Identifier of a custom emoji to be shown on the reply header background; 0 if none // Identifier of a custom emoji to be shown on the reply header and link preview background; 0 if none
BackgroundCustomEmojiId JsonInt64 `json:"background_custom_emoji_id"` BackgroundCustomEmojiId JsonInt64 `json:"background_custom_emoji_id"`
} }
@ -13397,7 +13671,7 @@ func (client *Client) SetAccentColor(req *SetAccentColorRequest) (*Ok, error) {
type SetProfileAccentColorRequest struct { type SetProfileAccentColorRequest struct {
// Identifier of the accent color to use for profile; pass -1 if none // Identifier of the accent color to use for profile; pass -1 if none
ProfileAccentColorId int32 `json:"profile_accent_color_id"` ProfileAccentColorId int32 `json:"profile_accent_color_id"`
// Identifier of a custom emoji to be shown in the on the user's profile photo background; 0 if none // Identifier of a custom emoji to be shown on the user's profile photo background; 0 if none
ProfileBackgroundCustomEmojiId JsonInt64 `json:"profile_background_custom_emoji_id"` ProfileBackgroundCustomEmojiId JsonInt64 `json:"profile_background_custom_emoji_id"`
} }
@ -15289,36 +15563,10 @@ func (client *Client) GetSupportUser() (*User, error) {
return UnmarshalUser(result.Data) return UnmarshalUser(result.Data)
} }
type GetBackgroundsRequest struct {
// Pass true to order returned backgrounds for a dark theme
ForDarkTheme bool `json:"for_dark_theme"`
}
// Returns backgrounds installed by the user
func (client *Client) GetBackgrounds(req *GetBackgroundsRequest) (*Backgrounds, error) {
result, err := client.Send(Request{
meta: meta{
Type: "getBackgrounds",
},
Data: map[string]interface{}{
"for_dark_theme": req.ForDarkTheme,
},
})
if err != nil {
return nil, err
}
if result.Type == "error" {
return nil, buildResponseError(result.Data)
}
return UnmarshalBackgrounds(result.Data)
}
type GetBackgroundUrlRequest struct { type GetBackgroundUrlRequest struct {
// Background name // Background name
Name string `json:"name"` Name string `json:"name"`
// Background type // Background type; backgroundTypeChatTheme isn't supported
Type BackgroundType `json:"type"` Type BackgroundType `json:"type"`
} }
@ -15370,20 +15618,20 @@ func (client *Client) SearchBackground(req *SearchBackgroundRequest) (*Backgroun
return UnmarshalBackground(result.Data) return UnmarshalBackground(result.Data)
} }
type SetBackgroundRequest struct { type SetDefaultBackgroundRequest struct {
// The input background to use; pass null to create a new filled background or to remove the current background // The input background to use; pass null to create a new filled background
Background InputBackground `json:"background"` Background InputBackground `json:"background"`
// Background type; pass null to use the default type of the remote background or to remove the current background // Background type; pass null to use the default type of the remote background; backgroundTypeChatTheme isn't supported
Type BackgroundType `json:"type"` Type BackgroundType `json:"type"`
// Pass true if the background is changed for a dark theme // Pass true if the background is set for a dark theme
ForDarkTheme bool `json:"for_dark_theme"` ForDarkTheme bool `json:"for_dark_theme"`
} }
// Changes the background selected by the user; adds background to the list of installed backgrounds // Sets default background for chats; adds the background to the list of installed backgrounds
func (client *Client) SetBackground(req *SetBackgroundRequest) (*Background, error) { func (client *Client) SetDefaultBackground(req *SetDefaultBackgroundRequest) (*Background, error) {
result, err := client.Send(Request{ result, err := client.Send(Request{
meta: meta{ meta: meta{
Type: "setBackground", Type: "setDefaultBackground",
}, },
Data: map[string]interface{}{ Data: map[string]interface{}{
"background": req.Background, "background": req.Background,
@ -15402,16 +15650,68 @@ func (client *Client) SetBackground(req *SetBackgroundRequest) (*Background, err
return UnmarshalBackground(result.Data) return UnmarshalBackground(result.Data)
} }
type RemoveBackgroundRequest struct { type DeleteDefaultBackgroundRequest struct {
// Pass true if the background is deleted for a dark theme
ForDarkTheme bool `json:"for_dark_theme"`
}
// Deletes default background for chats
func (client *Client) DeleteDefaultBackground(req *DeleteDefaultBackgroundRequest) (*Ok, error) {
result, err := client.Send(Request{
meta: meta{
Type: "deleteDefaultBackground",
},
Data: map[string]interface{}{
"for_dark_theme": req.ForDarkTheme,
},
})
if err != nil {
return nil, err
}
if result.Type == "error" {
return nil, buildResponseError(result.Data)
}
return UnmarshalOk(result.Data)
}
type GetInstalledBackgroundsRequest struct {
// Pass true to order returned backgrounds for a dark theme
ForDarkTheme bool `json:"for_dark_theme"`
}
// Returns backgrounds installed by the user
func (client *Client) GetInstalledBackgrounds(req *GetInstalledBackgroundsRequest) (*Backgrounds, error) {
result, err := client.Send(Request{
meta: meta{
Type: "getInstalledBackgrounds",
},
Data: map[string]interface{}{
"for_dark_theme": req.ForDarkTheme,
},
})
if err != nil {
return nil, err
}
if result.Type == "error" {
return nil, buildResponseError(result.Data)
}
return UnmarshalBackgrounds(result.Data)
}
type RemoveInstalledBackgroundRequest struct {
// The background identifier // The background identifier
BackgroundId JsonInt64 `json:"background_id"` BackgroundId JsonInt64 `json:"background_id"`
} }
// Removes background from the list of installed backgrounds // Removes background from the list of installed backgrounds
func (client *Client) RemoveBackground(req *RemoveBackgroundRequest) (*Ok, error) { func (client *Client) RemoveInstalledBackground(req *RemoveInstalledBackgroundRequest) (*Ok, error) {
result, err := client.Send(Request{ result, err := client.Send(Request{
meta: meta{ meta: meta{
Type: "removeBackground", Type: "removeInstalledBackground",
}, },
Data: map[string]interface{}{ Data: map[string]interface{}{
"background_id": req.BackgroundId, "background_id": req.BackgroundId,
@ -15429,10 +15729,10 @@ func (client *Client) RemoveBackground(req *RemoveBackgroundRequest) (*Ok, error
} }
// Resets list of installed backgrounds to its default value // Resets list of installed backgrounds to its default value
func (client *Client) ResetBackgrounds() (*Ok, error) { func (client *Client) ResetInstalledBackgrounds() (*Ok, error) {
result, err := client.Send(Request{ result, err := client.Send(Request{
meta: meta{ meta: meta{
Type: "resetBackgrounds", Type: "resetInstalledBackgrounds",
}, },
Data: map[string]interface{}{}, Data: map[string]interface{}{},
}) })
@ -16256,12 +16556,12 @@ type GetMessagePublicForwardsRequest struct {
MessageId int64 `json:"message_id"` MessageId int64 `json:"message_id"`
// Offset of the first entry to return as received from the previous request; use empty string to get the first chunk of results // Offset of the first entry to return as received from the previous request; use empty string to get the first chunk of results
Offset string `json:"offset"` Offset string `json:"offset"`
// The maximum number of messages to be returned; must be positive and can't be greater than 100. For optimal performance, the number of returned messages is chosen by TDLib and can be smaller than the specified limit // The maximum number of messages and stories to be returned; must be positive and can't be greater than 100. For optimal performance, the number of returned objects is chosen by TDLib and can be smaller than the specified limit
Limit int32 `json:"limit"` Limit int32 `json:"limit"`
} }
// Returns forwarded copies of a channel message to different public channels. Can be used only if message.can_get_statistics == true. For optimal performance, the number of returned messages is chosen by TDLib // Returns forwarded copies of a channel message to different public channels and public reposts as a story. Can be used only if message.can_get_statistics == true. For optimal performance, the number of returned messages and stories is chosen by TDLib
func (client *Client) GetMessagePublicForwards(req *GetMessagePublicForwardsRequest) (*FoundMessages, error) { func (client *Client) GetMessagePublicForwards(req *GetMessagePublicForwardsRequest) (*PublicForwards, error) {
result, err := client.Send(Request{ result, err := client.Send(Request{
meta: meta{ meta: meta{
Type: "getMessagePublicForwards", Type: "getMessagePublicForwards",
@ -16281,7 +16581,7 @@ func (client *Client) GetMessagePublicForwards(req *GetMessagePublicForwardsRequ
return nil, buildResponseError(result.Data) return nil, buildResponseError(result.Data)
} }
return UnmarshalFoundMessages(result.Data) return UnmarshalPublicForwards(result.Data)
} }
type GetStoryStatisticsRequest struct { type GetStoryStatisticsRequest struct {
@ -18024,7 +18324,7 @@ func (client *Client) LaunchPrepaidPremiumGiveaway(req *LaunchPrepaidPremiumGive
type GetPremiumGiveawayInfoRequest struct { type GetPremiumGiveawayInfoRequest struct {
// Identifier of the channel chat which started the giveaway // Identifier of the channel chat which started the giveaway
ChatId int64 `json:"chat_id"` ChatId int64 `json:"chat_id"`
// Identifier of the giveaway message in the chat // Identifier of the giveaway or a giveaway winners message in the chat
MessageId int64 `json:"message_id"` MessageId int64 `json:"message_id"`
} }
@ -18463,32 +18763,6 @@ func (client *Client) GetApplicationConfig() (JsonValue, error) {
} }
} }
type AddApplicationChangelogRequest struct {
// The previous application version
PreviousApplicationVersion string `json:"previous_application_version"`
}
// Adds server-provided application changelog as messages to the chat 777000 (Telegram) or as a stories; for official applications only. Returns a 404 error if nothing changed
func (client *Client) AddApplicationChangelog(req *AddApplicationChangelogRequest) (*Ok, error) {
result, err := client.Send(Request{
meta: meta{
Type: "addApplicationChangelog",
},
Data: map[string]interface{}{
"previous_application_version": req.PreviousApplicationVersion,
},
})
if err != nil {
return nil, err
}
if result.Type == "error" {
return nil, buildResponseError(result.Data)
}
return UnmarshalOk(result.Data)
}
type SaveApplicationLogEventRequest struct { type SaveApplicationLogEventRequest struct {
// Event type // Event type
Type string `json:"type"` Type string `json:"type"`
@ -19416,11 +19690,8 @@ func (client *Client) TestUseUpdate() (Update, error) {
case TypeUpdateChatPhoto: case TypeUpdateChatPhoto:
return UnmarshalUpdateChatPhoto(result.Data) return UnmarshalUpdateChatPhoto(result.Data)
case TypeUpdateChatAccentColor: case TypeUpdateChatAccentColors:
return UnmarshalUpdateChatAccentColor(result.Data) return UnmarshalUpdateChatAccentColors(result.Data)
case TypeUpdateChatBackgroundCustomEmoji:
return UnmarshalUpdateChatBackgroundCustomEmoji(result.Data)
case TypeUpdateChatPermissions: case TypeUpdateChatPermissions:
return UnmarshalUpdateChatPermissions(result.Data) return UnmarshalUpdateChatPermissions(result.Data)
@ -19446,6 +19717,9 @@ func (client *Client) TestUseUpdate() (Update, error) {
case TypeUpdateChatDraftMessage: case TypeUpdateChatDraftMessage:
return UnmarshalUpdateChatDraftMessage(result.Data) return UnmarshalUpdateChatDraftMessage(result.Data)
case TypeUpdateChatEmojiStatus:
return UnmarshalUpdateChatEmojiStatus(result.Data)
case TypeUpdateChatMessageSender: case TypeUpdateChatMessageSender:
return UnmarshalUpdateChatMessageSender(result.Data) return UnmarshalUpdateChatMessageSender(result.Data)
@ -19641,8 +19915,8 @@ func (client *Client) TestUseUpdate() (Update, error) {
case TypeUpdateSavedNotificationSounds: case TypeUpdateSavedNotificationSounds:
return UnmarshalUpdateSavedNotificationSounds(result.Data) return UnmarshalUpdateSavedNotificationSounds(result.Data)
case TypeUpdateSelectedBackground: case TypeUpdateDefaultBackground:
return UnmarshalUpdateSelectedBackground(result.Data) return UnmarshalUpdateDefaultBackground(result.Data)
case TypeUpdateChatThemes: case TypeUpdateChatThemes:
return UnmarshalUpdateChatThemes(result.Data) return UnmarshalUpdateChatThemes(result.Data)
@ -19740,6 +20014,12 @@ func (client *Client) TestUseUpdate() (Update, error) {
case TypeUpdateChatBoost: case TypeUpdateChatBoost:
return UnmarshalUpdateChatBoost(result.Data) return UnmarshalUpdateChatBoost(result.Data)
case TypeUpdateMessageReaction:
return UnmarshalUpdateMessageReaction(result.Data)
case TypeUpdateMessageReactions:
return UnmarshalUpdateMessageReactions(result.Data)
default: default:
return nil, errors.New("invalid type") return nil, errors.New("invalid type")
} }

File diff suppressed because it is too large Load diff

View file

@ -1477,8 +1477,8 @@ func UnmarshalKeyboardButtonType(data json.RawMessage) (KeyboardButtonType, erro
case TypeKeyboardButtonTypeRequestPoll: case TypeKeyboardButtonTypeRequestPoll:
return UnmarshalKeyboardButtonTypeRequestPoll(data) return UnmarshalKeyboardButtonTypeRequestPoll(data)
case TypeKeyboardButtonTypeRequestUser: case TypeKeyboardButtonTypeRequestUsers:
return UnmarshalKeyboardButtonTypeRequestUser(data) return UnmarshalKeyboardButtonTypeRequestUsers(data)
case TypeKeyboardButtonTypeRequestChat: case TypeKeyboardButtonTypeRequestChat:
return UnmarshalKeyboardButtonTypeRequestChat(data) return UnmarshalKeyboardButtonTypeRequestChat(data)
@ -2541,11 +2541,14 @@ func UnmarshalMessageContent(data json.RawMessage) (MessageContent, error) {
case TypeMessagePremiumGiveawayCompleted: case TypeMessagePremiumGiveawayCompleted:
return UnmarshalMessagePremiumGiveawayCompleted(data) return UnmarshalMessagePremiumGiveawayCompleted(data)
case TypeMessagePremiumGiveawayWinners:
return UnmarshalMessagePremiumGiveawayWinners(data)
case TypeMessageContactRegistered: case TypeMessageContactRegistered:
return UnmarshalMessageContactRegistered(data) return UnmarshalMessageContactRegistered(data)
case TypeMessageUserShared: case TypeMessageUsersShared:
return UnmarshalMessageUserShared(data) return UnmarshalMessageUsersShared(data)
case TypeMessageChatShared: case TypeMessageChatShared:
return UnmarshalMessageChatShared(data) return UnmarshalMessageChatShared(data)
@ -3084,6 +3087,9 @@ func UnmarshalStoryAreaType(data json.RawMessage) (StoryAreaType, error) {
case TypeStoryAreaTypeSuggestedReaction: case TypeStoryAreaTypeSuggestedReaction:
return UnmarshalStoryAreaTypeSuggestedReaction(data) return UnmarshalStoryAreaTypeSuggestedReaction(data)
case TypeStoryAreaTypeMessage:
return UnmarshalStoryAreaTypeMessage(data)
default: default:
return nil, fmt.Errorf("Error unmarshaling. Unknown type: " + meta.Type) return nil, fmt.Errorf("Error unmarshaling. Unknown type: " + meta.Type)
} }
@ -3124,6 +3130,9 @@ func UnmarshalInputStoryAreaType(data json.RawMessage) (InputStoryAreaType, erro
case TypeInputStoryAreaTypeSuggestedReaction: case TypeInputStoryAreaTypeSuggestedReaction:
return UnmarshalInputStoryAreaTypeSuggestedReaction(data) return UnmarshalInputStoryAreaTypeSuggestedReaction(data)
case TypeInputStoryAreaTypeMessage:
return UnmarshalInputStoryAreaTypeMessage(data)
default: default:
return nil, fmt.Errorf("Error unmarshaling. Unknown type: " + meta.Type) return nil, fmt.Errorf("Error unmarshaling. Unknown type: " + meta.Type)
} }
@ -3282,7 +3291,7 @@ func UnmarshalListOfStoryOrigin(dataList []json.RawMessage) ([]StoryOrigin, erro
return list, nil return list, nil
} }
func UnmarshalStoryPublicForward(data json.RawMessage) (StoryPublicForward, error) { func UnmarshalStoryInteractionType(data json.RawMessage) (StoryInteractionType, error) {
var meta meta var meta meta
err := json.Unmarshal(data, &meta) err := json.Unmarshal(data, &meta)
@ -3291,22 +3300,59 @@ func UnmarshalStoryPublicForward(data json.RawMessage) (StoryPublicForward, erro
} }
switch meta.Type { switch meta.Type {
case TypeStoryPublicForwardMessage: case TypeStoryInteractionTypeView:
return UnmarshalStoryPublicForwardMessage(data) return UnmarshalStoryInteractionTypeView(data)
case TypeStoryPublicForwardStory: case TypeStoryInteractionTypeForward:
return UnmarshalStoryPublicForwardStory(data) return UnmarshalStoryInteractionTypeForward(data)
case TypeStoryInteractionTypeRepost:
return UnmarshalStoryInteractionTypeRepost(data)
default: default:
return nil, fmt.Errorf("Error unmarshaling. Unknown type: " + meta.Type) return nil, fmt.Errorf("Error unmarshaling. Unknown type: " + meta.Type)
} }
} }
func UnmarshalListOfStoryPublicForward(dataList []json.RawMessage) ([]StoryPublicForward, error) { func UnmarshalListOfStoryInteractionType(dataList []json.RawMessage) ([]StoryInteractionType, error) {
list := []StoryPublicForward{} list := []StoryInteractionType{}
for _, data := range dataList { for _, data := range dataList {
entity, err := UnmarshalStoryPublicForward(data) entity, err := UnmarshalStoryInteractionType(data)
if err != nil {
return nil, err
}
list = append(list, entity)
}
return list, nil
}
func UnmarshalPublicForward(data json.RawMessage) (PublicForward, error) {
var meta meta
err := json.Unmarshal(data, &meta)
if err != nil {
return nil, err
}
switch meta.Type {
case TypePublicForwardMessage:
return UnmarshalPublicForwardMessage(data)
case TypePublicForwardStory:
return UnmarshalPublicForwardStory(data)
default:
return nil, fmt.Errorf("Error unmarshaling. Unknown type: " + meta.Type)
}
}
func UnmarshalListOfPublicForward(dataList []json.RawMessage) ([]PublicForward, error) {
list := []PublicForward{}
for _, data := range dataList {
entity, err := UnmarshalPublicForward(data)
if err != nil { if err != nil {
return nil, err return nil, err
} }
@ -3960,9 +4006,15 @@ func UnmarshalChatEventAction(data json.RawMessage) (ChatEventAction, error) {
case TypeChatEventAvailableReactionsChanged: case TypeChatEventAvailableReactionsChanged:
return UnmarshalChatEventAvailableReactionsChanged(data) return UnmarshalChatEventAvailableReactionsChanged(data)
case TypeChatEventBackgroundChanged:
return UnmarshalChatEventBackgroundChanged(data)
case TypeChatEventDescriptionChanged: case TypeChatEventDescriptionChanged:
return UnmarshalChatEventDescriptionChanged(data) return UnmarshalChatEventDescriptionChanged(data)
case TypeChatEventEmojiStatusChanged:
return UnmarshalChatEventEmojiStatusChanged(data)
case TypeChatEventLinkedChatChanged: case TypeChatEventLinkedChatChanged:
return UnmarshalChatEventLinkedChatChanged(data) return UnmarshalChatEventLinkedChatChanged(data)
@ -3996,8 +4048,8 @@ func UnmarshalChatEventAction(data json.RawMessage) (ChatEventAction, error) {
case TypeChatEventAccentColorChanged: case TypeChatEventAccentColorChanged:
return UnmarshalChatEventAccentColorChanged(data) return UnmarshalChatEventAccentColorChanged(data)
case TypeChatEventBackgroundCustomEmojiChanged: case TypeChatEventProfileAccentColorChanged:
return UnmarshalChatEventBackgroundCustomEmojiChanged(data) return UnmarshalChatEventProfileAccentColorChanged(data)
case TypeChatEventHasProtectedContentToggled: case TypeChatEventHasProtectedContentToggled:
return UnmarshalChatEventHasProtectedContentToggled(data) return UnmarshalChatEventHasProtectedContentToggled(data)
@ -4564,6 +4616,9 @@ func UnmarshalBackgroundType(data json.RawMessage) (BackgroundType, error) {
case TypeBackgroundTypeFill: case TypeBackgroundTypeFill:
return UnmarshalBackgroundTypeFill(data) return UnmarshalBackgroundTypeFill(data)
case TypeBackgroundTypeChatTheme:
return UnmarshalBackgroundTypeChatTheme(data)
default: default:
return nil, fmt.Errorf("Error unmarshaling. Unknown type: " + meta.Type) return nil, fmt.Errorf("Error unmarshaling. Unknown type: " + meta.Type)
} }
@ -5564,6 +5619,9 @@ func UnmarshalInternalLinkType(data json.RawMessage) (InternalLinkType, error) {
case TypeInternalLinkTypePremiumFeatures: case TypeInternalLinkTypePremiumFeatures:
return UnmarshalInternalLinkTypePremiumFeatures(data) return UnmarshalInternalLinkTypePremiumFeatures(data)
case TypeInternalLinkTypePremiumGift:
return UnmarshalInternalLinkTypePremiumGift(data)
case TypeInternalLinkTypePremiumGiftCode: case TypeInternalLinkTypePremiumGiftCode:
return UnmarshalInternalLinkTypePremiumGiftCode(data) return UnmarshalInternalLinkTypePremiumGiftCode(data)
@ -6041,6 +6099,9 @@ func UnmarshalSuggestedAction(data json.RawMessage) (SuggestedAction, error) {
case TypeSuggestedActionSubscribeToAnnualPremium: case TypeSuggestedActionSubscribeToAnnualPremium:
return UnmarshalSuggestedActionSubscribeToAnnualPremium(data) return UnmarshalSuggestedActionSubscribeToAnnualPremium(data)
case TypeSuggestedActionGiftPremiumForChristmas:
return UnmarshalSuggestedActionGiftPremiumForChristmas(data)
default: default:
return nil, fmt.Errorf("Error unmarshaling. Unknown type: " + meta.Type) return nil, fmt.Errorf("Error unmarshaling. Unknown type: " + meta.Type)
} }
@ -6376,11 +6437,8 @@ func UnmarshalUpdate(data json.RawMessage) (Update, error) {
case TypeUpdateChatPhoto: case TypeUpdateChatPhoto:
return UnmarshalUpdateChatPhoto(data) return UnmarshalUpdateChatPhoto(data)
case TypeUpdateChatAccentColor: case TypeUpdateChatAccentColors:
return UnmarshalUpdateChatAccentColor(data) return UnmarshalUpdateChatAccentColors(data)
case TypeUpdateChatBackgroundCustomEmoji:
return UnmarshalUpdateChatBackgroundCustomEmoji(data)
case TypeUpdateChatPermissions: case TypeUpdateChatPermissions:
return UnmarshalUpdateChatPermissions(data) return UnmarshalUpdateChatPermissions(data)
@ -6406,6 +6464,9 @@ func UnmarshalUpdate(data json.RawMessage) (Update, error) {
case TypeUpdateChatDraftMessage: case TypeUpdateChatDraftMessage:
return UnmarshalUpdateChatDraftMessage(data) return UnmarshalUpdateChatDraftMessage(data)
case TypeUpdateChatEmojiStatus:
return UnmarshalUpdateChatEmojiStatus(data)
case TypeUpdateChatMessageSender: case TypeUpdateChatMessageSender:
return UnmarshalUpdateChatMessageSender(data) return UnmarshalUpdateChatMessageSender(data)
@ -6601,8 +6662,8 @@ func UnmarshalUpdate(data json.RawMessage) (Update, error) {
case TypeUpdateSavedNotificationSounds: case TypeUpdateSavedNotificationSounds:
return UnmarshalUpdateSavedNotificationSounds(data) return UnmarshalUpdateSavedNotificationSounds(data)
case TypeUpdateSelectedBackground: case TypeUpdateDefaultBackground:
return UnmarshalUpdateSelectedBackground(data) return UnmarshalUpdateDefaultBackground(data)
case TypeUpdateChatThemes: case TypeUpdateChatThemes:
return UnmarshalUpdateChatThemes(data) return UnmarshalUpdateChatThemes(data)
@ -6700,6 +6761,12 @@ func UnmarshalUpdate(data json.RawMessage) (Update, error) {
case TypeUpdateChatBoost: case TypeUpdateChatBoost:
return UnmarshalUpdateChatBoost(data) return UnmarshalUpdateChatBoost(data)
case TypeUpdateMessageReaction:
return UnmarshalUpdateMessageReaction(data)
case TypeUpdateMessageReactions:
return UnmarshalUpdateMessageReactions(data)
default: default:
return nil, fmt.Errorf("Error unmarshaling. Unknown type: " + meta.Type) return nil, fmt.Errorf("Error unmarshaling. Unknown type: " + meta.Type)
} }
@ -9004,8 +9071,8 @@ func UnmarshalKeyboardButtonTypeRequestPoll(data json.RawMessage) (*KeyboardButt
return &resp, err return &resp, err
} }
func UnmarshalKeyboardButtonTypeRequestUser(data json.RawMessage) (*KeyboardButtonTypeRequestUser, error) { func UnmarshalKeyboardButtonTypeRequestUsers(data json.RawMessage) (*KeyboardButtonTypeRequestUsers, error) {
var resp KeyboardButtonTypeRequestUser var resp KeyboardButtonTypeRequestUsers
err := json.Unmarshal(data, &resp) err := json.Unmarshal(data, &resp)
@ -10972,6 +11039,14 @@ func UnmarshalMessagePremiumGiveawayCompleted(data json.RawMessage) (*MessagePre
return &resp, err return &resp, err
} }
func UnmarshalMessagePremiumGiveawayWinners(data json.RawMessage) (*MessagePremiumGiveawayWinners, error) {
var resp MessagePremiumGiveawayWinners
err := json.Unmarshal(data, &resp)
return &resp, err
}
func UnmarshalMessageContactRegistered(data json.RawMessage) (*MessageContactRegistered, error) { func UnmarshalMessageContactRegistered(data json.RawMessage) (*MessageContactRegistered, error) {
var resp MessageContactRegistered var resp MessageContactRegistered
@ -10980,8 +11055,8 @@ func UnmarshalMessageContactRegistered(data json.RawMessage) (*MessageContactReg
return &resp, err return &resp, err
} }
func UnmarshalMessageUserShared(data json.RawMessage) (*MessageUserShared, error) { func UnmarshalMessageUsersShared(data json.RawMessage) (*MessageUsersShared, error) {
var resp MessageUserShared var resp MessageUsersShared
err := json.Unmarshal(data, &resp) err := json.Unmarshal(data, &resp)
@ -11812,22 +11887,6 @@ func UnmarshalEmojiCategoryTypeChatPhoto(data json.RawMessage) (*EmojiCategoryTy
return &resp, err return &resp, err
} }
func UnmarshalStoryViewer(data json.RawMessage) (*StoryViewer, error) {
var resp StoryViewer
err := json.Unmarshal(data, &resp)
return &resp, err
}
func UnmarshalStoryViewers(data json.RawMessage) (*StoryViewers, error) {
var resp StoryViewers
err := json.Unmarshal(data, &resp)
return &resp, err
}
func UnmarshalStoryAreaPosition(data json.RawMessage) (*StoryAreaPosition, error) { func UnmarshalStoryAreaPosition(data json.RawMessage) (*StoryAreaPosition, error) {
var resp StoryAreaPosition var resp StoryAreaPosition
@ -11860,6 +11919,14 @@ func UnmarshalStoryAreaTypeSuggestedReaction(data json.RawMessage) (*StoryAreaTy
return &resp, err return &resp, err
} }
func UnmarshalStoryAreaTypeMessage(data json.RawMessage) (*StoryAreaTypeMessage, error) {
var resp StoryAreaTypeMessage
err := json.Unmarshal(data, &resp)
return &resp, err
}
func UnmarshalStoryArea(data json.RawMessage) (*StoryArea, error) { func UnmarshalStoryArea(data json.RawMessage) (*StoryArea, error) {
var resp StoryArea var resp StoryArea
@ -11900,6 +11967,14 @@ func UnmarshalInputStoryAreaTypeSuggestedReaction(data json.RawMessage) (*InputS
return &resp, err return &resp, err
} }
func UnmarshalInputStoryAreaTypeMessage(data json.RawMessage) (*InputStoryAreaTypeMessage, error) {
var resp InputStoryAreaTypeMessage
err := json.Unmarshal(data, &resp)
return &resp, err
}
func UnmarshalInputStoryArea(data json.RawMessage) (*InputStoryArea, error) { func UnmarshalInputStoryArea(data json.RawMessage) (*InputStoryArea, error) {
var resp InputStoryArea var resp InputStoryArea
@ -12052,24 +12127,80 @@ func UnmarshalChatActiveStories(data json.RawMessage) (*ChatActiveStories, error
return &resp, err return &resp, err
} }
func UnmarshalStoryPublicForwardMessage(data json.RawMessage) (*StoryPublicForwardMessage, error) { func UnmarshalStoryInteractionTypeView(data json.RawMessage) (*StoryInteractionTypeView, error) {
var resp StoryPublicForwardMessage var resp StoryInteractionTypeView
err := json.Unmarshal(data, &resp) err := json.Unmarshal(data, &resp)
return &resp, err return &resp, err
} }
func UnmarshalStoryPublicForwardStory(data json.RawMessage) (*StoryPublicForwardStory, error) { func UnmarshalStoryInteractionTypeForward(data json.RawMessage) (*StoryInteractionTypeForward, error) {
var resp StoryPublicForwardStory var resp StoryInteractionTypeForward
err := json.Unmarshal(data, &resp) err := json.Unmarshal(data, &resp)
return &resp, err return &resp, err
} }
func UnmarshalStoryPublicForwards(data json.RawMessage) (*StoryPublicForwards, error) { func UnmarshalStoryInteractionTypeRepost(data json.RawMessage) (*StoryInteractionTypeRepost, error) {
var resp StoryPublicForwards var resp StoryInteractionTypeRepost
err := json.Unmarshal(data, &resp)
return &resp, err
}
func UnmarshalStoryInteraction(data json.RawMessage) (*StoryInteraction, error) {
var resp StoryInteraction
err := json.Unmarshal(data, &resp)
return &resp, err
}
func UnmarshalStoryInteractions(data json.RawMessage) (*StoryInteractions, error) {
var resp StoryInteractions
err := json.Unmarshal(data, &resp)
return &resp, err
}
func UnmarshalPublicForwardMessage(data json.RawMessage) (*PublicForwardMessage, error) {
var resp PublicForwardMessage
err := json.Unmarshal(data, &resp)
return &resp, err
}
func UnmarshalPublicForwardStory(data json.RawMessage) (*PublicForwardStory, error) {
var resp PublicForwardStory
err := json.Unmarshal(data, &resp)
return &resp, err
}
func UnmarshalPublicForwards(data json.RawMessage) (*PublicForwards, error) {
var resp PublicForwards
err := json.Unmarshal(data, &resp)
return &resp, err
}
func UnmarshalChatBoostLevelFeatures(data json.RawMessage) (*ChatBoostLevelFeatures, error) {
var resp ChatBoostLevelFeatures
err := json.Unmarshal(data, &resp)
return &resp, err
}
func UnmarshalChatBoostFeatures(data json.RawMessage) (*ChatBoostFeatures, error) {
var resp ChatBoostFeatures
err := json.Unmarshal(data, &resp) err := json.Unmarshal(data, &resp)
@ -13028,6 +13159,14 @@ func UnmarshalChatEventAvailableReactionsChanged(data json.RawMessage) (*ChatEve
return &resp, err return &resp, err
} }
func UnmarshalChatEventBackgroundChanged(data json.RawMessage) (*ChatEventBackgroundChanged, error) {
var resp ChatEventBackgroundChanged
err := json.Unmarshal(data, &resp)
return &resp, err
}
func UnmarshalChatEventDescriptionChanged(data json.RawMessage) (*ChatEventDescriptionChanged, error) { func UnmarshalChatEventDescriptionChanged(data json.RawMessage) (*ChatEventDescriptionChanged, error) {
var resp ChatEventDescriptionChanged var resp ChatEventDescriptionChanged
@ -13036,6 +13175,14 @@ func UnmarshalChatEventDescriptionChanged(data json.RawMessage) (*ChatEventDescr
return &resp, err return &resp, err
} }
func UnmarshalChatEventEmojiStatusChanged(data json.RawMessage) (*ChatEventEmojiStatusChanged, error) {
var resp ChatEventEmojiStatusChanged
err := json.Unmarshal(data, &resp)
return &resp, err
}
func UnmarshalChatEventLinkedChatChanged(data json.RawMessage) (*ChatEventLinkedChatChanged, error) { func UnmarshalChatEventLinkedChatChanged(data json.RawMessage) (*ChatEventLinkedChatChanged, error) {
var resp ChatEventLinkedChatChanged var resp ChatEventLinkedChatChanged
@ -13124,8 +13271,8 @@ func UnmarshalChatEventAccentColorChanged(data json.RawMessage) (*ChatEventAccen
return &resp, err return &resp, err
} }
func UnmarshalChatEventBackgroundCustomEmojiChanged(data json.RawMessage) (*ChatEventBackgroundCustomEmojiChanged, error) { func UnmarshalChatEventProfileAccentColorChanged(data json.RawMessage) (*ChatEventProfileAccentColorChanged, error) {
var resp ChatEventBackgroundCustomEmojiChanged var resp ChatEventProfileAccentColorChanged
err := json.Unmarshal(data, &resp) err := json.Unmarshal(data, &resp)
@ -13988,6 +14135,14 @@ func UnmarshalBackgroundTypeFill(data json.RawMessage) (*BackgroundTypeFill, err
return &resp, err return &resp, err
} }
func UnmarshalBackgroundTypeChatTheme(data json.RawMessage) (*BackgroundTypeChatTheme, error) {
var resp BackgroundTypeChatTheme
err := json.Unmarshal(data, &resp)
return &resp, err
}
func UnmarshalInputBackgroundLocal(data json.RawMessage) (*InputBackgroundLocal, error) { func UnmarshalInputBackgroundLocal(data json.RawMessage) (*InputBackgroundLocal, error) {
var resp InputBackgroundLocal var resp InputBackgroundLocal
@ -15364,6 +15519,14 @@ func UnmarshalInternalLinkTypePremiumFeatures(data json.RawMessage) (*InternalLi
return &resp, err return &resp, err
} }
func UnmarshalInternalLinkTypePremiumGift(data json.RawMessage) (*InternalLinkTypePremiumGift, error) {
var resp InternalLinkTypePremiumGift
err := json.Unmarshal(data, &resp)
return &resp, err
}
func UnmarshalInternalLinkTypePremiumGiftCode(data json.RawMessage) (*InternalLinkTypePremiumGiftCode, error) { func UnmarshalInternalLinkTypePremiumGiftCode(data json.RawMessage) (*InternalLinkTypePremiumGiftCode, error) {
var resp InternalLinkTypePremiumGiftCode var resp InternalLinkTypePremiumGiftCode
@ -16124,6 +16287,14 @@ func UnmarshalSuggestedActionSubscribeToAnnualPremium(data json.RawMessage) (*Su
return &resp, err return &resp, err
} }
func UnmarshalSuggestedActionGiftPremiumForChristmas(data json.RawMessage) (*SuggestedActionGiftPremiumForChristmas, error) {
var resp SuggestedActionGiftPremiumForChristmas
err := json.Unmarshal(data, &resp)
return &resp, err
}
func UnmarshalCount(data json.RawMessage) (*Count, error) { func UnmarshalCount(data json.RawMessage) (*Count, error) {
var resp Count var resp Count
@ -16556,16 +16727,8 @@ func UnmarshalUpdateChatPhoto(data json.RawMessage) (*UpdateChatPhoto, error) {
return &resp, err return &resp, err
} }
func UnmarshalUpdateChatAccentColor(data json.RawMessage) (*UpdateChatAccentColor, error) { func UnmarshalUpdateChatAccentColors(data json.RawMessage) (*UpdateChatAccentColors, error) {
var resp UpdateChatAccentColor var resp UpdateChatAccentColors
err := json.Unmarshal(data, &resp)
return &resp, err
}
func UnmarshalUpdateChatBackgroundCustomEmoji(data json.RawMessage) (*UpdateChatBackgroundCustomEmoji, error) {
var resp UpdateChatBackgroundCustomEmoji
err := json.Unmarshal(data, &resp) err := json.Unmarshal(data, &resp)
@ -16636,6 +16799,14 @@ func UnmarshalUpdateChatDraftMessage(data json.RawMessage) (*UpdateChatDraftMess
return &resp, err return &resp, err
} }
func UnmarshalUpdateChatEmojiStatus(data json.RawMessage) (*UpdateChatEmojiStatus, error) {
var resp UpdateChatEmojiStatus
err := json.Unmarshal(data, &resp)
return &resp, err
}
func UnmarshalUpdateChatMessageSender(data json.RawMessage) (*UpdateChatMessageSender, error) { func UnmarshalUpdateChatMessageSender(data json.RawMessage) (*UpdateChatMessageSender, error) {
var resp UpdateChatMessageSender var resp UpdateChatMessageSender
@ -17156,8 +17327,8 @@ func UnmarshalUpdateSavedNotificationSounds(data json.RawMessage) (*UpdateSavedN
return &resp, err return &resp, err
} }
func UnmarshalUpdateSelectedBackground(data json.RawMessage) (*UpdateSelectedBackground, error) { func UnmarshalUpdateDefaultBackground(data json.RawMessage) (*UpdateDefaultBackground, error) {
var resp UpdateSelectedBackground var resp UpdateDefaultBackground
err := json.Unmarshal(data, &resp) err := json.Unmarshal(data, &resp)
@ -17420,6 +17591,22 @@ func UnmarshalUpdateChatBoost(data json.RawMessage) (*UpdateChatBoost, error) {
return &resp, err return &resp, err
} }
func UnmarshalUpdateMessageReaction(data json.RawMessage) (*UpdateMessageReaction, error) {
var resp UpdateMessageReaction
err := json.Unmarshal(data, &resp)
return &resp, err
}
func UnmarshalUpdateMessageReactions(data json.RawMessage) (*UpdateMessageReactions, error) {
var resp UpdateMessageReactions
err := json.Unmarshal(data, &resp)
return &resp, err
}
func UnmarshalUpdates(data json.RawMessage) (*Updates, error) { func UnmarshalUpdates(data json.RawMessage) (*Updates, error) {
var resp Updates var resp Updates
@ -18384,8 +18571,8 @@ func UnmarshalType(data json.RawMessage) (Type, error) {
case TypeKeyboardButtonTypeRequestPoll: case TypeKeyboardButtonTypeRequestPoll:
return UnmarshalKeyboardButtonTypeRequestPoll(data) return UnmarshalKeyboardButtonTypeRequestPoll(data)
case TypeKeyboardButtonTypeRequestUser: case TypeKeyboardButtonTypeRequestUsers:
return UnmarshalKeyboardButtonTypeRequestUser(data) return UnmarshalKeyboardButtonTypeRequestUsers(data)
case TypeKeyboardButtonTypeRequestChat: case TypeKeyboardButtonTypeRequestChat:
return UnmarshalKeyboardButtonTypeRequestChat(data) return UnmarshalKeyboardButtonTypeRequestChat(data)
@ -19122,11 +19309,14 @@ func UnmarshalType(data json.RawMessage) (Type, error) {
case TypeMessagePremiumGiveawayCompleted: case TypeMessagePremiumGiveawayCompleted:
return UnmarshalMessagePremiumGiveawayCompleted(data) return UnmarshalMessagePremiumGiveawayCompleted(data)
case TypeMessagePremiumGiveawayWinners:
return UnmarshalMessagePremiumGiveawayWinners(data)
case TypeMessageContactRegistered: case TypeMessageContactRegistered:
return UnmarshalMessageContactRegistered(data) return UnmarshalMessageContactRegistered(data)
case TypeMessageUserShared: case TypeMessageUsersShared:
return UnmarshalMessageUserShared(data) return UnmarshalMessageUsersShared(data)
case TypeMessageChatShared: case TypeMessageChatShared:
return UnmarshalMessageChatShared(data) return UnmarshalMessageChatShared(data)
@ -19437,12 +19627,6 @@ func UnmarshalType(data json.RawMessage) (Type, error) {
case TypeEmojiCategoryTypeChatPhoto: case TypeEmojiCategoryTypeChatPhoto:
return UnmarshalEmojiCategoryTypeChatPhoto(data) return UnmarshalEmojiCategoryTypeChatPhoto(data)
case TypeStoryViewer:
return UnmarshalStoryViewer(data)
case TypeStoryViewers:
return UnmarshalStoryViewers(data)
case TypeStoryAreaPosition: case TypeStoryAreaPosition:
return UnmarshalStoryAreaPosition(data) return UnmarshalStoryAreaPosition(data)
@ -19455,6 +19639,9 @@ func UnmarshalType(data json.RawMessage) (Type, error) {
case TypeStoryAreaTypeSuggestedReaction: case TypeStoryAreaTypeSuggestedReaction:
return UnmarshalStoryAreaTypeSuggestedReaction(data) return UnmarshalStoryAreaTypeSuggestedReaction(data)
case TypeStoryAreaTypeMessage:
return UnmarshalStoryAreaTypeMessage(data)
case TypeStoryArea: case TypeStoryArea:
return UnmarshalStoryArea(data) return UnmarshalStoryArea(data)
@ -19470,6 +19657,9 @@ func UnmarshalType(data json.RawMessage) (Type, error) {
case TypeInputStoryAreaTypeSuggestedReaction: case TypeInputStoryAreaTypeSuggestedReaction:
return UnmarshalInputStoryAreaTypeSuggestedReaction(data) return UnmarshalInputStoryAreaTypeSuggestedReaction(data)
case TypeInputStoryAreaTypeMessage:
return UnmarshalInputStoryAreaTypeMessage(data)
case TypeInputStoryArea: case TypeInputStoryArea:
return UnmarshalInputStoryArea(data) return UnmarshalInputStoryArea(data)
@ -19527,14 +19717,35 @@ func UnmarshalType(data json.RawMessage) (Type, error) {
case TypeChatActiveStories: case TypeChatActiveStories:
return UnmarshalChatActiveStories(data) return UnmarshalChatActiveStories(data)
case TypeStoryPublicForwardMessage: case TypeStoryInteractionTypeView:
return UnmarshalStoryPublicForwardMessage(data) return UnmarshalStoryInteractionTypeView(data)
case TypeStoryPublicForwardStory: case TypeStoryInteractionTypeForward:
return UnmarshalStoryPublicForwardStory(data) return UnmarshalStoryInteractionTypeForward(data)
case TypeStoryPublicForwards: case TypeStoryInteractionTypeRepost:
return UnmarshalStoryPublicForwards(data) return UnmarshalStoryInteractionTypeRepost(data)
case TypeStoryInteraction:
return UnmarshalStoryInteraction(data)
case TypeStoryInteractions:
return UnmarshalStoryInteractions(data)
case TypePublicForwardMessage:
return UnmarshalPublicForwardMessage(data)
case TypePublicForwardStory:
return UnmarshalPublicForwardStory(data)
case TypePublicForwards:
return UnmarshalPublicForwards(data)
case TypeChatBoostLevelFeatures:
return UnmarshalChatBoostLevelFeatures(data)
case TypeChatBoostFeatures:
return UnmarshalChatBoostFeatures(data)
case TypeChatBoostSourceGiftCode: case TypeChatBoostSourceGiftCode:
return UnmarshalChatBoostSourceGiftCode(data) return UnmarshalChatBoostSourceGiftCode(data)
@ -19893,9 +20104,15 @@ func UnmarshalType(data json.RawMessage) (Type, error) {
case TypeChatEventAvailableReactionsChanged: case TypeChatEventAvailableReactionsChanged:
return UnmarshalChatEventAvailableReactionsChanged(data) return UnmarshalChatEventAvailableReactionsChanged(data)
case TypeChatEventBackgroundChanged:
return UnmarshalChatEventBackgroundChanged(data)
case TypeChatEventDescriptionChanged: case TypeChatEventDescriptionChanged:
return UnmarshalChatEventDescriptionChanged(data) return UnmarshalChatEventDescriptionChanged(data)
case TypeChatEventEmojiStatusChanged:
return UnmarshalChatEventEmojiStatusChanged(data)
case TypeChatEventLinkedChatChanged: case TypeChatEventLinkedChatChanged:
return UnmarshalChatEventLinkedChatChanged(data) return UnmarshalChatEventLinkedChatChanged(data)
@ -19929,8 +20146,8 @@ func UnmarshalType(data json.RawMessage) (Type, error) {
case TypeChatEventAccentColorChanged: case TypeChatEventAccentColorChanged:
return UnmarshalChatEventAccentColorChanged(data) return UnmarshalChatEventAccentColorChanged(data)
case TypeChatEventBackgroundCustomEmojiChanged: case TypeChatEventProfileAccentColorChanged:
return UnmarshalChatEventBackgroundCustomEmojiChanged(data) return UnmarshalChatEventProfileAccentColorChanged(data)
case TypeChatEventHasProtectedContentToggled: case TypeChatEventHasProtectedContentToggled:
return UnmarshalChatEventHasProtectedContentToggled(data) return UnmarshalChatEventHasProtectedContentToggled(data)
@ -20253,6 +20470,9 @@ func UnmarshalType(data json.RawMessage) (Type, error) {
case TypeBackgroundTypeFill: case TypeBackgroundTypeFill:
return UnmarshalBackgroundTypeFill(data) return UnmarshalBackgroundTypeFill(data)
case TypeBackgroundTypeChatTheme:
return UnmarshalBackgroundTypeChatTheme(data)
case TypeInputBackgroundLocal: case TypeInputBackgroundLocal:
return UnmarshalInputBackgroundLocal(data) return UnmarshalInputBackgroundLocal(data)
@ -20769,6 +20989,9 @@ func UnmarshalType(data json.RawMessage) (Type, error) {
case TypeInternalLinkTypePremiumFeatures: case TypeInternalLinkTypePremiumFeatures:
return UnmarshalInternalLinkTypePremiumFeatures(data) return UnmarshalInternalLinkTypePremiumFeatures(data)
case TypeInternalLinkTypePremiumGift:
return UnmarshalInternalLinkTypePremiumGift(data)
case TypeInternalLinkTypePremiumGiftCode: case TypeInternalLinkTypePremiumGiftCode:
return UnmarshalInternalLinkTypePremiumGiftCode(data) return UnmarshalInternalLinkTypePremiumGiftCode(data)
@ -21054,6 +21277,9 @@ func UnmarshalType(data json.RawMessage) (Type, error) {
case TypeSuggestedActionSubscribeToAnnualPremium: case TypeSuggestedActionSubscribeToAnnualPremium:
return UnmarshalSuggestedActionSubscribeToAnnualPremium(data) return UnmarshalSuggestedActionSubscribeToAnnualPremium(data)
case TypeSuggestedActionGiftPremiumForChristmas:
return UnmarshalSuggestedActionGiftPremiumForChristmas(data)
case TypeCount: case TypeCount:
return UnmarshalCount(data) return UnmarshalCount(data)
@ -21216,11 +21442,8 @@ func UnmarshalType(data json.RawMessage) (Type, error) {
case TypeUpdateChatPhoto: case TypeUpdateChatPhoto:
return UnmarshalUpdateChatPhoto(data) return UnmarshalUpdateChatPhoto(data)
case TypeUpdateChatAccentColor: case TypeUpdateChatAccentColors:
return UnmarshalUpdateChatAccentColor(data) return UnmarshalUpdateChatAccentColors(data)
case TypeUpdateChatBackgroundCustomEmoji:
return UnmarshalUpdateChatBackgroundCustomEmoji(data)
case TypeUpdateChatPermissions: case TypeUpdateChatPermissions:
return UnmarshalUpdateChatPermissions(data) return UnmarshalUpdateChatPermissions(data)
@ -21246,6 +21469,9 @@ func UnmarshalType(data json.RawMessage) (Type, error) {
case TypeUpdateChatDraftMessage: case TypeUpdateChatDraftMessage:
return UnmarshalUpdateChatDraftMessage(data) return UnmarshalUpdateChatDraftMessage(data)
case TypeUpdateChatEmojiStatus:
return UnmarshalUpdateChatEmojiStatus(data)
case TypeUpdateChatMessageSender: case TypeUpdateChatMessageSender:
return UnmarshalUpdateChatMessageSender(data) return UnmarshalUpdateChatMessageSender(data)
@ -21441,8 +21667,8 @@ func UnmarshalType(data json.RawMessage) (Type, error) {
case TypeUpdateSavedNotificationSounds: case TypeUpdateSavedNotificationSounds:
return UnmarshalUpdateSavedNotificationSounds(data) return UnmarshalUpdateSavedNotificationSounds(data)
case TypeUpdateSelectedBackground: case TypeUpdateDefaultBackground:
return UnmarshalUpdateSelectedBackground(data) return UnmarshalUpdateDefaultBackground(data)
case TypeUpdateChatThemes: case TypeUpdateChatThemes:
return UnmarshalUpdateChatThemes(data) return UnmarshalUpdateChatThemes(data)
@ -21540,6 +21766,12 @@ func UnmarshalType(data json.RawMessage) (Type, error) {
case TypeUpdateChatBoost: case TypeUpdateChatBoost:
return UnmarshalUpdateChatBoost(data) return UnmarshalUpdateChatBoost(data)
case TypeUpdateMessageReaction:
return UnmarshalUpdateMessageReaction(data)
case TypeUpdateMessageReactions:
return UnmarshalUpdateMessageReactions(data)
case TypeUpdates: case TypeUpdates:
return UnmarshalUpdates(data) return UnmarshalUpdates(data)

View file

@ -512,14 +512,14 @@ poll id:int64 question:string options:vector<pollOption> total_voter_count:int32
//@is_default True, if this is one of default backgrounds //@is_default True, if this is one of default backgrounds
//@is_dark True, if the background is dark and is recommended to be used with dark theme //@is_dark True, if the background is dark and is recommended to be used with dark theme
//@name Unique background name //@name Unique background name
//@document Document with the background; may be null. Null only for filled backgrounds //@document Document with the background; may be null. Null only for filled and chat theme backgrounds
//@type Type of the background //@type Type of the background
background id:int64 is_default:Bool is_dark:Bool name:string document:document type:BackgroundType = Background; background id:int64 is_default:Bool is_dark:Bool name:string document:document type:BackgroundType = Background;
//@description Contains a list of backgrounds @backgrounds A list of backgrounds //@description Contains a list of backgrounds @backgrounds A list of backgrounds
backgrounds backgrounds:vector<background> = Backgrounds; backgrounds backgrounds:vector<background> = Backgrounds;
//@description Describes a background set for a specific chat @background The background @dark_theme_dimming Dimming of the background in dark themes, as a percentage; 0-100 //@description Describes a background set for a specific chat @background The background @dark_theme_dimming Dimming of the background in dark themes, as a percentage; 0-100. Applied only to Wallpaper and Fill types of background
chatBackground background:background dark_theme_dimming:int32 = ChatBackground; chatBackground background:background dark_theme_dimming:int32 = ChatBackground;
@ -633,7 +633,7 @@ inputChatPhotoSticker sticker:chatPhotoSticker = InputChatPhoto;
//@description Describes actions that a user is allowed to take in a chat //@description Describes actions that a user is allowed to take in a chat
//@can_send_basic_messages True, if the user can send text messages, contacts, giveaways, invoices, locations, and venues //@can_send_basic_messages True, if the user can send text messages, contacts, giveaways, giveaway winners, invoices, locations, and venues
//@can_send_audios True, if the user can send music files //@can_send_audios True, if the user can send music files
//@can_send_documents True, if the user can send documents //@can_send_documents True, if the user can send documents
//@can_send_photos True, if the user can send photos //@can_send_photos True, if the user can send photos
@ -675,7 +675,7 @@ chatAdministratorRights can_manage_chat:Bool can_change_info:Bool can_post_messa
//@currency ISO 4217 currency code for Telegram Premium subscription payment //@currency ISO 4217 currency code for Telegram Premium subscription payment
//@amount The amount to pay, in the smallest units of the currency //@amount The amount to pay, in the smallest units of the currency
//@discount_percentage The discount associated with this option, as a percentage //@discount_percentage The discount associated with this option, as a percentage
//@month_count Number of month the Telegram Premium subscription will be active //@month_count Number of months the Telegram Premium subscription will be active
//@store_product_id Identifier of the store product associated with the option //@store_product_id Identifier of the store product associated with the option
//@payment_link An internal link to be opened for buying Telegram Premium to the user if store payment isn't possible; may be null if direct payment isn't available //@payment_link An internal link to be opened for buying Telegram Premium to the user if store payment isn't possible; may be null if direct payment isn't available
premiumPaymentOption currency:string amount:int53 discount_percentage:int32 month_count:int32 store_product_id:string payment_link:InternalLinkType = PremiumPaymentOption; premiumPaymentOption currency:string amount:int53 discount_percentage:int32 month_count:int32 store_product_id:string payment_link:InternalLinkType = PremiumPaymentOption;
@ -691,7 +691,7 @@ premiumStatePaymentOption payment_option:premiumPaymentOption is_current:Bool is
//@currency ISO 4217 currency code for Telegram Premium gift code payment //@currency ISO 4217 currency code for Telegram Premium gift code payment
//@amount The amount to pay, in the smallest units of the currency //@amount The amount to pay, in the smallest units of the currency
//@user_count Number of users which will be able to activate the gift codes //@user_count Number of users which will be able to activate the gift codes
//@month_count Number of month the Telegram Premium subscription will be active //@month_count Number of months the Telegram Premium subscription will be active
//@store_product_id Identifier of the store product associated with the option; may be empty if none //@store_product_id Identifier of the store product associated with the option; may be empty if none
//@store_product_quantity Number of times the store product must be paid //@store_product_quantity Number of times the store product must be paid
premiumGiftCodePaymentOption currency:string amount:int53 user_count:int32 month_count:int32 store_product_id:string store_product_quantity:int32 = PremiumGiftCodePaymentOption; premiumGiftCodePaymentOption currency:string amount:int53 user_count:int32 month_count:int32 store_product_id:string store_product_quantity:int32 = PremiumGiftCodePaymentOption;
@ -700,11 +700,11 @@ premiumGiftCodePaymentOption currency:string amount:int53 user_count:int32 month
premiumGiftCodePaymentOptions options:vector<premiumGiftCodePaymentOption> = PremiumGiftCodePaymentOptions; premiumGiftCodePaymentOptions options:vector<premiumGiftCodePaymentOption> = PremiumGiftCodePaymentOptions;
//@description Contains information about a Telegram Premium gift code //@description Contains information about a Telegram Premium gift code
//@creator_id Identifier of a chat or a user that created the gift code //@creator_id Identifier of a chat or a user that created the gift code; may be null if unknown. If null and the code is from messagePremiumGiftCode message, then creator_id from the message can be used
//@creation_date Point in time (Unix timestamp) when the code was created //@creation_date Point in time (Unix timestamp) when the code was created
//@is_from_giveaway True, if the gift code was created for a giveaway //@is_from_giveaway True, if the gift code was created for a giveaway
//@giveaway_message_id Identifier of the corresponding giveaway message in the creator_id chat; can be 0 or an identifier of a deleted message //@giveaway_message_id Identifier of the corresponding giveaway message in the creator_id chat; can be 0 or an identifier of a deleted message
//@month_count Number of month the Telegram Premium subscription will be active after code activation //@month_count Number of months the Telegram Premium subscription will be active after code activation
//@user_id Identifier of a user for which the code was created; 0 if none //@user_id Identifier of a user for which the code was created; 0 if none
//@use_date Point in time (Unix timestamp) when the code was activated; 0 if none //@use_date Point in time (Unix timestamp) when the code was activated; 0 if none
premiumGiftCodeInfo creator_id:MessageSender creation_date:int32 is_from_giveaway:Bool giveaway_message_id:int53 month_count:int32 user_id:int53 use_date:int32 = PremiumGiftCodeInfo; premiumGiftCodeInfo creator_id:MessageSender creation_date:int32 is_from_giveaway:Bool giveaway_message_id:int53 month_count:int32 user_id:int53 use_date:int32 = PremiumGiftCodeInfo;
@ -752,7 +752,8 @@ premiumGiveawayInfoCompleted creation_date:int32 actual_winners_selection_date:i
//@built_in_accent_color_id Identifier of a built-in color to use in places, where only one color is needed; 0-6 //@built_in_accent_color_id Identifier of a built-in color to use in places, where only one color is needed; 0-6
//@light_theme_colors The list of 1-3 colors in RGB format, describing the accent color, as expected to be shown in light themes //@light_theme_colors The list of 1-3 colors in RGB format, describing the accent color, as expected to be shown in light themes
//@dark_theme_colors The list of 1-3 colors in RGB format, describing the accent color, as expected to be shown in dark themes //@dark_theme_colors The list of 1-3 colors in RGB format, describing the accent color, as expected to be shown in dark themes
accentColor id:int32 built_in_accent_color_id:int32 light_theme_colors:vector<int32> dark_theme_colors:vector<int32> = AccentColor; //@min_chat_boost_level The minimum chat boost level required to use the color
accentColor id:int32 built_in_accent_color_id:int32 light_theme_colors:vector<int32> dark_theme_colors:vector<int32> min_chat_boost_level:int32 = AccentColor;
//@description Contains information about supported accent colors for user profile photo background in RGB format //@description Contains information about supported accent colors for user profile photo background in RGB format
//@palette_colors The list of 1-2 colors in RGB format, describing the colors, as expected to be shown in the color palette settings //@palette_colors The list of 1-2 colors in RGB format, describing the colors, as expected to be shown in the color palette settings
@ -762,16 +763,17 @@ profileAccentColors palette_colors:vector<int32> background_colors:vector<int32>
//@description Contains information about supported accent color for user profile photo background //@description Contains information about supported accent color for user profile photo background
//@id Profile accent color identifier //@id Profile accent color identifier
//@light_theme_colors The list of 1-3 colors in RGB format, describing the accent color, as expected to be shown in light themes //@light_theme_colors Accent colors expected to be used in light themes
//@dark_theme_colors The list of 1-3 colors in RGB format, describing the accent color, as expected to be shown in dark themes //@dark_theme_colors Accent colors expected to be used in dark themes
profileAccentColor id:int32 light_theme_colors:profileAccentColors dark_theme_colors:profileAccentColors = ProfileAccentColor; //@min_chat_boost_level The minimum chat boost level required to use the color
profileAccentColor id:int32 light_theme_colors:profileAccentColors dark_theme_colors:profileAccentColors min_chat_boost_level:int32 = ProfileAccentColor;
//@description Describes a custom emoji to be shown instead of the Telegram Premium badge //@description Describes a custom emoji to be shown instead of the Telegram Premium badge
//@custom_emoji_id Identifier of the custom emoji in stickerFormatTgs format //@custom_emoji_id Identifier of the custom emoji in stickerFormatTgs format
//@expiration_date Point in time (Unix timestamp) when the status will expire; 0 if never //@expiration_date Point in time (Unix timestamp) when the status will expire; 0 if never
emojiStatus custom_emoji_id:int64 expiration_date:int32 = EmojiStatus; emojiStatus custom_emoji_id:int64 expiration_date:int32 = EmojiStatus;
//@description Contains a list of custom emoji identifiers, which can be set as emoji statuses @custom_emoji_ids The list of custom emoji identifiers //@description Contains a list of custom emoji identifiers for emoji statuses @custom_emoji_ids The list of custom emoji identifiers
emojiStatuses custom_emoji_ids:vector<int64> = EmojiStatuses; emojiStatuses custom_emoji_ids:vector<int64> = EmojiStatuses;
@ -792,7 +794,7 @@ usernames active_usernames:vector<string> disabled_usernames:vector<string> edit
//@status Current online status of the user //@status Current online status of the user
//@profile_photo Profile photo of the user; may be null //@profile_photo Profile photo of the user; may be null
//@accent_color_id Identifier of the accent color for name, and backgrounds of profile photo, reply header, and link preview. For Telegram Premium users only //@accent_color_id Identifier of the accent color for name, and backgrounds of profile photo, reply header, and link preview. For Telegram Premium users only
//@background_custom_emoji_id Identifier of a custom emoji to be shown on the reply header background; 0 if none. For Telegram Premium users only //@background_custom_emoji_id Identifier of a custom emoji to be shown on the reply header and link preview background; 0 if none. For Telegram Premium users only
//@profile_accent_color_id Identifier of the accent color for the user's profile; -1 if none. For Telegram Premium users only //@profile_accent_color_id Identifier of the accent color for the user's profile; -1 if none. For Telegram Premium users only
//@profile_background_custom_emoji_id Identifier of a custom emoji to be shown on the background of the user's profile; 0 if none. For Telegram Premium users only //@profile_background_custom_emoji_id Identifier of a custom emoji to be shown on the background of the user's profile; 0 if none. For Telegram Premium users only
//@emoji_status Emoji status to be shown instead of the default Telegram Premium badge; may be null. For Telegram Premium users only //@emoji_status Emoji status to be shown instead of the default Telegram Premium badge; may be null. For Telegram Premium users only
@ -1065,8 +1067,9 @@ basicGroupFullInfo photo:chatPhoto description:string creator_user_id:int53 memb
//@status Status of the current user in the supergroup or channel; custom title will always be empty //@status Status of the current user in the supergroup or channel; custom title will always be empty
//@member_count Number of members in the supergroup or channel; 0 if unknown. Currently, it is guaranteed to be known only if the supergroup or channel was received through //@member_count Number of members in the supergroup or channel; 0 if unknown. Currently, it is guaranteed to be known only if the supergroup or channel was received through
//-getChatSimilarChats, getChatsToSendStories, getCreatedPublicChats, getGroupsInCommon, getInactiveSupergroupChats, getSuitableDiscussionChats, getUserPrivacySettingRules, getVideoChatAvailableParticipants, //-getChatSimilarChats, getChatsToSendStories, getCreatedPublicChats, getGroupsInCommon, getInactiveSupergroupChats, getSuitableDiscussionChats, getUserPrivacySettingRules, getVideoChatAvailableParticipants,
//-searchChatsNearby, searchPublicChats, or in chatFolderInviteLinkInfo.missing_chat_ids, or for public chats in which where sent messages and posted stories from storyPublicForwards, //-searchChatsNearby, searchPublicChats, or in chatFolderInviteLinkInfo.missing_chat_ids, or for public chats in which where sent messages and posted stories from publicForwards,
//-or for public chats in which where sent messages from getMessagePublicForwards response //-or for public chats in which where sent messages from getMessagePublicForwards response
//@boost_level Approximate boost level for the chat
//@has_linked_chat True, if the channel has a discussion group, or the supergroup is the designated discussion group for a channel //@has_linked_chat True, if the channel has a discussion group, or the supergroup is the designated discussion group for a channel
//@has_location True, if the supergroup is connected to a location, i.e. the supergroup is a location-based supergroup //@has_location True, if the supergroup is connected to a location, i.e. the supergroup is a location-based supergroup
//@sign_messages True, if messages sent to the channel need to contain information about the sender. This field is only applicable to channels //@sign_messages True, if messages sent to the channel need to contain information about the sender. This field is only applicable to channels
@ -1082,7 +1085,7 @@ basicGroupFullInfo photo:chatPhoto description:string creator_user_id:int53 memb
//@is_fake True, if many users reported this supergroup or channel as a fake account //@is_fake True, if many users reported this supergroup or channel as a fake account
//@has_active_stories True, if the channel has non-expired stories available to the current user //@has_active_stories True, if the channel has non-expired stories available to the current user
//@has_unread_active_stories True, if the channel has unread non-expired stories available to the current user //@has_unread_active_stories True, if the channel has unread non-expired stories available to the current user
supergroup id:int53 access_hash:int64 usernames:usernames date:int32 status:ChatMemberStatus member_count:int32 has_linked_chat:Bool has_location:Bool sign_messages:Bool join_to_send_messages:Bool join_by_request:Bool is_slow_mode_enabled:Bool is_channel:Bool is_broadcast_group:Bool is_forum:Bool is_verified:Bool restriction_reason:string is_scam:Bool is_fake:Bool has_active_stories:Bool has_unread_active_stories:Bool = Supergroup; supergroup id:int53 access_hash:int64 usernames:usernames date:int32 status:ChatMemberStatus member_count:int32 boost_level:int32 has_linked_chat:Bool has_location:Bool sign_messages:Bool join_to_send_messages:Bool join_by_request:Bool is_slow_mode_enabled:Bool is_channel:Bool is_broadcast_group:Bool is_forum:Bool is_verified:Bool restriction_reason:string is_scam:Bool is_fake:Bool has_active_stories:Bool has_unread_active_stories:Bool = Supergroup;
//@description Contains full information about a supergroup or channel //@description Contains full information about a supergroup or channel
//@photo Chat photo; may be null if empty or unknown. If non-null, then it is the same photo as in chat.photo //@photo Chat photo; may be null if empty or unknown. If non-null, then it is the same photo as in chat.photo
@ -1255,7 +1258,7 @@ messageSendingStateFailed error:error can_retry:Bool need_another_sender:Bool ne
//@description Describes manually or automatically chosen quote from another message //@description Describes manually or automatically chosen quote from another message
//@text Text of the quote. Only Bold, Italic, Underline, Strikethrough, Spoiler, and CustomEmoji entities can be present in the text //@text Text of the quote. Only Bold, Italic, Underline, Strikethrough, Spoiler, and CustomEmoji entities can be present in the text
//@position Approximate quote position in the original message in UTF-16 code units //@position Approximate quote position in the original message in UTF-16 code units as specified by the message sender
//@is_manual True, if the quote was manually chosen by the message sender //@is_manual True, if the quote was manually chosen by the message sender
textQuote text:formattedText position:int32 is_manual:Bool = TextQuote; textQuote text:formattedText position:int32 is_manual:Bool = TextQuote;
@ -1275,7 +1278,8 @@ inputTextQuote text:formattedText position:int32 = InputTextQuote;
//@origin_send_date Point in time (Unix timestamp) when the message was sent if the message was from another chat or topic; 0 for messages from the same chat //@origin_send_date Point in time (Unix timestamp) when the message was sent if the message was from another chat or topic; 0 for messages from the same chat
//@content Media content of the message if the message was from another chat or topic; may be null for messages from the same chat and messages without media. //@content Media content of the message if the message was from another chat or topic; may be null for messages from the same chat and messages without media.
//-Can be only one of the following types: messageAnimation, messageAudio, messageContact, messageDice, messageDocument, messageGame, messageInvoice, messageLocation, //-Can be only one of the following types: messageAnimation, messageAudio, messageContact, messageDice, messageDocument, messageGame, messageInvoice, messageLocation,
//-messagePhoto, messagePoll, messagePremiumGiveaway, messageSticker, messageStory, messageText (for link preview), messageVenue, messageVideo, messageVideoNote, or messageVoiceNote //-messagePhoto, messagePoll, messagePremiumGiveaway, messagePremiumGiveawayWinners, messageSticker, messageStory, messageText (for link preview), messageVenue,
//-messageVideo, messageVideoNote, or messageVoiceNote
messageReplyToMessage chat_id:int53 message_id:int53 quote:textQuote origin:MessageOrigin origin_send_date:int32 content:MessageContent = MessageReplyTo; messageReplyToMessage chat_id:int53 message_id:int53 quote:textQuote origin:MessageOrigin origin_send_date:int32 content:MessageContent = MessageReplyTo;
//@description Describes a story replied by a given message @story_sender_chat_id The identifier of the sender of the story @story_id The identifier of the story //@description Describes a story replied by a given message @story_sender_chat_id The identifier of the sender of the story @story_id The identifier of the story
@ -1627,7 +1631,9 @@ videoChat group_call_id:int32 has_participants:Bool default_participant_id:Messa
//@title Chat title //@title Chat title
//@photo Chat photo; may be null //@photo Chat photo; may be null
//@accent_color_id Identifier of the accent color for message sender name, and backgrounds of chat photo, reply header, and link preview //@accent_color_id Identifier of the accent color for message sender name, and backgrounds of chat photo, reply header, and link preview
//@background_custom_emoji_id Identifier of a custom emoji to be shown on the reply header background in replies to messages sent by the chat; 0 if none //@background_custom_emoji_id Identifier of a custom emoji to be shown on the reply header and link preview background for messages sent by the chat; 0 if none
//@profile_accent_color_id Identifier of the profile accent color for the chat's profile; -1 if none
//@profile_background_custom_emoji_id Identifier of a custom emoji to be shown on the background of the chat's profile; 0 if none
//@permissions Actions that non-administrator chat members are allowed to take in the chat //@permissions Actions that non-administrator chat members are allowed to take in the chat
//@last_message Last message in the chat; may be null if none or unknown //@last_message Last message in the chat; may be null if none or unknown
//@positions Positions of the chat in chat lists //@positions Positions of the chat in chat lists
@ -1650,6 +1656,7 @@ videoChat group_call_id:int32 has_participants:Bool default_participant_id:Messa
//@notification_settings Notification settings for the chat //@notification_settings Notification settings for the chat
//@available_reactions Types of reaction, available in the chat //@available_reactions Types of reaction, available in the chat
//@message_auto_delete_time Current message auto-delete or self-destruct timer setting for the chat, in seconds; 0 if disabled. Self-destruct timer in secret chats starts after the message or its content is viewed. Auto-delete timer in other chats starts from the send date //@message_auto_delete_time Current message auto-delete or self-destruct timer setting for the chat, in seconds; 0 if disabled. Self-destruct timer in secret chats starts after the message or its content is viewed. Auto-delete timer in other chats starts from the send date
//@emoji_status Emoji status to be shown along with chat title; may be null
//@background Background set for the chat; may be null if none //@background Background set for the chat; may be null if none
//@theme_name If non-empty, name of a theme, set for the chat //@theme_name If non-empty, name of a theme, set for the chat
//@action_bar Information about actions which must be possible to do through the chat action bar; may be null if none //@action_bar Information about actions which must be possible to do through the chat action bar; may be null if none
@ -1658,7 +1665,7 @@ videoChat group_call_id:int32 has_participants:Bool default_participant_id:Messa
//@reply_markup_message_id Identifier of the message from which reply markup needs to be used; 0 if there is no default custom reply markup in the chat //@reply_markup_message_id Identifier of the message from which reply markup needs to be used; 0 if there is no default custom reply markup in the chat
//@draft_message A draft of a message in the chat; may be null if none //@draft_message A draft of a message in the chat; may be null if none
//@client_data Application-specific data associated with the chat. (For example, the chat scroll position or local chat notification settings can be stored here.) Persistent if the message database is used //@client_data Application-specific data associated with the chat. (For example, the chat scroll position or local chat notification settings can be stored here.) Persistent if the message database is used
chat id:int53 type:ChatType title:string photo:chatPhotoInfo accent_color_id:int32 background_custom_emoji_id:int64 permissions:chatPermissions last_message:message positions:vector<chatPosition> message_sender_id:MessageSender block_list:BlockList has_protected_content:Bool is_translatable:Bool is_marked_as_unread:Bool view_as_topics:Bool has_scheduled_messages:Bool can_be_deleted_only_for_self:Bool can_be_deleted_for_all_users:Bool can_be_reported:Bool default_disable_notification:Bool unread_count:int32 last_read_inbox_message_id:int53 last_read_outbox_message_id:int53 unread_mention_count:int32 unread_reaction_count:int32 notification_settings:chatNotificationSettings available_reactions:ChatAvailableReactions message_auto_delete_time:int32 background:chatBackground theme_name:string action_bar:ChatActionBar video_chat:videoChat pending_join_requests:chatJoinRequestsInfo reply_markup_message_id:int53 draft_message:draftMessage client_data:string = Chat; chat id:int53 type:ChatType title:string photo:chatPhotoInfo accent_color_id:int32 background_custom_emoji_id:int64 profile_accent_color_id:int32 profile_background_custom_emoji_id:int64 permissions:chatPermissions last_message:message positions:vector<chatPosition> message_sender_id:MessageSender block_list:BlockList has_protected_content:Bool is_translatable:Bool is_marked_as_unread:Bool view_as_topics:Bool has_scheduled_messages:Bool can_be_deleted_only_for_self:Bool can_be_deleted_for_all_users:Bool can_be_reported:Bool default_disable_notification:Bool unread_count:int32 last_read_inbox_message_id:int53 last_read_outbox_message_id:int53 unread_mention_count:int32 unread_reaction_count:int32 notification_settings:chatNotificationSettings available_reactions:ChatAvailableReactions message_auto_delete_time:int32 emoji_status:emojiStatus background:chatBackground theme_name:string action_bar:ChatActionBar video_chat:videoChat pending_join_requests:chatJoinRequestsInfo reply_markup_message_id:int53 draft_message:draftMessage client_data:string = Chat;
//@description Represents a list of chats @total_count Approximate total number of chats found @chat_ids List of chat identifiers //@description Represents a list of chats @total_count Approximate total number of chats found @chat_ids List of chat identifiers
chats total_count:int32 chat_ids:vector<int53> = Chats; chats total_count:int32 chat_ids:vector<int53> = Chats;
@ -1725,13 +1732,14 @@ keyboardButtonTypeRequestLocation = KeyboardButtonType;
//@description A button that allows the user to create and send a poll when pressed; available only in private chats @force_regular If true, only regular polls must be allowed to create @force_quiz If true, only polls in quiz mode must be allowed to create //@description A button that allows the user to create and send a poll when pressed; available only in private chats @force_regular If true, only regular polls must be allowed to create @force_quiz If true, only polls in quiz mode must be allowed to create
keyboardButtonTypeRequestPoll force_regular:Bool force_quiz:Bool = KeyboardButtonType; keyboardButtonTypeRequestPoll force_regular:Bool force_quiz:Bool = KeyboardButtonType;
//@description A button that requests a user to be shared by the current user; available only in private chats. Use the method shareUserWithBot to complete the request //@description A button that requests users to be shared by the current user; available only in private chats. Use the method shareUsersWithBot to complete the request
//@id Unique button identifier //@id Unique button identifier
//@restrict_user_is_bot True, if the shared user must or must not be a bot //@restrict_user_is_bot True, if the shared users must or must not be bots
//@user_is_bot True, if the shared user must be a bot; otherwise, the shared user must no be a bot. Ignored if restrict_user_is_bot is false //@user_is_bot True, if the shared users must be bots; otherwise, the shared users must not be bots. Ignored if restrict_user_is_bot is false
//@restrict_user_is_premium True, if the shared user must or must not be a Telegram Premium user //@restrict_user_is_premium True, if the shared users must or must not be Telegram Premium users
//@user_is_premium True, if the shared user must be a Telegram Premium user; otherwise, the shared user must no be a Telegram Premium user. Ignored if restrict_user_is_premium is false //@user_is_premium True, if the shared users must be Telegram Premium users; otherwise, the shared users must not be Telegram Premium users. Ignored if restrict_user_is_premium is false
keyboardButtonTypeRequestUser id:int32 restrict_user_is_bot:Bool user_is_bot:Bool restrict_user_is_premium:Bool user_is_premium:Bool = KeyboardButtonType; //@max_quantity The maximum number of users to share
keyboardButtonTypeRequestUsers id:int32 restrict_user_is_bot:Bool user_is_bot:Bool restrict_user_is_premium:Bool user_is_premium:Bool max_quantity:int32 = KeyboardButtonType;
//@description A button that requests a chat to be shared by the current user; available only in private chats. Use the method shareChatWithBot to complete the request //@description A button that requests a chat to be shared by the current user; available only in private chats. Use the method shareChatWithBot to complete the request
//@id Unique button identifier //@id Unique button identifier
@ -2289,8 +2297,8 @@ inputCredentialsGooglePay data:string = InputCredentials;
//@class PaymentProvider @description Contains information about a payment provider //@class PaymentProvider @description Contains information about a payment provider
//@description Smart Glocal payment provider @public_token Public payment token //@description Smart Glocal payment provider @public_token Public payment token @tokenize_url URL for sending card tokenization requests
paymentProviderSmartGlocal public_token:string = PaymentProvider; paymentProviderSmartGlocal public_token:string tokenize_url:string = PaymentProvider;
//@description Stripe payment provider //@description Stripe payment provider
//@publishable_key Stripe API publishable key //@publishable_key Stripe API publishable key
@ -2380,10 +2388,12 @@ messageExtendedMediaUnsupported caption:formattedText = MessageExtendedMedia;
//@boosted_chat_id Identifier of the channel chat, which will be automatically boosted by the winners of the giveaway for duration of the Premium subscription //@boosted_chat_id Identifier of the channel chat, which will be automatically boosted by the winners of the giveaway for duration of the Premium subscription
//@additional_chat_ids Identifiers of other channel chats that must be subscribed by the users to be eligible for the giveaway. There can be up to getOption("giveaway_additional_chat_count_max") additional chats //@additional_chat_ids Identifiers of other channel chats that must be subscribed by the users to be eligible for the giveaway. There can be up to getOption("giveaway_additional_chat_count_max") additional chats
//@winners_selection_date Point in time (Unix timestamp) when the giveaway is expected to be performed; must be 60-getOption("giveaway_duration_max") seconds in the future in scheduled giveaways //@winners_selection_date Point in time (Unix timestamp) when the giveaway is expected to be performed; must be 60-getOption("giveaway_duration_max") seconds in the future in scheduled giveaways
//@only_new_members True, if only new subscribers of the chats will be eligible for the giveaway //@only_new_members True, if only new members of the chats will be eligible for the giveaway
//@has_public_winners True, if the list of winners of the giveaway will be available to everyone
//@country_codes The list of two-letter ISO 3166-1 alpha-2 codes of countries, users from which will be eligible for the giveaway. If empty, then all users can participate in the giveaway. //@country_codes The list of two-letter ISO 3166-1 alpha-2 codes of countries, users from which will be eligible for the giveaway. If empty, then all users can participate in the giveaway.
//-There can be up to getOption("giveaway_country_count_max") chosen countries. Users with phone number that was bought on Fragment can participate in any giveaway and the country code "FT" must not be specified in the list //-There can be up to getOption("giveaway_country_count_max") chosen countries. Users with phone number that was bought on Fragment can participate in any giveaway and the country code "FT" must not be specified in the list
premiumGiveawayParameters boosted_chat_id:int53 additional_chat_ids:vector<int53> winners_selection_date:int32 only_new_members:Bool country_codes:vector<string> = PremiumGiveawayParameters; //@prize_description Additional description of the giveaway prize; 0-128 characters
premiumGiveawayParameters boosted_chat_id:int53 additional_chat_ids:vector<int53> winners_selection_date:int32 only_new_members:Bool has_public_winners:Bool country_codes:vector<string> prize_description:string = PremiumGiveawayParameters;
//@description File with the date it was uploaded @file The file @date Point in time (Unix timestamp) when the file was uploaded //@description File with the date it was uploaded @file The file @date Point in time (Unix timestamp) when the file was uploaded
@ -2883,19 +2893,23 @@ messagePaymentSuccessfulBot currency:string total_amount:int53 is_recurring:Bool
//@currency Currency for the paid amount //@currency Currency for the paid amount
//@amount The paid amount, in the smallest units of the currency //@amount The paid amount, in the smallest units of the currency
//@cryptocurrency Cryptocurrency used to pay for the gift; may be empty if none //@cryptocurrency Cryptocurrency used to pay for the gift; may be empty if none
//@cryptocurrency_amount The paid amount, in the smallest units of the cryptocurrency //@cryptocurrency_amount The paid amount, in the smallest units of the cryptocurrency; 0 if none
//@month_count Number of month the Telegram Premium subscription will be active //@month_count Number of months the Telegram Premium subscription will be active
//@sticker A sticker to be shown in the message; may be null if unknown //@sticker A sticker to be shown in the message; may be null if unknown
messageGiftedPremium gifter_user_id:int53 currency:string amount:int53 cryptocurrency:string cryptocurrency_amount:int64 month_count:int32 sticker:sticker = MessageContent; messageGiftedPremium gifter_user_id:int53 currency:string amount:int53 cryptocurrency:string cryptocurrency_amount:int64 month_count:int32 sticker:sticker = MessageContent;
//@description A Telegram Premium gift code was created for the user //@description A Telegram Premium gift code was created for the user
//@creator_id Identifier of a chat or a user that created the gift code //@creator_id Identifier of a chat or a user that created the gift code; may be null if unknown
//@is_from_giveaway True, if the gift code was created for a giveaway //@is_from_giveaway True, if the gift code was created for a giveaway
//@is_unclaimed True, if the winner for the corresponding Telegram Premium subscription wasn't chosen //@is_unclaimed True, if the winner for the corresponding Telegram Premium subscription wasn't chosen
//@month_count Number of month the Telegram Premium subscription will be active after code activation //@currency Currency for the paid amount; empty if unknown
//@amount The paid amount, in the smallest units of the currency; 0 if unknown
//@cryptocurrency Cryptocurrency used to pay for the gift; may be empty if none or unknown
//@cryptocurrency_amount The paid amount, in the smallest units of the cryptocurrency; 0 if unknown
//@month_count Number of months the Telegram Premium subscription will be active after code activation
//@sticker A sticker to be shown in the message; may be null if unknown //@sticker A sticker to be shown in the message; may be null if unknown
//@code The gift code //@code The gift code
messagePremiumGiftCode creator_id:MessageSender is_from_giveaway:Bool is_unclaimed:Bool month_count:int32 sticker:sticker code:string = MessageContent; messagePremiumGiftCode creator_id:MessageSender is_from_giveaway:Bool is_unclaimed:Bool currency:string amount:int53 cryptocurrency:string cryptocurrency_amount:int64 month_count:int32 sticker:sticker code:string = MessageContent;
//@description A Telegram Premium giveaway was created for the chat //@description A Telegram Premium giveaway was created for the chat
messagePremiumGiveawayCreated = MessageContent; messagePremiumGiveawayCreated = MessageContent;
@ -2903,21 +2917,35 @@ messagePremiumGiveawayCreated = MessageContent;
//@description A Telegram Premium giveaway //@description A Telegram Premium giveaway
//@parameters Giveaway parameters //@parameters Giveaway parameters
//@winner_count Number of users which will receive Telegram Premium subscription gift codes //@winner_count Number of users which will receive Telegram Premium subscription gift codes
//@month_count Number of month the Telegram Premium subscription will be active after code activation //@month_count Number of months the Telegram Premium subscription will be active after code activation
//@sticker A sticker to be shown in the message; may be null if unknown //@sticker A sticker to be shown in the message; may be null if unknown
messagePremiumGiveaway parameters:premiumGiveawayParameters winner_count:int32 month_count:int32 sticker:sticker = MessageContent; messagePremiumGiveaway parameters:premiumGiveawayParameters winner_count:int32 month_count:int32 sticker:sticker = MessageContent;
//@description A Telegram Premium giveaway has been completed for the chat //@description A Telegram Premium giveaway without public winners has been completed for the chat
//@giveaway_message_id Identifier of the message with the giveaway, can be an identifier of a deleted message //@giveaway_message_id Identifier of the message with the giveaway; can be 0 if the message was deleted
//@winner_count Number of winners in the giveaway //@winner_count Number of winners in the giveaway
//@unclaimed_prize_count Number of undistributed prizes //@unclaimed_prize_count Number of undistributed prizes
messagePremiumGiveawayCompleted giveaway_message_id:int53 winner_count:int32 unclaimed_prize_count:int32 = MessageContent; messagePremiumGiveawayCompleted giveaway_message_id:int53 winner_count:int32 unclaimed_prize_count:int32 = MessageContent;
//@description A Telegram Premium giveaway with public winners has been completed for the chat
//@boosted_chat_id Identifier of the channel chat, which was automatically boosted by the winners of the giveaway for duration of the Premium subscription
//@giveaway_message_id Identifier of the message with the giveaway in the boosted chat
//@additional_chat_count Number of other chats that participated in the giveaway
//@actual_winners_selection_date Point in time (Unix timestamp) when the winners were selected. May be bigger than winners selection date specified in parameters of the giveaway
//@only_new_members True, if only new members of the chats were eligible for the giveaway
//@was_refunded True, if the giveaway was canceled and was fully refunded
//@month_count Number of months the Telegram Premium subscription will be active after code activation
//@prize_description Additional description of the giveaway prize
//@winner_count Total number of winners in the giveaway
//@winner_user_ids Up to 100 user identifiers of the winners of the giveaway
//@unclaimed_prize_count Number of undistributed prizes
messagePremiumGiveawayWinners boosted_chat_id:int53 giveaway_message_id:int53 additional_chat_count:int32 actual_winners_selection_date:int32 only_new_members:Bool was_refunded:Bool month_count:int32 prize_description:string winner_count:int32 winner_user_ids:vector<int53> unclaimed_prize_count:int32 = MessageContent;
//@description A contact has registered with Telegram //@description A contact has registered with Telegram
messageContactRegistered = MessageContent; messageContactRegistered = MessageContent;
//@description The current user shared a user, which was requested by the bot @user_id Identifier of the shared user @button_id Identifier of the keyboard button with the request //@description The current user shared users, which were requested by the bot @user_ids Identifier of the shared users @button_id Identifier of the keyboard button with the request
messageUserShared user_id:int53 button_id:int32 = MessageContent; messageUsersShared user_ids:vector<int53> button_id:int32 = MessageContent;
//@description The current user shared a chat, which was requested by the bot @chat_id Identifier of the shared chat @button_id Identifier of the keyboard button with the request //@description The current user shared a chat, which was requested by the bot @chat_id Identifier of the shared chat @button_id Identifier of the keyboard button with the request
messageChatShared chat_id:int53 button_id:int32 = MessageContent; messageChatShared chat_id:int53 button_id:int32 = MessageContent;
@ -3045,7 +3073,7 @@ messageSelfDestructTypeImmediately = MessageSelfDestructType;
//@only_preview Pass true to get a fake message instead of actually sending them //@only_preview Pass true to get a fake message instead of actually sending them
messageSendOptions disable_notification:Bool from_background:Bool protect_content:Bool update_order_of_installed_sticker_sets:Bool scheduling_state:MessageSchedulingState sending_id:int32 only_preview:Bool = MessageSendOptions; messageSendOptions disable_notification:Bool from_background:Bool protect_content:Bool update_order_of_installed_sticker_sets:Bool scheduling_state:MessageSchedulingState sending_id:int32 only_preview:Bool = MessageSendOptions;
//@description Options to be used when a message content is copied without reference to the original sender. Service messages, and messages with messageInvoice or messagePremiumGiveaway content can't be copied //@description Options to be used when a message content is copied without reference to the original sender. Service messages, messages with messageInvoice, messagePremiumGiveaway, or messagePremiumGiveawayWinners content can't be copied
//@send_copy True, if content of the message needs to be copied without reference to the original sender. Always true if the message is forwarded to a secret chat or is local //@send_copy True, if content of the message needs to be copied without reference to the original sender. Always true if the message is forwarded to a secret chat or is local
//@replace_caption True, if media caption of the message copy needs to be replaced. Ignored if send_copy is false //@replace_caption True, if media caption of the message copy needs to be replaced. Ignored if send_copy is false
//@new_caption New message caption; pass null to copy message without caption. Ignored if replace_caption is false //@new_caption New message caption; pass null to copy message without caption. Ignored if replace_caption is false
@ -3083,7 +3111,7 @@ inputMessageAudio audio:InputFile album_cover_thumbnail:inputThumbnail duration:
//@description A document message (general file) //@description A document message (general file)
//@document Document to be sent //@document Document to be sent
//@thumbnail Document thumbnail; pass null to skip thumbnail uploading //@thumbnail Document thumbnail; pass null to skip thumbnail uploading
//@disable_content_type_detection True, if automatic file type detection is disabled and the document must be sent as a file. Always true for files sent to secret chats //@disable_content_type_detection Pass true to disable automatic file type detection and send the document as a file. Always true for files sent to secret chats
//@caption Document caption; pass null to use an empty caption; 0-getOption("message_caption_length_max") characters //@caption Document caption; pass null to use an empty caption; 0-getOption("message_caption_length_max") characters
inputMessageDocument document:InputFile thumbnail:inputThumbnail disable_content_type_detection:Bool caption:formattedText = InputMessageContent; inputMessageDocument document:InputFile thumbnail:inputThumbnail disable_content_type_detection:Bool caption:formattedText = InputMessageContent;
@ -3332,16 +3360,17 @@ emojis emojis:vector<string> = Emojis;
//@sticker_format Format of the stickers in the set //@sticker_format Format of the stickers in the set
//@sticker_type Type of the stickers in the set //@sticker_type Type of the stickers in the set
//@needs_repainting True, if stickers in the sticker set are custom emoji that must be repainted; for custom emoji sticker sets only //@needs_repainting True, if stickers in the sticker set are custom emoji that must be repainted; for custom emoji sticker sets only
//@is_allowed_as_chat_emoji_status True, if stickers in the sticker set are custom emoji that can be used as chat emoji status; for custom emoji sticker sets only
//@is_viewed True for already viewed trending sticker sets //@is_viewed True for already viewed trending sticker sets
//@stickers List of stickers in this set //@stickers List of stickers in this set
//@emojis A list of emoji corresponding to the stickers in the same order. The list is only for informational purposes, because a sticker is always sent with a fixed emoji from the corresponding Sticker object //@emojis A list of emoji corresponding to the stickers in the same order. The list is only for informational purposes, because a sticker is always sent with a fixed emoji from the corresponding Sticker object
stickerSet id:int64 title:string name:string thumbnail:thumbnail thumbnail_outline:vector<closedVectorPath> is_installed:Bool is_archived:Bool is_official:Bool sticker_format:StickerFormat sticker_type:StickerType needs_repainting:Bool is_viewed:Bool stickers:vector<sticker> emojis:vector<emojis> = StickerSet; stickerSet id:int64 title:string name:string thumbnail:thumbnail thumbnail_outline:vector<closedVectorPath> is_installed:Bool is_archived:Bool is_official:Bool sticker_format:StickerFormat sticker_type:StickerType needs_repainting:Bool is_allowed_as_chat_emoji_status:Bool is_viewed:Bool stickers:vector<sticker> emojis:vector<emojis> = StickerSet;
//@description Represents short information about a sticker set //@description Represents short information about a sticker set
//@id Identifier of the sticker set //@id Identifier of the sticker set
//@title Title of the sticker set //@title Title of the sticker set
//@name Name of the sticker set //@name Name of the sticker set
//@thumbnail Sticker set thumbnail in WEBP, TGS, or WEBM format with width and height 100; may be null //@thumbnail Sticker set thumbnail in WEBP, TGS, or WEBM format with width and height 100; may be null. The file can be downloaded only before the thumbnail is changed
//@thumbnail_outline Sticker set thumbnail's outline represented as a list of closed vector paths; may be empty. The coordinate system origin is in the upper-left corner //@thumbnail_outline Sticker set thumbnail's outline represented as a list of closed vector paths; may be empty. The coordinate system origin is in the upper-left corner
//@is_installed True, if the sticker set has been installed by the current user //@is_installed True, if the sticker set has been installed by the current user
//@is_archived True, if the sticker set has been archived. A sticker set can't be installed and archived simultaneously //@is_archived True, if the sticker set has been archived. A sticker set can't be installed and archived simultaneously
@ -3349,10 +3378,11 @@ stickerSet id:int64 title:string name:string thumbnail:thumbnail thumbnail_outli
//@sticker_format Format of the stickers in the set //@sticker_format Format of the stickers in the set
//@sticker_type Type of the stickers in the set //@sticker_type Type of the stickers in the set
//@needs_repainting True, if stickers in the sticker set are custom emoji that must be repainted; for custom emoji sticker sets only //@needs_repainting True, if stickers in the sticker set are custom emoji that must be repainted; for custom emoji sticker sets only
//@is_allowed_as_chat_emoji_status True, if stickers in the sticker set are custom emoji that can be used as chat emoji status; for custom emoji sticker sets only
//@is_viewed True for already viewed trending sticker sets //@is_viewed True for already viewed trending sticker sets
//@size Total number of stickers in the set //@size Total number of stickers in the set
//@covers Up to the first 5 stickers from the set, depending on the context. If the application needs more stickers the full sticker set needs to be requested //@covers Up to the first 5 stickers from the set, depending on the context. If the application needs more stickers the full sticker set needs to be requested
stickerSetInfo id:int64 title:string name:string thumbnail:thumbnail thumbnail_outline:vector<closedVectorPath> is_installed:Bool is_archived:Bool is_official:Bool sticker_format:StickerFormat sticker_type:StickerType needs_repainting:Bool is_viewed:Bool size:int32 covers:vector<sticker> = StickerSetInfo; stickerSetInfo id:int64 title:string name:string thumbnail:thumbnail thumbnail_outline:vector<closedVectorPath> is_installed:Bool is_archived:Bool is_official:Bool sticker_format:StickerFormat sticker_type:StickerType needs_repainting:Bool is_allowed_as_chat_emoji_status:Bool is_viewed:Bool size:int32 covers:vector<sticker> = StickerSetInfo;
//@description Represents a list of sticker sets @total_count Approximate total number of sticker sets found @sets List of sticker sets //@description Represents a list of sticker sets @total_count Approximate total number of sticker sets found @sets List of sticker sets
stickerSets total_count:int32 sets:vector<stickerSetInfo> = StickerSets; stickerSets total_count:int32 sets:vector<stickerSetInfo> = StickerSets;
@ -3383,21 +3413,6 @@ emojiCategoryTypeEmojiStatus = EmojiCategoryType;
emojiCategoryTypeChatPhoto = EmojiCategoryType; emojiCategoryTypeChatPhoto = EmojiCategoryType;
//@description Represents a viewer of a story
//@user_id User identifier of the viewer
//@view_date Approximate point in time (Unix timestamp) when the story was viewed
//@block_list Block list to which the user is added; may be null if none
//@chosen_reaction_type Type of the reaction that was chosen by the user; may be null if none
storyViewer user_id:int53 view_date:int32 block_list:BlockList chosen_reaction_type:ReactionType = StoryViewer;
//@description Represents a list of story viewers
//@total_count Approximate total number of story viewers found
//@total_reaction_count Approximate total number of reactions set by found story viewers
//@viewers List of story viewers
//@next_offset The offset for the next request. If empty, then there are no more results
storyViewers total_count:int32 total_reaction_count:int32 viewers:vector<storyViewer> next_offset:string = StoryViewers;
//@description Describes position of a clickable rectangle area on a story media //@description Describes position of a clickable rectangle area on a story media
//@x_percentage The abscissa of the rectangle's center, as a percentage of the media width //@x_percentage The abscissa of the rectangle's center, as a percentage of the media width
//@y_percentage The ordinate of the rectangle's center, as a percentage of the media height //@y_percentage The ordinate of the rectangle's center, as a percentage of the media height
@ -3422,6 +3437,9 @@ storyAreaTypeVenue venue:venue = StoryAreaType;
//@is_flipped True, if reaction corner is flipped //@is_flipped True, if reaction corner is flipped
storyAreaTypeSuggestedReaction reaction_type:ReactionType total_count:int32 is_dark:Bool is_flipped:Bool = StoryAreaType; storyAreaTypeSuggestedReaction reaction_type:ReactionType total_count:int32 is_dark:Bool is_flipped:Bool = StoryAreaType;
//@description An area pointing to a message @chat_id Identifier of the chat with the message @message_id Identifier of the message
storyAreaTypeMessage chat_id:int53 message_id:int53 = StoryAreaType;
//@description Describes a clickable rectangle area on a story media @position Position of the area @type Type of the area //@description Describes a clickable rectangle area on a story media @position Position of the area @type Type of the area
storyArea position:storyAreaPosition type:StoryAreaType = StoryArea; storyArea position:storyAreaPosition type:StoryAreaType = StoryArea;
@ -3448,11 +3466,18 @@ inputStoryAreaTypePreviousVenue venue_provider:string venue_id:string = InputSto
//@is_flipped True, if reaction corner is flipped //@is_flipped True, if reaction corner is flipped
inputStoryAreaTypeSuggestedReaction reaction_type:ReactionType is_dark:Bool is_flipped:Bool = InputStoryAreaType; inputStoryAreaTypeSuggestedReaction reaction_type:ReactionType is_dark:Bool is_flipped:Bool = InputStoryAreaType;
//@description An area pointing to a message
//@chat_id Identifier of the chat with the message. Currently, the chat must be a supergroup or a channel chat
//@message_id Identifier of the message. Only successfully sent non-scheduled messages can be specified
inputStoryAreaTypeMessage chat_id:int53 message_id:int53 = InputStoryAreaType;
//@description Describes a clickable rectangle area on a story media to be added @position Position of the area @type Type of the area //@description Describes a clickable rectangle area on a story media to be added @position Position of the area @type Type of the area
inputStoryArea position:storyAreaPosition type:InputStoryAreaType = InputStoryArea; inputStoryArea position:storyAreaPosition type:InputStoryAreaType = InputStoryArea;
//@description Contains a list of story areas to be added @areas List of 0-10 input story areas //@description Contains a list of story areas to be added @areas List of input story areas. Currently, a story can have
//-up to 10 inputStoryAreaTypeLocation, inputStoryAreaTypeFoundVenue, and inputStoryAreaTypePreviousVenue areas,
//-up to getOption("story_suggested_reaction_area_count_max") inputStoryAreaTypeSuggestedReaction areas, and up to 1 inputStoryAreaTypeMessage area
inputStoryAreas areas:vector<inputStoryArea> = InputStoryAreas; inputStoryAreas areas:vector<inputStoryArea> = InputStoryAreas;
@ -3541,7 +3566,7 @@ storyInteractionInfo view_count:int32 forward_count:int32 reaction_count:int32 r
//@can_be_replied True, if the story can be replied in the chat with the story sender //@can_be_replied True, if the story can be replied in the chat with the story sender
//@can_toggle_is_pinned True, if the story's is_pinned value can be changed //@can_toggle_is_pinned True, if the story's is_pinned value can be changed
//@can_get_statistics True, if the story statistics are available through getStoryStatistics //@can_get_statistics True, if the story statistics are available through getStoryStatistics
//@can_get_viewers True, if users viewed the story can be received through getStoryViewers //@can_get_interactions True, if interactions with the story can be received through getStoryInteractions
//@has_expired_viewers True, if users viewed the story can't be received, because the story has expired more than getOption("story_viewers_expiration_delay") seconds ago //@has_expired_viewers True, if users viewed the story can't be received, because the story has expired more than getOption("story_viewers_expiration_delay") seconds ago
//@repost_info Information about the original story; may be null if the story wasn't reposted //@repost_info Information about the original story; may be null if the story wasn't reposted
//@interaction_info Information about interactions with the story; may be null if the story isn't owned or there were no interactions //@interaction_info Information about interactions with the story; may be null if the story isn't owned or there were no interactions
@ -3550,7 +3575,7 @@ storyInteractionInfo view_count:int32 forward_count:int32 reaction_count:int32 r
//@content Content of the story //@content Content of the story
//@areas Clickable areas to be shown on the story content //@areas Clickable areas to be shown on the story content
//@caption Caption of the story //@caption Caption of the story
story id:int32 sender_chat_id:int53 date:int32 is_being_sent:Bool is_being_edited:Bool is_edited:Bool is_pinned:Bool is_visible_only_for_self:Bool can_be_deleted:Bool can_be_edited:Bool can_be_forwarded:Bool can_be_replied:Bool can_toggle_is_pinned:Bool can_get_statistics:Bool can_get_viewers:Bool has_expired_viewers:Bool repost_info:storyRepostInfo interaction_info:storyInteractionInfo chosen_reaction_type:ReactionType privacy_settings:StoryPrivacySettings content:StoryContent areas:vector<storyArea> caption:formattedText = Story; story id:int32 sender_chat_id:int53 date:int32 is_being_sent:Bool is_being_edited:Bool is_edited:Bool is_pinned:Bool is_visible_only_for_self:Bool can_be_deleted:Bool can_be_edited:Bool can_be_forwarded:Bool can_be_replied:Bool can_toggle_is_pinned:Bool can_get_statistics:Bool can_get_interactions:Bool has_expired_viewers:Bool repost_info:storyRepostInfo interaction_info:storyInteractionInfo chosen_reaction_type:ReactionType privacy_settings:StoryPrivacySettings content:StoryContent areas:vector<storyArea> caption:formattedText = Story;
//@description Represents a list of stories @total_count Approximate total number of stories found @stories The list of stories //@description Represents a list of stories @total_count Approximate total number of stories found @stories The list of stories
stories total_count:int32 stories:vector<story> = Stories; stories total_count:int32 stories:vector<story> = Stories;
@ -3575,20 +3600,66 @@ storyInfo story_id:int32 date:int32 is_for_close_friends:Bool = StoryInfo;
chatActiveStories chat_id:int53 list:StoryList order:int53 max_read_story_id:int32 stories:vector<storyInfo> = ChatActiveStories; chatActiveStories chat_id:int53 list:StoryList order:int53 max_read_story_id:int32 stories:vector<storyInfo> = ChatActiveStories;
//@class StoryPublicForward @description Describes a public forward or repost of a story //@class StoryInteractionType @description Describes type of interaction with a story
//@description Contains a public forward of a story as a message @message Information about the message with the story //@description A view of the story @chosen_reaction_type Type of the reaction that was chosen by the viewer; may be null if none
storyPublicForwardMessage message:message = StoryPublicForward; storyInteractionTypeView chosen_reaction_type:ReactionType = StoryInteractionType;
//@description Contains a public repost of a story as a story @story Information about the reposted story //@description A forward of the story as a message @message The message with story forward
storyPublicForwardStory story:story = StoryPublicForward; storyInteractionTypeForward message:message = StoryInteractionType;
//@description A repost of the story as a story @story The reposted story
storyInteractionTypeRepost story:story = StoryInteractionType;
//@description Represents a list of public forwards and reposts of a story //@description Represents interaction with a story
//@actor_id Identifier of the user or chat that made the interaction
//@interaction_date Approximate point in time (Unix timestamp) when the interaction happened
//@block_list Block list to which the actor is added; may be null if none or for chat stories
//@type Type of the interaction
storyInteraction actor_id:MessageSender interaction_date:int32 block_list:BlockList type:StoryInteractionType = StoryInteraction;
//@description Represents a list of interactions with a story
//@total_count Approximate total number of interactions found
//@total_forward_count Approximate total number of found forwards and reposts; always 0 for chat stories
//@total_reaction_count Approximate total number of found reactions; always 0 for chat stories
//@interactions List of story interactions
//@next_offset The offset for the next request. If empty, then there are no more results
storyInteractions total_count:int32 total_forward_count:int32 total_reaction_count:int32 interactions:vector<storyInteraction> next_offset:string = StoryInteractions;
//@class PublicForward @description Describes a public forward or repost of a story
//@description Contains a public forward as a message @message Information about the message
publicForwardMessage message:message = PublicForward;
//@description Contains a public repost to a story @story Information about the story
publicForwardStory story:story = PublicForward;
//@description Represents a list of public forwards and reposts as a story of a message or a story
//@total_count Approximate total number of messages and stories found //@total_count Approximate total number of messages and stories found
//@forwards List of found public forwards and reposts //@forwards List of found public forwards and reposts
//@next_offset The offset for the next request. If empty, then there are no more results //@next_offset The offset for the next request. If empty, then there are no more results
storyPublicForwards total_count:int32 forwards:vector<StoryPublicForward> next_offset:string = StoryPublicForwards; publicForwards total_count:int32 forwards:vector<PublicForward> next_offset:string = PublicForwards;
//@description Contains a list of features available on a specific chat boost level
//@level Target chat boost level
//@story_per_day_count Number of stories that the chat can publish daily
//@custom_emoji_reaction_count Number of custom emoji reactions that can be added to the list of available reactions
//@title_color_count Number of custom colors for chat title
//@profile_accent_color_count Number of custom colors for profile photo background
//@can_set_profile_background_custom_emoji True, if custom emoji for profile background can be set
//@accent_color_count Number of custom colors for background of empty chat photo, replies to messages and link previews
//@can_set_background_custom_emoji True, if custom emoji for reply header and link preview background can be set
//@can_set_emoji_status True, if emoji status can be set
//@chat_theme_background_count Number of chat theme backgrounds that can be set as chat background
//@can_set_custom_background True, if custom background can be set in the chat for all users
chatBoostLevelFeatures level:int32 story_per_day_count:int32 custom_emoji_reaction_count:int32 title_color_count:int32 profile_accent_color_count:int32 can_set_profile_background_custom_emoji:Bool accent_color_count:int32 can_set_background_custom_emoji:Bool can_set_emoji_status:Bool chat_theme_background_count:int32 can_set_custom_background:Bool = ChatBoostLevelFeatures;
//@description Contains a list of features available on the first chat boost levels @features The list of features
chatBoostFeatures features:vector<chatBoostLevelFeatures> = ChatBoostFeatures;
//@class ChatBoostSource @description Describes source of a chat boost //@class ChatBoostSource @description Describes source of a chat boost
@ -3613,7 +3684,7 @@ chatBoostSourcePremium user_id:int53 = ChatBoostSource;
//@description Describes a prepaid Telegram Premium giveaway //@description Describes a prepaid Telegram Premium giveaway
//@id Unique identifier of the prepaid giveaway //@id Unique identifier of the prepaid giveaway
//@winner_count Number of users which will receive Telegram Premium subscription gift codes //@winner_count Number of users which will receive Telegram Premium subscription gift codes
//@month_count Number of month the Telegram Premium subscription will be active after code activation //@month_count Number of months the Telegram Premium subscription will be active after code activation
//@payment_date Point in time (Unix timestamp) when the giveaway was paid //@payment_date Point in time (Unix timestamp) when the giveaway was paid
prepaidPremiumGiveaway id:int64 winner_count:int32 month_count:int32 payment_date:int32 = PrepaidPremiumGiveaway; prepaidPremiumGiveaway id:int64 winner_count:int32 month_count:int32 payment_date:int32 = PrepaidPremiumGiveaway;
@ -4311,9 +4382,15 @@ chatEventMemberRestricted member_id:MessageSender old_status:ChatMemberStatus ne
//@description The chat available reactions were changed @old_available_reactions Previous chat available reactions @new_available_reactions New chat available reactions //@description The chat available reactions were changed @old_available_reactions Previous chat available reactions @new_available_reactions New chat available reactions
chatEventAvailableReactionsChanged old_available_reactions:ChatAvailableReactions new_available_reactions:ChatAvailableReactions = ChatEventAction; chatEventAvailableReactionsChanged old_available_reactions:ChatAvailableReactions new_available_reactions:ChatAvailableReactions = ChatEventAction;
//@description The chat background was changed @old_background Previous background; may be null if none @new_background New background; may be null if none
chatEventBackgroundChanged old_background:chatBackground new_background:chatBackground = ChatEventAction;
//@description The chat description was changed @old_description Previous chat description @new_description New chat description //@description The chat description was changed @old_description Previous chat description @new_description New chat description
chatEventDescriptionChanged old_description:string new_description:string = ChatEventAction; chatEventDescriptionChanged old_description:string new_description:string = ChatEventAction;
//@description The chat emoji status was changed @old_emoji_status Previous emoji status; may be null if none @new_emoji_status New emoji status; may be null if none
chatEventEmojiStatusChanged old_emoji_status:emojiStatus new_emoji_status:emojiStatus = ChatEventAction;
//@description The linked chat of a supergroup was changed @old_linked_chat_id Previous supergroup linked chat identifier @new_linked_chat_id New supergroup linked chat identifier //@description The linked chat of a supergroup was changed @old_linked_chat_id Previous supergroup linked chat identifier @new_linked_chat_id New supergroup linked chat identifier
chatEventLinkedChatChanged old_linked_chat_id:int53 new_linked_chat_id:int53 = ChatEventAction; chatEventLinkedChatChanged old_linked_chat_id:int53 new_linked_chat_id:int53 = ChatEventAction;
@ -4344,11 +4421,19 @@ chatEventUsernameChanged old_username:string new_username:string = ChatEventActi
//@description The chat active usernames were changed @old_usernames Previous list of active usernames @new_usernames New list of active usernames //@description The chat active usernames were changed @old_usernames Previous list of active usernames @new_usernames New list of active usernames
chatEventActiveUsernamesChanged old_usernames:vector<string> new_usernames:vector<string> = ChatEventAction; chatEventActiveUsernamesChanged old_usernames:vector<string> new_usernames:vector<string> = ChatEventAction;
//@description The chat accent color was changed @old_accent_color_id Previous identifier of chat accent color @new_accent_color_id New identifier of chat accent color //@description The chat accent color or background custom emoji were changed
chatEventAccentColorChanged old_accent_color_id:int32 new_accent_color_id:int32 = ChatEventAction; //@old_accent_color_id Previous identifier of chat accent color
//@old_background_custom_emoji_id Previous identifier of the custom emoji; 0 if none
//@new_accent_color_id New identifier of chat accent color
//@new_background_custom_emoji_id New identifier of the custom emoji; 0 if none
chatEventAccentColorChanged old_accent_color_id:int32 old_background_custom_emoji_id:int64 new_accent_color_id:int32 new_background_custom_emoji_id:int64 = ChatEventAction;
//@description The chat's custom emoji for reply background was changed @old_background_custom_emoji_id Previous identifier of the custom emoji; 0 if none @new_background_custom_emoji_id New identifier of the custom emoji; 0 if none //@description The chat's profile accent color or profile background custom emoji were changed
chatEventBackgroundCustomEmojiChanged old_background_custom_emoji_id:int64 new_background_custom_emoji_id:int64 = ChatEventAction; //@old_profile_accent_color_id Previous identifier of chat's profile accent color; -1 if none
//@old_profile_background_custom_emoji_id Previous identifier of the custom emoji; 0 if none
//@new_profile_accent_color_id New identifier of chat's profile accent color; -1 if none
//@new_profile_background_custom_emoji_id New identifier of the custom emoji; 0 if none
chatEventProfileAccentColorChanged old_profile_accent_color_id:int32 old_profile_background_custom_emoji_id:int64 new_profile_accent_color_id:int32 new_profile_background_custom_emoji_id:int64 = ChatEventAction;
//@description The has_protected_content setting of a channel was toggled @has_protected_content New value of has_protected_content //@description The has_protected_content setting of a channel was toggled @has_protected_content New value of has_protected_content
chatEventHasProtectedContentToggled has_protected_content:Bool = ChatEventAction; chatEventHasProtectedContentToggled has_protected_content:Bool = ChatEventAction;
@ -4686,7 +4771,7 @@ storePaymentPurposePremiumGiveaway parameters:premiumGiveawayParameters currency
//@currency ISO 4217 currency code of the payment currency //@currency ISO 4217 currency code of the payment currency
//@amount Paid amount, in the smallest units of the currency //@amount Paid amount, in the smallest units of the currency
//@user_ids Identifiers of the users which can activate the gift codes //@user_ids Identifiers of the users which can activate the gift codes
//@month_count Number of month the Telegram Premium subscription will be active for the users //@month_count Number of months the Telegram Premium subscription will be active for the users
telegramPaymentPurposePremiumGiftCodes boosted_chat_id:int53 currency:string amount:int53 user_ids:vector<int53> month_count:int32 = TelegramPaymentPurpose; telegramPaymentPurposePremiumGiftCodes boosted_chat_id:int53 currency:string amount:int53 user_ids:vector<int53> month_count:int32 = TelegramPaymentPurpose;
//@description The user creating a Telegram Premium giveaway for subscribers of channel chats; requires can_post_messages rights in the channels //@description The user creating a Telegram Premium giveaway for subscribers of channel chats; requires can_post_messages rights in the channels
@ -4694,7 +4779,7 @@ telegramPaymentPurposePremiumGiftCodes boosted_chat_id:int53 currency:string amo
//@currency ISO 4217 currency code of the payment currency //@currency ISO 4217 currency code of the payment currency
//@amount Paid amount, in the smallest units of the currency //@amount Paid amount, in the smallest units of the currency
//@winner_count Number of users which will be able to activate the gift codes //@winner_count Number of users which will be able to activate the gift codes
//@month_count Number of month the Telegram Premium subscription will be active for the users //@month_count Number of months the Telegram Premium subscription will be active for the users
telegramPaymentPurposePremiumGiveaway parameters:premiumGiveawayParameters currency:string amount:int53 winner_count:int32 month_count:int32 = TelegramPaymentPurpose; telegramPaymentPurposePremiumGiveaway parameters:premiumGiveawayParameters currency:string amount:int53 winner_count:int32 month_count:int32 = TelegramPaymentPurpose;
@ -4776,6 +4861,9 @@ backgroundTypePattern fill:BackgroundFill intensity:int32 is_inverted:Bool is_mo
//@description A filled background @fill The background fill //@description A filled background @fill The background fill
backgroundTypeFill fill:BackgroundFill = BackgroundType; backgroundTypeFill fill:BackgroundFill = BackgroundType;
//@description A background from a chat theme; can be used only as a chat background in channels @theme_name Name of the chat theme
backgroundTypeChatTheme theme_name:string = BackgroundType;
//@class InputBackground @description Contains information about background to set //@class InputBackground @description Contains information about background to set
@ -4948,12 +5036,12 @@ pushMessageContentPhoto photo:photo caption:string is_secret:Bool is_pinned:Bool
//@is_pinned True, if the message is a pinned message with the specified content //@is_pinned True, if the message is a pinned message with the specified content
pushMessageContentPoll question:string is_regular:Bool is_pinned:Bool = PushMessageContent; pushMessageContentPoll question:string is_regular:Bool is_pinned:Bool = PushMessageContent;
//@description A message with a Telegram Premium gift code created for the user @month_count Number of month the Telegram Premium subscription will be active after code activation //@description A message with a Telegram Premium gift code created for the user @month_count Number of months the Telegram Premium subscription will be active after code activation
pushMessageContentPremiumGiftCode month_count:int32 = PushMessageContent; pushMessageContentPremiumGiftCode month_count:int32 = PushMessageContent;
//@description A message with a Telegram Premium giveaway //@description A message with a Telegram Premium giveaway
//@winner_count Number of users which will receive Telegram Premium subscription gift codes; 0 for pinned message //@winner_count Number of users which will receive Telegram Premium subscription gift codes; 0 for pinned message
//@month_count Number of month the Telegram Premium subscription will be active after code activation; 0 for pinned message //@month_count Number of months the Telegram Premium subscription will be active after code activation; 0 for pinned message
//@is_pinned True, if the message is a pinned message with the specified content //@is_pinned True, if the message is a pinned message with the specified content
pushMessageContentPremiumGiveaway winner_count:int32 month_count:int32 is_pinned:Bool = PushMessageContent; pushMessageContentPremiumGiveaway winner_count:int32 month_count:int32 is_pinned:Bool = PushMessageContent;
@ -5488,6 +5576,9 @@ internalLinkTypePhoneNumberConfirmation hash:string phone_number:string = Intern
//@description The link is a link to the Premium features screen of the application from which the user can subscribe to Telegram Premium. Call getPremiumFeatures with the given referrer to process the link @referrer Referrer specified in the link //@description The link is a link to the Premium features screen of the application from which the user can subscribe to Telegram Premium. Call getPremiumFeatures with the given referrer to process the link @referrer Referrer specified in the link
internalLinkTypePremiumFeatures referrer:string = InternalLinkType; internalLinkTypePremiumFeatures referrer:string = InternalLinkType;
//@description The link is a link to the screen for gifting Telegram Premium subscriptions to friends @referrer Referrer specified in the link
internalLinkTypePremiumGift referrer:string = InternalLinkType;
//@description The link is a link with a Telegram Premium gift code. Call checkPremiumGiftCode with the given code to process the link. If the code is valid and the user wants to apply it, then call applyPremiumGiftCode //@description The link is a link with a Telegram Premium gift code. Call checkPremiumGiftCode with the given code to process the link. If the code is valid and the user wants to apply it, then call applyPremiumGiftCode
//@code The Telegram Premium gift code //@code The Telegram Premium gift code
internalLinkTypePremiumGiftCode code:string = InternalLinkType; internalLinkTypePremiumGiftCode code:string = InternalLinkType;
@ -5884,6 +5975,9 @@ suggestedActionRestorePremium = SuggestedAction;
//@description Suggests the user to subscribe to the Premium subscription with annual payments //@description Suggests the user to subscribe to the Premium subscription with annual payments
suggestedActionSubscribeToAnnualPremium = SuggestedAction; suggestedActionSubscribeToAnnualPremium = SuggestedAction;
//@description Suggests the user to gift Telegram Premium to friends for Christmas
suggestedActionGiftPremiumForChristmas = SuggestedAction;
//@description Contains a counter @count Count //@description Contains a counter @count Count
count count:int32 = Count; count count:int32 = Count;
@ -6162,11 +6256,13 @@ updateChatTitle chat_id:int53 title:string = Update;
//@description A chat photo was changed @chat_id Chat identifier @photo The new chat photo; may be null //@description A chat photo was changed @chat_id Chat identifier @photo The new chat photo; may be null
updateChatPhoto chat_id:int53 photo:chatPhotoInfo = Update; updateChatPhoto chat_id:int53 photo:chatPhotoInfo = Update;
//@description A chat accent color has changed @chat_id Chat identifier @accent_color_id The new chat accent color identifier //@description Chat accent colors have changed
updateChatAccentColor chat_id:int53 accent_color_id:int32 = Update; //@chat_id Chat identifier
//@accent_color_id The new chat accent color identifier
//@description A chat's custom emoji for reply background has changed @chat_id Chat identifier @background_custom_emoji_id The new identifier of a custom emoji to be shown on the reply header background; 0 if none //@background_custom_emoji_id The new identifier of a custom emoji to be shown on the reply header and link preview background; 0 if none
updateChatBackgroundCustomEmoji chat_id:int53 background_custom_emoji_id:int64 = Update; //@profile_accent_color_id The new chat profile accent color identifier; -1 if none
//@profile_background_custom_emoji_id The new identifier of a custom emoji to be shown on the profile background; 0 if none
updateChatAccentColors chat_id:int53 accent_color_id:int32 background_custom_emoji_id:int64 profile_accent_color_id:int32 profile_background_custom_emoji_id:int64 = Update;
//@description Chat permissions were changed @chat_id Chat identifier @permissions The new chat permissions //@description Chat permissions were changed @chat_id Chat identifier @permissions The new chat permissions
updateChatPermissions chat_id:int53 permissions:chatPermissions = Update; updateChatPermissions chat_id:int53 permissions:chatPermissions = Update;
@ -6200,6 +6296,11 @@ updateChatAvailableReactions chat_id:int53 available_reactions:ChatAvailableReac
//@positions The new chat positions in the chat lists //@positions The new chat positions in the chat lists
updateChatDraftMessage chat_id:int53 draft_message:draftMessage positions:vector<chatPosition> = Update; updateChatDraftMessage chat_id:int53 draft_message:draftMessage positions:vector<chatPosition> = Update;
//@description Chat emoji status has changed
//@chat_id Chat identifier
//@emoji_status The new chat emoji status; may be null
updateChatEmojiStatus chat_id:int53 emoji_status:emojiStatus = Update;
//@description The message sender that is selected to send messages in a chat has changed @chat_id Chat identifier @message_sender_id New value of message_sender_id; may be null if the user can't change message sender //@description The message sender that is selected to send messages in a chat has changed @chat_id Chat identifier @message_sender_id New value of message_sender_id; may be null if the user can't change message sender
updateChatMessageSender chat_id:int53 message_sender_id:MessageSender = Update; updateChatMessageSender chat_id:int53 message_sender_id:MessageSender = Update;
@ -6448,8 +6549,8 @@ updateSavedAnimations animation_ids:vector<int32> = Update;
//@description 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 @notification_sound_ids The new list of identifiers of saved notification sounds //@description 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 @notification_sound_ids The new list of identifiers of saved notification sounds
updateSavedNotificationSounds notification_sound_ids:vector<int64> = Update; updateSavedNotificationSounds notification_sound_ids:vector<int64> = Update;
//@description The selected background has changed @for_dark_theme True, if background for dark theme has changed @background The new selected background; may be null //@description The default background has changed @for_dark_theme True, if default background for dark theme has changed @background The new default background; may be null
updateSelectedBackground for_dark_theme:Bool background:background = Update; updateDefaultBackground for_dark_theme:Bool background:background = Update;
//@description The list of available chat themes has changed @chat_themes The new list of chat themes //@description The list of available chat themes has changed @chat_themes The new list of chat themes
updateChatThemes chat_themes:vector<chatTheme> = Update; updateChatThemes chat_themes:vector<chatTheme> = Update;
@ -6462,7 +6563,7 @@ updateAccentColors colors:vector<accentColor> available_accent_color_ids:vector<
//@description The list of supported accent colors for user profiles has changed //@description The list of supported accent colors for user profiles has changed
//@colors Information about supported colors //@colors Information about supported colors
//@available_accent_color_ids The list of accent color identifiers, which can be set through setProfileAccentColor. The colors must be shown in the specififed order //@available_accent_color_ids The list of accent color identifiers, which can be set through setProfileAccentColor and setChatProfileAccentColor. The colors must be shown in the specififed order
updateProfileAccentColors colors:vector<profileAccentColor> available_accent_color_ids:vector<int32> = Update; updateProfileAccentColors colors:vector<profileAccentColor> available_accent_color_ids:vector<int32> = Update;
//@description Some language pack strings have been updated @localization_target Localization target to which the language pack belongs @language_pack_id Identifier of the updated language pack @strings List of changed language pack strings; empty if all strings have changed //@description Some language pack strings have been updated @localization_target Localization target to which the language pack belongs @language_pack_id Identifier of the updated language pack @strings List of changed language pack strings; empty if all strings have changed
@ -6608,6 +6709,22 @@ updateNewChatJoinRequest chat_id:int53 request:chatJoinRequest user_chat_id:int5
//@boost New information about the boost //@boost New information about the boost
updateChatBoost chat_id:int53 boost:chatBoost = Update; updateChatBoost chat_id:int53 boost:chatBoost = Update;
//@description User changed its reactions on a message with public reactions; for bots only
//@chat_id Chat identifier
//@message_id Message identifier
//@actor_id Identifier of the user or chat that changed reactions
//@date Point in time (Unix timestamp) when the reactions were changed
//@old_reaction_types Old list of chosen reactions
//@new_reaction_types New list of chosen reactions
updateMessageReaction chat_id:int53 message_id:int53 actor_id:MessageSender date:int32 old_reaction_types:vector<ReactionType> new_reaction_types:vector<ReactionType> = Update;
//@description Reactions added to a message with anonymous reactions have changed; for bots only
//@chat_id Chat identifier
//@message_id Message identifier
//@date Point in time (Unix timestamp) when the reactions were changed
//@reactions The list of reactions added to the message
updateMessageReactions chat_id:int53 message_id:int53 date:int32 reactions:vector<messageReaction> = Update;
//@description Contains a list of updates @updates List of updates //@description Contains a list of updates @updates List of updates
updates updates:vector<Update> = Updates; updates updates:vector<Update> = Updates;
@ -6853,8 +6970,8 @@ getMessage chat_id:int53 message_id:int53 = Message;
getMessageLocally chat_id:int53 message_id:int53 = Message; getMessageLocally chat_id:int53 message_id:int53 = Message;
//@description Returns information about a non-bundled message that is replied by a given message. Also, returns the pinned message, the game message, the invoice message, //@description Returns information about a non-bundled message that is replied by a given message. Also, returns the pinned message, the game message, the invoice message,
//-the message with a previously set same background, and the topic creation message for messages of the types //-the message with a previously set same background, the giveaway message, and the topic creation message for messages of the types
//-messagePinMessage, messageGameScore, messagePaymentSuccessful, messageChatSetBackground and topic messages without non-bundled replied message respectively //-messagePinMessage, messageGameScore, messagePaymentSuccessful, messageChatSetBackground, messagePremiumGiveawayCompleted and topic messages without non-bundled replied message respectively
//@chat_id Identifier of the chat the message belongs to //@chat_id Identifier of the chat the message belongs to
//@message_id Identifier of the reply message //@message_id Identifier of the reply message
getRepliedMessage chat_id:int53 message_id:int53 = Message; getRepliedMessage chat_id:int53 message_id:int53 = Message;
@ -6924,6 +7041,11 @@ getChatSimilarChats chat_id:int53 = Chats;
//@return_local Pass true to get the number of chats without sending network requests, or -1 if the number of chats is unknown locally //@return_local Pass true to get the number of chats without sending network requests, or -1 if the number of chats is unknown locally
getChatSimilarChatCount chat_id:int53 return_local:Bool = Count; getChatSimilarChatCount chat_id:int53 return_local:Bool = Count;
//@description Informs TDLib that a chat was opened from the list of similar chats. The method is independent from openChat and closeChat methods
//@chat_id Identifier of the original chat, which similar chats were requested
//@opened_chat_id Identifier of the opened chat
openChatSimilarChat chat_id:int53 opened_chat_id:int53 = Ok;
//@description Returns a list of frequently used chats @category Category of chats to be returned @limit The maximum number of chats to be returned; up to 30 //@description Returns a list of frequently used chats @category Category of chats to be returned @limit The maximum number of chats to be returned; up to 30
getTopChats category:TopChatCategory limit:int32 = Chats; getTopChats category:TopChatCategory limit:int32 = Chats;
@ -7399,6 +7521,13 @@ addMessageReaction chat_id:int53 message_id:int53 reaction_type:ReactionType is_
//@reaction_type Type of the reaction to remove //@reaction_type Type of the reaction to remove
removeMessageReaction chat_id:int53 message_id:int53 reaction_type:ReactionType = Ok; removeMessageReaction chat_id:int53 message_id:int53 reaction_type:ReactionType = Ok;
//@description Sets reactions on a message; for bots only
//@chat_id Identifier of the chat to which the message belongs
//@message_id Identifier of the message
//@reaction_types Types of the reaction to set
//@is_big Pass true if the reactions are added with a big animation
setMessageReactions chat_id:int53 message_id:int53 reaction_types:vector<ReactionType> is_big:Bool = Ok;
//@description Returns reactions added for a message, along with their sender //@description Returns reactions added for a message, along with their sender
//@chat_id Identifier of the chat to which the message belongs //@chat_id Identifier of the chat to which the message belongs
//@message_id Identifier of the message //@message_id Identifier of the message
@ -7496,13 +7625,13 @@ getLoginUrlInfo chat_id:int53 message_id:int53 button_id:int53 = LoginUrlInfo;
getLoginUrl chat_id:int53 message_id:int53 button_id:int53 allow_write_access:Bool = HttpUrl; getLoginUrl chat_id:int53 message_id:int53 button_id:int53 allow_write_access:Bool = HttpUrl;
//@description Shares a user after pressing a keyboardButtonTypeRequestUser button with the bot //@description Shares users after pressing a keyboardButtonTypeRequestUsers button with the bot
//@chat_id Identifier of the chat with the bot //@chat_id Identifier of the chat with the bot
//@message_id Identifier of the message with the button //@message_id Identifier of the message with the button
//@button_id Identifier of the button //@button_id Identifier of the button
//@shared_user_id Identifier of the shared user //@shared_user_ids Identifiers of the shared users
//@only_check Pass true to check that the user can be shared by the button instead of actually sharing them //@only_check Pass true to check that the users can be shared by the button instead of actually sharing them
shareUserWithBot chat_id:int53 message_id:int53 button_id:int32 shared_user_id:int53 only_check:Bool = Ok; shareUsersWithBot chat_id:int53 message_id:int53 button_id:int32 shared_user_ids:vector<int53> only_check:Bool = Ok;
//@description Shares a chat after pressing a keyboardButtonTypeRequestChat button with the bot //@description Shares a chat after pressing a keyboardButtonTypeRequestChat button with the bot
//@chat_id Identifier of the chat with the bot //@chat_id Identifier of the chat with the bot
@ -7811,29 +7940,41 @@ setChatTitle chat_id:int53 title:string = Ok;
//@photo New chat photo; pass null to delete the chat photo //@photo New chat photo; pass null to delete the chat photo
setChatPhoto chat_id:int53 photo:InputChatPhoto = Ok; setChatPhoto chat_id:int53 photo:InputChatPhoto = Ok;
//@description Changes accent color and background custom emoji of a chat. Supported only for channels with getOption("channel_custom_accent_color_boost_level_min") boost level. Requires can_change_info administrator right //@description Changes accent color and background custom emoji of a chat. Requires can_change_info administrator right
//@chat_id Chat identifier //@chat_id Chat identifier
//@accent_color_id Identifier of the accent color to use //@accent_color_id Identifier of the accent color to use. The chat must have at least accentColor.min_chat_boost_level boost level to pass the corresponding color
//@background_custom_emoji_id Identifier of a custom emoji to be shown on the reply header background; 0 if none //@background_custom_emoji_id Identifier of a custom emoji to be shown on the reply header and link preview background; 0 if none. Use chatBoostLevelFeatures.can_set_background_custom_emoji to check whether a custom emoji can be set
setChatAccentColor chat_id:int53 accent_color_id:int32 background_custom_emoji_id:int64 = Ok; setChatAccentColor chat_id:int53 accent_color_id:int32 background_custom_emoji_id:int64 = Ok;
//@description Changes accent color and background custom emoji for profile of a chat. Requires can_change_info administrator right
//@chat_id Chat identifier
//@profile_accent_color_id Identifier of the accent color to use for profile; pass -1 if none. The chat must have at least profileAccentColor.min_chat_boost_level boost level to pass the corresponding color
//@profile_background_custom_emoji_id Identifier of a custom emoji to be shown on the chat's profile photo background; 0 if none. Use chatBoostLevelFeatures.can_set_profile_background_custom_emoji to check whether a custom emoji can be set
setChatProfileAccentColor chat_id:int53 profile_accent_color_id:int32 profile_background_custom_emoji_id:int64 = Ok;
//@description Changes the message auto-delete or self-destruct (for secret chats) time in a chat. Requires change_info administrator right in basic groups, supergroups and channels //@description Changes the message auto-delete or self-destruct (for secret chats) time in a chat. Requires change_info administrator right in basic groups, supergroups and channels
//-Message auto-delete time can't be changed in a chat with the current user (Saved Messages) and the chat 777000 (Telegram). //-Message auto-delete time can't be changed in a chat with the current user (Saved Messages) and the chat 777000 (Telegram).
//@chat_id Chat identifier //@chat_id Chat identifier
//@message_auto_delete_time New time value, in seconds; unless the chat is secret, it must be from 0 up to 365 * 86400 and be divisible by 86400. If 0, then messages aren't deleted automatically //@message_auto_delete_time New time value, in seconds; unless the chat is secret, it must be from 0 up to 365 * 86400 and be divisible by 86400. If 0, then messages aren't deleted automatically
setChatMessageAutoDeleteTime chat_id:int53 message_auto_delete_time:int32 = Ok; setChatMessageAutoDeleteTime chat_id:int53 message_auto_delete_time:int32 = Ok;
//@description Changes the emoji status of a chat. Use chatBoostLevelFeatures.can_set_emoji_status to check whether an emoji status can be set. Requires can_change_info administrator right
//@chat_id Chat identifier
//@emoji_status New emoji status; pass null to remove emoji status
setChatEmojiStatus chat_id:int53 emoji_status:emojiStatus = Ok;
//@description Changes the chat members permissions. Supported only for basic groups and supergroups. Requires can_restrict_members administrator right //@description Changes the chat members permissions. Supported only for basic groups and supergroups. Requires can_restrict_members administrator right
//@chat_id Chat identifier //@chat_id Chat identifier
//@permissions New non-administrator members permissions in the chat //@permissions New non-administrator members permissions in the chat
setChatPermissions chat_id:int53 permissions:chatPermissions = Ok; setChatPermissions chat_id:int53 permissions:chatPermissions = Ok;
//@description Sets the background in a specific chat. Supported only in private and secret chats with non-deleted users //@description Sets the background in a specific chat. Supported only in private and secret chats with non-deleted users, and in chats with sufficient boost level and can_change_info administrator right
//@chat_id Chat identifier //@chat_id Chat identifier
//@background The input background to use; pass null to create a new filled background //@background The input background to use; pass null to create a new filled or chat theme background
//@type Background type; pass null to use default background type for the chosen background //@type Background type; pass null to use default background type for the chosen background; backgroundTypeChatTheme isn't supported for private and secret chats.
//@dark_theme_dimming Dimming of the background in dark themes, as a percentage; 0-100 //-Use chatBoostLevelFeatures.chat_theme_background_count and chatBoostLevelFeatures.can_set_custom_background to check whether the background type can be set in the boosted chat
//@only_for_self Pass true to set background only for self; pass false to set background for both chat users. Background can be set for both users only by Telegram Premium users and if set background isn't of the type inputBackgroundPrevious //@dark_theme_dimming Dimming of the background in dark themes, as a percentage; 0-100. Applied only to Wallpaper and Fill types of background
//@only_for_self Pass true to set background only for self; pass false to set background for all chat users. Always false for backgrounds set in boosted chats. Background can be set for both users only by Telegram Premium users and if set background isn't of the type inputBackgroundPrevious
setChatBackground chat_id:int53 background:InputBackground type:BackgroundType dark_theme_dimming:int32 only_for_self:Bool = Ok; setChatBackground chat_id:int53 background:InputBackground type:BackgroundType dark_theme_dimming:int32 only_for_self:Bool = Ok;
//@description Deletes background in a specific chat //@description Deletes background in a specific chat
@ -8109,14 +8250,24 @@ getStoryAvailableReactions row_size:int32 = AvailableReactions;
//@update_recent_reactions Pass true if the reaction needs to be added to recent reactions //@update_recent_reactions Pass true if the reaction needs to be added to recent reactions
setStoryReaction story_sender_chat_id:int53 story_id:int32 reaction_type:ReactionType update_recent_reactions:Bool = Ok; setStoryReaction story_sender_chat_id:int53 story_id:int32 reaction_type:ReactionType update_recent_reactions:Bool = Ok;
//@description Returns viewers of a story. The method can be called only for stories posted on behalf of the current user //@description Returns interactions with a story. The method can be called only for stories posted on behalf of the current user
//@story_id Story identifier //@story_id Story identifier
//@query Query to search for in names and usernames of the viewers; may be empty to get all relevant viewers //@query Query to search for in names, usernames and titles; may be empty to get all relevant interactions
//@only_contacts Pass true to get only contacts; pass false to get all relevant viewers //@only_contacts Pass true to get only interactions by contacts; pass false to get all relevant interactions
//@prefer_with_reaction Pass true to get viewers with reaction first; pass false to get viewers sorted just by view_date //@prefer_forwards Pass true to get forwards and reposts first, then reactions, then other views; pass false to get interactions sorted just by interaction date
//@prefer_with_reaction Pass true to get interactions with reaction first; pass false to get interactions sorted just by interaction date. Ignored if prefer_forwards == true
//@offset Offset of the first entry to return as received from the previous request; use empty string to get the first chunk of results //@offset Offset of the first entry to return as received from the previous request; use empty string to get the first chunk of results
//@limit The maximum number of story viewers to return //@limit The maximum number of story interactions to return
getStoryViewers story_id:int32 query:string only_contacts:Bool prefer_with_reaction:Bool offset:string limit:int32 = StoryViewers; getStoryInteractions story_id:int32 query:string only_contacts:Bool prefer_forwards:Bool prefer_with_reaction:Bool offset:string limit:int32 = StoryInteractions;
//@description Returns interactions with a story posted in a chat. Can be used only if story is posted on behalf of a chat and the user is an administrator in the chat
//@story_sender_chat_id The identifier of the sender of the story
//@story_id Story identifier
//@reaction_type Pass the default heart reaction or a suggested reaction type to receive only interactions with the specified reaction type; pass null to receive all interactions
//@prefer_forwards Pass true to get forwards and reposts first, then reactions, then other views; pass false to get interactions sorted just by interaction date
//@offset Offset of the first entry to return as received from the previous request; use empty string to get the first chunk of results
//@limit The maximum number of story interactions to return
getChatStoryInteractions story_sender_chat_id:int53 story_id:int32 reaction_type:ReactionType prefer_forwards:Bool offset:string limit:int32 = StoryInteractions;
//@description Reports a story to the Telegram moderators //@description Reports a story to the Telegram moderators
//@story_sender_chat_id The identifier of the sender of the story to report //@story_sender_chat_id The identifier of the sender of the story to report
@ -8135,9 +8286,15 @@ activateStoryStealthMode = Ok;
//@story_id The identifier of the story //@story_id The identifier of the story
//@offset Offset of the first entry to return as received from the previous request; use empty string to get the first chunk of results //@offset Offset of the first entry to return as received from the previous request; use empty string to get the first chunk of results
//@limit The maximum number of messages and stories to be returned; must be positive and can't be greater than 100. For optimal performance, the number of returned objects is chosen by TDLib and can be smaller than the specified limit //@limit The maximum number of messages and stories to be returned; must be positive and can't be greater than 100. For optimal performance, the number of returned objects is chosen by TDLib and can be smaller than the specified limit
getStoryPublicForwards story_sender_chat_id:int53 story_id:int32 offset:string limit:int32 = StoryPublicForwards; getStoryPublicForwards story_sender_chat_id:int53 story_id:int32 offset:string limit:int32 = PublicForwards;
//@description Returns list of features available on the specific chat boost level; this is an offline request @level Chat boost level
getChatBoostLevelFeatures level:int32 = ChatBoostLevelFeatures;
//@description Returns list of features available on the first 10 chat boost levels; this is an offline request
getChatBoostFeatures = ChatBoostFeatures;
//@description Returns the list of available chat boost slots for the current user //@description Returns the list of available chat boost slots for the current user
getAvailableChatBoostSlots = ChatBoostSlots; getAvailableChatBoostSlots = ChatBoostSlots;
@ -8176,19 +8333,29 @@ getAttachmentMenuBot bot_user_id:int53 = AttachmentMenuBot;
toggleBotIsAddedToAttachmentMenu bot_user_id:int53 is_added:Bool allow_write_access:Bool = Ok; toggleBotIsAddedToAttachmentMenu bot_user_id:int53 is_added:Bool allow_write_access:Bool = Ok;
//@description Returns up to 8 emoji statuses, which must be shown right after the default Premium Badge in the emoji status list //@description Returns up to 8 emoji statuses, which must be shown right after the default Premium Badge in the emoji status list for self status
getThemedEmojiStatuses = EmojiStatuses; getThemedEmojiStatuses = EmojiStatuses;
//@description Returns recent emoji statuses //@description Returns recent emoji statuses for self status
getRecentEmojiStatuses = EmojiStatuses; getRecentEmojiStatuses = EmojiStatuses;
//@description Returns default emoji statuses //@description Returns default emoji statuses for self status
getDefaultEmojiStatuses = EmojiStatuses; getDefaultEmojiStatuses = EmojiStatuses;
//@description Clears the list of recently used emoji statuses //@description Clears the list of recently used emoji statuses for self status
clearRecentEmojiStatuses = Ok; clearRecentEmojiStatuses = Ok;
//@description Returns up to 8 emoji statuses, which must be shown in the emoji status list for chats
getThemedChatEmojiStatuses = EmojiStatuses;
//@description Returns default emoji statuses for chats
getDefaultChatEmojiStatuses = EmojiStatuses;
//@description Returns the list of emoji statuses, which can't be used as chat emoji status, even they are from a sticker set with is_allowed_as_chat_emoji_status == true
getDisallowedChatEmojiStatuses = EmojiStatuses;
//@description Downloads a file from the cloud. Download progress and completion of the download will be notified through updateFile updates //@description Downloads a file from the cloud. Download progress and completion of the download will be notified through updateFile updates
//@file_id Identifier of the file to download //@file_id Identifier of the file to download
//@priority Priority of the download (1-32). The higher the priority, the earlier the file will be downloaded. If the priorities of two files are equal, then the last one for which downloadFile/addFileToDownloads was called will be downloaded first //@priority Priority of the download (1-32). The higher the priority, the earlier the file will be downloaded. If the priorities of two files are equal, then the last one for which downloadFile/addFileToDownloads was called will be downloaded first
@ -8772,12 +8939,12 @@ deleteProfilePhoto profile_photo_id:int64 = Ok;
//@description Changes accent color and background custom emoji for the current user; for Telegram Premium users only //@description Changes accent color and background custom emoji for the current user; for Telegram Premium users only
//@accent_color_id Identifier of the accent color to use //@accent_color_id Identifier of the accent color to use
//@background_custom_emoji_id Identifier of a custom emoji to be shown on the reply header background; 0 if none //@background_custom_emoji_id Identifier of a custom emoji to be shown on the reply header and link preview background; 0 if none
setAccentColor accent_color_id:int32 background_custom_emoji_id:int64 = Ok; setAccentColor accent_color_id:int32 background_custom_emoji_id:int64 = Ok;
//@description Changes accent color and background custom emoji for profile of the current user; for Telegram Premium users only //@description Changes accent color and background custom emoji for profile of the current user; for Telegram Premium users only
//@profile_accent_color_id Identifier of the accent color to use for profile; pass -1 if none //@profile_accent_color_id Identifier of the accent color to use for profile; pass -1 if none
//@profile_background_custom_emoji_id Identifier of a custom emoji to be shown in the on the user's profile photo background; 0 if none //@profile_background_custom_emoji_id Identifier of a custom emoji to be shown on the user's profile photo background; 0 if none
setProfileAccentColor profile_accent_color_id:int32 profile_background_custom_emoji_id:int64 = Ok; setProfileAccentColor profile_accent_color_id:int32 profile_background_custom_emoji_id:int64 = Ok;
//@description Changes the first and last name of the current user @first_name The new value of the first name for the current user; 1-64 characters @last_name The new value of the optional last name for the current user; 0-64 characters //@description Changes the first and last name of the current user @first_name The new value of the first name for the current user; 1-64 characters @last_name The new value of the optional last name for the current user; 0-64 characters
@ -9065,26 +9232,29 @@ createInvoiceLink invoice:InputMessageContent = HttpUrl;
getSupportUser = User; getSupportUser = User;
//@description Returns backgrounds installed by the user @for_dark_theme Pass true to order returned backgrounds for a dark theme //@description Constructs a persistent HTTP URL for a background @name Background name @type Background type; backgroundTypeChatTheme isn't supported
getBackgrounds for_dark_theme:Bool = Backgrounds;
//@description Constructs a persistent HTTP URL for a background @name Background name @type Background type
getBackgroundUrl name:string type:BackgroundType = HttpUrl; getBackgroundUrl name:string type:BackgroundType = HttpUrl;
//@description Searches for a background by its name @name The name of the background //@description Searches for a background by its name @name The name of the background
searchBackground name:string = Background; searchBackground name:string = Background;
//@description Changes the background selected by the user; adds background to the list of installed backgrounds //@description Sets default background for chats; adds the background to the list of installed backgrounds
//@background The input background to use; pass null to create a new filled background or to remove the current background //@background The input background to use; pass null to create a new filled background
//@type Background type; pass null to use the default type of the remote background or to remove the current background //@type Background type; pass null to use the default type of the remote background; backgroundTypeChatTheme isn't supported
//@for_dark_theme Pass true if the background is changed for a dark theme //@for_dark_theme Pass true if the background is set for a dark theme
setBackground background:InputBackground type:BackgroundType for_dark_theme:Bool = Background; setDefaultBackground background:InputBackground type:BackgroundType for_dark_theme:Bool = Background;
//@description Deletes default background for chats @for_dark_theme Pass true if the background is deleted for a dark theme
deleteDefaultBackground for_dark_theme:Bool = Ok;
//@description Returns backgrounds installed by the user @for_dark_theme Pass true to order returned backgrounds for a dark theme
getInstalledBackgrounds for_dark_theme:Bool = Backgrounds;
//@description Removes background from the list of installed backgrounds @background_id The background identifier //@description Removes background from the list of installed backgrounds @background_id The background identifier
removeBackground background_id:int64 = Ok; removeInstalledBackground background_id:int64 = Ok;
//@description Resets list of installed backgrounds to its default value //@description Resets list of installed backgrounds to its default value
resetBackgrounds = Ok; resetInstalledBackgrounds = Ok;
//@description Returns information about the current localization target. This is an offline request if only_local is true. Can be called before authorization @only_local Pass true to get only locally available information without sending network requests //@description Returns information about the current localization target. This is an offline request if only_local is true. Can be called before authorization @only_local Pass true to get only locally available information without sending network requests
@ -9205,12 +9375,12 @@ getChatStatistics chat_id:int53 is_dark:Bool = ChatStatistics;
//@description Returns detailed statistics about a message. Can be used only if message.can_get_statistics == true @chat_id Chat identifier @message_id Message identifier @is_dark Pass true if a dark theme is used by the application //@description Returns detailed statistics about a message. Can be used only if message.can_get_statistics == true @chat_id Chat identifier @message_id Message identifier @is_dark Pass true if a dark theme is used by the application
getMessageStatistics chat_id:int53 message_id:int53 is_dark:Bool = MessageStatistics; getMessageStatistics chat_id:int53 message_id:int53 is_dark:Bool = MessageStatistics;
//@description Returns forwarded copies of a channel message to different public channels. Can be used only if message.can_get_statistics == true. For optimal performance, the number of returned messages is chosen by TDLib //@description Returns forwarded copies of a channel message to different public channels and public reposts as a story. Can be used only if message.can_get_statistics == true. For optimal performance, the number of returned messages and stories is chosen by TDLib
//@chat_id Chat identifier of the message //@chat_id Chat identifier of the message
//@message_id Message identifier //@message_id Message identifier
//@offset Offset of the first entry to return as received from the previous request; use empty string to get the first chunk of results //@offset Offset of the first entry to return as received from the previous request; use empty string to get the first chunk of results
//@limit The maximum number of messages to be returned; must be positive and can't be greater than 100. For optimal performance, the number of returned messages is chosen by TDLib and can be smaller than the specified limit //@limit The maximum number of messages and stories to be returned; must be positive and can't be greater than 100. For optimal performance, the number of returned objects is chosen by TDLib and can be smaller than the specified limit
getMessagePublicForwards chat_id:int53 message_id:int53 offset:string limit:int32 = FoundMessages; getMessagePublicForwards chat_id:int53 message_id:int53 offset:string limit:int32 = PublicForwards;
//@description Returns detailed statistics about a story. Can be used only if story.can_get_statistics == true @chat_id Chat identifier @story_id Story identifier @is_dark Pass true if a dark theme is used by the application //@description Returns detailed statistics about a story. Can be used only if story.can_get_statistics == true @chat_id Chat identifier @story_id Story identifier @is_dark Pass true if a dark theme is used by the application
getStoryStatistics chat_id:int53 story_id:int32 is_dark:Bool = StoryStatistics; getStoryStatistics chat_id:int53 story_id:int32 is_dark:Bool = StoryStatistics;
@ -9472,7 +9642,7 @@ launchPrepaidPremiumGiveaway giveaway_id:int64 parameters:premiumGiveawayParamet
//@description Returns information about a Telegram Premium giveaway //@description Returns information about a Telegram Premium giveaway
//@chat_id Identifier of the channel chat which started the giveaway //@chat_id Identifier of the channel chat which started the giveaway
//@message_id Identifier of the giveaway message in the chat //@message_id Identifier of the giveaway or a giveaway winners message in the chat
getPremiumGiveawayInfo chat_id:int53 message_id:int53 = PremiumGiveawayInfo; getPremiumGiveawayInfo chat_id:int53 message_id:int53 = PremiumGiveawayInfo;
//@description Checks whether Telegram Premium purchase is possible. Must be called before in-store Premium purchase @purpose Transaction purpose //@description Checks whether Telegram Premium purchase is possible. Must be called before in-store Premium purchase @purpose Transaction purpose
@ -9534,9 +9704,6 @@ getDeepLinkInfo link:string = DeepLinkInfo;
//@description Returns application config, provided by the server. Can be called before authorization //@description Returns application config, provided by the server. Can be called before authorization
getApplicationConfig = JsonValue; getApplicationConfig = JsonValue;
//@description Adds server-provided application changelog as messages to the chat 777000 (Telegram) or as a stories; for official applications only. Returns a 404 error if nothing changed @previous_application_version The previous application version
addApplicationChangelog previous_application_version:string = Ok;
//@description Saves application log event on the server. Can be called before authorization @type Event type @chat_id Optional chat identifier, associated with the event @data The log event data //@description Saves application log event on the server. Can be called before authorization @type Event type @chat_id Optional chat identifier, associated with the event @data The log event data
saveApplicationLogEvent type:string chat_id:int53 data:JsonValue = Ok; saveApplicationLogEvent type:string chat_id:int53 data:JsonValue = Ok;