Update to TDLib 1.8.11

This commit is contained in:
c0re100 2023-02-05 06:54:46 +08:00
parent 7df275842c
commit 869b97df28
No known key found for this signature in database
GPG key ID: 7C3B3004FE745AAF
4 changed files with 2270 additions and 160 deletions

View file

@ -71,7 +71,7 @@ type SetTdlibParametersRequest struct {
DatabaseDirectory string `json:"database_directory"` DatabaseDirectory string `json:"database_directory"`
// The path to the directory for storing files; if empty, database_directory will be used // The path to the directory for storing files; if empty, database_directory will be used
FilesDirectory string `json:"files_directory"` FilesDirectory string `json:"files_directory"`
// Encryption key for the database // Encryption key for the database. If the encryption key is invalid, then an error with code 401 will be returned
DatabaseEncryptionKey []byte `json:"database_encryption_key"` DatabaseEncryptionKey []byte `json:"database_encryption_key"`
// Pass true to keep information about downloaded and uploaded files between application restarts // Pass true to keep information about downloaded and uploaded files between application restarts
UseFileDatabase bool `json:"use_file_database"` UseFileDatabase bool `json:"use_file_database"`
@ -142,7 +142,7 @@ type SetAuthenticationPhoneNumberRequest struct {
Settings *PhoneNumberAuthenticationSettings `json:"settings"` Settings *PhoneNumberAuthenticationSettings `json:"settings"`
} }
// Sets the phone number of the user and sends an authentication code to the user. Works only when the current authorization state is authorizationStateWaitPhoneNumber, or if there is no pending authentication query and the current authorization state is authorizationStateWaitCode, authorizationStateWaitRegistration, or authorizationStateWaitPassword // Sets the phone number of the user and sends an authentication code to the user. Works only when the current authorization state is authorizationStateWaitPhoneNumber, or if there is no pending authentication query and the current authorization state is authorizationStateWaitEmailAddress, authorizationStateWaitEmailCode, authorizationStateWaitCode, authorizationStateWaitRegistration, or authorizationStateWaitPassword
func (client *Client) SetAuthenticationPhoneNumber(req *SetAuthenticationPhoneNumberRequest) (*Ok, error) { func (client *Client) SetAuthenticationPhoneNumber(req *SetAuthenticationPhoneNumberRequest) (*Ok, error) {
result, err := client.Send(Request{ result, err := client.Send(Request{
meta: meta{ meta: meta{
@ -266,7 +266,7 @@ type RequestQrCodeAuthenticationRequest struct {
OtherUserIds []int64 `json:"other_user_ids"` OtherUserIds []int64 `json:"other_user_ids"`
} }
// Requests QR code authentication by scanning a QR code on another logged in device. Works only when the current authorization state is authorizationStateWaitPhoneNumber, or if there is no pending authentication query and the current authorization state is authorizationStateWaitCode, authorizationStateWaitRegistration, or authorizationStateWaitPassword // Requests QR code authentication by scanning a QR code on another logged in device. Works only when the current authorization state is authorizationStateWaitPhoneNumber, or if there is no pending authentication query and the current authorization state is authorizationStateWaitEmailAddress, authorizationStateWaitEmailCode, authorizationStateWaitCode, authorizationStateWaitRegistration, or authorizationStateWaitPassword
func (client *Client) RequestQrCodeAuthentication(req *RequestQrCodeAuthenticationRequest) (*Ok, error) { func (client *Client) RequestQrCodeAuthentication(req *RequestQrCodeAuthenticationRequest) (*Ok, error) {
result, err := client.Send(Request{ result, err := client.Send(Request{
meta: meta{ meta: meta{
@ -419,6 +419,32 @@ func (client *Client) RecoverAuthenticationPassword(req *RecoverAuthenticationPa
return UnmarshalOk(result.Data) return UnmarshalOk(result.Data)
} }
type SendAuthenticationFirebaseSmsRequest struct {
// SafetyNet Attestation API token for the Android application, or secret from push notification for the iOS application
Token string `json:"token"`
}
// Sends Firebase Authentication SMS to the phone number of the user. Works only when the current authorization state is authorizationStateWaitCode and the server returned code of the type authenticationCodeTypeFirebaseAndroid or authenticationCodeTypeFirebaseIos
func (client *Client) SendAuthenticationFirebaseSms(req *SendAuthenticationFirebaseSmsRequest) (*Ok, error) {
result, err := client.Send(Request{
meta: meta{
Type: "sendAuthenticationFirebaseSms",
},
Data: map[string]interface{}{
"token": req.Token,
},
})
if err != nil {
return nil, err
}
if result.Type == "error" {
return nil, buildResponseError(result.Data)
}
return UnmarshalOk(result.Data)
}
type CheckAuthenticationBotTokenRequest struct { type CheckAuthenticationBotTokenRequest struct {
// The bot token // The bot token
Token string `json:"token"` Token string `json:"token"`
@ -1268,7 +1294,7 @@ type GetRepliedMessageRequest struct {
MessageId int64 `json:"message_id"` MessageId int64 `json:"message_id"`
} }
// Returns information about a message that is replied by a given message. Also returns the pinned message, the game message, the invoice message, and the topic creation message for messages of the types messagePinMessage, messageGameScore, messagePaymentSuccessful, and topic messages without replied message respectively // Returns information about a message that is replied by a given message. Also, returns the pinned message, the game message, the invoice message, and the topic creation message for messages of the types messagePinMessage, messageGameScore, messagePaymentSuccessful, and topic messages without 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{
@ -1553,7 +1579,7 @@ type SearchPublicChatRequest struct {
Username string `json:"username"` Username string `json:"username"`
} }
// Searches a public chat by its username. Currently, only private chats, supergroups and channels can be public. Returns the chat if found; otherwise an error is returned // Searches a public chat by its username. Currently, only private chats, supergroups and channels can be public. Returns the chat if found; otherwise, an error is returned
func (client *Client) SearchPublicChat(req *SearchPublicChatRequest) (*Chat, error) { func (client *Client) SearchPublicChat(req *SearchPublicChatRequest) (*Chat, error) {
result, err := client.Send(Request{ result, err := client.Send(Request{
meta: meta{ meta: meta{
@ -2815,22 +2841,19 @@ func (client *Client) GetMessageLinkInfo(req *GetMessageLinkInfoRequest) (*Messa
type TranslateTextRequest struct { type TranslateTextRequest struct {
// Text to translate // Text to translate
Text string `json:"text"` Text *FormattedText `json:"text"`
// A two-letter ISO 639-1 language code of the language from which the message is translated. If empty, the language will be detected automatically // ISO language code of the language to which the message is translated. Must be one of "af", "sq", "am", "ar", "hy", "az", "eu", "be", "bn", "bs", "bg", "ca", "ceb", "zh-CN", "zh", "zh-Hans", "zh-TW", "zh-Hant", "co", "hr", "cs", "da", "nl", "en", "eo", "et", "fi", "fr", "fy", "gl", "ka", "de", "el", "gu", "ht", "ha", "haw", "he", "iw", "hi", "hmn", "hu", "is", "ig", "id", "in", "ga", "it", "ja", "jv", "kn", "kk", "km", "rw", "ko", "ku", "ky", "lo", "la", "lv", "lt", "lb", "mk", "mg", "ms", "ml", "mt", "mi", "mr", "mn", "my", "ne", "no", "ny", "or", "ps", "fa", "pl", "pt", "pa", "ro", "ru", "sm", "gd", "sr", "st", "sn", "sd", "si", "sk", "sl", "so", "es", "su", "sw", "sv", "tl", "tg", "ta", "tt", "te", "th", "tr", "tk", "uk", "ur", "ug", "uz", "vi", "cy", "xh", "yi", "ji", "yo", "zu"
FromLanguageCode string `json:"from_language_code"`
// A two-letter ISO 639-1 language code of the language to which the message is translated
ToLanguageCode string `json:"to_language_code"` ToLanguageCode string `json:"to_language_code"`
} }
// Translates a text to the given language. Returns a 404 error if the translation can't be performed // Translates a text to the given language. If the current user is a Telegram Premium user, then text formatting is preserved
func (client *Client) TranslateText(req *TranslateTextRequest) (*Text, error) { func (client *Client) TranslateText(req *TranslateTextRequest) (*FormattedText, error) {
result, err := client.Send(Request{ result, err := client.Send(Request{
meta: meta{ meta: meta{
Type: "translateText", Type: "translateText",
}, },
Data: map[string]interface{}{ Data: map[string]interface{}{
"text": req.Text, "text": req.Text,
"from_language_code": req.FromLanguageCode,
"to_language_code": req.ToLanguageCode, "to_language_code": req.ToLanguageCode,
}, },
}) })
@ -2842,7 +2865,39 @@ func (client *Client) TranslateText(req *TranslateTextRequest) (*Text, error) {
return nil, buildResponseError(result.Data) return nil, buildResponseError(result.Data)
} }
return UnmarshalText(result.Data) return UnmarshalFormattedText(result.Data)
}
type TranslateMessageTextRequest struct {
// Identifier of the chat to which the message belongs
ChatId int64 `json:"chat_id"`
// Identifier of the message
MessageId int64 `json:"message_id"`
// ISO language code of the language to which the message is translated. Must be one of "af", "sq", "am", "ar", "hy", "az", "eu", "be", "bn", "bs", "bg", "ca", "ceb", "zh-CN", "zh", "zh-Hans", "zh-TW", "zh-Hant", "co", "hr", "cs", "da", "nl", "en", "eo", "et", "fi", "fr", "fy", "gl", "ka", "de", "el", "gu", "ht", "ha", "haw", "he", "iw", "hi", "hmn", "hu", "is", "ig", "id", "in", "ga", "it", "ja", "jv", "kn", "kk", "km", "rw", "ko", "ku", "ky", "lo", "la", "lv", "lt", "lb", "mk", "mg", "ms", "ml", "mt", "mi", "mr", "mn", "my", "ne", "no", "ny", "or", "ps", "fa", "pl", "pt", "pa", "ro", "ru", "sm", "gd", "sr", "st", "sn", "sd", "si", "sk", "sl", "so", "es", "su", "sw", "sv", "tl", "tg", "ta", "tt", "te", "th", "tr", "tk", "uk", "ur", "ug", "uz", "vi", "cy", "xh", "yi", "ji", "yo", "zu"
ToLanguageCode string `json:"to_language_code"`
}
// Extracts text or caption of the given message and translates it to the given language. If the current user is a Telegram Premium user, then text formatting is preserved
func (client *Client) TranslateMessageText(req *TranslateMessageTextRequest) (*FormattedText, error) {
result, err := client.Send(Request{
meta: meta{
Type: "translateMessageText",
},
Data: map[string]interface{}{
"chat_id": req.ChatId,
"message_id": req.MessageId,
"to_language_code": req.ToLanguageCode,
},
})
if err != nil {
return nil, err
}
if result.Type == "error" {
return nil, buildResponseError(result.Data)
}
return UnmarshalFormattedText(result.Data)
} }
type RecognizeSpeechRequest struct { type RecognizeSpeechRequest struct {
@ -4919,6 +4974,82 @@ func (client *Client) GetLoginUrl(req *GetLoginUrlRequest) (*HttpUrl, error) {
return UnmarshalHttpUrl(result.Data) return UnmarshalHttpUrl(result.Data)
} }
type ShareUserWithBotRequest struct {
// Identifier of the chat with the bot
ChatId int64 `json:"chat_id"`
// Identifier of the message with the button
MessageId int64 `json:"message_id"`
// Identifier of the button
ButtonId int32 `json:"button_id"`
// Identifier of the shared user
SharedUserId int64 `json:"shared_user_id"`
// Pass true to check that the user can be shared by the button instead of actually sharing them
OnlyCheck bool `json:"only_check"`
}
// Shares a user after pressing a keyboardButtonTypeRequestUser button with the bot
func (client *Client) ShareUserWithBot(req *ShareUserWithBotRequest) (*Ok, error) {
result, err := client.Send(Request{
meta: meta{
Type: "shareUserWithBot",
},
Data: map[string]interface{}{
"chat_id": req.ChatId,
"message_id": req.MessageId,
"button_id": req.ButtonId,
"shared_user_id": req.SharedUserId,
"only_check": req.OnlyCheck,
},
})
if err != nil {
return nil, err
}
if result.Type == "error" {
return nil, buildResponseError(result.Data)
}
return UnmarshalOk(result.Data)
}
type ShareChatWithBotRequest struct {
// Identifier of the chat with the bot
ChatId int64 `json:"chat_id"`
// Identifier of the message with the button
MessageId int64 `json:"message_id"`
// Identifier of the button
ButtonId int32 `json:"button_id"`
// Identifier of the shared chat
SharedChatId int64 `json:"shared_chat_id"`
// Pass true to check that the chat can be shared by the button instead of actually sharing it. Doesn't check bot_is_member and bot_administrator_rights restrictions. If the bot must be a member, then all chats from getGroupsInCommon and all chats, where the user can add the bot, are suitable. In the latter case the bot will be automatically added to the chat. If the bot must be an administrator, then all chats, where the bot already has requested rights or can be added to administrators by the user, are suitable. In the latter case the bot will be automatically granted requested rights
OnlyCheck bool `json:"only_check"`
}
// Shares a chat after pressing a keyboardButtonTypeRequestChat button with the bot
func (client *Client) ShareChatWithBot(req *ShareChatWithBotRequest) (*Ok, error) {
result, err := client.Send(Request{
meta: meta{
Type: "shareChatWithBot",
},
Data: map[string]interface{}{
"chat_id": req.ChatId,
"message_id": req.MessageId,
"button_id": req.ButtonId,
"shared_chat_id": req.SharedChatId,
"only_check": req.OnlyCheck,
},
})
if err != nil {
return nil, err
}
if result.Type == "error" {
return nil, buildResponseError(result.Data)
}
return UnmarshalOk(result.Data)
}
type GetInlineQueryResultsRequest struct { type GetInlineQueryResultsRequest struct {
// The identifier of the target bot // The identifier of the target bot
BotUserId int64 `json:"bot_user_id"` BotUserId int64 `json:"bot_user_id"`
@ -6103,7 +6234,9 @@ func (client *Client) CreateNewBasicGroupChat(req *CreateNewBasicGroupChatReques
type CreateNewSupergroupChatRequest struct { type CreateNewSupergroupChatRequest struct {
// Title of the new chat; 1-128 characters // Title of the new chat; 1-128 characters
Title string `json:"title"` Title string `json:"title"`
// Pass true to create a channel chat // Pass true to create a forum supergroup chat
IsForum bool `json:"is_forum"`
// Pass true to create a channel chat; ignored if a forum is created
IsChannel bool `json:"is_channel"` IsChannel bool `json:"is_channel"`
// Chat description; 0-255 characters // Chat description; 0-255 characters
Description string `json:"description"` Description string `json:"description"`
@ -6123,6 +6256,7 @@ func (client *Client) CreateNewSupergroupChat(req *CreateNewSupergroupChatReques
}, },
Data: map[string]interface{}{ Data: map[string]interface{}{
"title": req.Title, "title": req.Title,
"is_forum": req.IsForum,
"is_channel": req.IsChannel, "is_channel": req.IsChannel,
"description": req.Description, "description": req.Description,
"location": req.Location, "location": req.Location,
@ -6669,6 +6803,35 @@ func (client *Client) ToggleChatHasProtectedContent(req *ToggleChatHasProtectedC
return UnmarshalOk(result.Data) return UnmarshalOk(result.Data)
} }
type ToggleChatIsTranslatableRequest struct {
// Chat identifier
ChatId int64 `json:"chat_id"`
// New value of is_translatable
IsTranslatable bool `json:"is_translatable"`
}
// Changes the tranlatable state of a chat; for Telegram Premium users only
func (client *Client) ToggleChatIsTranslatable(req *ToggleChatIsTranslatableRequest) (*Ok, error) {
result, err := client.Send(Request{
meta: meta{
Type: "toggleChatIsTranslatable",
},
Data: map[string]interface{}{
"chat_id": req.ChatId,
"is_translatable": req.IsTranslatable,
},
})
if err != nil {
return nil, err
}
if result.Type == "error" {
return nil, buildResponseError(result.Data)
}
return UnmarshalOk(result.Data)
}
type ToggleChatIsMarkedAsUnreadRequest struct { type ToggleChatIsMarkedAsUnreadRequest struct {
// Chat identifier // Chat identifier
ChatId int64 `json:"chat_id"` ChatId int64 `json:"chat_id"`
@ -10413,7 +10576,7 @@ func (client *Client) GetUserProfilePhotos(req *GetUserProfilePhotosRequest) (*C
type GetStickersRequest struct { type GetStickersRequest struct {
// Type of the stickers to return // Type of the stickers to return
StickerType StickerType `json:"sticker_type"` StickerType StickerType `json:"sticker_type"`
// Search query; an emoji or a keyword prefix. If empty, returns all known installed stickers // Search query; a space-separated list of emoji or a keyword prefix. If empty, returns all known installed stickers
Query string `json:"query"` Query string `json:"query"`
// The maximum number of stickers to be returned // The maximum number of stickers to be returned
Limit int32 `json:"limit"` Limit int32 `json:"limit"`
@ -10421,7 +10584,7 @@ type GetStickersRequest struct {
ChatId int64 `json:"chat_id"` ChatId int64 `json:"chat_id"`
} }
// Returns stickers from the installed sticker sets that correspond to a given emoji or can be found by sticker-specific keywords. If the query is non-empty, then favorite, recently used or trending stickers may also be returned // Returns stickers from the installed sticker sets that correspond to any of the given emoji or can be found by sticker-specific keywords. If the query is non-empty, then favorite, recently used or trending stickers may also be returned
func (client *Client) GetStickers(req *GetStickersRequest) (*Stickers, error) { func (client *Client) GetStickers(req *GetStickersRequest) (*Stickers, error) {
result, err := client.Send(Request{ result, err := client.Send(Request{
meta: meta{ meta: meta{
@ -10446,20 +10609,23 @@ func (client *Client) GetStickers(req *GetStickersRequest) (*Stickers, error) {
} }
type SearchStickersRequest struct { type SearchStickersRequest struct {
// String representation of emoji; must be non-empty // Type of the stickers to return
Emoji string `json:"emoji"` StickerType StickerType `json:"sticker_type"`
// Space-separated list of emoji to search for; must be non-empty
Emojis string `json:"emojis"`
// The maximum number of stickers to be returned; 0-100 // The maximum number of stickers to be returned; 0-100
Limit int32 `json:"limit"` Limit int32 `json:"limit"`
} }
// Searches for stickers from public sticker sets that correspond to a given emoji // Searches for stickers from public sticker sets that correspond to any of the given emoji
func (client *Client) SearchStickers(req *SearchStickersRequest) (*Stickers, error) { func (client *Client) SearchStickers(req *SearchStickersRequest) (*Stickers, error) {
result, err := client.Send(Request{ result, err := client.Send(Request{
meta: meta{ meta: meta{
Type: "searchStickers", Type: "searchStickers",
}, },
Data: map[string]interface{}{ Data: map[string]interface{}{
"emoji": req.Emoji, "sticker_type": req.StickerType,
"emojis": req.Emojis,
"limit": req.Limit, "limit": req.Limit,
}, },
}) })
@ -11052,6 +11218,32 @@ func (client *Client) SearchEmojis(req *SearchEmojisRequest) (*Emojis, error) {
return UnmarshalEmojis(result.Data) return UnmarshalEmojis(result.Data)
} }
type GetEmojiCategoriesRequest struct {
// Type of emoji categories to return; pass null to get default emoji categories
Type EmojiCategoryType `json:"type"`
}
// Returns available emojis categories
func (client *Client) GetEmojiCategories(req *GetEmojiCategoriesRequest) (*EmojiCategories, error) {
result, err := client.Send(Request{
meta: meta{
Type: "getEmojiCategories",
},
Data: map[string]interface{}{
"type": req.Type,
},
})
if err != nil {
return nil, err
}
if result.Type == "error" {
return nil, buildResponseError(result.Data)
}
return UnmarshalEmojiCategories(result.Data)
}
type GetAnimatedEmojiRequest struct { type GetAnimatedEmojiRequest struct {
// The emoji // The emoji
Emoji string `json:"emoji"` Emoji string `json:"emoji"`
@ -11130,6 +11322,44 @@ func (client *Client) GetCustomEmojiStickers(req *GetCustomEmojiStickersRequest)
return UnmarshalStickers(result.Data) return UnmarshalStickers(result.Data)
} }
// Returns default list of custom emoji stickers for placing on a chat photo
func (client *Client) GetDefaultChatPhotoCustomEmojiStickers() (*Stickers, error) {
result, err := client.Send(Request{
meta: meta{
Type: "getDefaultChatPhotoCustomEmojiStickers",
},
Data: map[string]interface{}{},
})
if err != nil {
return nil, err
}
if result.Type == "error" {
return nil, buildResponseError(result.Data)
}
return UnmarshalStickers(result.Data)
}
// Returns default list of custom emoji stickers for placing on a profile photo
func (client *Client) GetDefaultProfilePhotoCustomEmojiStickers() (*Stickers, error) {
result, err := client.Send(Request{
meta: meta{
Type: "getDefaultProfilePhotoCustomEmojiStickers",
},
Data: map[string]interface{}{},
})
if err != nil {
return nil, err
}
if result.Type == "error" {
return nil, buildResponseError(result.Data)
}
return UnmarshalStickers(result.Data)
}
// Returns saved animations // Returns saved animations
func (client *Client) GetSavedAnimations() (*Animations, error) { func (client *Client) GetSavedAnimations() (*Animations, error) {
result, err := client.Send(Request{ result, err := client.Send(Request{
@ -11763,7 +11993,7 @@ type GetCommandsRequest struct {
LanguageCode string `json:"language_code"` LanguageCode string `json:"language_code"`
} }
// Returns the list of commands supported by the bot for the given user scope and language; for bots only // Returns list of commands supported by the bot for the given user scope and language; for bots only
func (client *Client) GetCommands(req *GetCommandsRequest) (*BotCommands, error) { func (client *Client) GetCommands(req *GetCommandsRequest) (*BotCommands, error) {
result, err := client.Send(Request{ result, err := client.Send(Request{
meta: meta{ meta: meta{
@ -12426,11 +12656,11 @@ func (client *Client) ToggleSupergroupHasAggressiveAntiSpamEnabled(req *ToggleSu
type ToggleSupergroupIsForumRequest struct { type ToggleSupergroupIsForumRequest struct {
// Identifier of the supergroup // Identifier of the supergroup
SupergroupId int64 `json:"supergroup_id"` SupergroupId int64 `json:"supergroup_id"`
// New value of is_forum. A supergroup can be converted to a forum, only if it has at least getOption("forum_member_count_min") members // New value of is_forum
IsForum bool `json:"is_forum"` IsForum bool `json:"is_forum"`
} }
// Toggles whether the supergroup is a forum; requires owner privileges in the supergroup // Toggles whether the supergroup is a forum; requires owner privileges in the supergroup. Discussion supergroups can't be converted to forums
func (client *Client) ToggleSupergroupIsForum(req *ToggleSupergroupIsForumRequest) (*Ok, error) { func (client *Client) ToggleSupergroupIsForum(req *ToggleSupergroupIsForumRequest) (*Ok, error) {
result, err := client.Send(Request{ result, err := client.Send(Request{
meta: meta{ meta: meta{
@ -14134,6 +14364,73 @@ func (client *Client) SetAutoDownloadSettings(req *SetAutoDownloadSettingsReques
return UnmarshalOk(result.Data) return UnmarshalOk(result.Data)
} }
// Returns autosave settings for the current user
func (client *Client) GetAutosaveSettings() (*AutosaveSettings, error) {
result, err := client.Send(Request{
meta: meta{
Type: "getAutosaveSettings",
},
Data: map[string]interface{}{},
})
if err != nil {
return nil, err
}
if result.Type == "error" {
return nil, buildResponseError(result.Data)
}
return UnmarshalAutosaveSettings(result.Data)
}
type SetAutosaveSettingsRequest struct {
// Autosave settings scope
Scope AutosaveSettingsScope `json:"scope"`
// New autosave settings for the scope; pass null to set autosave settings to default
Settings *ScopeAutosaveSettings `json:"settings"`
}
// Sets autosave settings for the given scope
func (client *Client) SetAutosaveSettings(req *SetAutosaveSettingsRequest) (*Ok, error) {
result, err := client.Send(Request{
meta: meta{
Type: "setAutosaveSettings",
},
Data: map[string]interface{}{
"scope": req.Scope,
"settings": req.Settings,
},
})
if err != nil {
return nil, err
}
if result.Type == "error" {
return nil, buildResponseError(result.Data)
}
return UnmarshalOk(result.Data)
}
// Clears the list of all autosave settings exceptions
func (client *Client) ClearAutosaveSettingsExceptions() (*Ok, error) {
result, err := client.Send(Request{
meta: meta{
Type: "clearAutosaveSettingsExceptions",
},
Data: map[string]interface{}{},
})
if err != nil {
return nil, err
}
if result.Type == "error" {
return nil, buildResponseError(result.Data)
}
return UnmarshalOk(result.Data)
}
type GetBankCardInfoRequest struct { type GetBankCardInfoRequest struct {
// The bank card number // The bank card number
BankCardNumber string `json:"bank_card_number"` BankCardNumber string `json:"bank_card_number"`
@ -16511,14 +16808,17 @@ func (client *Client) TestUseUpdate() (Update, error) {
case TypeUpdateChatHasProtectedContent: case TypeUpdateChatHasProtectedContent:
return UnmarshalUpdateChatHasProtectedContent(result.Data) return UnmarshalUpdateChatHasProtectedContent(result.Data)
case TypeUpdateChatHasScheduledMessages: case TypeUpdateChatIsTranslatable:
return UnmarshalUpdateChatHasScheduledMessages(result.Data) return UnmarshalUpdateChatIsTranslatable(result.Data)
case TypeUpdateChatIsMarkedAsUnread:
return UnmarshalUpdateChatIsMarkedAsUnread(result.Data)
case TypeUpdateChatIsBlocked: case TypeUpdateChatIsBlocked:
return UnmarshalUpdateChatIsBlocked(result.Data) return UnmarshalUpdateChatIsBlocked(result.Data)
case TypeUpdateChatIsMarkedAsUnread: case TypeUpdateChatHasScheduledMessages:
return UnmarshalUpdateChatIsMarkedAsUnread(result.Data) return UnmarshalUpdateChatHasScheduledMessages(result.Data)
case TypeUpdateChatFilters: case TypeUpdateChatFilters:
return UnmarshalUpdateChatFilters(result.Data) return UnmarshalUpdateChatFilters(result.Data)
@ -16685,6 +16985,9 @@ func (client *Client) TestUseUpdate() (Update, error) {
case TypeUpdateSuggestedActions: case TypeUpdateSuggestedActions:
return UnmarshalUpdateSuggestedActions(result.Data) return UnmarshalUpdateSuggestedActions(result.Data)
case TypeUpdateAutosaveSettings:
return UnmarshalUpdateAutosaveSettings(result.Data)
case TypeUpdateNewInlineQuery: case TypeUpdateNewInlineQuery:
return UnmarshalUpdateNewInlineQuery(result.Data) return UnmarshalUpdateNewInlineQuery(result.Data)

File diff suppressed because it is too large Load diff

View file

@ -34,6 +34,12 @@ func UnmarshalAuthenticationCodeType(data json.RawMessage) (AuthenticationCodeTy
case TypeAuthenticationCodeTypeFragment: case TypeAuthenticationCodeTypeFragment:
return UnmarshalAuthenticationCodeTypeFragment(data) return UnmarshalAuthenticationCodeTypeFragment(data)
case TypeAuthenticationCodeTypeFirebaseAndroid:
return UnmarshalAuthenticationCodeTypeFirebaseAndroid(data)
case TypeAuthenticationCodeTypeFirebaseIos:
return UnmarshalAuthenticationCodeTypeFirebaseIos(data)
default: default:
return nil, fmt.Errorf("Error unmarshaling. Unknown type: " + meta.Type) return nil, fmt.Errorf("Error unmarshaling. Unknown type: " + meta.Type)
} }
@ -468,6 +474,40 @@ func UnmarshalListOfUserType(dataList []json.RawMessage) ([]UserType, error) {
return list, nil return list, nil
} }
func UnmarshalChatPhotoStickerType(data json.RawMessage) (ChatPhotoStickerType, error) {
var meta meta
err := json.Unmarshal(data, &meta)
if err != nil {
return nil, err
}
switch meta.Type {
case TypeChatPhotoStickerTypeRegularOrMask:
return UnmarshalChatPhotoStickerTypeRegularOrMask(data)
case TypeChatPhotoStickerTypeCustomEmoji:
return UnmarshalChatPhotoStickerTypeCustomEmoji(data)
default:
return nil, fmt.Errorf("Error unmarshaling. Unknown type: " + meta.Type)
}
}
func UnmarshalListOfChatPhotoStickerType(dataList []json.RawMessage) ([]ChatPhotoStickerType, error) {
list := []ChatPhotoStickerType{}
for _, data := range dataList {
entity, err := UnmarshalChatPhotoStickerType(data)
if err != nil {
return nil, err
}
list = append(list, entity)
}
return list, nil
}
func UnmarshalInputChatPhoto(data json.RawMessage) (InputChatPhoto, error) { func UnmarshalInputChatPhoto(data json.RawMessage) (InputChatPhoto, error) {
var meta meta var meta meta
@ -486,6 +526,9 @@ func UnmarshalInputChatPhoto(data json.RawMessage) (InputChatPhoto, error) {
case TypeInputChatPhotoAnimation: case TypeInputChatPhotoAnimation:
return UnmarshalInputChatPhotoAnimation(data) return UnmarshalInputChatPhotoAnimation(data)
case TypeInputChatPhotoSticker:
return UnmarshalInputChatPhotoSticker(data)
default: default:
return nil, fmt.Errorf("Error unmarshaling. Unknown type: " + meta.Type) return nil, fmt.Errorf("Error unmarshaling. Unknown type: " + meta.Type)
} }
@ -1120,6 +1163,12 @@ func UnmarshalKeyboardButtonType(data json.RawMessage) (KeyboardButtonType, erro
case TypeKeyboardButtonTypeRequestPoll: case TypeKeyboardButtonTypeRequestPoll:
return UnmarshalKeyboardButtonTypeRequestPoll(data) return UnmarshalKeyboardButtonTypeRequestPoll(data)
case TypeKeyboardButtonTypeRequestUser:
return UnmarshalKeyboardButtonTypeRequestUser(data)
case TypeKeyboardButtonTypeRequestChat:
return UnmarshalKeyboardButtonTypeRequestChat(data)
case TypeKeyboardButtonTypeWebApp: case TypeKeyboardButtonTypeWebApp:
return UnmarshalKeyboardButtonTypeWebApp(data) return UnmarshalKeyboardButtonTypeWebApp(data)
@ -2160,6 +2209,12 @@ func UnmarshalMessageContent(data json.RawMessage) (MessageContent, error) {
case TypeMessageContactRegistered: case TypeMessageContactRegistered:
return UnmarshalMessageContactRegistered(data) return UnmarshalMessageContactRegistered(data)
case TypeMessageUserShared:
return UnmarshalMessageUserShared(data)
case TypeMessageChatShared:
return UnmarshalMessageChatShared(data)
case TypeMessageWebsiteConnected: case TypeMessageWebsiteConnected:
return UnmarshalMessageWebsiteConnected(data) return UnmarshalMessageWebsiteConnected(data)
@ -2602,6 +2657,43 @@ func UnmarshalListOfUserStatus(dataList []json.RawMessage) ([]UserStatus, error)
return list, nil return list, nil
} }
func UnmarshalEmojiCategoryType(data json.RawMessage) (EmojiCategoryType, error) {
var meta meta
err := json.Unmarshal(data, &meta)
if err != nil {
return nil, err
}
switch meta.Type {
case TypeEmojiCategoryTypeDefault:
return UnmarshalEmojiCategoryTypeDefault(data)
case TypeEmojiCategoryTypeEmojiStatus:
return UnmarshalEmojiCategoryTypeEmojiStatus(data)
case TypeEmojiCategoryTypeChatPhoto:
return UnmarshalEmojiCategoryTypeChatPhoto(data)
default:
return nil, fmt.Errorf("Error unmarshaling. Unknown type: " + meta.Type)
}
}
func UnmarshalListOfEmojiCategoryType(dataList []json.RawMessage) ([]EmojiCategoryType, error) {
list := []EmojiCategoryType{}
for _, data := range dataList {
entity, err := UnmarshalEmojiCategoryType(data)
if err != nil {
return nil, err
}
list = append(list, entity)
}
return list, nil
}
func UnmarshalCallDiscardReason(data json.RawMessage) (CallDiscardReason, error) { func UnmarshalCallDiscardReason(data json.RawMessage) (CallDiscardReason, error) {
var meta meta var meta meta
@ -2817,6 +2909,40 @@ func UnmarshalListOfCallProblem(dataList []json.RawMessage) ([]CallProblem, erro
return list, nil return list, nil
} }
func UnmarshalFirebaseAuthenticationSettings(data json.RawMessage) (FirebaseAuthenticationSettings, error) {
var meta meta
err := json.Unmarshal(data, &meta)
if err != nil {
return nil, err
}
switch meta.Type {
case TypeFirebaseAuthenticationSettingsAndroid:
return UnmarshalFirebaseAuthenticationSettingsAndroid(data)
case TypeFirebaseAuthenticationSettingsIos:
return UnmarshalFirebaseAuthenticationSettingsIos(data)
default:
return nil, fmt.Errorf("Error unmarshaling. Unknown type: " + meta.Type)
}
}
func UnmarshalListOfFirebaseAuthenticationSettings(dataList []json.RawMessage) ([]FirebaseAuthenticationSettings, error) {
list := []FirebaseAuthenticationSettings{}
for _, data := range dataList {
entity, err := UnmarshalFirebaseAuthenticationSettings(data)
if err != nil {
return nil, err
}
list = append(list, entity)
}
return list, nil
}
func UnmarshalDiceStickers(data json.RawMessage) (DiceStickers, error) { func UnmarshalDiceStickers(data json.RawMessage) (DiceStickers, error) {
var meta meta var meta meta
@ -3359,6 +3485,9 @@ func UnmarshalPremiumFeature(data json.RawMessage) (PremiumFeature, error) {
case TypePremiumFeatureAppIcons: case TypePremiumFeatureAppIcons:
return UnmarshalPremiumFeatureAppIcons(data) return UnmarshalPremiumFeatureAppIcons(data)
case TypePremiumFeatureRealTimeChatTranslation:
return UnmarshalPremiumFeatureRealTimeChatTranslation(data)
default: default:
return nil, fmt.Errorf("Error unmarshaling. Unknown type: " + meta.Type) return nil, fmt.Errorf("Error unmarshaling. Unknown type: " + meta.Type)
} }
@ -3494,6 +3623,9 @@ func UnmarshalDeviceToken(data json.RawMessage) (DeviceToken, error) {
case TypeDeviceTokenTizenPush: case TypeDeviceTokenTizenPush:
return UnmarshalDeviceTokenTizenPush(data) return UnmarshalDeviceTokenTizenPush(data)
case TypeDeviceTokenHuaweiPush:
return UnmarshalDeviceTokenHuaweiPush(data)
default: default:
return nil, fmt.Errorf("Error unmarshaling. Unknown type: " + meta.Type) return nil, fmt.Errorf("Error unmarshaling. Unknown type: " + meta.Type)
} }
@ -4675,6 +4807,46 @@ func UnmarshalListOfNetworkStatisticsEntry(dataList []json.RawMessage) ([]Networ
return list, nil return list, nil
} }
func UnmarshalAutosaveSettingsScope(data json.RawMessage) (AutosaveSettingsScope, error) {
var meta meta
err := json.Unmarshal(data, &meta)
if err != nil {
return nil, err
}
switch meta.Type {
case TypeAutosaveSettingsScopePrivateChats:
return UnmarshalAutosaveSettingsScopePrivateChats(data)
case TypeAutosaveSettingsScopeGroupChats:
return UnmarshalAutosaveSettingsScopeGroupChats(data)
case TypeAutosaveSettingsScopeChannelChats:
return UnmarshalAutosaveSettingsScopeChannelChats(data)
case TypeAutosaveSettingsScopeChat:
return UnmarshalAutosaveSettingsScopeChat(data)
default:
return nil, fmt.Errorf("Error unmarshaling. Unknown type: " + meta.Type)
}
}
func UnmarshalListOfAutosaveSettingsScope(dataList []json.RawMessage) ([]AutosaveSettingsScope, error) {
list := []AutosaveSettingsScope{}
for _, data := range dataList {
entity, err := UnmarshalAutosaveSettingsScope(data)
if err != nil {
return nil, err
}
list = append(list, entity)
}
return list, nil
}
func UnmarshalConnectionState(data json.RawMessage) (ConnectionState, error) { func UnmarshalConnectionState(data json.RawMessage) (ConnectionState, error) {
var meta meta var meta meta
@ -4834,6 +5006,12 @@ func UnmarshalSuggestedAction(data json.RawMessage) (SuggestedAction, error) {
case TypeSuggestedActionSetPassword: case TypeSuggestedActionSetPassword:
return UnmarshalSuggestedActionSetPassword(data) return UnmarshalSuggestedActionSetPassword(data)
case TypeSuggestedActionUpgradePremium:
return UnmarshalSuggestedActionUpgradePremium(data)
case TypeSuggestedActionSubscribeToAnnualPremium:
return UnmarshalSuggestedActionSubscribeToAnnualPremium(data)
default: default:
return nil, fmt.Errorf("Error unmarshaling. Unknown type: " + meta.Type) return nil, fmt.Errorf("Error unmarshaling. Unknown type: " + meta.Type)
} }
@ -5192,14 +5370,17 @@ func UnmarshalUpdate(data json.RawMessage) (Update, error) {
case TypeUpdateChatHasProtectedContent: case TypeUpdateChatHasProtectedContent:
return UnmarshalUpdateChatHasProtectedContent(data) return UnmarshalUpdateChatHasProtectedContent(data)
case TypeUpdateChatHasScheduledMessages: case TypeUpdateChatIsTranslatable:
return UnmarshalUpdateChatHasScheduledMessages(data) return UnmarshalUpdateChatIsTranslatable(data)
case TypeUpdateChatIsMarkedAsUnread:
return UnmarshalUpdateChatIsMarkedAsUnread(data)
case TypeUpdateChatIsBlocked: case TypeUpdateChatIsBlocked:
return UnmarshalUpdateChatIsBlocked(data) return UnmarshalUpdateChatIsBlocked(data)
case TypeUpdateChatIsMarkedAsUnread: case TypeUpdateChatHasScheduledMessages:
return UnmarshalUpdateChatIsMarkedAsUnread(data) return UnmarshalUpdateChatHasScheduledMessages(data)
case TypeUpdateChatFilters: case TypeUpdateChatFilters:
return UnmarshalUpdateChatFilters(data) return UnmarshalUpdateChatFilters(data)
@ -5366,6 +5547,9 @@ func UnmarshalUpdate(data json.RawMessage) (Update, error) {
case TypeUpdateSuggestedActions: case TypeUpdateSuggestedActions:
return UnmarshalUpdateSuggestedActions(data) return UnmarshalUpdateSuggestedActions(data)
case TypeUpdateAutosaveSettings:
return UnmarshalUpdateAutosaveSettings(data)
case TypeUpdateNewInlineQuery: case TypeUpdateNewInlineQuery:
return UnmarshalUpdateNewInlineQuery(data) return UnmarshalUpdateNewInlineQuery(data)
@ -5522,6 +5706,22 @@ func UnmarshalAuthenticationCodeTypeFragment(data json.RawMessage) (*Authenticat
return &resp, err return &resp, err
} }
func UnmarshalAuthenticationCodeTypeFirebaseAndroid(data json.RawMessage) (*AuthenticationCodeTypeFirebaseAndroid, error) {
var resp AuthenticationCodeTypeFirebaseAndroid
err := json.Unmarshal(data, &resp)
return &resp, err
}
func UnmarshalAuthenticationCodeTypeFirebaseIos(data json.RawMessage) (*AuthenticationCodeTypeFirebaseIos, error) {
var resp AuthenticationCodeTypeFirebaseIos
err := json.Unmarshal(data, &resp)
return &resp, err
}
func UnmarshalAuthenticationCodeInfo(data json.RawMessage) (*AuthenticationCodeInfo, error) { func UnmarshalAuthenticationCodeInfo(data json.RawMessage) (*AuthenticationCodeInfo, error) {
var resp AuthenticationCodeInfo var resp AuthenticationCodeInfo
@ -6186,6 +6386,30 @@ func UnmarshalChatLocation(data json.RawMessage) (*ChatLocation, error) {
return &resp, err return &resp, err
} }
func UnmarshalChatPhotoStickerTypeRegularOrMask(data json.RawMessage) (*ChatPhotoStickerTypeRegularOrMask, error) {
var resp ChatPhotoStickerTypeRegularOrMask
err := json.Unmarshal(data, &resp)
return &resp, err
}
func UnmarshalChatPhotoStickerTypeCustomEmoji(data json.RawMessage) (*ChatPhotoStickerTypeCustomEmoji, error) {
var resp ChatPhotoStickerTypeCustomEmoji
err := json.Unmarshal(data, &resp)
return &resp, err
}
func UnmarshalChatPhotoSticker(data json.RawMessage) (*ChatPhotoSticker, error) {
var resp ChatPhotoSticker
err := json.Unmarshal(data, &resp)
return &resp, err
}
func UnmarshalAnimatedChatPhoto(data json.RawMessage) (*AnimatedChatPhoto, error) { func UnmarshalAnimatedChatPhoto(data json.RawMessage) (*AnimatedChatPhoto, error) {
var resp AnimatedChatPhoto var resp AnimatedChatPhoto
@ -6234,6 +6458,14 @@ func UnmarshalInputChatPhotoAnimation(data json.RawMessage) (*InputChatPhotoAnim
return &resp, err return &resp, err
} }
func UnmarshalInputChatPhotoSticker(data json.RawMessage) (*InputChatPhotoSticker, error) {
var resp InputChatPhotoSticker
err := json.Unmarshal(data, &resp)
return &resp, err
}
func UnmarshalChatPermissions(data json.RawMessage) (*ChatPermissions, error) { func UnmarshalChatPermissions(data json.RawMessage) (*ChatPermissions, error) {
var resp ChatPermissions var resp ChatPermissions
@ -6258,6 +6490,14 @@ func UnmarshalPremiumPaymentOption(data json.RawMessage) (*PremiumPaymentOption,
return &resp, err return &resp, err
} }
func UnmarshalPremiumStatePaymentOption(data json.RawMessage) (*PremiumStatePaymentOption, error) {
var resp PremiumStatePaymentOption
err := json.Unmarshal(data, &resp)
return &resp, err
}
func UnmarshalEmojiStatus(data json.RawMessage) (*EmojiStatus, error) { func UnmarshalEmojiStatus(data json.RawMessage) (*EmojiStatus, error) {
var resp EmojiStatus var resp EmojiStatus
@ -7242,6 +7482,22 @@ func UnmarshalKeyboardButtonTypeRequestPoll(data json.RawMessage) (*KeyboardButt
return &resp, err return &resp, err
} }
func UnmarshalKeyboardButtonTypeRequestUser(data json.RawMessage) (*KeyboardButtonTypeRequestUser, error) {
var resp KeyboardButtonTypeRequestUser
err := json.Unmarshal(data, &resp)
return &resp, err
}
func UnmarshalKeyboardButtonTypeRequestChat(data json.RawMessage) (*KeyboardButtonTypeRequestChat, error) {
var resp KeyboardButtonTypeRequestChat
err := json.Unmarshal(data, &resp)
return &resp, err
}
func UnmarshalKeyboardButtonTypeWebApp(data json.RawMessage) (*KeyboardButtonTypeWebApp, error) { func UnmarshalKeyboardButtonTypeWebApp(data json.RawMessage) (*KeyboardButtonTypeWebApp, error) {
var resp KeyboardButtonTypeWebApp var resp KeyboardButtonTypeWebApp
@ -9122,6 +9378,22 @@ func UnmarshalMessageContactRegistered(data json.RawMessage) (*MessageContactReg
return &resp, err return &resp, err
} }
func UnmarshalMessageUserShared(data json.RawMessage) (*MessageUserShared, error) {
var resp MessageUserShared
err := json.Unmarshal(data, &resp)
return &resp, err
}
func UnmarshalMessageChatShared(data json.RawMessage) (*MessageChatShared, error) {
var resp MessageChatShared
err := json.Unmarshal(data, &resp)
return &resp, err
}
func UnmarshalMessageWebsiteConnected(data json.RawMessage) (*MessageWebsiteConnected, error) { func UnmarshalMessageWebsiteConnected(data json.RawMessage) (*MessageWebsiteConnected, error) {
var resp MessageWebsiteConnected var resp MessageWebsiteConnected
@ -9874,6 +10146,46 @@ func UnmarshalTrendingStickerSets(data json.RawMessage) (*TrendingStickerSets, e
return &resp, err return &resp, err
} }
func UnmarshalEmojiCategory(data json.RawMessage) (*EmojiCategory, error) {
var resp EmojiCategory
err := json.Unmarshal(data, &resp)
return &resp, err
}
func UnmarshalEmojiCategories(data json.RawMessage) (*EmojiCategories, error) {
var resp EmojiCategories
err := json.Unmarshal(data, &resp)
return &resp, err
}
func UnmarshalEmojiCategoryTypeDefault(data json.RawMessage) (*EmojiCategoryTypeDefault, error) {
var resp EmojiCategoryTypeDefault
err := json.Unmarshal(data, &resp)
return &resp, err
}
func UnmarshalEmojiCategoryTypeEmojiStatus(data json.RawMessage) (*EmojiCategoryTypeEmojiStatus, error) {
var resp EmojiCategoryTypeEmojiStatus
err := json.Unmarshal(data, &resp)
return &resp, err
}
func UnmarshalEmojiCategoryTypeChatPhoto(data json.RawMessage) (*EmojiCategoryTypeChatPhoto, error) {
var resp EmojiCategoryTypeChatPhoto
err := json.Unmarshal(data, &resp)
return &resp, err
}
func UnmarshalCallDiscardReasonEmpty(data json.RawMessage) (*CallDiscardReasonEmpty, error) { func UnmarshalCallDiscardReasonEmpty(data json.RawMessage) (*CallDiscardReasonEmpty, error) {
var resp CallDiscardReasonEmpty var resp CallDiscardReasonEmpty
@ -10178,6 +10490,22 @@ func UnmarshalCall(data json.RawMessage) (*Call, error) {
return &resp, err return &resp, err
} }
func UnmarshalFirebaseAuthenticationSettingsAndroid(data json.RawMessage) (*FirebaseAuthenticationSettingsAndroid, error) {
var resp FirebaseAuthenticationSettingsAndroid
err := json.Unmarshal(data, &resp)
return &resp, err
}
func UnmarshalFirebaseAuthenticationSettingsIos(data json.RawMessage) (*FirebaseAuthenticationSettingsIos, error) {
var resp FirebaseAuthenticationSettingsIos
err := json.Unmarshal(data, &resp)
return &resp, err
}
func UnmarshalPhoneNumberAuthenticationSettings(data json.RawMessage) (*PhoneNumberAuthenticationSettings, error) { func UnmarshalPhoneNumberAuthenticationSettings(data json.RawMessage) (*PhoneNumberAuthenticationSettings, error) {
var resp PhoneNumberAuthenticationSettings var resp PhoneNumberAuthenticationSettings
@ -11202,6 +11530,14 @@ func UnmarshalPremiumFeatureAppIcons(data json.RawMessage) (*PremiumFeatureAppIc
return &resp, err return &resp, err
} }
func UnmarshalPremiumFeatureRealTimeChatTranslation(data json.RawMessage) (*PremiumFeatureRealTimeChatTranslation, error) {
var resp PremiumFeatureRealTimeChatTranslation
err := json.Unmarshal(data, &resp)
return &resp, err
}
func UnmarshalPremiumLimit(data json.RawMessage) (*PremiumLimit, error) { func UnmarshalPremiumLimit(data json.RawMessage) (*PremiumLimit, error) {
var resp PremiumLimit var resp PremiumLimit
@ -11282,6 +11618,14 @@ func UnmarshalStorePaymentPurposeGiftedPremium(data json.RawMessage) (*StorePaym
return &resp, err return &resp, err
} }
func Unmarshal//-To(data json.RawMessage) (*//-To, error) {
var resp //-To
err := json.Unmarshal(data, &resp)
return &resp, err
}
func UnmarshalDeviceTokenFirebaseCloudMessaging(data json.RawMessage) (*DeviceTokenFirebaseCloudMessaging, error) { func UnmarshalDeviceTokenFirebaseCloudMessaging(data json.RawMessage) (*DeviceTokenFirebaseCloudMessaging, error) {
var resp DeviceTokenFirebaseCloudMessaging var resp DeviceTokenFirebaseCloudMessaging
@ -11370,6 +11714,14 @@ func UnmarshalDeviceTokenTizenPush(data json.RawMessage) (*DeviceTokenTizenPush,
return &resp, err return &resp, err
} }
func UnmarshalDeviceTokenHuaweiPush(data json.RawMessage) (*DeviceTokenHuaweiPush, error) {
var resp DeviceTokenHuaweiPush
err := json.Unmarshal(data, &resp)
return &resp, err
}
func UnmarshalPushReceiverId(data json.RawMessage) (*PushReceiverId, error) { func UnmarshalPushReceiverId(data json.RawMessage) (*PushReceiverId, error) {
var resp PushReceiverId var resp PushReceiverId
@ -13058,6 +13410,62 @@ func UnmarshalAutoDownloadSettingsPresets(data json.RawMessage) (*AutoDownloadSe
return &resp, err return &resp, err
} }
func UnmarshalAutosaveSettingsScopePrivateChats(data json.RawMessage) (*AutosaveSettingsScopePrivateChats, error) {
var resp AutosaveSettingsScopePrivateChats
err := json.Unmarshal(data, &resp)
return &resp, err
}
func UnmarshalAutosaveSettingsScopeGroupChats(data json.RawMessage) (*AutosaveSettingsScopeGroupChats, error) {
var resp AutosaveSettingsScopeGroupChats
err := json.Unmarshal(data, &resp)
return &resp, err
}
func UnmarshalAutosaveSettingsScopeChannelChats(data json.RawMessage) (*AutosaveSettingsScopeChannelChats, error) {
var resp AutosaveSettingsScopeChannelChats
err := json.Unmarshal(data, &resp)
return &resp, err
}
func UnmarshalAutosaveSettingsScopeChat(data json.RawMessage) (*AutosaveSettingsScopeChat, error) {
var resp AutosaveSettingsScopeChat
err := json.Unmarshal(data, &resp)
return &resp, err
}
func UnmarshalScopeAutosaveSettings(data json.RawMessage) (*ScopeAutosaveSettings, error) {
var resp ScopeAutosaveSettings
err := json.Unmarshal(data, &resp)
return &resp, err
}
func UnmarshalAutosaveSettingsException(data json.RawMessage) (*AutosaveSettingsException, error) {
var resp AutosaveSettingsException
err := json.Unmarshal(data, &resp)
return &resp, err
}
func UnmarshalAutosaveSettings(data json.RawMessage) (*AutosaveSettings, error) {
var resp AutosaveSettings
err := json.Unmarshal(data, &resp)
return &resp, err
}
func UnmarshalConnectionStateWaitingForNetwork(data json.RawMessage) (*ConnectionStateWaitingForNetwork, error) { func UnmarshalConnectionStateWaitingForNetwork(data json.RawMessage) (*ConnectionStateWaitingForNetwork, error) {
var resp ConnectionStateWaitingForNetwork var resp ConnectionStateWaitingForNetwork
@ -13250,6 +13658,22 @@ func UnmarshalSuggestedActionSetPassword(data json.RawMessage) (*SuggestedAction
return &resp, err return &resp, err
} }
func UnmarshalSuggestedActionUpgradePremium(data json.RawMessage) (*SuggestedActionUpgradePremium, error) {
var resp SuggestedActionUpgradePremium
err := json.Unmarshal(data, &resp)
return &resp, err
}
func UnmarshalSuggestedActionSubscribeToAnnualPremium(data json.RawMessage) (*SuggestedActionSubscribeToAnnualPremium, error) {
var resp SuggestedActionSubscribeToAnnualPremium
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
@ -13810,8 +14234,16 @@ func UnmarshalUpdateChatHasProtectedContent(data json.RawMessage) (*UpdateChatHa
return &resp, err return &resp, err
} }
func UnmarshalUpdateChatHasScheduledMessages(data json.RawMessage) (*UpdateChatHasScheduledMessages, error) { func UnmarshalUpdateChatIsTranslatable(data json.RawMessage) (*UpdateChatIsTranslatable, error) {
var resp UpdateChatHasScheduledMessages var resp UpdateChatIsTranslatable
err := json.Unmarshal(data, &resp)
return &resp, err
}
func UnmarshalUpdateChatIsMarkedAsUnread(data json.RawMessage) (*UpdateChatIsMarkedAsUnread, error) {
var resp UpdateChatIsMarkedAsUnread
err := json.Unmarshal(data, &resp) err := json.Unmarshal(data, &resp)
@ -13826,8 +14258,8 @@ func UnmarshalUpdateChatIsBlocked(data json.RawMessage) (*UpdateChatIsBlocked, e
return &resp, err return &resp, err
} }
func UnmarshalUpdateChatIsMarkedAsUnread(data json.RawMessage) (*UpdateChatIsMarkedAsUnread, error) { func UnmarshalUpdateChatHasScheduledMessages(data json.RawMessage) (*UpdateChatHasScheduledMessages, error) {
var resp UpdateChatIsMarkedAsUnread var resp UpdateChatHasScheduledMessages
err := json.Unmarshal(data, &resp) err := json.Unmarshal(data, &resp)
@ -14274,6 +14706,14 @@ func UnmarshalUpdateSuggestedActions(data json.RawMessage) (*UpdateSuggestedActi
return &resp, err return &resp, err
} }
func UnmarshalUpdateAutosaveSettings(data json.RawMessage) (*UpdateAutosaveSettings, error) {
var resp UpdateAutosaveSettings
err := json.Unmarshal(data, &resp)
return &resp, err
}
func UnmarshalUpdateNewInlineQuery(data json.RawMessage) (*UpdateNewInlineQuery, error) { func UnmarshalUpdateNewInlineQuery(data json.RawMessage) (*UpdateNewInlineQuery, error) {
var resp UpdateNewInlineQuery var resp UpdateNewInlineQuery
@ -14515,6 +14955,12 @@ func UnmarshalType(data json.RawMessage) (Type, error) {
case TypeAuthenticationCodeTypeFragment: case TypeAuthenticationCodeTypeFragment:
return UnmarshalAuthenticationCodeTypeFragment(data) return UnmarshalAuthenticationCodeTypeFragment(data)
case TypeAuthenticationCodeTypeFirebaseAndroid:
return UnmarshalAuthenticationCodeTypeFirebaseAndroid(data)
case TypeAuthenticationCodeTypeFirebaseIos:
return UnmarshalAuthenticationCodeTypeFirebaseIos(data)
case TypeAuthenticationCodeInfo: case TypeAuthenticationCodeInfo:
return UnmarshalAuthenticationCodeInfo(data) return UnmarshalAuthenticationCodeInfo(data)
@ -14764,6 +15210,15 @@ func UnmarshalType(data json.RawMessage) (Type, error) {
case TypeChatLocation: case TypeChatLocation:
return UnmarshalChatLocation(data) return UnmarshalChatLocation(data)
case TypeChatPhotoStickerTypeRegularOrMask:
return UnmarshalChatPhotoStickerTypeRegularOrMask(data)
case TypeChatPhotoStickerTypeCustomEmoji:
return UnmarshalChatPhotoStickerTypeCustomEmoji(data)
case TypeChatPhotoSticker:
return UnmarshalChatPhotoSticker(data)
case TypeAnimatedChatPhoto: case TypeAnimatedChatPhoto:
return UnmarshalAnimatedChatPhoto(data) return UnmarshalAnimatedChatPhoto(data)
@ -14782,6 +15237,9 @@ func UnmarshalType(data json.RawMessage) (Type, error) {
case TypeInputChatPhotoAnimation: case TypeInputChatPhotoAnimation:
return UnmarshalInputChatPhotoAnimation(data) return UnmarshalInputChatPhotoAnimation(data)
case TypeInputChatPhotoSticker:
return UnmarshalInputChatPhotoSticker(data)
case TypeChatPermissions: case TypeChatPermissions:
return UnmarshalChatPermissions(data) return UnmarshalChatPermissions(data)
@ -14791,6 +15249,9 @@ func UnmarshalType(data json.RawMessage) (Type, error) {
case TypePremiumPaymentOption: case TypePremiumPaymentOption:
return UnmarshalPremiumPaymentOption(data) return UnmarshalPremiumPaymentOption(data)
case TypePremiumStatePaymentOption:
return UnmarshalPremiumStatePaymentOption(data)
case TypeEmojiStatus: case TypeEmojiStatus:
return UnmarshalEmojiStatus(data) return UnmarshalEmojiStatus(data)
@ -15160,6 +15621,12 @@ func UnmarshalType(data json.RawMessage) (Type, error) {
case TypeKeyboardButtonTypeRequestPoll: case TypeKeyboardButtonTypeRequestPoll:
return UnmarshalKeyboardButtonTypeRequestPoll(data) return UnmarshalKeyboardButtonTypeRequestPoll(data)
case TypeKeyboardButtonTypeRequestUser:
return UnmarshalKeyboardButtonTypeRequestUser(data)
case TypeKeyboardButtonTypeRequestChat:
return UnmarshalKeyboardButtonTypeRequestChat(data)
case TypeKeyboardButtonTypeWebApp: case TypeKeyboardButtonTypeWebApp:
return UnmarshalKeyboardButtonTypeWebApp(data) return UnmarshalKeyboardButtonTypeWebApp(data)
@ -15865,6 +16332,12 @@ func UnmarshalType(data json.RawMessage) (Type, error) {
case TypeMessageContactRegistered: case TypeMessageContactRegistered:
return UnmarshalMessageContactRegistered(data) return UnmarshalMessageContactRegistered(data)
case TypeMessageUserShared:
return UnmarshalMessageUserShared(data)
case TypeMessageChatShared:
return UnmarshalMessageChatShared(data)
case TypeMessageWebsiteConnected: case TypeMessageWebsiteConnected:
return UnmarshalMessageWebsiteConnected(data) return UnmarshalMessageWebsiteConnected(data)
@ -16147,6 +16620,21 @@ func UnmarshalType(data json.RawMessage) (Type, error) {
case TypeTrendingStickerSets: case TypeTrendingStickerSets:
return UnmarshalTrendingStickerSets(data) return UnmarshalTrendingStickerSets(data)
case TypeEmojiCategory:
return UnmarshalEmojiCategory(data)
case TypeEmojiCategories:
return UnmarshalEmojiCategories(data)
case TypeEmojiCategoryTypeDefault:
return UnmarshalEmojiCategoryTypeDefault(data)
case TypeEmojiCategoryTypeEmojiStatus:
return UnmarshalEmojiCategoryTypeEmojiStatus(data)
case TypeEmojiCategoryTypeChatPhoto:
return UnmarshalEmojiCategoryTypeChatPhoto(data)
case TypeCallDiscardReasonEmpty: case TypeCallDiscardReasonEmpty:
return UnmarshalCallDiscardReasonEmpty(data) return UnmarshalCallDiscardReasonEmpty(data)
@ -16261,6 +16749,12 @@ func UnmarshalType(data json.RawMessage) (Type, error) {
case TypeCall: case TypeCall:
return UnmarshalCall(data) return UnmarshalCall(data)
case TypeFirebaseAuthenticationSettingsAndroid:
return UnmarshalFirebaseAuthenticationSettingsAndroid(data)
case TypeFirebaseAuthenticationSettingsIos:
return UnmarshalFirebaseAuthenticationSettingsIos(data)
case TypePhoneNumberAuthenticationSettings: case TypePhoneNumberAuthenticationSettings:
return UnmarshalPhoneNumberAuthenticationSettings(data) return UnmarshalPhoneNumberAuthenticationSettings(data)
@ -16645,6 +17139,9 @@ func UnmarshalType(data json.RawMessage) (Type, error) {
case TypePremiumFeatureAppIcons: case TypePremiumFeatureAppIcons:
return UnmarshalPremiumFeatureAppIcons(data) return UnmarshalPremiumFeatureAppIcons(data)
case TypePremiumFeatureRealTimeChatTranslation:
return UnmarshalPremiumFeatureRealTimeChatTranslation(data)
case TypePremiumLimit: case TypePremiumLimit:
return UnmarshalPremiumLimit(data) return UnmarshalPremiumLimit(data)
@ -16675,6 +17172,9 @@ func UnmarshalType(data json.RawMessage) (Type, error) {
case TypeStorePaymentPurposeGiftedPremium: case TypeStorePaymentPurposeGiftedPremium:
return UnmarshalStorePaymentPurposeGiftedPremium(data) return UnmarshalStorePaymentPurposeGiftedPremium(data)
case Type//-To:
return Unmarshal//-To(data)
case TypeDeviceTokenFirebaseCloudMessaging: case TypeDeviceTokenFirebaseCloudMessaging:
return UnmarshalDeviceTokenFirebaseCloudMessaging(data) return UnmarshalDeviceTokenFirebaseCloudMessaging(data)
@ -16708,6 +17208,9 @@ func UnmarshalType(data json.RawMessage) (Type, error) {
case TypeDeviceTokenTizenPush: case TypeDeviceTokenTizenPush:
return UnmarshalDeviceTokenTizenPush(data) return UnmarshalDeviceTokenTizenPush(data)
case TypeDeviceTokenHuaweiPush:
return UnmarshalDeviceTokenHuaweiPush(data)
case TypePushReceiverId: case TypePushReceiverId:
return UnmarshalPushReceiverId(data) return UnmarshalPushReceiverId(data)
@ -17341,6 +17844,27 @@ func UnmarshalType(data json.RawMessage) (Type, error) {
case TypeAutoDownloadSettingsPresets: case TypeAutoDownloadSettingsPresets:
return UnmarshalAutoDownloadSettingsPresets(data) return UnmarshalAutoDownloadSettingsPresets(data)
case TypeAutosaveSettingsScopePrivateChats:
return UnmarshalAutosaveSettingsScopePrivateChats(data)
case TypeAutosaveSettingsScopeGroupChats:
return UnmarshalAutosaveSettingsScopeGroupChats(data)
case TypeAutosaveSettingsScopeChannelChats:
return UnmarshalAutosaveSettingsScopeChannelChats(data)
case TypeAutosaveSettingsScopeChat:
return UnmarshalAutosaveSettingsScopeChat(data)
case TypeScopeAutosaveSettings:
return UnmarshalScopeAutosaveSettings(data)
case TypeAutosaveSettingsException:
return UnmarshalAutosaveSettingsException(data)
case TypeAutosaveSettings:
return UnmarshalAutosaveSettings(data)
case TypeConnectionStateWaitingForNetwork: case TypeConnectionStateWaitingForNetwork:
return UnmarshalConnectionStateWaitingForNetwork(data) return UnmarshalConnectionStateWaitingForNetwork(data)
@ -17413,6 +17937,12 @@ func UnmarshalType(data json.RawMessage) (Type, error) {
case TypeSuggestedActionSetPassword: case TypeSuggestedActionSetPassword:
return UnmarshalSuggestedActionSetPassword(data) return UnmarshalSuggestedActionSetPassword(data)
case TypeSuggestedActionUpgradePremium:
return UnmarshalSuggestedActionUpgradePremium(data)
case TypeSuggestedActionSubscribeToAnnualPremium:
return UnmarshalSuggestedActionSubscribeToAnnualPremium(data)
case TypeCount: case TypeCount:
return UnmarshalCount(data) return UnmarshalCount(data)
@ -17623,14 +18153,17 @@ func UnmarshalType(data json.RawMessage) (Type, error) {
case TypeUpdateChatHasProtectedContent: case TypeUpdateChatHasProtectedContent:
return UnmarshalUpdateChatHasProtectedContent(data) return UnmarshalUpdateChatHasProtectedContent(data)
case TypeUpdateChatHasScheduledMessages: case TypeUpdateChatIsTranslatable:
return UnmarshalUpdateChatHasScheduledMessages(data) return UnmarshalUpdateChatIsTranslatable(data)
case TypeUpdateChatIsMarkedAsUnread:
return UnmarshalUpdateChatIsMarkedAsUnread(data)
case TypeUpdateChatIsBlocked: case TypeUpdateChatIsBlocked:
return UnmarshalUpdateChatIsBlocked(data) return UnmarshalUpdateChatIsBlocked(data)
case TypeUpdateChatIsMarkedAsUnread: case TypeUpdateChatHasScheduledMessages:
return UnmarshalUpdateChatIsMarkedAsUnread(data) return UnmarshalUpdateChatHasScheduledMessages(data)
case TypeUpdateChatFilters: case TypeUpdateChatFilters:
return UnmarshalUpdateChatFilters(data) return UnmarshalUpdateChatFilters(data)
@ -17797,6 +18330,9 @@ func UnmarshalType(data json.RawMessage) (Type, error) {
case TypeUpdateSuggestedActions: case TypeUpdateSuggestedActions:
return UnmarshalUpdateSuggestedActions(data) return UnmarshalUpdateSuggestedActions(data)
case TypeUpdateAutosaveSettings:
return UnmarshalUpdateAutosaveSettings(data)
case TypeUpdateNewInlineQuery: case TypeUpdateNewInlineQuery:
return UnmarshalUpdateNewInlineQuery(data) return UnmarshalUpdateNewInlineQuery(data)

View file

@ -50,6 +50,17 @@ authenticationCodeTypeMissedCall phone_number_prefix:string length:int32 = Authe
//@length Length of the code //@length Length of the code
authenticationCodeTypeFragment url:string length:int32 = AuthenticationCodeType; authenticationCodeTypeFragment url:string length:int32 = AuthenticationCodeType;
//@description An authentication code is delivered via Firebase Authentication to the official Android application
//@nonce Nonce to pass to the SafetyNet Attestation API
//@length Length of the code
authenticationCodeTypeFirebaseAndroid nonce:bytes length:int32 = AuthenticationCodeType;
//@description An authentication code is delivered via Firebase Authentication to the official iOS application
//@receipt Receipt of successful applikation token validation to compare with receipt from push notification
//@push_timeout Time after the next authentication method is supposed to be used if verification push notification isn't received, in seconds
//@length Length of the code
authenticationCodeTypeFirebaseIos receipt:string push_timeout:int32 length:int32 = AuthenticationCodeType;
//@description Information about the authentication code that was sent //@description Information about the authentication code that was sent
//@phone_number A phone number that is being authenticated //@phone_number A phone number that is being authenticated
@ -311,7 +322,8 @@ stickerFullTypeMask mask_position:maskPosition = StickerFullType;
//@description The sticker is a custom emoji to be used inside message text and caption. Currently, only Telegram Premium users can use custom emoji //@description The sticker is a custom emoji to be used inside message text and caption. Currently, only Telegram Premium users can use custom emoji
//@custom_emoji_id Identifier of the custom emoji //@custom_emoji_id Identifier of the custom emoji
//@needs_repainting True, if the sticker must be repainted to a text color in messages, the color of the Telegram Premium badge in emoji status, or another appropriate color in other places //@needs_repainting True, if the sticker must be repainted to a text color in messages, the color of the Telegram Premium badge in emoji status, or another appropriate color in other places.
//-The sticker must not be repainted on chat photos
stickerFullTypeCustomEmoji custom_emoji_id:int64 needs_repainting:Bool = StickerFullType; stickerFullTypeCustomEmoji custom_emoji_id:int64 needs_repainting:Bool = StickerFullType;
@ -378,6 +390,7 @@ document file_name:string mime_type:string minithumbnail:minithumbnail thumbnail
photo has_stickers:Bool minithumbnail:minithumbnail sizes:vector<photoSize> = Photo; photo has_stickers:Bool minithumbnail:minithumbnail sizes:vector<photoSize> = Photo;
//@description Describes a sticker //@description Describes a sticker
//@id Unique sticker identifier within the set; 0 if none
//@set_id The identifier of the sticker set to which the sticker belongs; 0 if none //@set_id The identifier of the sticker set to which the sticker belongs; 0 if none
//@width Sticker width; as defined by the sender //@width Sticker width; as defined by the sender
//@height Sticker height; as defined by the sender //@height Sticker height; as defined by the sender
@ -387,7 +400,7 @@ photo has_stickers:Bool minithumbnail:minithumbnail sizes:vector<photoSize> = Ph
//@outline Sticker's outline represented as a list of closed vector paths; may be empty. The coordinate system origin is in the upper-left corner //@outline Sticker's outline represented as a list of closed vector paths; may be empty. The coordinate system origin is in the upper-left corner
//@thumbnail Sticker thumbnail in WEBP or JPEG format; may be null //@thumbnail Sticker thumbnail in WEBP or JPEG format; may be null
//@sticker File containing the sticker //@sticker File containing the sticker
sticker set_id:int64 width:int32 height:int32 emoji:string format:StickerFormat full_type:StickerFullType outline:vector<closedVectorPath> thumbnail:thumbnail sticker:file = Sticker; sticker id:int64 set_id:int64 width:int32 height:int32 emoji:string format:StickerFormat full_type:StickerFullType outline:vector<closedVectorPath> thumbnail:thumbnail sticker:file = Sticker;
//@description Describes a video file //@description Describes a video file
//@duration Duration of the video, in seconds; as defined by the sender //@duration Duration of the video, in seconds; as defined by the sender
@ -433,7 +446,7 @@ animatedEmoji sticker:sticker sticker_width:int32 sticker_height:int32 fitzpatri
//@first_name First name of the user; 1-255 characters in length //@first_name First name of the user; 1-255 characters in length
//@last_name Last name of the user //@last_name Last name of the user
//@vcard Additional data about the user in a form of vCard; 0-2048 bytes in length //@vcard Additional data about the user in a form of vCard; 0-2048 bytes in length
//@user_id Identifier of the user, if known; otherwise 0 //@user_id Identifier of the user, if known; 0 otherwise
contact phone_number:string first_name:string last_name:string vcard:string user_id:int53 = Contact; contact phone_number:string first_name:string last_name:string vcard:string user_id:int53 = Contact;
//@description Describes a location on planet Earth //@description Describes a location on planet Earth
@ -528,6 +541,23 @@ botMenuButton text:string url:string = BotMenuButton;
chatLocation location:location address:string = ChatLocation; chatLocation location:location address:string = ChatLocation;
//@class ChatPhotoStickerType @description Describes type of a sticker, which was used to create a chat photo
//@description Information about the sticker, which was used to create the chat photo
//@sticker_set_id Sticker set identifier
//@sticker_id Identifier of the sticker in the set
chatPhotoStickerTypeRegularOrMask sticker_set_id:int64 sticker_id:int64 = ChatPhotoStickerType;
//@description Information about the custom emoji, which was used to create the chat photo
//@custom_emoji_id Identifier of the custom emoji
chatPhotoStickerTypeCustomEmoji custom_emoji_id:int64 = ChatPhotoStickerType;
//@description Information about the sticker, which was used to create the chat photo. The sticker is shown at the center of the photo and occupies at most 67% of it
//@type Type of the sticker
//@background_fill The fill to be used as background for the sticker; rotation angle in backgroundFillGradient isn't supported
chatPhotoSticker type:ChatPhotoStickerType background_fill:BackgroundFill = ChatPhotoSticker;
//@description Animated variant of a chat photo in MPEG4 format //@description Animated variant of a chat photo in MPEG4 format
//@length Animation width and height //@length Animation width and height
//@file Information about the animation file //@file Information about the animation file
@ -540,9 +570,10 @@ animatedChatPhoto length:int32 file:file main_frame_timestamp:double = AnimatedC
//@added_date Point in time (Unix timestamp) when the photo has been added //@added_date Point in time (Unix timestamp) when the photo has been added
//@minithumbnail Photo minithumbnail; may be null //@minithumbnail Photo minithumbnail; may be null
//@sizes Available variants of the photo in JPEG format, in different size //@sizes Available variants of the photo in JPEG format, in different size
//@animation A big (640x640) animated variant of the photo in MPEG4 format; may be null //@animation A big (up to 1280x1280) animated variant of the photo in MPEG4 format; may be null
//@small_animation A small (160x160) animated variant of the photo in MPEG4 format; may be null even the big animation is available //@small_animation A small (160x160) animated variant of the photo in MPEG4 format; may be null even the big animation is available
chatPhoto id:int64 added_date:int32 minithumbnail:minithumbnail sizes:vector<photoSize> animation:animatedChatPhoto small_animation:animatedChatPhoto = ChatPhoto; //@sticker Sticker-based version of the chat photo; may be null
chatPhoto id:int64 added_date:int32 minithumbnail:minithumbnail sizes:vector<photoSize> animation:animatedChatPhoto small_animation:animatedChatPhoto sticker:chatPhotoSticker = ChatPhoto;
//@description Contains a list of chat or user profile photos @total_count Total number of photos @photos List of photos //@description Contains a list of chat or user profile photos @total_count Total number of photos @photos List of photos
chatPhotos total_count:int32 photos:vector<chatPhoto> = ChatPhotos; chatPhotos total_count:int32 photos:vector<chatPhoto> = ChatPhotos;
@ -556,26 +587,34 @@ inputChatPhotoPrevious chat_photo_id:int64 = InputChatPhoto;
//@description A static photo in JPEG format @photo Photo to be set as profile photo. Only inputFileLocal and inputFileGenerated are allowed //@description A static photo in JPEG format @photo Photo to be set as profile photo. Only inputFileLocal and inputFileGenerated are allowed
inputChatPhotoStatic photo:InputFile = InputChatPhoto; inputChatPhotoStatic photo:InputFile = InputChatPhoto;
//@description An animation in MPEG4 format; must be square, at most 10 seconds long, have width between 160 and 800 and be at most 2MB in size //@description An animation in MPEG4 format; must be square, at most 10 seconds long, have width between 160 and 1280 and be at most 2MB in size
//@animation Animation to be set as profile photo. Only inputFileLocal and inputFileGenerated are allowed //@animation Animation to be set as profile photo. Only inputFileLocal and inputFileGenerated are allowed
//@main_frame_timestamp Timestamp of the frame, which will be used as static chat photo //@main_frame_timestamp Timestamp of the frame, which will be used as static chat photo
inputChatPhotoAnimation animation:InputFile main_frame_timestamp:double = InputChatPhoto; inputChatPhotoAnimation animation:InputFile main_frame_timestamp:double = InputChatPhoto;
//@description A sticker on a custom background @sticker Information about the sticker
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_messages True, if the user can send text messages, contacts, locations, and venues //@can_send_messages True, if the user can send text messages, contacts, invoices, locations, and venues
//@can_send_media_messages True, if the user can send audio files, documents, photos, videos, video notes, and voice notes. Implies can_send_messages permissions //@can_send_audios True, if the user can send music files
//@can_send_polls True, if the user can send polls. Implies can_send_messages permissions //@can_send_documents True, if the user can send documents
//@can_send_photos True, if the user can send audio photos
//@can_send_videos True, if the user can send audio videos
//@can_send_video_notes True, if the user can send video notes
//@can_send_voice_notes True, if the user can send voice notes
//@can_send_polls True, if the user can send polls
//@can_send_stickers True, if the user can send stickers. Implies can_send_messages permissions //@can_send_stickers True, if the user can send stickers. Implies can_send_messages permissions
//@can_send_animations True, if the user can send animations. Implies can_send_messages permissions //@can_send_animations True, if the user can send animations. Implies can_send_messages permissions
//@can_send_games True, if the user can send games. Implies can_send_messages permissions //@can_send_games True, if the user can send games. Implies can_send_messages permissions
//@can_use_inline_bots True, if the user can use inline bots. Implies can_send_messages permissions //@can_use_inline_bots True, if the user can use inline bots. Implies can_send_messages permissions
//@can_add_web_page_previews True, if the user may add a web page preview to their messages. Implies can_send_messages permissions //@can_add_web_page_previews True, if the user may add a web page preview to their messages
//@can_change_info True, if the user can change the chat title, photo, and other settings //@can_change_info True, if the user can change the chat title, photo, and other settings
//@can_invite_users True, if the user can invite new users to the chat //@can_invite_users True, if the user can invite new users to the chat
//@can_pin_messages True, if the user can pin messages //@can_pin_messages True, if the user can pin messages
//@can_manage_topics True, if the user can manage topics //@can_manage_topics True, if the user can manage topics
chatPermissions can_send_messages:Bool can_send_media_messages:Bool can_send_polls:Bool can_send_stickers:Bool can_send_animations:Bool can_send_games:Bool can_use_inline_bots:Bool can_add_web_page_previews:Bool can_change_info:Bool can_invite_users:Bool can_pin_messages:Bool can_manage_topics:Bool = ChatPermissions; chatPermissions can_send_messages:Bool can_send_audios:Bool can_send_documents:Bool can_send_photos:Bool can_send_videos:Bool can_send_video_notes:Bool can_send_voice_notes:Bool can_send_polls:Bool can_send_stickers:Bool can_send_animations:Bool can_send_games:Bool can_use_inline_bots:Bool can_add_web_page_previews:Bool can_change_info:Bool can_invite_users:Bool can_pin_messages:Bool can_manage_topics:Bool = ChatPermissions;
//@description Describes rights of the administrator //@description Describes rights of the administrator
//@can_manage_chat True, if the administrator can get chat event log, get chat statistics, get message statistics in channels, get channel members, see anonymous administrators in supergroups and ignore slow mode. Implied by any other privilege; applicable to supergroups and channels only //@can_manage_chat True, if the administrator can get chat event log, get chat statistics, get message statistics in channels, get channel members, see anonymous administrators in supergroups and ignore slow mode. Implied by any other privilege; applicable to supergroups and channels only
@ -602,6 +641,13 @@ chatAdministratorRights can_manage_chat:Bool can_change_info:Bool can_post_messa
//@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;
//@description Describes an option for buying or upgrading Telegram Premium for self
//@payment_option Information about the payment option
//@is_current True, if this is the currently used Telegram Premium subscription option
//@is_upgrade True, if the payment option can be used to upgrade the existing Telegram Premium subscription
//@last_transaction_id Identifier of the last in-store transaction for the currently used option
premiumStatePaymentOption payment_option:premiumPaymentOption is_current:Bool is_upgrade:Bool last_transaction_id:string = PremiumStatePaymentOption;
//@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 //@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
emojiStatus custom_emoji_id:int64 = EmojiStatus; emojiStatus custom_emoji_id:int64 = EmojiStatus;
@ -654,9 +700,12 @@ user id:int53 access_hash:int64 first_name:string last_name:string usernames:use
botInfo share_text:string description:string photo:photo animation:animation menu_button:botMenuButton commands:vector<botCommand> default_group_administrator_rights:chatAdministratorRights default_channel_administrator_rights:chatAdministratorRights = BotInfo; botInfo share_text:string description:string photo:photo animation:animation menu_button:botMenuButton commands:vector<botCommand> default_group_administrator_rights:chatAdministratorRights default_channel_administrator_rights:chatAdministratorRights = BotInfo;
//@description Contains full information about a user //@description Contains full information about a user
//@personal_photo User profile photo set by the current user for the contact; may be null. If null and user.profile_photo is null, then the photo is empty, otherwise unknown. If non-null, then it is the same photo as in user.profile_photo and chat.photo. This photo isn't returned in the list of user photos //@personal_photo User profile photo set by the current user for the contact; may be null. If null and user.profile_photo is null, then the photo is empty; otherwise, it is unknown.
//@photo User profile photo; may be null. If null and user.profile_photo is null, then the photo is empty, otherwise unknown. If non-null and personal_photo is null, then it is the same photo as in user.profile_photo and chat.photo //-If non-null, then it is the same photo as in user.profile_photo and chat.photo. This photo isn't returned in the list of user photos
//@public_photo User profile photo visible if the main photo is hidden by privacy settings; may be null. If null and user.profile_photo is null, then the photo is empty, otherwise unknown. If non-null and both photo and personal_photo are null, then it is the same photo as in user.profile_photo and chat.photo. This photo isn't returned in the list of user photos //@photo User profile photo; may be null. If null and user.profile_photo is null, then the photo is empty; otherwise, it is unknown.
//-If non-null and personal_photo is null, then it is the same photo as in user.profile_photo and chat.photo
//@public_photo User profile photo visible if the main photo is hidden by privacy settings; may be null. If null and user.profile_photo is null, then the photo is empty; otherwise, it is unknown.
//-If non-null and both photo and personal_photo are null, then it is the same photo as in user.profile_photo and chat.photo. This photo isn't returned in the list of user photos
//@is_blocked True, if the user is blocked by the current user //@is_blocked True, if the user is blocked by the current user
//@can_be_called True, if the user can be called //@can_be_called True, if the user can be called
//@supports_video_calls True, if a video call can be created with the user //@supports_video_calls True, if a video call can be created with the user
@ -923,7 +972,7 @@ secretChatStateClosed = SecretChatState;
//@id Secret chat identifier //@id Secret chat identifier
//@user_id Identifier of the chat partner //@user_id Identifier of the chat partner
//@state State of the secret chat //@state State of the secret chat
//@is_outbound True, if the chat was created by the current user; otherwise false //@is_outbound True, if the chat was created by the current user; false otherwise
//@key_hash Hash of the currently used key for comparison with the hash of the chat partner's key. This is a string of 36 little-endian bytes, which must be split into groups of 2 bits, each denoting a pixel of one of 4 colors FFFFFF, D5E6F3, 2D5775, and 2F99C9. //@key_hash Hash of the currently used key for comparison with the hash of the chat partner's key. This is a string of 36 little-endian bytes, which must be split into groups of 2 bits, each denoting a pixel of one of 4 colors FFFFFF, D5E6F3, 2D5775, and 2F99C9.
//-The pixels must be used to make a 12x12 square image filled from left to right, top to bottom. Alternatively, the first 32 bytes of the hash can be converted to the hexadecimal format and printed as 32 2-digit hex numbers //-The pixels must be used to make a 12x12 square image filled from left to right, top to bottom. Alternatively, the first 32 bytes of the hash can be converted to the hexadecimal format and printed as 32 2-digit hex numbers
//@layer Secret chat layer; determines features supported by the chat partner's application. Nested text entities and underline and strikethrough entities are supported if the layer >= 101, //@layer Secret chat layer; determines features supported by the chat partner's application. Nested text entities and underline and strikethrough entities are supported if the layer >= 101,
@ -1279,6 +1328,7 @@ videoChat group_call_id:int32 has_participants:Bool default_participant_id:Messa
//@positions Positions of the chat in chat lists //@positions Positions of the chat in chat lists
//@message_sender_id Identifier of a user or chat that is selected to send messages in the chat; may be null if the user can't change message sender //@message_sender_id Identifier of a user or chat that is selected to send messages in the chat; may be null if the user can't change message sender
//@has_protected_content True, if chat content can't be saved locally, forwarded, or copied //@has_protected_content True, if chat content can't be saved locally, forwarded, or copied
//@is_translatable True, if translation of all messages in the chat must be suggested to the user
//@is_marked_as_unread True, if the chat is marked as unread //@is_marked_as_unread True, if the chat is marked as unread
//@is_blocked True, if the chat is blocked by the current user and private messages from the chat can't be received //@is_blocked True, if the chat is blocked by the current user and private messages from the chat can't be received
//@has_scheduled_messages True, if the chat has scheduled messages //@has_scheduled_messages True, if the chat has scheduled messages
@ -1301,7 +1351,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 //@draft_message A draft of a message in the chat; may be null
//@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 permissions:chatPermissions last_message:message positions:vector<chatPosition> message_sender_id:MessageSender has_protected_content:Bool is_marked_as_unread:Bool is_blocked: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 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 permissions:chatPermissions last_message:message positions:vector<chatPosition> message_sender_id:MessageSender has_protected_content:Bool is_translatable:Bool is_marked_as_unread:Bool is_blocked: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 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;
@ -1368,6 +1418,27 @@ 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
//@id Unique button identifier
//@restrict_user_is_bot True, if the shared user must or must not be a bot
//@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
//@restrict_user_is_premium True, if the shared user must or must not be a Telegram Premium user
//@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
keyboardButtonTypeRequestUser id:int32 restrict_user_is_bot:Bool user_is_bot:Bool restrict_user_is_premium:Bool user_is_premium:Bool = 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
//@id Unique button identifier
//@chat_is_channel True, if the chat must be a channel; otherwise, a basic group or a supergroup chat is shared
//@restrict_chat_is_forum True, if the chat must or must not be a forum supergroup
//@chat_is_forum True, if the chat must be a forum supergroup; otherwise, the chat must not be a forum supergroup. Ignored if restrict_chat_is_forum is false
//@restrict_chat_has_username True, if the chat must or must not have a username
//@chat_has_username True, if the chat must have a username; otherwise, the chat must not have a username. Ignored if restrict_chat_has_username is false
//@chat_is_created True, if the chat must be created by the current user
//@user_administrator_rights Expected user administrator rights in the chat; may be null if they aren't restricted
//@bot_administrator_rights Expected bot administrator rights in the chat; may be null if they aren't restricted
//@bot_is_member True, if the bot must be a member of the chat; for basic group and supergroup chats only
keyboardButtonTypeRequestChat id:int32 chat_is_channel:Bool restrict_chat_is_forum:Bool chat_is_forum:Bool restrict_chat_has_username:Bool chat_has_username:Bool chat_is_created:Bool user_administrator_rights:chatAdministratorRights bot_administrator_rights:chatAdministratorRights bot_is_member:Bool = KeyboardButtonType;
//@description A button that opens a Web App by calling getWebAppUrl @url An HTTP URL to pass to getWebAppUrl //@description A button that opens a Web App by calling getWebAppUrl @url An HTTP URL to pass to getWebAppUrl
keyboardButtonTypeWebApp url:string = KeyboardButtonType; keyboardButtonTypeWebApp url:string = KeyboardButtonType;
@ -1423,7 +1494,7 @@ replyMarkupForceReply is_personal:Bool input_field_placeholder:string = ReplyMar
//@description Contains a custom keyboard layout to quickly reply to bots //@description Contains a custom keyboard layout to quickly reply to bots
//@rows A list of rows of bot keyboard buttons //@rows A list of rows of bot keyboard buttons
//@is_persistent True, if the keyboard is supposed to be always shown when the ordinary keyboard is hidden //@is_persistent True, if the keyboard is supposed to always be shown when the ordinary keyboard is hidden
//@resize_keyboard True, if the application needs to resize the keyboard vertically //@resize_keyboard True, if the application needs to resize the keyboard vertically
//@one_time True, if the application needs to hide the keyboard after use //@one_time True, if the application needs to hide the keyboard after use
//@is_personal True, if the keyboard must automatically be shown to the current user. For outgoing messages, specify true to show the keyboard only for the mentioned users and for the target user of a reply //@is_personal True, if the keyboard must automatically be shown to the current user. For outgoing messages, specify true to show the keyboard only for the mentioned users and for the target user of a reply
@ -1437,7 +1508,7 @@ replyMarkupInlineKeyboard rows:vector<vector<inlineKeyboardButton>> = ReplyMarku
//@class LoginUrlInfo @description Contains information about an inline button of type inlineKeyboardButtonTypeLoginUrl //@class LoginUrlInfo @description Contains information about an inline button of type inlineKeyboardButtonTypeLoginUrl
//@description An HTTP url needs to be open @url The URL to open @skip_confirm True, if there is no need to show an ordinary open URL confirm //@description An HTTP URL needs to be open @url The URL to open @skip_confirm True, if there is no need to show an ordinary open URL confirm
loginUrlInfoOpen url:string skip_confirm:Bool = LoginUrlInfo; loginUrlInfoOpen url:string skip_confirm:Bool = LoginUrlInfo;
//@description An authorization confirmation dialog needs to be shown to the user //@description An authorization confirmation dialog needs to be shown to the user
@ -1916,10 +1987,10 @@ paymentOption title:string url:string = PaymentOption;
//@product_photo Product photo; may be null //@product_photo Product photo; may be null
paymentForm id:int64 invoice:invoice seller_bot_user_id:int53 payment_provider_user_id:int53 payment_provider:PaymentProvider additional_payment_options:vector<paymentOption> saved_order_info:orderInfo saved_credentials:vector<savedCredentials> can_save_credentials:Bool need_password:Bool product_title:string product_description:formattedText product_photo:photo = PaymentForm; paymentForm id:int64 invoice:invoice seller_bot_user_id:int53 payment_provider_user_id:int53 payment_provider:PaymentProvider additional_payment_options:vector<paymentOption> saved_order_info:orderInfo saved_credentials:vector<savedCredentials> can_save_credentials:Bool need_password:Bool product_title:string product_description:formattedText product_photo:photo = PaymentForm;
//@description Contains a temporary identifier of validated order information, which is stored for one hour. Also contains the available shipping options @order_info_id Temporary identifier of the order information @shipping_options Available shipping options //@description Contains a temporary identifier of validated order information, which is stored for one hour, and the available shipping options @order_info_id Temporary identifier of the order information @shipping_options Available shipping options
validatedOrderInfo order_info_id:string shipping_options:vector<shippingOption> = ValidatedOrderInfo; validatedOrderInfo order_info_id:string shipping_options:vector<shippingOption> = ValidatedOrderInfo;
//@description Contains the result of a payment request @success True, if the payment request was successful; otherwise the verification_url will be non-empty @verification_url URL for additional payment credentials verification //@description Contains the result of a payment request @success True, if the payment request was successful; otherwise, the verification_url will be non-empty @verification_url URL for additional payment credentials verification
paymentResult success:Bool verification_url:string = PaymentResult; paymentResult success:Bool verification_url:string = PaymentResult;
//@description Contains information about a successful payment //@description Contains information about a successful payment
@ -2392,7 +2463,7 @@ messagePinMessage message_id:int53 = MessageContent;
//@description A screenshot of a message in the chat has been taken //@description A screenshot of a message in the chat has been taken
messageScreenshotTaken = MessageContent; messageScreenshotTaken = MessageContent;
//@description A theme in the chat has been changed @theme_name If non-empty, name of a new theme, set for the chat. Otherwise chat theme was reset to the default one //@description A theme in the chat has been changed @theme_name If non-empty, name of a new theme, set for the chat. Otherwise, chat theme was reset to the default one
messageChatSetTheme theme_name:string = MessageContent; messageChatSetTheme theme_name:string = MessageContent;
//@description The auto-delete or self-destruct timer for messages in the chat has been changed @message_auto_delete_time New value auto-delete or self-destruct time, in seconds; 0 if disabled @from_user_id If not 0, a user identifier, which default setting was automatically applied //@description The auto-delete or self-destruct timer for messages in the chat has been changed @message_auto_delete_time New value auto-delete or self-destruct time, in seconds; 0 if disabled @from_user_id If not 0, a user identifier, which default setting was automatically applied
@ -2407,10 +2478,10 @@ messageForumTopicCreated name:string icon:forumTopicIcon = MessageContent;
//@icon_custom_emoji_id New unique identifier of the custom emoji shown on the topic icon; 0 if none. Must be ignored if edit_icon_custom_emoji_id is false //@icon_custom_emoji_id New unique identifier of the custom emoji shown on the topic icon; 0 if none. Must be ignored if edit_icon_custom_emoji_id is false
messageForumTopicEdited name:string edit_icon_custom_emoji_id:Bool icon_custom_emoji_id:int64 = MessageContent; messageForumTopicEdited name:string edit_icon_custom_emoji_id:Bool icon_custom_emoji_id:int64 = MessageContent;
//@description A forum topic has been closed or opened @is_closed True, if the topic was closed, otherwise the topic was reopened //@description A forum topic has been closed or opened @is_closed True, if the topic was closed; otherwise, the topic was reopened
messageForumTopicIsClosedToggled is_closed:Bool = MessageContent; messageForumTopicIsClosedToggled is_closed:Bool = MessageContent;
//@description A General forum topic has been hidden or unhidden @is_hidden True, if the topic was hidden, otherwise the topic was unhidden //@description A General forum topic has been hidden or unhidden @is_hidden True, if the topic was hidden; otherwise, the topic was unhidden
messageForumTopicIsHiddenToggled is_hidden:Bool = MessageContent; messageForumTopicIsHiddenToggled is_hidden:Bool = MessageContent;
//@description A profile photo was suggested to a user in a private chat @photo The suggested chat photo. Use the method setProfilePhoto with inputChatPhotoPrevious to apply the photo //@description A profile photo was suggested to a user in a private chat @photo The suggested chat photo. Use the method setProfilePhoto with inputChatPhotoPrevious to apply the photo
@ -2454,6 +2525,12 @@ messageGiftedPremium currency:string amount:int53 month_count:int32 sticker:stic
//@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
messageUserShared user_id: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
messageChatShared chat_id:int53 button_id:int32 = MessageContent;
//@description The current user has connected a website by logging in using Telegram Login Widget on it @domain_name Domain name of the connected website //@description The current user has connected a website by logging in using Telegram Login Widget on it @domain_name Domain name of the connected website
messageWebsiteConnected domain_name:string = MessageContent; messageWebsiteConnected domain_name:string = MessageContent;
@ -2874,6 +2951,28 @@ stickerSets total_count:int32 sets:vector<stickerSetInfo> = StickerSets;
trendingStickerSets total_count:int32 sets:vector<stickerSetInfo> is_premium:Bool = TrendingStickerSets; trendingStickerSets total_count:int32 sets:vector<stickerSetInfo> is_premium:Bool = TrendingStickerSets;
//@description Contains a list of similar emoji to search for in getStickers and searchStickers
//@name Name of the category
//@icon_custom_emoji_id Unique identifier of the custom emoji, which represents icon of the category
//@emojis List of emojis in the category
emojiCategory name:string icon_custom_emoji_id:int64 emojis:vector<string> = EmojiCategory;
//@description Represents a list of emoji categories @categories List of categories
emojiCategories categories:vector<emojiCategory> = EmojiCategories;
//@class EmojiCategoryType @description Describes type of an emoji category
//@description The category must be used by default
emojiCategoryTypeDefault = EmojiCategoryType;
//@description The category must be used for emoji status selection
emojiCategoryTypeEmojiStatus = EmojiCategoryType;
//@description The category must be used for chat photo emoji selection
emojiCategoryTypeChatPhoto = EmojiCategoryType;
//@class CallDiscardReason @description Describes the reason why a call was discarded //@class CallDiscardReason @description Describes the reason why a call was discarded
//@description The call wasn't discarded, or the reason is unknown //@description The call wasn't discarded, or the reason is unknown
@ -2982,7 +3081,7 @@ groupCallStream channel_id:int32 scale:int32 time_offset:int53 = GroupCallStream
//@description Represents a list of group call streams @streams A list of group call streams //@description Represents a list of group call streams @streams A list of group call streams
groupCallStreams streams:vector<groupCallStream> = GroupCallStreams; groupCallStreams streams:vector<groupCallStream> = GroupCallStreams;
//@description Represents an RTMP url @url The URL @stream_key Stream key //@description Represents an RTMP URL @url The URL @stream_key Stream key
rtmpUrl url:string stream_key:string = RtmpUrl; rtmpUrl url:string stream_key:string = RtmpUrl;
@ -3083,13 +3182,23 @@ callProblemPixelatedVideo = CallProblem;
call id:int32 user_id:int53 is_outgoing:Bool is_video:Bool state:CallState = Call; call id:int32 user_id:int53 is_outgoing:Bool is_video:Bool state:CallState = Call;
//@class FirebaseAuthenticationSettings @description Contains settings for Firebase Authentication in the official applications
//@description Settings for Firebase Authentication in the official Android application
firebaseAuthenticationSettingsAndroid = FirebaseAuthenticationSettings;
//@description Settings for Firebase Authentication in the official iOS application @device_token Device token from Apple Push Notification service @is_app_sandbox True, if App Sandbox is enabled
firebaseAuthenticationSettingsIos device_token:string is_app_sandbox:Bool = FirebaseAuthenticationSettings;
//@description Contains settings for the authentication of the user's phone number //@description Contains settings for the authentication of the user's phone number
//@allow_flash_call Pass true if the authentication code may be sent via a flash call to the specified phone number //@allow_flash_call Pass true if the authentication code may be sent via a flash call to the specified phone number
//@allow_missed_call Pass true if the authentication code may be sent via a missed call to the specified phone number //@allow_missed_call Pass true if the authentication code may be sent via a missed call to the specified phone number
//@is_current_phone_number Pass true if the authenticated phone number is used on the current device //@is_current_phone_number Pass true if the authenticated phone number is used on the current device
//@allow_sms_retriever_api For official applications only. True, if the application can use Android SMS Retriever API (requires Google Play Services >= 10.2) to automatically receive the authentication code from the SMS. See https://developers.google.com/identity/sms-retriever/ for more details //@allow_sms_retriever_api For official applications only. True, if the application can use Android SMS Retriever API (requires Google Play Services >= 10.2) to automatically receive the authentication code from the SMS. See https://developers.google.com/identity/sms-retriever/ for more details
//@firebase_authentication_settings For official Android and iOS applications only; pass null otherwise. Settings for Firebase Authentication
//@authentication_tokens List of up to 20 authentication tokens, recently received in updateOption("authentication_token") in previously logged out sessions //@authentication_tokens List of up to 20 authentication tokens, recently received in updateOption("authentication_token") in previously logged out sessions
phoneNumberAuthenticationSettings allow_flash_call:Bool allow_missed_call:Bool is_current_phone_number:Bool allow_sms_retriever_api:Bool authentication_tokens:vector<string> = PhoneNumberAuthenticationSettings; phoneNumberAuthenticationSettings allow_flash_call:Bool allow_missed_call:Bool is_current_phone_number:Bool allow_sms_retriever_api:Bool firebase_authentication_settings:FirebaseAuthenticationSettings authentication_tokens:vector<string> = PhoneNumberAuthenticationSettings;
//@description Represents a reaction applied to a message @type Type of the reaction @sender_id Identifier of the chat member, applied the reaction //@description Represents a reaction applied to a message @type Type of the reaction @sender_id Identifier of the chat member, applied the reaction
@ -3726,6 +3835,9 @@ premiumFeatureForumTopicIcon = PremiumFeature;
//@description Allowed to set a premium appllication icons //@description Allowed to set a premium appllication icons
premiumFeatureAppIcons = PremiumFeature; premiumFeatureAppIcons = PremiumFeature;
//@description Allowed to translate chat messages real-time
premiumFeatureRealTimeChatTranslation = PremiumFeature;
//@description Contains information about a limit, increased for Premium users @type The type of the limit @default_value Default value of the limit @premium_value Value of the limit for Premium users //@description Contains information about a limit, increased for Premium users @type The type of the limit @default_value Default value of the limit @premium_value Value of the limit for Premium users
premiumLimit type:PremiumLimitType default_value:int32 premium_value:int32 = PremiumLimit; premiumLimit type:PremiumLimitType default_value:int32 premium_value:int32 = PremiumLimit;
@ -3759,19 +3871,20 @@ premiumFeaturePromotionAnimation feature:PremiumFeature animation:animation = Pr
//@state Text description of the state of the current Premium subscription; may be empty if the current user has no Telegram Premium subscription //@state Text description of the state of the current Premium subscription; may be empty if the current user has no Telegram Premium subscription
//@payment_options The list of available options for buying Telegram Premium //@payment_options The list of available options for buying Telegram Premium
//@animations The list of available promotion animations for Premium features //@animations The list of available promotion animations for Premium features
premiumState state:formattedText payment_options:vector<premiumPaymentOption> animations:vector<premiumFeaturePromotionAnimation> = PremiumState; premiumState state:formattedText payment_options:vector<premiumStatePaymentOption> animations:vector<premiumFeaturePromotionAnimation> = PremiumState;
//@class StorePaymentPurpose @description Describes a purpose of an in-store payment //@class StorePaymentPurpose @description Describes a purpose of an in-store payment
//@description The user subscribed to Telegram Premium @is_restore Pass true if this is a restore of a Telegram Premium purchase; only for App Store //@description The user subscribed to Telegram Premium @is_restore Pass true if this is a restore of a Telegram Premium purchase; only for App Store @is_upgrade Pass true if this is an upgrade from a monthly subscription to early subscription; only for App Store
storePaymentPurposePremiumSubscription is_restore:Bool = StorePaymentPurpose; storePaymentPurposePremiumSubscription is_restore:Bool is_upgrade:Bool = StorePaymentPurpose;
//@description The user gifted Telegram Premium to another user @user_id Identifier of the user for which Premium was gifted @currency ISO 4217 currency code of the payment currency @amount Paid amount, in the smallest units of the currency //@description The user gifted Telegram Premium to another user @user_id Identifier of the user for which Premium was gifted @currency ISO 4217 currency code of the payment currency @amount Paid amount, in the smallest units of the currency
storePaymentPurposeGiftedPremium user_id:int53 currency:string amount:int53 = StorePaymentPurpose; storePaymentPurposeGiftedPremium user_id:int53 currency:string amount:int53 = StorePaymentPurpose;
//@class DeviceToken @description Represents a data needed to subscribe for push notifications through registerDevice method. To use specific push notification service, the correct application platform must be specified and a valid server authentication data must be uploaded at https://my.telegram.org //@class DeviceToken @description Represents a data needed to subscribe for push notifications through registerDevice method.
//-To use specific push notification service, the correct application platform must be specified and a valid server authentication data must be uploaded at https://my.telegram.org
//@description A token for Firebase Cloud Messaging @token Device registration token; may be empty to deregister a device @encrypt True, if push notifications must be additionally encrypted //@description A token for Firebase Cloud Messaging @token Device registration token; may be empty to deregister a device @encrypt True, if push notifications must be additionally encrypted
deviceTokenFirebaseCloudMessaging token:string encrypt:Bool = DeviceToken; deviceTokenFirebaseCloudMessaging token:string encrypt:Bool = DeviceToken;
@ -3809,6 +3922,9 @@ deviceTokenBlackBerryPush token:string = DeviceToken;
//@description A token for Tizen Push Service @reg_id Push service registration identifier; may be empty to deregister a device //@description A token for Tizen Push Service @reg_id Push service registration identifier; may be empty to deregister a device
deviceTokenTizenPush reg_id:string = DeviceToken; deviceTokenTizenPush reg_id:string = DeviceToken;
//@description A token for HUAWEI Push Service @token Device registration token; may be empty to deregister a device @encrypt True, if push notifications must be additionally encrypted
deviceTokenHuaweiPush token:string encrypt:Bool = DeviceToken;
//@description Contains a globally unique push receiver identifier, which can be used to identify which account has received a push notification @id The globally unique identifier of push notification subscription //@description Contains a globally unique push receiver identifier, which can be used to identify which account has received a push notification @id The globally unique identifier of push notification subscription
pushReceiverId id:int64 = PushReceiverId; pushReceiverId id:int64 = PushReceiverId;
@ -4047,7 +4163,7 @@ pushMessageContentChatChangePhoto = PushMessageContent;
//@description A chat title was edited @title New chat title //@description A chat title was edited @title New chat title
pushMessageContentChatChangeTitle title:string = PushMessageContent; pushMessageContentChatChangeTitle title:string = PushMessageContent;
//@description A chat theme was edited @theme_name If non-empty, name of a new theme, set for the chat. Otherwise chat theme was reset to the default one //@description A chat theme was edited @theme_name If non-empty, name of a new theme, set for the chat. Otherwise, the chat theme was reset to the default one
pushMessageContentChatSetTheme theme_name:string = PushMessageContent; pushMessageContentChatSetTheme theme_name:string = PushMessageContent;
//@description A chat member was deleted //@description A chat member was deleted
@ -4400,7 +4516,7 @@ targetChatInternalLink link:InternalLinkType = TargetChat;
internalLinkTypeActiveSessions = InternalLinkType; internalLinkTypeActiveSessions = InternalLinkType;
//@description The link is a link to an attachment menu bot to be opened in the specified or a chosen chat. Process given target_chat to open the chat. //@description The link is a link to an attachment menu bot to be opened in the specified or a chosen chat. Process given target_chat to open the chat.
//-Then call searchPublicChat with the given bot username, check that the user is a bot and can be added to attachment menu. Then use getAttachmentMenuBot to receive information about the bot. //-Then, call searchPublicChat with the given bot username, check that the user is a bot and can be added to attachment menu. Then, use getAttachmentMenuBot to receive information about the bot.
//-If the bot isn't added to attachment menu, then user needs to confirm adding the bot to attachment menu. If user confirms adding, then use toggleBotIsAddedToAttachmentMenu to add it. //-If the bot isn't added to attachment menu, then user needs to confirm adding the bot to attachment menu. If user confirms adding, then use toggleBotIsAddedToAttachmentMenu to add it.
//-If the attachment menu bot can't be used in the opened chat, show an error to the user. If the bot is added to attachment menu and can be used in the chat, then use openWebApp with the given URL //-If the attachment menu bot can't be used in the opened chat, show an error to the user. If the bot is added to attachment menu and can be used in the chat, then use openWebApp with the given URL
//@target_chat Target chat to be opened //@target_chat Target chat to be opened
@ -4426,15 +4542,15 @@ internalLinkTypeBotStart bot_username:string start_parameter:string autostart:Bo
//-If administrator rights are provided by the link, call getChatMember to receive the current bot rights in the chat and if the bot already is an administrator, //-If administrator rights are provided by the link, call getChatMember to receive the current bot rights in the chat and if the bot already is an administrator,
//-check that the current user can edit its administrator rights, combine received rights with the requested administrator rights, show confirmation box to the user, //-check that the current user can edit its administrator rights, combine received rights with the requested administrator rights, show confirmation box to the user,
//-and call setChatMemberStatus with the chosen chat and confirmed administrator rights. Before call to setChatMemberStatus it may be required to upgrade the chosen basic group chat to a supergroup chat. //-and call setChatMemberStatus with the chosen chat and confirmed administrator rights. Before call to setChatMemberStatus it may be required to upgrade the chosen basic group chat to a supergroup chat.
//-Then if start_parameter isn't empty, call sendBotStartMessage with the given start parameter and the chosen chat, otherwise just send /start message with bot's username added to the chat. //-Then, if start_parameter isn't empty, call sendBotStartMessage with the given start parameter and the chosen chat; otherwise, just send /start message with bot's username added to the chat.
//@bot_username Username of the bot //@bot_username Username of the bot
//@start_parameter The parameter to be passed to sendBotStartMessage //@start_parameter The parameter to be passed to sendBotStartMessage
//@administrator_rights Expected administrator rights for the bot; may be null //@administrator_rights Expected administrator rights for the bot; may be null
internalLinkTypeBotStartInGroup bot_username:string start_parameter:string administrator_rights:chatAdministratorRights = InternalLinkType; internalLinkTypeBotStartInGroup bot_username:string start_parameter:string administrator_rights:chatAdministratorRights = InternalLinkType;
//@description The link is a link to a Telegram bot, which is supposed to be added to a channel chat as an administrator. Call searchPublicChat with the given bot username and check that the user is a bot, //@description The link is a link to a Telegram bot, which is supposed to be added to a channel chat as an administrator. Call searchPublicChat with the given bot username and check that the user is a bot,
//-ask the current user to select a channel chat to add the bot to as an administrator. Then call getChatMember to receive the current bot rights in the chat and if the bot already is an administrator, //-ask the current user to select a channel chat to add the bot to as an administrator. Then, call getChatMember to receive the current bot rights in the chat and if the bot already is an administrator,
//-check that the current user can edit its administrator rights and combine received rights with the requested administrator rights. Then show confirmation box to the user, and call setChatMemberStatus with the chosen chat and confirmed rights //-check that the current user can edit its administrator rights and combine received rights with the requested administrator rights. Then, show confirmation box to the user, and call setChatMemberStatus with the chosen chat and confirmed rights
//@bot_username Username of the bot //@bot_username Username of the bot
//@administrator_rights Expected administrator rights for the bot //@administrator_rights Expected administrator rights for the bot
internalLinkTypeBotAddToChannel bot_username:string administrator_rights:chatAdministratorRights = InternalLinkType; internalLinkTypeBotAddToChannel bot_username:string administrator_rights:chatAdministratorRights = InternalLinkType;
@ -4479,12 +4595,13 @@ internalLinkTypeMessage url:string = InternalLinkType;
//@contains_link True, if the first line of the text contains a link. If true, the input field needs to be focused and the text after the link must be selected //@contains_link True, if the first line of the text contains a link. If true, the input field needs to be focused and the text after the link must be selected
internalLinkTypeMessageDraft text:formattedText contains_link:Bool = InternalLinkType; internalLinkTypeMessageDraft text:formattedText contains_link:Bool = InternalLinkType;
//@description The link contains a request of Telegram passport data. Call getPassportAuthorizationForm with the given parameters to process the link if the link was received from outside of the application, otherwise ignore it //@description The link contains a request of Telegram passport data. Call getPassportAuthorizationForm with the given parameters to process the link if the link was received from outside of the application; otherwise, ignore it
//@bot_user_id User identifier of the service's bot //@bot_user_id User identifier of the service's bot
//@scope Telegram Passport element types requested by the service //@scope Telegram Passport element types requested by the service
//@public_key Service's public key //@public_key Service's public key
//@nonce Unique request identifier provided by the service //@nonce Unique request identifier provided by the service
//@callback_url An HTTP URL to open once the request is finished or canceled with the parameter tg_passport=success or tg_passport=cancel respectively. If empty, then the link tgbot{bot_user_id}://passport/success or tgbot{bot_user_id}://passport/cancel needs to be opened instead //@callback_url An HTTP URL to open once the request is finished, canceled, or failed with the parameters tg_passport=success, tg_passport=cancel, or tg_passport=error&error=... respectively.
//-If empty, then onActivityResult method must be used to return response on Android, or the link tgbot{bot_user_id}://passport/success or tgbot{bot_user_id}://passport/cancel must be opened otherwise
internalLinkTypePassportDataRequest bot_user_id:int53 scope:string public_key:string nonce:string callback_url:string = InternalLinkType; internalLinkTypePassportDataRequest bot_user_id:int53 scope:string public_key:string nonce:string callback_url:string = InternalLinkType;
//@description The link can be used to confirm ownership of a phone number to prevent account deletion. Call sendPhoneNumberConfirmationCode with the given hash and phone number to process the link //@description The link can be used to confirm ownership of a phone number to prevent account deletion. Call sendPhoneNumberConfirmationCode with the given hash and phone number to process the link
@ -4706,6 +4823,40 @@ autoDownloadSettings is_auto_download_enabled:Bool max_photo_file_size:int32 max
autoDownloadSettingsPresets low:autoDownloadSettings medium:autoDownloadSettings high:autoDownloadSettings = AutoDownloadSettingsPresets; autoDownloadSettingsPresets low:autoDownloadSettings medium:autoDownloadSettings high:autoDownloadSettings = AutoDownloadSettingsPresets;
//@class AutosaveSettingsScope @description Describes scope of autosave settings
//@description Autosave settings applied to all private chats without chat-specific settings
autosaveSettingsScopePrivateChats = AutosaveSettingsScope;
//@description Autosave settings applied to all basic group and supergroup chats without chat-specific settings
autosaveSettingsScopeGroupChats = AutosaveSettingsScope;
//@description Autosave settings applied to all channel chats without chat-specific settings
autosaveSettingsScopeChannelChats = AutosaveSettingsScope;
//@description Autosave settings applied to a chat @chat_id Chat identifier
autosaveSettingsScopeChat chat_id:int53 = AutosaveSettingsScope;
//@description Contains autosave settings for an autosave settings scope
//@autosave_photos True, if photo autosave is enabled
//@autosave_videos True, if video autosave is enabled
//@max_video_file_size The maximum size of a video file to be autosaved, in bytes; 512 KB - 4000 MB
scopeAutosaveSettings autosave_photos:Bool autosave_videos:Bool max_video_file_size:int53 = ScopeAutosaveSettings;
//@description Contains autosave settings for a chat, which overrides default settings for the corresponding scope
//@chat_id Chat identifier
//@settings Autosave settings for the chat
autosaveSettingsException chat_id:int53 settings:scopeAutosaveSettings = AutosaveSettingsException;
//@description Describes autosave settings
//@private_chat_settings Default autosave settings for private chats
//@group_settings Default autosave settings for basic group and supergroup chats
//@channel_settings Default autosave settings for channel chats
//@exceptions Autosave settings for specific chats
autosaveSettings private_chat_settings:scopeAutosaveSettings group_settings:scopeAutosaveSettings channel_settings:scopeAutosaveSettings exceptions:vector<autosaveSettingsException> = AutosaveSettings;
//@class ConnectionState @description Describes the current state of the connection to Telegram servers //@class ConnectionState @description Describes the current state of the connection to Telegram servers
//@description Currently waiting for the network to become available. Use setNetworkType to change the available network type //@description Currently waiting for the network to become available. Use setNetworkType to change the available network type
@ -4786,9 +4937,16 @@ suggestedActionViewChecksHint = SuggestedAction;
//@description Suggests the user to convert specified supergroup to a broadcast group @supergroup_id Supergroup identifier //@description Suggests the user to convert specified supergroup to a broadcast group @supergroup_id Supergroup identifier
suggestedActionConvertToBroadcastGroup supergroup_id:int53 = SuggestedAction; suggestedActionConvertToBroadcastGroup supergroup_id:int53 = SuggestedAction;
//@description Suggests the user to set a 2-step verification password to be able to log in again @authorization_delay The number of days to pass between consecutive authorizations if the user declines to set password //@description Suggests the user to set a 2-step verification password to be able to log in again
//@authorization_delay The number of days to pass between consecutive authorizations if the user declines to set password; if 0, then the user is advised to set the password for security reasons
suggestedActionSetPassword authorization_delay:int32 = SuggestedAction; suggestedActionSetPassword authorization_delay:int32 = SuggestedAction;
//@description Suggests the user to upgrade the Premium subscription from monthly payments to annual payments
suggestedActionUpgradePremium = SuggestedAction;
//@description Suggests the user to subscribe to the Premium subscription with annual payments
suggestedActionSubscribeToAnnualPremium = SuggestedAction;
//@description Contains a counter @count Count //@description Contains a counter @count Count
count count:int32 = Count; count count:int32 = Count;
@ -5053,7 +5211,7 @@ updateChatPermissions chat_id:int53 permissions:chatPermissions = Update;
//@positions The new chat positions in the chat lists //@positions The new chat positions in the chat lists
updateChatLastMessage chat_id:int53 last_message:message positions:vector<chatPosition> = Update; updateChatLastMessage chat_id:int53 last_message:message positions:vector<chatPosition> = Update;
//@description The position of a chat in a chat list has changed. Instead of this update updateChatLastMessage or updateChatDraftMessage might be sent //@description The position of a chat in a chat list has changed. An updateChatLastMessage or updateChatDraftMessage update might be sent instead of the update
//@chat_id Chat identifier //@chat_id Chat identifier
//@position New chat position. If new order is 0, then the chat needs to be removed from the list //@position New chat position. If new order is 0, then the chat needs to be removed from the list
updateChatPosition chat_id:int53 position:chatPosition = Update; updateChatPosition chat_id:int53 position:chatPosition = Update;
@ -5111,14 +5269,17 @@ updateChatDefaultDisableNotification chat_id:int53 default_disable_notification:
//@description A chat content was allowed or restricted for saving @chat_id Chat identifier @has_protected_content New value of has_protected_content //@description A chat content was allowed or restricted for saving @chat_id Chat identifier @has_protected_content New value of has_protected_content
updateChatHasProtectedContent chat_id:int53 has_protected_content:Bool = Update; updateChatHasProtectedContent chat_id:int53 has_protected_content:Bool = Update;
//@description A chat's has_scheduled_messages field has changed @chat_id Chat identifier @has_scheduled_messages New value of has_scheduled_messages //@description Translation of chat messages was enabled or disabled @chat_id Chat identifier @is_translatable New value of is_translatable
updateChatHasScheduledMessages chat_id:int53 has_scheduled_messages:Bool = Update; updateChatIsTranslatable chat_id:int53 is_translatable:Bool = Update;
//@description A chat was marked as unread or was read @chat_id Chat identifier @is_marked_as_unread New value of is_marked_as_unread
updateChatIsMarkedAsUnread chat_id:int53 is_marked_as_unread:Bool = Update;
//@description A chat was blocked or unblocked @chat_id Chat identifier @is_blocked New value of is_blocked //@description A chat was blocked or unblocked @chat_id Chat identifier @is_blocked New value of is_blocked
updateChatIsBlocked chat_id:int53 is_blocked:Bool = Update; updateChatIsBlocked chat_id:int53 is_blocked:Bool = Update;
//@description A chat was marked as unread or was read @chat_id Chat identifier @is_marked_as_unread New value of is_marked_as_unread //@description A chat's has_scheduled_messages field has changed @chat_id Chat identifier @has_scheduled_messages New value of has_scheduled_messages
updateChatIsMarkedAsUnread chat_id:int53 is_marked_as_unread:Bool = Update; updateChatHasScheduledMessages chat_id:int53 has_scheduled_messages:Bool = Update;
//@description The list of chat filters or a chat filter has changed @chat_filters The new list of chat filters @main_chat_list_position Position of the main chat list among chat filters, 0-based //@description The list of chat filters or a chat filter has changed @chat_filters The new list of chat filters @main_chat_list_position Position of the main chat list among chat filters, 0-based
updateChatFilters chat_filters:vector<chatFilterInfo> main_chat_list_position:int32 = Update; updateChatFilters chat_filters:vector<chatFilterInfo> main_chat_list_position:int32 = Update;
@ -5276,7 +5437,7 @@ updateInstalledStickerSets sticker_type:StickerType sticker_set_ids:vector<int64
//@description The list of trending sticker sets was updated or some of them were viewed @sticker_type Type of the affected stickers @sticker_sets The prefix of the list of trending sticker sets with the newest trending sticker sets //@description The list of trending sticker sets was updated or some of them were viewed @sticker_type Type of the affected stickers @sticker_sets The prefix of the list of trending sticker sets with the newest trending sticker sets
updateTrendingStickerSets sticker_type:StickerType sticker_sets:trendingStickerSets = Update; updateTrendingStickerSets sticker_type:StickerType sticker_sets:trendingStickerSets = Update;
//@description The list of recently used stickers was updated @is_attached True, if the list of stickers attached to photo or video files was updated, otherwise the list of sent stickers is updated @sticker_ids The new list of file identifiers of recently used stickers //@description The list of recently used stickers was updated @is_attached True, if the list of stickers attached to photo or video files was updated; otherwise, the list of sent stickers is updated @sticker_ids The new list of file identifiers of recently used stickers
updateRecentStickers is_attached:Bool sticker_ids:vector<int32> = Update; updateRecentStickers is_attached:Bool sticker_ids:vector<int32> = Update;
//@description The list of favorite stickers was updated @sticker_ids The new list of file identifiers of favorite stickers //@description The list of favorite stickers was updated @sticker_ids The new list of file identifiers of favorite stickers
@ -5333,6 +5494,9 @@ updateAnimationSearchParameters provider:string emojis:vector<string> = Update;
//@description The list of suggested to the user actions has changed @added_actions Added suggested actions @removed_actions Removed suggested actions //@description The list of suggested to the user actions has changed @added_actions Added suggested actions @removed_actions Removed suggested actions
updateSuggestedActions added_actions:vector<SuggestedAction> removed_actions:vector<SuggestedAction> = Update; updateSuggestedActions added_actions:vector<SuggestedAction> removed_actions:vector<SuggestedAction> = Update;
//@description Autosave settings for some type of chats were updated @scope Type of chats for which autosave settings were updated @settings The new autosave settings; may be null if the settings are reset to default
updateAutosaveSettings scope:AutosaveSettingsScope settings:scopeAutosaveSettings = Update;
//@description A new incoming inline query; for bots only //@description A new incoming inline query; for bots only
//@id Unique query identifier //@id Unique query identifier
//@sender_user_id Identifier of the user who sent the query //@sender_user_id Identifier of the user who sent the query
@ -5405,8 +5569,12 @@ updatePollAnswer poll_id:int64 user_id:int53 option_ids:vector<int32> = Update;
//@new_chat_member New chat member //@new_chat_member New chat member
updateChatMember chat_id:int53 actor_user_id:int53 date:int32 invite_link:chatInviteLink old_chat_member:chatMember new_chat_member:chatMember = Update; updateChatMember chat_id:int53 actor_user_id:int53 date:int32 invite_link:chatInviteLink old_chat_member:chatMember new_chat_member:chatMember = Update;
//@description A user sent a join request to a chat; for bots only @chat_id Chat identifier @request Join request @invite_link The invite link, which was used to send join request; may be null //@description A user sent a join request to a chat; for bots only
updateNewChatJoinRequest chat_id:int53 request:chatJoinRequest invite_link:chatInviteLink = Update; //@chat_id Chat identifier
//@request Join request
//@user_chat_id Chat identifier of the private chat with the user
//@invite_link The invite link, which was used to send join request; may be null
updateNewChatJoinRequest chat_id:int53 request:chatJoinRequest user_chat_id:int53 invite_link:chatInviteLink = Update;
//@description Contains a list of updates @updates List of updates //@description Contains a list of updates @updates List of updates
@ -5464,7 +5632,7 @@ getAuthorizationState = AuthorizationState;
//@use_test_dc Pass true to use Telegram test environment instead of the production environment //@use_test_dc Pass true to use Telegram test environment instead of the production environment
//@database_directory The path to the directory for the persistent database; if empty, the current working directory will be used //@database_directory The path to the directory for the persistent database; if empty, the current working directory will be used
//@files_directory The path to the directory for storing files; if empty, database_directory will be used //@files_directory The path to the directory for storing files; if empty, database_directory will be used
//@database_encryption_key Encryption key for the database //@database_encryption_key Encryption key for the database. If the encryption key is invalid, then an error with code 401 will be returned
//@use_file_database Pass true to keep information about downloaded and uploaded files between application restarts //@use_file_database Pass true to keep information about downloaded and uploaded files between application restarts
//@use_chat_info_database Pass true to keep cache of users, basic groups, supergroups, channels and secret chats between restarts. Implies use_file_database //@use_chat_info_database Pass true to keep cache of users, basic groups, supergroups, channels and secret chats between restarts. Implies use_file_database
//@use_message_database Pass true to keep cache of chats and messages between restarts. Implies use_chat_info_database //@use_message_database Pass true to keep cache of chats and messages between restarts. Implies use_chat_info_database
@ -5480,7 +5648,7 @@ getAuthorizationState = AuthorizationState;
setTdlibParameters use_test_dc:Bool database_directory:string files_directory:string database_encryption_key:bytes use_file_database:Bool use_chat_info_database:Bool use_message_database:Bool use_secret_chats:Bool api_id:int32 api_hash:string system_language_code:string device_model:string system_version:string application_version:string enable_storage_optimizer:Bool ignore_file_names:Bool = Ok; setTdlibParameters use_test_dc:Bool database_directory:string files_directory:string database_encryption_key:bytes use_file_database:Bool use_chat_info_database:Bool use_message_database:Bool use_secret_chats:Bool api_id:int32 api_hash:string system_language_code:string device_model:string system_version:string application_version:string enable_storage_optimizer:Bool ignore_file_names:Bool = Ok;
//@description Sets the phone number of the user and sends an authentication code to the user. Works only when the current authorization state is authorizationStateWaitPhoneNumber, //@description Sets the phone number of the user and sends an authentication code to the user. Works only when the current authorization state is authorizationStateWaitPhoneNumber,
//-or if there is no pending authentication query and the current authorization state is authorizationStateWaitCode, authorizationStateWaitRegistration, or authorizationStateWaitPassword //-or if there is no pending authentication query and the current authorization state is authorizationStateWaitEmailAddress, authorizationStateWaitEmailCode, authorizationStateWaitCode, authorizationStateWaitRegistration, or authorizationStateWaitPassword
//@phone_number The phone number of the user, in international format //@phone_number The phone number of the user, in international format
//@settings Settings for the authentication of the user's phone number; pass null to use default settings //@settings Settings for the authentication of the user's phone number; pass null to use default settings
setAuthenticationPhoneNumber phone_number:string settings:phoneNumberAuthenticationSettings = Ok; setAuthenticationPhoneNumber phone_number:string settings:phoneNumberAuthenticationSettings = Ok;
@ -5499,7 +5667,7 @@ checkAuthenticationEmailCode code:EmailAddressAuthentication = Ok;
checkAuthenticationCode code:string = Ok; checkAuthenticationCode code:string = Ok;
//@description Requests QR code authentication by scanning a QR code on another logged in device. Works only when the current authorization state is authorizationStateWaitPhoneNumber, //@description Requests QR code authentication by scanning a QR code on another logged in device. Works only when the current authorization state is authorizationStateWaitPhoneNumber,
//-or if there is no pending authentication query and the current authorization state is authorizationStateWaitCode, authorizationStateWaitRegistration, or authorizationStateWaitPassword //-or if there is no pending authentication query and the current authorization state is authorizationStateWaitEmailAddress, authorizationStateWaitEmailCode, authorizationStateWaitCode, authorizationStateWaitRegistration, or authorizationStateWaitPassword
//@other_user_ids List of user identifiers of other users currently using the application //@other_user_ids List of user identifiers of other users currently using the application
requestQrCodeAuthentication other_user_ids:vector<int53> = Ok; requestQrCodeAuthentication other_user_ids:vector<int53> = Ok;
@ -5523,6 +5691,10 @@ checkAuthenticationPasswordRecoveryCode recovery_code:string = Ok;
//@new_hint New password hint; may be empty //@new_hint New password hint; may be empty
recoverAuthenticationPassword recovery_code:string new_password:string new_hint:string = Ok; recoverAuthenticationPassword recovery_code:string new_password:string new_hint:string = Ok;
//@description Sends Firebase Authentication SMS to the phone number of the user. Works only when the current authorization state is authorizationStateWaitCode and the server returned code of the type authenticationCodeTypeFirebaseAndroid or authenticationCodeTypeFirebaseIos
//@token SafetyNet Attestation API token for the Android application, or secret from push notification for the iOS application
sendAuthenticationFirebaseSms token:string = Ok;
//@description Checks the authentication token of a bot; to log in as a bot. Works only when the current authorization state is authorizationStateWaitPhoneNumber. Can be used instead of setAuthenticationPhoneNumber and checkAuthenticationCode to log in @token The bot token //@description Checks the authentication token of a bot; to log in as a bot. Works only when the current authorization state is authorizationStateWaitPhoneNumber. Can be used instead of setAuthenticationPhoneNumber and checkAuthenticationCode to log in @token The bot token
checkAuthenticationBotToken token:string = Ok; checkAuthenticationBotToken token:string = Ok;
@ -5644,7 +5816,7 @@ getMessage chat_id:int53 message_id:int53 = Message;
//@description Returns information about a message, if it is available without sending network request. This is an offline request @chat_id Identifier of the chat the message belongs to @message_id Identifier of the message to get //@description Returns information about a message, if it is available without sending network request. This is an offline request @chat_id Identifier of the chat the message belongs to @message_id Identifier of the message to get
getMessageLocally chat_id:int53 message_id:int53 = Message; getMessageLocally chat_id:int53 message_id:int53 = Message;
//@description Returns information about a message that is replied by a given message. Also returns the pinned message, the game message, the invoice message, and the topic creation message for messages //@description Returns information about a message that is replied by a given message. Also, returns the pinned message, the game message, the invoice message, and the topic creation message for messages
//-of the types messagePinMessage, messageGameScore, messagePaymentSuccessful, and topic messages without replied message respectively //-of the types messagePinMessage, messageGameScore, messagePaymentSuccessful, and topic messages without 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
@ -5686,7 +5858,7 @@ loadChats chat_list:ChatList limit:int32 = Ok;
//@limit The maximum number of chats to be returned //@limit The maximum number of chats to be returned
getChats chat_list:ChatList limit:int32 = Chats; getChats chat_list:ChatList limit:int32 = Chats;
//@description Searches a public chat by its username. Currently, only private chats, supergroups and channels can be public. Returns the chat if found; otherwise an error is returned @username Username to be resolved //@description Searches a public chat by its username. Currently, only private chats, supergroups and channels can be public. Returns the chat if found; otherwise, an error is returned @username Username to be resolved
searchPublicChat username:string = Chat; searchPublicChat username:string = Chat;
//@description Searches public chats by looking for specified query in their username and title. Currently, only private chats, supergroups and channels can be public. Returns a meaningful number of results. //@description Searches public chats by looking for specified query in their username and title. Currently, only private chats, supergroups and channels can be public. Returns a meaningful number of results.
@ -5775,7 +5947,9 @@ getMessageThreadHistory chat_id:int53 message_id:int53 from_message_id:int53 off
//@revoke Pass true to delete chat history for all users //@revoke Pass true to delete chat history for all users
deleteChatHistory chat_id:int53 remove_from_chat_list:Bool revoke:Bool = Ok; deleteChatHistory chat_id:int53 remove_from_chat_list:Bool revoke:Bool = Ok;
//@description Deletes a chat along with all messages in the corresponding chat for all chat members. For group chats this will release the usernames and remove all members. Use the field chat.can_be_deleted_for_all_users to find whether the method can be applied to the chat @chat_id Chat identifier //@description Deletes a chat along with all messages in the corresponding chat for all chat members. For group chats this will release the usernames and remove all members.
//-Use the field chat.can_be_deleted_for_all_users to find whether the method can be applied to the chat
//@chat_id Chat identifier
deleteChat chat_id:int53 = Ok; deleteChat chat_id:int53 = Ok;
//@description Searches for messages with given words in the chat. Returns the results in reverse chronological order, i.e. in order of decreasing message_id. Cannot be used in secret chats with a non-empty query //@description Searches for messages with given words in the chat. Returns the results in reverse chronological order, i.e. in order of decreasing message_id. Cannot be used in secret chats with a non-empty query
@ -5900,11 +6074,24 @@ getMessageEmbeddingCode chat_id:int53 message_id:int53 for_album:Bool = Text;
getMessageLinkInfo url:string = MessageLinkInfo; getMessageLinkInfo url:string = MessageLinkInfo;
//@description Translates a text to the given language. Returns a 404 error if the translation can't be performed //@description Translates a text to the given language. If the current user is a Telegram Premium user, then text formatting is preserved
//@text Text to translate //@text Text to translate
//@from_language_code A two-letter ISO 639-1 language code of the language from which the message is translated. If empty, the language will be detected automatically //@to_language_code ISO language code of the language to which the message is translated. Must be one of
//@to_language_code A two-letter ISO 639-1 language code of the language to which the message is translated //-"af", "sq", "am", "ar", "hy", "az", "eu", "be", "bn", "bs", "bg", "ca", "ceb", "zh-CN", "zh", "zh-Hans", "zh-TW", "zh-Hant", "co", "hr", "cs", "da", "nl", "en", "eo", "et",
translateText text:string from_language_code:string to_language_code:string = Text; //-"fi", "fr", "fy", "gl", "ka", "de", "el", "gu", "ht", "ha", "haw", "he", "iw", "hi", "hmn", "hu", "is", "ig", "id", "in", "ga", "it", "ja", "jv", "kn", "kk", "km", "rw", "ko",
//-"ku", "ky", "lo", "la", "lv", "lt", "lb", "mk", "mg", "ms", "ml", "mt", "mi", "mr", "mn", "my", "ne", "no", "ny", "or", "ps", "fa", "pl", "pt", "pa", "ro", "ru", "sm", "gd", "sr",
//-"st", "sn", "sd", "si", "sk", "sl", "so", "es", "su", "sw", "sv", "tl", "tg", "ta", "tt", "te", "th", "tr", "tk", "uk", "ur", "ug", "uz", "vi", "cy", "xh", "yi", "ji", "yo", "zu"
translateText text:formattedText to_language_code:string = FormattedText;
//@description Extracts text or caption of the given message and translates it to the given language. If the current user is a Telegram Premium user, then text formatting is preserved
//@chat_id Identifier of the chat to which the message belongs
//@message_id Identifier of the message
//@to_language_code ISO language code of the language to which the message is translated. Must be one of
//-"af", "sq", "am", "ar", "hy", "az", "eu", "be", "bn", "bs", "bg", "ca", "ceb", "zh-CN", "zh", "zh-Hans", "zh-TW", "zh-Hant", "co", "hr", "cs", "da", "nl", "en", "eo", "et",
//-"fi", "fr", "fy", "gl", "ka", "de", "el", "gu", "ht", "ha", "haw", "he", "iw", "hi", "hmn", "hu", "is", "ig", "id", "in", "ga", "it", "ja", "jv", "kn", "kk", "km", "rw", "ko",
//-"ku", "ky", "lo", "la", "lv", "lt", "lb", "mk", "mg", "ms", "ml", "mt", "mi", "mr", "mn", "my", "ne", "no", "ny", "or", "ps", "fa", "pl", "pt", "pa", "ro", "ru", "sm", "gd", "sr",
//-"st", "sn", "sd", "si", "sk", "sl", "so", "es", "su", "sw", "sv", "tl", "tg", "ta", "tt", "te", "th", "tr", "tk", "uk", "ur", "ug", "uz", "vi", "cy", "xh", "yi", "ji", "yo", "zu"
translateMessageText chat_id:int53 message_id:int53 to_language_code:string = FormattedText;
//@description Recognizes speech in a video note or a voice note message. The message must be successfully sent and must not be scheduled. May return an error with a message "MSG_VOICE_TOO_LONG" if media duration is too big to be recognized //@description Recognizes speech in a video note or a voice note message. The message must be successfully sent and must not be scheduled. May return an error with a message "MSG_VOICE_TOO_LONG" if media duration is too big to be recognized
//@chat_id Identifier of the chat to which the message belongs //@chat_id Identifier of the chat to which the message belongs
@ -6256,6 +6443,25 @@ 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
//@chat_id Identifier of the chat with the bot
//@message_id Identifier of the message with the button
//@button_id Identifier of the button
//@shared_user_id Identifier of the shared user
//@only_check Pass true to check that the user 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;
//@description Shares a chat after pressing a keyboardButtonTypeRequestChat button with the bot
//@chat_id Identifier of the chat with the bot
//@message_id Identifier of the message with the button
//@button_id Identifier of the button
//@shared_chat_id Identifier of the shared chat
//@only_check Pass true to check that the chat can be shared by the button instead of actually sharing it. Doesn't check bot_is_member and bot_administrator_rights restrictions.
//-If the bot must be a member, then all chats from getGroupsInCommon and all chats, where the user can add the bot, are suitable. In the latter case the bot will be automatically added to the chat.
//-If the bot must be an administrator, then all chats, where the bot already has requested rights or can be added to administrators by the user, are suitable. In the latter case the bot will be automatically granted requested rights
shareChatWithBot chat_id:int53 message_id:int53 button_id:int32 shared_chat_id:int53 only_check:Bool = Ok;
//@description Sends an inline query to a bot and returns its results. Returns an error with code 502 if the bot fails to answer the query before the query timeout expires //@description Sends an inline query to a bot and returns its results. Returns an error with code 502 if the bot fails to answer the query before the query timeout expires
//@bot_user_id The identifier of the target bot //@bot_user_id The identifier of the target bot
//@chat_id Identifier of the chat where the query was sent //@chat_id Identifier of the chat where the query was sent
@ -6432,12 +6638,13 @@ createNewBasicGroupChat user_ids:vector<int53> title:string message_auto_delete_
//@description Creates a new supergroup or channel and sends a corresponding messageSupergroupChatCreate. Returns the newly created chat //@description Creates a new supergroup or channel and sends a corresponding messageSupergroupChatCreate. Returns the newly created chat
//@title Title of the new chat; 1-128 characters //@title Title of the new chat; 1-128 characters
//@is_channel Pass true to create a channel chat //@is_forum Pass true to create a forum supergroup chat
//@is_channel Pass true to create a channel chat; ignored if a forum is created
//@param_description Chat description; 0-255 characters //@param_description Chat description; 0-255 characters
//@location Chat location if a location-based supergroup is being created; pass null to create an ordinary supergroup chat //@location Chat location if a location-based supergroup is being created; pass null to create an ordinary supergroup chat
//@message_auto_delete_time Message auto-delete time value, in seconds; 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 Message auto-delete time value, in seconds; must be from 0 up to 365 * 86400 and be divisible by 86400. If 0, then messages aren't deleted automatically
//@for_import Pass true to create a supergroup for importing messages using importMessage //@for_import Pass true to create a supergroup for importing messages using importMessage
createNewSupergroupChat title:string is_channel:Bool description:string location:chatLocation message_auto_delete_time:int32 for_import:Bool = Chat; createNewSupergroupChat title:string is_forum:Bool is_channel:Bool description:string location:chatLocation message_auto_delete_time:int32 for_import:Bool = Chat;
//@description Creates a new secret chat. Returns the newly created chat @user_id Identifier of the target user //@description Creates a new secret chat. Returns the newly created chat @user_id Identifier of the target user
createNewSecretChat user_id:int53 = Chat; createNewSecretChat user_id:int53 = Chat;
@ -6513,6 +6720,9 @@ setChatNotificationSettings chat_id:int53 notification_settings:chatNotification
//@has_protected_content New value of has_protected_content //@has_protected_content New value of has_protected_content
toggleChatHasProtectedContent chat_id:int53 has_protected_content:Bool = Ok; toggleChatHasProtectedContent chat_id:int53 has_protected_content:Bool = Ok;
//@description Changes the tranlatable state of a chat; for Telegram Premium users only @chat_id Chat identifier @is_translatable New value of is_translatable
toggleChatIsTranslatable chat_id:int53 is_translatable:Bool = Ok;
//@description Changes the marked as unread state of a chat @chat_id Chat identifier @is_marked_as_unread New value of is_marked_as_unread //@description Changes the marked as unread state of a chat @chat_id Chat identifier @is_marked_as_unread New value of is_marked_as_unread
toggleChatIsMarkedAsUnread chat_id:int53 is_marked_as_unread:Bool = Ok; toggleChatIsMarkedAsUnread chat_id:int53 is_marked_as_unread:Bool = Ok;
@ -7090,15 +7300,18 @@ sharePhoneNumber user_id:int53 = Ok;
getUserProfilePhotos user_id:int53 offset:int32 limit:int32 = ChatPhotos; getUserProfilePhotos user_id:int53 offset:int32 limit:int32 = ChatPhotos;
//@description Returns stickers from the installed sticker sets that correspond to a given emoji or can be found by sticker-specific keywords. If the query is non-empty, then favorite, recently used or trending stickers may also be returned //@description Returns stickers from the installed sticker sets that correspond to any of the given emoji or can be found by sticker-specific keywords. If the query is non-empty, then favorite, recently used or trending stickers may also be returned
//@sticker_type Type of the stickers to return //@sticker_type Type of the stickers to return
//@query Search query; an emoji or a keyword prefix. If empty, returns all known installed stickers //@query Search query; a space-separated list of emoji or a keyword prefix. If empty, returns all known installed stickers
//@limit The maximum number of stickers to be returned //@limit The maximum number of stickers to be returned
//@chat_id Chat identifier for which to return stickers. Available custom emoji stickers may be different for different chats //@chat_id Chat identifier for which to return stickers. Available custom emoji stickers may be different for different chats
getStickers sticker_type:StickerType query:string limit:int32 chat_id:int53 = Stickers; getStickers sticker_type:StickerType query:string limit:int32 chat_id:int53 = Stickers;
//@description Searches for stickers from public sticker sets that correspond to a given emoji @emoji String representation of emoji; must be non-empty @limit The maximum number of stickers to be returned; 0-100 //@description Searches for stickers from public sticker sets that correspond to any of the given emoji
searchStickers emoji:string limit:int32 = Stickers; //@sticker_type Type of the stickers to return
//@emojis Space-separated list of emoji to search for; must be non-empty
//@limit The maximum number of stickers to be returned; 0-100
searchStickers sticker_type:StickerType emojis:string limit:int32 = Stickers;
//@description Returns premium stickers from regular sticker sets @limit The maximum number of stickers to be returned; 0-100 //@description Returns premium stickers from regular sticker sets @limit The maximum number of stickers to be returned; 0-100
getPremiumStickers limit:int32 = Stickers; getPremiumStickers limit:int32 = Stickers;
@ -7174,6 +7387,9 @@ getStickerEmojis sticker:InputFile = Emojis;
//@input_language_codes List of possible IETF language tags of the user's input language; may be empty if unknown //@input_language_codes List of possible IETF language tags of the user's input language; may be empty if unknown
searchEmojis text:string exact_match:Bool input_language_codes:vector<string> = Emojis; searchEmojis text:string exact_match:Bool input_language_codes:vector<string> = Emojis;
//@description Returns available emojis categories @type Type of emoji categories to return; pass null to get default emoji categories
getEmojiCategories type:EmojiCategoryType = EmojiCategories;
//@description Returns an animated emoji corresponding to a given emoji. Returns a 404 error if the emoji has no animated emoji @emoji The emoji //@description Returns an animated emoji corresponding to a given emoji. Returns a 404 error if the emoji has no animated emoji @emoji The emoji
getAnimatedEmoji emoji:string = AnimatedEmoji; getAnimatedEmoji emoji:string = AnimatedEmoji;
@ -7183,6 +7399,12 @@ getEmojiSuggestionsUrl language_code:string = HttpUrl;
//@description Returns list of custom emoji stickers by their identifiers. Stickers are returned in arbitrary order. Only found stickers are returned @custom_emoji_ids Identifiers of custom emoji stickers. At most 200 custom emoji stickers can be received simultaneously //@description Returns list of custom emoji stickers by their identifiers. Stickers are returned in arbitrary order. Only found stickers are returned @custom_emoji_ids Identifiers of custom emoji stickers. At most 200 custom emoji stickers can be received simultaneously
getCustomEmojiStickers custom_emoji_ids:vector<int64> = Stickers; getCustomEmojiStickers custom_emoji_ids:vector<int64> = Stickers;
//@description Returns default list of custom emoji stickers for placing on a chat photo
getDefaultChatPhotoCustomEmojiStickers = Stickers;
//@description Returns default list of custom emoji stickers for placing on a profile photo
getDefaultProfilePhotoCustomEmojiStickers = Stickers;
//@description Returns saved animations //@description Returns saved animations
getSavedAnimations = Animations; getSavedAnimations = Animations;
@ -7213,7 +7435,9 @@ getWebPagePreview text:formattedText = WebPage;
getWebPageInstantView url:string force_full:Bool = WebPageInstantView; getWebPageInstantView url:string force_full:Bool = WebPageInstantView;
//@description Changes a profile photo for the current user @photo Profile photo to set @is_public Pass true to set a public photo, which will be visible even the main photo is hidden by privacy settings //@description Changes a profile photo for the current user
//@photo Profile photo to set
//@is_public Pass true to set a public photo, which will be visible even the main photo is hidden by privacy settings
setProfilePhoto photo:InputChatPhoto is_public:Bool = Ok; setProfilePhoto photo:InputChatPhoto is_public:Bool = Ok;
//@description Deletes a profile photo @profile_photo_id Identifier of the profile photo to delete //@description Deletes a profile photo @profile_photo_id Identifier of the profile photo to delete
@ -7275,7 +7499,7 @@ setCommands scope:BotCommandScope language_code:string commands:vector<botComman
//@language_code A two-letter ISO 639-1 language code or an empty string //@language_code A two-letter ISO 639-1 language code or an empty string
deleteCommands scope:BotCommandScope language_code:string = Ok; deleteCommands scope:BotCommandScope language_code:string = Ok;
//@description Returns the list of commands supported by the bot for the given user scope and language; for bots only //@description Returns list of commands supported by the bot for the given user scope and language; for bots only
//@scope The scope to which the commands are relevant; pass null to get commands in the default bot command scope //@scope The scope to which the commands are relevant; pass null to get commands in the default bot command scope
//@language_code A two-letter ISO 639-1 language code or an empty string //@language_code A two-letter ISO 639-1 language code or an empty string
getCommands scope:BotCommandScope language_code:string = BotCommands; getCommands scope:BotCommandScope language_code:string = BotCommands;
@ -7357,7 +7581,9 @@ toggleSupergroupJoinByRequest supergroup_id:int53 join_by_request:Bool = Ok;
//@description Toggles whether the message history of a supergroup is available to new members; requires can_change_info administrator right @supergroup_id The identifier of the supergroup @is_all_history_available The new value of is_all_history_available //@description Toggles whether the message history of a supergroup is available to new members; requires can_change_info administrator right @supergroup_id The identifier of the supergroup @is_all_history_available The new value of is_all_history_available
toggleSupergroupIsAllHistoryAvailable supergroup_id:int53 is_all_history_available:Bool = Ok; toggleSupergroupIsAllHistoryAvailable supergroup_id:int53 is_all_history_available:Bool = Ok;
//@description Toggles whether non-administrators can receive only administrators and bots using getSupergroupMembers or searchChatMembers. Can be called only if supergroupFullInfo.can_hide_members == true @supergroup_id Identifier of the supergroup @has_hidden_members New value of has_hidden_members //@description Toggles whether non-administrators can receive only administrators and bots using getSupergroupMembers or searchChatMembers. Can be called only if supergroupFullInfo.can_hide_members == true
//@supergroup_id Identifier of the supergroup
//@has_hidden_members New value of has_hidden_members
toggleSupergroupHasHiddenMembers supergroup_id:int53 has_hidden_members:Bool = Ok; toggleSupergroupHasHiddenMembers supergroup_id:int53 has_hidden_members:Bool = Ok;
//@description Toggles whether aggressive anti-spam checks are enabled in the supergroup. Can be called only if supergroupFullInfo.can_toggle_aggressive_anti_spam == true //@description Toggles whether aggressive anti-spam checks are enabled in the supergroup. Can be called only if supergroupFullInfo.can_toggle_aggressive_anti_spam == true
@ -7365,7 +7591,7 @@ toggleSupergroupHasHiddenMembers supergroup_id:int53 has_hidden_members:Bool = O
//@has_aggressive_anti_spam_enabled The new value of has_aggressive_anti_spam_enabled //@has_aggressive_anti_spam_enabled The new value of has_aggressive_anti_spam_enabled
toggleSupergroupHasAggressiveAntiSpamEnabled supergroup_id:int53 has_aggressive_anti_spam_enabled:Bool = Ok; toggleSupergroupHasAggressiveAntiSpamEnabled supergroup_id:int53 has_aggressive_anti_spam_enabled:Bool = Ok;
//@description Toggles whether the supergroup is a forum; requires owner privileges in the supergroup @supergroup_id Identifier of the supergroup @is_forum New value of is_forum. A supergroup can be converted to a forum, only if it has at least getOption("forum_member_count_min") members //@description Toggles whether the supergroup is a forum; requires owner privileges in the supergroup. Discussion supergroups can't be converted to forums @supergroup_id Identifier of the supergroup @is_forum New value of is_forum
toggleSupergroupIsForum supergroup_id:int53 is_forum:Bool = Ok; toggleSupergroupIsForum supergroup_id:int53 is_forum:Bool = Ok;
//@description Upgrades supergroup to a broadcast group; requires owner privileges in the supergroup @supergroup_id Identifier of the supergroup //@description Upgrades supergroup to a broadcast group; requires owner privileges in the supergroup @supergroup_id Identifier of the supergroup
@ -7627,6 +7853,15 @@ getAutoDownloadSettingsPresets = AutoDownloadSettingsPresets;
//@description Sets auto-download settings @settings New user auto-download settings @type Type of the network for which the new settings are relevant //@description Sets auto-download settings @settings New user auto-download settings @type Type of the network for which the new settings are relevant
setAutoDownloadSettings settings:autoDownloadSettings type:NetworkType = Ok; setAutoDownloadSettings settings:autoDownloadSettings type:NetworkType = Ok;
//@description Returns autosave settings for the current user
getAutosaveSettings = AutosaveSettings;
//@description Sets autosave settings for the given scope @scope Autosave settings scope @settings New autosave settings for the scope; pass null to set autosave settings to default
setAutosaveSettings scope:AutosaveSettingsScope settings:scopeAutosaveSettings = Ok;
//@description Clears the list of all autosave settings exceptions
clearAutosaveSettingsExceptions = Ok;
//@description Returns information about a bank card @bank_card_number The bank card number //@description Returns information about a bank card @bank_card_number The bank card number
getBankCardInfo bank_card_number:string = BankCardInfo; getBankCardInfo bank_card_number:string = BankCardInfo;