Update to TDLib 1.8.22

This commit is contained in:
c0re100 2023-12-03 07:26:26 +08:00
parent 563cd7d677
commit af41176160
No known key found for this signature in database
GPG key ID: 7C3B3004FE745AAF
4 changed files with 1731 additions and 197 deletions

View file

@ -1313,7 +1313,7 @@ type GetRepliedMessageRequest struct {
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, messageChatSetBackground and topic messages without replied message respectively
// Returns information about a non-bundled message that is replied by a given message. Also, returns the pinned message, the game message, the invoice message, the message with a previously set same background, and the topic creation message for messages of the types messagePinMessage, messageGameScore, messagePaymentSuccessful, messageChatSetBackground and topic messages without non-bundled replied message respectively
func (client *Client) GetRepliedMessage(req *GetRepliedMessageRequest) (*Message, error) {
result, err := client.Send(Request{
meta: meta{
@ -1729,6 +1729,61 @@ func (client *Client) SearchChatsNearby(req *SearchChatsNearbyRequest) (*ChatsNe
return UnmarshalChatsNearby(result.Data)
}
type GetChatSimilarChatsRequest struct {
// Identifier of the target chat; must be an identifier of a channel chat
ChatId int64 `json:"chat_id"`
}
// Returns a list of chats similar to the given chat
func (client *Client) GetChatSimilarChats(req *GetChatSimilarChatsRequest) (*Chats, error) {
result, err := client.Send(Request{
meta: meta{
Type: "getChatSimilarChats",
},
Data: map[string]interface{}{
"chat_id": req.ChatId,
},
})
if err != nil {
return nil, err
}
if result.Type == "error" {
return nil, buildResponseError(result.Data)
}
return UnmarshalChats(result.Data)
}
type GetChatSimilarChatCountRequest struct {
// Identifier of the target chat; must be an identifier of a channel chat
ChatId int64 `json:"chat_id"`
// Pass true to get the number of chats without sending network requests, or -1 if the number of chats is unknown locally
ReturnLocal bool `json:"return_local"`
}
// Returns approximate number of chats similar to the given chat
func (client *Client) GetChatSimilarChatCount(req *GetChatSimilarChatCountRequest) (*Count, error) {
result, err := client.Send(Request{
meta: meta{
Type: "getChatSimilarChatCount",
},
Data: map[string]interface{}{
"chat_id": req.ChatId,
"return_local": req.ReturnLocal,
},
})
if err != nil {
return nil, err
}
if result.Type == "error" {
return nil, buildResponseError(result.Data)
}
return UnmarshalCount(result.Data)
}
type GetTopChatsRequest struct {
// Category of chats to be returned
Category TopChatCategory `json:"category"`
@ -2949,7 +3004,7 @@ type RecognizeSpeechRequest struct {
MessageId int64 `json:"message_id"`
}
// 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
// Recognizes speech in a video note or a voice note message. The message must be successfully sent, must not be scheduled, and must be from a non-secret chat
func (client *Client) RecognizeSpeech(req *RecognizeSpeechRequest) (*Ok, error) {
result, err := client.Send(Request{
meta: meta{
@ -3263,7 +3318,7 @@ type ResendMessagesRequest struct {
// Identifiers of the messages to resend. Message identifiers must be in a strictly increasing order
MessageIds []int64 `json:"message_ids"`
// New manually chosen quote from the message to be replied; pass null if none. Ignored if more than one message is re-sent, or if messageSendingStateFailed.need_another_reply_quote == false
Quote *FormattedText `json:"quote"`
Quote *InputTextQuote `json:"quote"`
}
// Resends messages which failed to send. Can be called only for messages for which messageSendingStateFailed.can_retry is true and after specified in messageSendingStateFailed.retry_after time passed. If a message is re-sent, the corresponding failed to send message is deleted. Returns the sent messages in the same order as the message identifiers passed in message_ids. If a message can't be re-sent, null will be returned instead of the message
@ -7270,15 +7325,17 @@ func (client *Client) SetChatPermissions(req *SetChatPermissionsRequest) (*Ok, e
type SetChatBackgroundRequest struct {
// Chat identifier
ChatId int64 `json:"chat_id"`
// The input background to use; pass null to create a new filled background or to remove the current background
// The input background to use; pass null to create a new filled background
Background InputBackground `json:"background"`
// Background type; pass null to remove the current background
// Background type; pass null to use default background type for the chosen background
Type BackgroundType `json:"type"`
// Dimming of the background in dark themes, as a percentage; 0-100
DarkThemeDimming int32 `json:"dark_theme_dimming"`
// Pass true to set background only for self; pass false to set background for both chat users. Background can be set for both users only by Telegram Premium users and if set background isn't of the type inputBackgroundPrevious
OnlyForSelf bool `json:"only_for_self"`
}
// Changes the background in a specific chat. Supported only in private and secret chats with non-deleted users
// Sets the background in a specific chat. Supported only in private and secret chats with non-deleted users
func (client *Client) SetChatBackground(req *SetChatBackgroundRequest) (*Ok, error) {
result, err := client.Send(Request{
meta: meta{
@ -7289,6 +7346,36 @@ func (client *Client) SetChatBackground(req *SetChatBackgroundRequest) (*Ok, err
"background": req.Background,
"type": req.Type,
"dark_theme_dimming": req.DarkThemeDimming,
"only_for_self": req.OnlyForSelf,
},
})
if err != nil {
return nil, err
}
if result.Type == "error" {
return nil, buildResponseError(result.Data)
}
return UnmarshalOk(result.Data)
}
type DeleteChatBackgroundRequest struct {
// Chat identifier
ChatId int64 `json:"chat_id"`
// Pass true to restore previously set background. Can be used only in private and secret chats with non-deleted users if userFullInfo.set_chat_background == true. Supposed to be used from messageChatSetBackground messages with the currently set background that was set for both sides by the other user
RestorePrevious bool `json:"restore_previous"`
}
// Deletes background in a specific chat
func (client *Client) DeleteChatBackground(req *DeleteChatBackgroundRequest) (*Ok, error) {
result, err := client.Send(Request{
meta: meta{
Type: "deleteChatBackground",
},
Data: map[string]interface{}{
"chat_id": req.ChatId,
"restore_previous": req.RestorePrevious,
},
})
if err != nil {
@ -7421,6 +7508,35 @@ func (client *Client) ToggleChatHasProtectedContent(req *ToggleChatHasProtectedC
return UnmarshalOk(result.Data)
}
type ToggleChatViewAsTopicsRequest struct {
// Chat identifier
ChatId int64 `json:"chat_id"`
// New value of view_as_topics
ViewAsTopics bool `json:"view_as_topics"`
}
// Changes the view_as_topics setting of a forum chat
func (client *Client) ToggleChatViewAsTopics(req *ToggleChatViewAsTopicsRequest) (*Ok, error) {
result, err := client.Send(Request{
meta: meta{
Type: "toggleChatViewAsTopics",
},
Data: map[string]interface{}{
"chat_id": req.ChatId,
"view_as_topics": req.ViewAsTopics,
},
})
if err != nil {
return nil, err
}
if result.Type == "error" {
return nil, buildResponseError(result.Data)
}
return UnmarshalOk(result.Data)
}
type ToggleChatIsTranslatableRequest struct {
// Chat identifier
ChatId int64 `json:"chat_id"`
@ -7428,7 +7544,7 @@ type ToggleChatIsTranslatableRequest struct {
IsTranslatable bool `json:"is_translatable"`
}
// Changes the translatable state of a chat; for Telegram Premium users only
// Changes the translatable state of a chat
func (client *Client) ToggleChatIsTranslatable(req *ToggleChatIsTranslatableRequest) (*Ok, error) {
result, err := client.Send(Request{
meta: meta{
@ -7511,7 +7627,7 @@ func (client *Client) ToggleChatDefaultDisableNotification(req *ToggleChatDefaul
type SetChatAvailableReactionsRequest struct {
// Identifier of the chat
ChatId int64 `json:"chat_id"`
// Reactions available in the chat. All emoji reactions must be active
// Reactions available in the chat. All explicitly specified emoji reactions must be active. Up to the chat's boost level custom emoji reactions can be explicitly specified
AvailableReactions ChatAvailableReactions `json:"available_reactions"`
}
@ -8561,6 +8677,8 @@ type SendStoryRequest struct {
PrivacySettings StoryPrivacySettings `json:"privacy_settings"`
// Period after which the story is moved to archive, in seconds; must be one of 6 * 3600, 12 * 3600, 86400, or 2 * 86400 for Telegram Premium users, and 86400 otherwise
ActivePeriod int32 `json:"active_period"`
// Full identifier of the original story, which content was used to create the story
FromStoryFullId *StoryFullId `json:"from_story_full_id"`
// Pass true to keep the story accessible after expiration
IsPinned bool `json:"is_pinned"`
// Pass true if the content of the story must be protected from forwarding and screenshotting
@ -8580,6 +8698,7 @@ func (client *Client) SendStory(req *SendStoryRequest) (*Story, error) {
"caption": req.Caption,
"privacy_settings": req.PrivacySettings,
"active_period": req.ActivePeriod,
"from_story_full_id": req.FromStoryFullId,
"is_pinned": req.IsPinned,
"protect_content": req.ProtectContent,
},
@ -9104,6 +9223,41 @@ func (client *Client) ActivateStoryStealthMode() (*Ok, error) {
return UnmarshalOk(result.Data)
}
type GetStoryPublicForwardsRequest struct {
// The identifier of the sender of the story
StorySenderChatId int64 `json:"story_sender_chat_id"`
// The identifier of the story
StoryId int32 `json:"story_id"`
// Offset of the first entry to return as received from the previous request; use empty string to get the first chunk of results
Offset string `json:"offset"`
// The maximum number of messages and stories to be returned; must be positive and can't be greater than 100. For optimal performance, the number of returned objects is chosen by TDLib and can be smaller than the specified limit
Limit int32 `json:"limit"`
}
// Returns forwards of a story as a message to public chats and reposts by public channels. Can be used only if the story is posted on behalf of the current user or story.can_get_statistics == true. For optimal performance, the number of returned messages and stories is chosen by TDLib
func (client *Client) GetStoryPublicForwards(req *GetStoryPublicForwardsRequest) (*StoryPublicForwards, error) {
result, err := client.Send(Request{
meta: meta{
Type: "getStoryPublicForwards",
},
Data: map[string]interface{}{
"story_sender_chat_id": req.StorySenderChatId,
"story_id": req.StoryId,
"offset": req.Offset,
"limit": req.Limit,
},
})
if err != nil {
return nil, err
}
if result.Type == "error" {
return nil, buildResponseError(result.Data)
}
return UnmarshalStoryPublicForwards(result.Data)
}
// Returns the list of available chat boost slots for the current user
func (client *Client) GetAvailableChatBoostSlots() (*ChatBoostSlots, error) {
result, err := client.Send(Request{
@ -9562,7 +9716,7 @@ type PreliminaryUploadFileRequest struct {
Priority int32 `json:"priority"`
}
// Preliminary uploads a file to the cloud before sending it in a message, which can be useful for uploading of being recorded voice and video notes. Updates updateFile will be used to notify about upload progress and successful completion of the upload. The file will not have a persistent remote identifier until it will be sent in a message
// Preliminary uploads a file to the cloud before sending it in a message, which can be useful for uploading of being recorded voice and video notes. Updates updateFile will be used to notify about upload progress and successful completion of the upload. The file will not have a persistent remote identifier until it is sent in a message
func (client *Client) PreliminaryUploadFile(req *PreliminaryUploadFileRequest) (*File, error) {
result, err := client.Send(Request{
meta: meta{
@ -10946,7 +11100,7 @@ type ToggleGroupCallEnabledStartNotificationRequest struct {
EnabledStartNotification bool `json:"enabled_start_notification"`
}
// Toggles whether the current user will receive a notification when the group call will start; scheduled group calls only
// Toggles whether the current user will receive a notification when the group call starts; scheduled group calls only
func (client *Client) ToggleGroupCallEnabledStartNotification(req *ToggleGroupCallEnabledStartNotificationRequest) (*Ok, error) {
result, err := client.Send(Request{
meta: meta{
@ -12438,17 +12592,20 @@ func (client *Client) SearchInstalledStickerSets(req *SearchInstalledStickerSets
}
type SearchStickerSetsRequest struct {
// Type of the sticker sets to return
StickerType StickerType `json:"sticker_type"`
// Query to search for
Query string `json:"query"`
}
// Searches for ordinary sticker sets by looking for specified query in their title and name. Excludes installed sticker sets from the results
// Searches for sticker sets by looking for specified query in their title and name. Excludes installed sticker sets from the results
func (client *Client) SearchStickerSets(req *SearchStickerSetsRequest) (*StickerSets, error) {
result, err := client.Send(Request{
meta: meta{
Type: "searchStickerSets",
},
Data: map[string]interface{}{
"sticker_type": req.StickerType,
"query": req.Query,
},
})
@ -13237,6 +13394,35 @@ func (client *Client) SetAccentColor(req *SetAccentColorRequest) (*Ok, error) {
return UnmarshalOk(result.Data)
}
type SetProfileAccentColorRequest struct {
// Identifier of the accent color to use for profile; pass -1 if none
ProfileAccentColorId int32 `json:"profile_accent_color_id"`
// Identifier of a custom emoji to be shown in the on the user's profile photo background; 0 if none
ProfileBackgroundCustomEmojiId JsonInt64 `json:"profile_background_custom_emoji_id"`
}
// Changes accent color and background custom emoji for profile of the current user; for Telegram Premium users only
func (client *Client) SetProfileAccentColor(req *SetProfileAccentColorRequest) (*Ok, error) {
result, err := client.Send(Request{
meta: meta{
Type: "setProfileAccentColor",
},
Data: map[string]interface{}{
"profile_accent_color_id": req.ProfileAccentColorId,
"profile_background_custom_emoji_id": req.ProfileBackgroundCustomEmojiId,
},
})
if err != nil {
return nil, err
}
if result.Type == "error" {
return nil, buildResponseError(result.Data)
}
return UnmarshalOk(result.Data)
}
type SetNameRequest struct {
// The new value of the first name for the current user; 1-64 characters
FirstName string `json:"first_name"`
@ -16098,6 +16284,38 @@ func (client *Client) GetMessagePublicForwards(req *GetMessagePublicForwardsRequ
return UnmarshalFoundMessages(result.Data)
}
type GetStoryStatisticsRequest struct {
// Chat identifier
ChatId int64 `json:"chat_id"`
// Story identifier
StoryId int32 `json:"story_id"`
// Pass true if a dark theme is used by the application
IsDark bool `json:"is_dark"`
}
// Returns detailed statistics about a story. Can be used only if story.can_get_statistics == true
func (client *Client) GetStoryStatistics(req *GetStoryStatisticsRequest) (*StoryStatistics, error) {
result, err := client.Send(Request{
meta: meta{
Type: "getStoryStatistics",
},
Data: map[string]interface{}{
"chat_id": req.ChatId,
"story_id": req.StoryId,
"is_dark": req.IsDark,
},
})
if err != nil {
return nil, err
}
if result.Type == "error" {
return nil, buildResponseError(result.Data)
}
return UnmarshalStoryStatistics(result.Data)
}
type GetStatisticalGraphRequest struct {
// Chat identifier
ChatId int64 `json:"chat_id"`
@ -19270,6 +19488,9 @@ func (client *Client) TestUseUpdate() (Update, error) {
case TypeUpdateChatIsMarkedAsUnread:
return UnmarshalUpdateChatIsMarkedAsUnread(result.Data)
case TypeUpdateChatViewAsTopics:
return UnmarshalUpdateChatViewAsTopics(result.Data)
case TypeUpdateChatBlockList:
return UnmarshalUpdateChatBlockList(result.Data)
@ -19429,6 +19650,9 @@ func (client *Client) TestUseUpdate() (Update, error) {
case TypeUpdateAccentColors:
return UnmarshalUpdateAccentColors(result.Data)
case TypeUpdateProfileAccentColors:
return UnmarshalUpdateProfileAccentColors(result.Data)
case TypeUpdateLanguagePackStrings:
return UnmarshalUpdateLanguagePackStrings(result.Data)
@ -19456,6 +19680,9 @@ func (client *Client) TestUseUpdate() (Update, error) {
case TypeUpdateDefaultReactionType:
return UnmarshalUpdateDefaultReactionType(result.Data)
case TypeUpdateSpeechRecognitionTrial:
return UnmarshalUpdateSpeechRecognitionTrial(result.Data)
case TypeUpdateDiceEmojis:
return UnmarshalUpdateDiceEmojis(result.Data)

File diff suppressed because it is too large Load diff

View file

@ -1160,6 +1160,9 @@ func UnmarshalMessageSponsorType(data json.RawMessage) (MessageSponsorType, erro
case TypeMessageSponsorTypeBot:
return UnmarshalMessageSponsorTypeBot(data)
case TypeMessageSponsorTypeWebApp:
return UnmarshalMessageSponsorTypeWebApp(data)
case TypeMessageSponsorTypePublicChannel:
return UnmarshalMessageSponsorTypePublicChannel(data)
@ -2535,6 +2538,9 @@ func UnmarshalMessageContent(data json.RawMessage) (MessageContent, error) {
case TypeMessagePremiumGiveaway:
return UnmarshalMessagePremiumGiveaway(data)
case TypeMessagePremiumGiveawayCompleted:
return UnmarshalMessagePremiumGiveawayCompleted(data)
case TypeMessageContactRegistered:
return UnmarshalMessageContactRegistered(data)
@ -3242,6 +3248,74 @@ func UnmarshalListOfStoryList(dataList []json.RawMessage) ([]StoryList, error) {
return list, nil
}
func UnmarshalStoryOrigin(data json.RawMessage) (StoryOrigin, error) {
var meta meta
err := json.Unmarshal(data, &meta)
if err != nil {
return nil, err
}
switch meta.Type {
case TypeStoryOriginPublicStory:
return UnmarshalStoryOriginPublicStory(data)
case TypeStoryOriginHiddenUser:
return UnmarshalStoryOriginHiddenUser(data)
default:
return nil, fmt.Errorf("Error unmarshaling. Unknown type: " + meta.Type)
}
}
func UnmarshalListOfStoryOrigin(dataList []json.RawMessage) ([]StoryOrigin, error) {
list := []StoryOrigin{}
for _, data := range dataList {
entity, err := UnmarshalStoryOrigin(data)
if err != nil {
return nil, err
}
list = append(list, entity)
}
return list, nil
}
func UnmarshalStoryPublicForward(data json.RawMessage) (StoryPublicForward, error) {
var meta meta
err := json.Unmarshal(data, &meta)
if err != nil {
return nil, err
}
switch meta.Type {
case TypeStoryPublicForwardMessage:
return UnmarshalStoryPublicForwardMessage(data)
case TypeStoryPublicForwardStory:
return UnmarshalStoryPublicForwardStory(data)
default:
return nil, fmt.Errorf("Error unmarshaling. Unknown type: " + meta.Type)
}
}
func UnmarshalListOfStoryPublicForward(dataList []json.RawMessage) ([]StoryPublicForward, error) {
list := []StoryPublicForward{}
for _, data := range dataList {
entity, err := UnmarshalStoryPublicForward(data)
if err != nil {
return nil, err
}
list = append(list, entity)
}
return list, nil
}
func UnmarshalChatBoostSource(data json.RawMessage) (ChatBoostSource, error) {
var meta meta
@ -4101,6 +4175,9 @@ func UnmarshalPremiumLimitType(data json.RawMessage) (PremiumLimitType, error) {
case TypePremiumLimitTypeStorySuggestedReactionAreaCount:
return UnmarshalPremiumLimitTypeStorySuggestedReactionAreaCount(data)
case TypePremiumLimitTypeSimilarChatCount:
return UnmarshalPremiumLimitTypeSimilarChatCount(data)
default:
return nil, fmt.Errorf("Error unmarshaling. Unknown type: " + meta.Type)
}
@ -4183,6 +4260,9 @@ func UnmarshalPremiumFeature(data json.RawMessage) (PremiumFeature, error) {
case TypePremiumFeatureAccentColor:
return UnmarshalPremiumFeatureAccentColor(data)
case TypePremiumFeatureBackgroundForBoth:
return UnmarshalPremiumFeatureBackgroundForBoth(data)
default:
return nil, fmt.Errorf("Error unmarshaling. Unknown type: " + meta.Type)
}
@ -6088,6 +6168,40 @@ func UnmarshalListOfStatisticalGraph(dataList []json.RawMessage) ([]StatisticalG
return list, nil
}
func UnmarshalChatStatisticsObjectType(data json.RawMessage) (ChatStatisticsObjectType, error) {
var meta meta
err := json.Unmarshal(data, &meta)
if err != nil {
return nil, err
}
switch meta.Type {
case TypeChatStatisticsObjectTypeMessage:
return UnmarshalChatStatisticsObjectTypeMessage(data)
case TypeChatStatisticsObjectTypeStory:
return UnmarshalChatStatisticsObjectTypeStory(data)
default:
return nil, fmt.Errorf("Error unmarshaling. Unknown type: " + meta.Type)
}
}
func UnmarshalListOfChatStatisticsObjectType(dataList []json.RawMessage) ([]ChatStatisticsObjectType, error) {
list := []ChatStatisticsObjectType{}
for _, data := range dataList {
entity, err := UnmarshalChatStatisticsObjectType(data)
if err != nil {
return nil, err
}
list = append(list, entity)
}
return list, nil
}
func UnmarshalChatStatistics(data json.RawMessage) (ChatStatistics, error) {
var meta meta
@ -6334,6 +6448,9 @@ func UnmarshalUpdate(data json.RawMessage) (Update, error) {
case TypeUpdateChatIsMarkedAsUnread:
return UnmarshalUpdateChatIsMarkedAsUnread(data)
case TypeUpdateChatViewAsTopics:
return UnmarshalUpdateChatViewAsTopics(data)
case TypeUpdateChatBlockList:
return UnmarshalUpdateChatBlockList(data)
@ -6493,6 +6610,9 @@ func UnmarshalUpdate(data json.RawMessage) (Update, error) {
case TypeUpdateAccentColors:
return UnmarshalUpdateAccentColors(data)
case TypeUpdateProfileAccentColors:
return UnmarshalUpdateProfileAccentColors(data)
case TypeUpdateLanguagePackStrings:
return UnmarshalUpdateLanguagePackStrings(data)
@ -6520,6 +6640,9 @@ func UnmarshalUpdate(data json.RawMessage) (Update, error) {
case TypeUpdateDefaultReactionType:
return UnmarshalUpdateDefaultReactionType(data)
case TypeUpdateSpeechRecognitionTrial:
return UnmarshalUpdateSpeechRecognitionTrial(data)
case TypeUpdateDiceEmojis:
return UnmarshalUpdateDiceEmojis(data)
@ -7625,6 +7748,22 @@ func UnmarshalAccentColor(data json.RawMessage) (*AccentColor, error) {
return &resp, err
}
func UnmarshalProfileAccentColors(data json.RawMessage) (*ProfileAccentColors, error) {
var resp ProfileAccentColors
err := json.Unmarshal(data, &resp)
return &resp, err
}
func UnmarshalProfileAccentColor(data json.RawMessage) (*ProfileAccentColor, error) {
var resp ProfileAccentColor
err := json.Unmarshal(data, &resp)
return &resp, err
}
func UnmarshalEmojiStatus(data json.RawMessage) (*EmojiStatus, error) {
var resp EmojiStatus
@ -8217,6 +8356,22 @@ func UnmarshalMessageSendingStateFailed(data json.RawMessage) (*MessageSendingSt
return &resp, err
}
func UnmarshalTextQuote(data json.RawMessage) (*TextQuote, error) {
var resp TextQuote
err := json.Unmarshal(data, &resp)
return &resp, err
}
func UnmarshalInputTextQuote(data json.RawMessage) (*InputTextQuote, error) {
var resp InputTextQuote
err := json.Unmarshal(data, &resp)
return &resp, err
}
func UnmarshalMessageReplyToMessage(data json.RawMessage) (*MessageReplyToMessage, error) {
var resp MessageReplyToMessage
@ -8401,6 +8556,14 @@ func UnmarshalMessageSponsorTypeBot(data json.RawMessage) (*MessageSponsorTypeBo
return &resp, err
}
func UnmarshalMessageSponsorTypeWebApp(data json.RawMessage) (*MessageSponsorTypeWebApp, error) {
var resp MessageSponsorTypeWebApp
err := json.Unmarshal(data, &resp)
return &resp, err
}
func UnmarshalMessageSponsorTypePublicChannel(data json.RawMessage) (*MessageSponsorTypePublicChannel, error) {
var resp MessageSponsorTypePublicChannel
@ -10801,6 +10964,14 @@ func UnmarshalMessagePremiumGiveaway(data json.RawMessage) (*MessagePremiumGivea
return &resp, err
}
func UnmarshalMessagePremiumGiveawayCompleted(data json.RawMessage) (*MessagePremiumGiveawayCompleted, error) {
var resp MessagePremiumGiveawayCompleted
err := json.Unmarshal(data, &resp)
return &resp, err
}
func UnmarshalMessageContactRegistered(data json.RawMessage) (*MessageContactRegistered, error) {
var resp MessageContactRegistered
@ -11809,6 +11980,30 @@ func UnmarshalStoryListArchive(data json.RawMessage) (*StoryListArchive, error)
return &resp, err
}
func UnmarshalStoryOriginPublicStory(data json.RawMessage) (*StoryOriginPublicStory, error) {
var resp StoryOriginPublicStory
err := json.Unmarshal(data, &resp)
return &resp, err
}
func UnmarshalStoryOriginHiddenUser(data json.RawMessage) (*StoryOriginHiddenUser, error) {
var resp StoryOriginHiddenUser
err := json.Unmarshal(data, &resp)
return &resp, err
}
func UnmarshalStoryRepostInfo(data json.RawMessage) (*StoryRepostInfo, error) {
var resp StoryRepostInfo
err := json.Unmarshal(data, &resp)
return &resp, err
}
func UnmarshalStoryInteractionInfo(data json.RawMessage) (*StoryInteractionInfo, error) {
var resp StoryInteractionInfo
@ -11833,6 +12028,14 @@ func UnmarshalStories(data json.RawMessage) (*Stories, error) {
return &resp, err
}
func UnmarshalStoryFullId(data json.RawMessage) (*StoryFullId, error) {
var resp StoryFullId
err := json.Unmarshal(data, &resp)
return &resp, err
}
func UnmarshalStoryInfo(data json.RawMessage) (*StoryInfo, error) {
var resp StoryInfo
@ -11849,6 +12052,30 @@ func UnmarshalChatActiveStories(data json.RawMessage) (*ChatActiveStories, error
return &resp, err
}
func UnmarshalStoryPublicForwardMessage(data json.RawMessage) (*StoryPublicForwardMessage, error) {
var resp StoryPublicForwardMessage
err := json.Unmarshal(data, &resp)
return &resp, err
}
func UnmarshalStoryPublicForwardStory(data json.RawMessage) (*StoryPublicForwardStory, error) {
var resp StoryPublicForwardStory
err := json.Unmarshal(data, &resp)
return &resp, err
}
func UnmarshalStoryPublicForwards(data json.RawMessage) (*StoryPublicForwards, error) {
var resp StoryPublicForwards
err := json.Unmarshal(data, &resp)
return &resp, err
}
func UnmarshalChatBoostSourceGiftCode(data json.RawMessage) (*ChatBoostSourceGiftCode, error) {
var resp ChatBoostSourceGiftCode
@ -13281,6 +13508,14 @@ func UnmarshalPremiumLimitTypeStorySuggestedReactionAreaCount(data json.RawMessa
return &resp, err
}
func UnmarshalPremiumLimitTypeSimilarChatCount(data json.RawMessage) (*PremiumLimitTypeSimilarChatCount, error) {
var resp PremiumLimitTypeSimilarChatCount
err := json.Unmarshal(data, &resp)
return &resp, err
}
func UnmarshalPremiumFeatureIncreasedLimits(data json.RawMessage) (*PremiumFeatureIncreasedLimits, error) {
var resp PremiumFeatureIncreasedLimits
@ -13425,6 +13660,14 @@ func UnmarshalPremiumFeatureAccentColor(data json.RawMessage) (*PremiumFeatureAc
return &resp, err
}
func UnmarshalPremiumFeatureBackgroundForBoth(data json.RawMessage) (*PremiumFeatureBackgroundForBoth, error) {
var resp PremiumFeatureBackgroundForBoth
err := json.Unmarshal(data, &resp)
return &resp, err
}
func UnmarshalPremiumStoryFeaturePriorityOrder(data json.RawMessage) (*PremiumStoryFeaturePriorityOrder, error) {
var resp PremiumStoryFeaturePriorityOrder
@ -16025,8 +16268,24 @@ func UnmarshalStatisticalGraphError(data json.RawMessage) (*StatisticalGraphErro
return &resp, err
}
func UnmarshalChatStatisticsMessageInteractionInfo(data json.RawMessage) (*ChatStatisticsMessageInteractionInfo, error) {
var resp ChatStatisticsMessageInteractionInfo
func UnmarshalChatStatisticsObjectTypeMessage(data json.RawMessage) (*ChatStatisticsObjectTypeMessage, error) {
var resp ChatStatisticsObjectTypeMessage
err := json.Unmarshal(data, &resp)
return &resp, err
}
func UnmarshalChatStatisticsObjectTypeStory(data json.RawMessage) (*ChatStatisticsObjectTypeStory, error) {
var resp ChatStatisticsObjectTypeStory
err := json.Unmarshal(data, &resp)
return &resp, err
}
func UnmarshalChatStatisticsInteractionInfo(data json.RawMessage) (*ChatStatisticsInteractionInfo, error) {
var resp ChatStatisticsInteractionInfo
err := json.Unmarshal(data, &resp)
@ -16081,6 +16340,14 @@ func UnmarshalMessageStatistics(data json.RawMessage) (*MessageStatistics, error
return &resp, err
}
func UnmarshalStoryStatistics(data json.RawMessage) (*StoryStatistics, error) {
var resp StoryStatistics
err := json.Unmarshal(data, &resp)
return &resp, err
}
func UnmarshalPoint(data json.RawMessage) (*Point, error) {
var resp Point
@ -16481,6 +16748,14 @@ func UnmarshalUpdateChatIsMarkedAsUnread(data json.RawMessage) (*UpdateChatIsMar
return &resp, err
}
func UnmarshalUpdateChatViewAsTopics(data json.RawMessage) (*UpdateChatViewAsTopics, error) {
var resp UpdateChatViewAsTopics
err := json.Unmarshal(data, &resp)
return &resp, err
}
func UnmarshalUpdateChatBlockList(data json.RawMessage) (*UpdateChatBlockList, error) {
var resp UpdateChatBlockList
@ -16905,6 +17180,14 @@ func UnmarshalUpdateAccentColors(data json.RawMessage) (*UpdateAccentColors, err
return &resp, err
}
func UnmarshalUpdateProfileAccentColors(data json.RawMessage) (*UpdateProfileAccentColors, error) {
var resp UpdateProfileAccentColors
err := json.Unmarshal(data, &resp)
return &resp, err
}
func UnmarshalUpdateLanguagePackStrings(data json.RawMessage) (*UpdateLanguagePackStrings, error) {
var resp UpdateLanguagePackStrings
@ -16977,6 +17260,14 @@ func UnmarshalUpdateDefaultReactionType(data json.RawMessage) (*UpdateDefaultRea
return &resp, err
}
func UnmarshalUpdateSpeechRecognitionTrial(data json.RawMessage) (*UpdateSpeechRecognitionTrial, error) {
var resp UpdateSpeechRecognitionTrial
err := json.Unmarshal(data, &resp)
return &resp, err
}
func UnmarshalUpdateDiceEmojis(data json.RawMessage) (*UpdateDiceEmojis, error) {
var resp UpdateDiceEmojis
@ -17622,6 +17913,12 @@ func UnmarshalType(data json.RawMessage) (Type, error) {
case TypeAccentColor:
return UnmarshalAccentColor(data)
case TypeProfileAccentColors:
return UnmarshalProfileAccentColors(data)
case TypeProfileAccentColor:
return UnmarshalProfileAccentColor(data)
case TypeEmojiStatus:
return UnmarshalEmojiStatus(data)
@ -17844,6 +18141,12 @@ func UnmarshalType(data json.RawMessage) (Type, error) {
case TypeMessageSendingStateFailed:
return UnmarshalMessageSendingStateFailed(data)
case TypeTextQuote:
return UnmarshalTextQuote(data)
case TypeInputTextQuote:
return UnmarshalInputTextQuote(data)
case TypeMessageReplyToMessage:
return UnmarshalMessageReplyToMessage(data)
@ -17913,6 +18216,9 @@ func UnmarshalType(data json.RawMessage) (Type, error) {
case TypeMessageSponsorTypeBot:
return UnmarshalMessageSponsorTypeBot(data)
case TypeMessageSponsorTypeWebApp:
return UnmarshalMessageSponsorTypeWebApp(data)
case TypeMessageSponsorTypePublicChannel:
return UnmarshalMessageSponsorTypePublicChannel(data)
@ -18813,6 +19119,9 @@ func UnmarshalType(data json.RawMessage) (Type, error) {
case TypeMessagePremiumGiveaway:
return UnmarshalMessagePremiumGiveaway(data)
case TypeMessagePremiumGiveawayCompleted:
return UnmarshalMessagePremiumGiveawayCompleted(data)
case TypeMessageContactRegistered:
return UnmarshalMessageContactRegistered(data)
@ -19191,6 +19500,15 @@ func UnmarshalType(data json.RawMessage) (Type, error) {
case TypeStoryListArchive:
return UnmarshalStoryListArchive(data)
case TypeStoryOriginPublicStory:
return UnmarshalStoryOriginPublicStory(data)
case TypeStoryOriginHiddenUser:
return UnmarshalStoryOriginHiddenUser(data)
case TypeStoryRepostInfo:
return UnmarshalStoryRepostInfo(data)
case TypeStoryInteractionInfo:
return UnmarshalStoryInteractionInfo(data)
@ -19200,12 +19518,24 @@ func UnmarshalType(data json.RawMessage) (Type, error) {
case TypeStories:
return UnmarshalStories(data)
case TypeStoryFullId:
return UnmarshalStoryFullId(data)
case TypeStoryInfo:
return UnmarshalStoryInfo(data)
case TypeChatActiveStories:
return UnmarshalChatActiveStories(data)
case TypeStoryPublicForwardMessage:
return UnmarshalStoryPublicForwardMessage(data)
case TypeStoryPublicForwardStory:
return UnmarshalStoryPublicForwardStory(data)
case TypeStoryPublicForwards:
return UnmarshalStoryPublicForwards(data)
case TypeChatBoostSourceGiftCode:
return UnmarshalChatBoostSourceGiftCode(data)
@ -19743,6 +20073,9 @@ func UnmarshalType(data json.RawMessage) (Type, error) {
case TypePremiumLimitTypeStorySuggestedReactionAreaCount:
return UnmarshalPremiumLimitTypeStorySuggestedReactionAreaCount(data)
case TypePremiumLimitTypeSimilarChatCount:
return UnmarshalPremiumLimitTypeSimilarChatCount(data)
case TypePremiumFeatureIncreasedLimits:
return UnmarshalPremiumFeatureIncreasedLimits(data)
@ -19797,6 +20130,9 @@ func UnmarshalType(data json.RawMessage) (Type, error) {
case TypePremiumFeatureAccentColor:
return UnmarshalPremiumFeatureAccentColor(data)
case TypePremiumFeatureBackgroundForBoth:
return UnmarshalPremiumFeatureBackgroundForBoth(data)
case TypePremiumStoryFeaturePriorityOrder:
return UnmarshalPremiumStoryFeaturePriorityOrder(data)
@ -20772,8 +21108,14 @@ func UnmarshalType(data json.RawMessage) (Type, error) {
case TypeStatisticalGraphError:
return UnmarshalStatisticalGraphError(data)
case TypeChatStatisticsMessageInteractionInfo:
return UnmarshalChatStatisticsMessageInteractionInfo(data)
case TypeChatStatisticsObjectTypeMessage:
return UnmarshalChatStatisticsObjectTypeMessage(data)
case TypeChatStatisticsObjectTypeStory:
return UnmarshalChatStatisticsObjectTypeStory(data)
case TypeChatStatisticsInteractionInfo:
return UnmarshalChatStatisticsInteractionInfo(data)
case TypeChatStatisticsMessageSenderInfo:
return UnmarshalChatStatisticsMessageSenderInfo(data)
@ -20793,6 +21135,9 @@ func UnmarshalType(data json.RawMessage) (Type, error) {
case TypeMessageStatistics:
return UnmarshalMessageStatistics(data)
case TypeStoryStatistics:
return UnmarshalStoryStatistics(data)
case TypePoint:
return UnmarshalPoint(data)
@ -20943,6 +21288,9 @@ func UnmarshalType(data json.RawMessage) (Type, error) {
case TypeUpdateChatIsMarkedAsUnread:
return UnmarshalUpdateChatIsMarkedAsUnread(data)
case TypeUpdateChatViewAsTopics:
return UnmarshalUpdateChatViewAsTopics(data)
case TypeUpdateChatBlockList:
return UnmarshalUpdateChatBlockList(data)
@ -21102,6 +21450,9 @@ func UnmarshalType(data json.RawMessage) (Type, error) {
case TypeUpdateAccentColors:
return UnmarshalUpdateAccentColors(data)
case TypeUpdateProfileAccentColors:
return UnmarshalUpdateProfileAccentColors(data)
case TypeUpdateLanguagePackStrings:
return UnmarshalUpdateLanguagePackStrings(data)
@ -21129,6 +21480,9 @@ func UnmarshalType(data json.RawMessage) (Type, error) {
case TypeUpdateDefaultReactionType:
return UnmarshalUpdateDefaultReactionType(data)
case TypeUpdateSpeechRecognitionTrial:
return UnmarshalUpdateSpeechRecognitionTrial(data)
case TypeUpdateDiceEmojis:
return UnmarshalUpdateDiceEmojis(data)

View file

@ -703,7 +703,7 @@ premiumGiftCodePaymentOptions options:vector<premiumGiftCodePaymentOption> = Pre
//@creator_id Identifier of a chat or a user that created the gift code
//@creation_date Point in time (Unix timestamp) when the code was created
//@is_from_giveaway True, if the gift code was created for a giveaway
//@giveaway_message_id Identifier of the corresponding giveaway message; can be 0 or an identifier of a deleted message
//@giveaway_message_id Identifier of the corresponding giveaway message in the creator_id chat; can be 0 or an identifier of a deleted message
//@month_count Number of month the Telegram Premium subscription will be active after code activation
//@user_id Identifier of a user for which the code was created; 0 if none
//@use_date Point in time (Unix timestamp) when the code was activated; 0 if none
@ -754,6 +754,18 @@ premiumGiveawayInfoCompleted creation_date:int32 actual_winners_selection_date:i
//@dark_theme_colors The list of 1-3 colors in RGB format, describing the accent color, as expected to be shown in dark themes
accentColor id:int32 built_in_accent_color_id:int32 light_theme_colors:vector<int32> dark_theme_colors:vector<int32> = AccentColor;
//@description Contains information about supported accent colors for user profile photo background in RGB format
//@palette_colors The list of 1-2 colors in RGB format, describing the colors, as expected to be shown in the color palette settings
//@background_colors The list of 1-2 colors in RGB format, describing the colors, as expected to be used for the profile photo background
//@story_colors The list of 2 colors in RGB format, describing the colors of the gradient to be used for the unread active story indicator around profile photo
profileAccentColors palette_colors:vector<int32> background_colors:vector<int32> story_colors:vector<int32> = ProfileAccentColors;
//@description Contains information about supported accent color for user profile photo background
//@id Profile accent color identifier
//@light_theme_colors The list of 1-3 colors in RGB format, describing the accent color, as expected to be shown in light themes
//@dark_theme_colors The list of 1-3 colors in RGB format, describing the accent color, as expected to be shown in dark themes
profileAccentColor id:int32 light_theme_colors:profileAccentColors dark_theme_colors:profileAccentColors = ProfileAccentColor;
//@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
//@expiration_date Point in time (Unix timestamp) when the status will expire; 0 if never
@ -779,8 +791,10 @@ usernames active_usernames:vector<string> disabled_usernames:vector<string> edit
//@phone_number Phone number of the user
//@status Current online status of the user
//@profile_photo Profile photo of the user; may be null
//@accent_color_id Identifier of the accent color for name, and backgrounds of profile photo, reply header, and link preview
//@accent_color_id Identifier of the accent color for name, and backgrounds of profile photo, reply header, and link preview. For Telegram Premium users only
//@background_custom_emoji_id Identifier of a custom emoji to be shown on the reply header background; 0 if none. For Telegram Premium users only
//@profile_accent_color_id Identifier of the accent color for the user's profile; -1 if none. For Telegram Premium users only
//@profile_background_custom_emoji_id Identifier of a custom emoji to be shown on the background of the user's profile; 0 if none. For Telegram Premium users only
//@emoji_status Emoji status to be shown instead of the default Telegram Premium badge; may be null. For Telegram Premium users only
//@is_contact The user is a contact of the current user
//@is_mutual_contact The user is a contact of the current user and the current user is a contact of the user
@ -797,7 +811,7 @@ usernames active_usernames:vector<string> disabled_usernames:vector<string> edit
//@type Type of the user
//@language_code IETF language tag of the user's language; only available to bots
//@added_to_attachment_menu True, if the user added the current bot to attachment menu; only available to bots
user id:int53 access_hash:int64 first_name:string last_name:string usernames:usernames phone_number:string status:UserStatus profile_photo:profilePhoto accent_color_id:int32 background_custom_emoji_id:int64 emoji_status:emojiStatus is_contact:Bool is_mutual_contact:Bool is_close_friend:Bool is_verified:Bool is_premium:Bool is_support:Bool restriction_reason:string is_scam:Bool is_fake:Bool has_active_stories:Bool has_unread_active_stories:Bool have_access:Bool type:UserType language_code:string added_to_attachment_menu:Bool = User;
user id:int53 access_hash:int64 first_name:string last_name:string usernames:usernames phone_number:string status:UserStatus profile_photo:profilePhoto accent_color_id:int32 background_custom_emoji_id:int64 profile_accent_color_id:int32 profile_background_custom_emoji_id:int64 emoji_status:emojiStatus is_contact:Bool is_mutual_contact:Bool is_close_friend:Bool is_verified:Bool is_premium:Bool is_support:Bool restriction_reason:string is_scam:Bool is_fake:Bool has_active_stories:Bool has_unread_active_stories:Bool have_access:Bool type:UserType language_code:string added_to_attachment_menu:Bool = User;
//@description Contains information about a bot
@ -830,11 +844,12 @@ botInfo short_description:string description:string photo:photo animation:animat
//@has_restricted_voice_and_video_note_messages True, if voice and video notes can't be sent or forwarded to the user
//@has_pinned_stories True, if the user has pinned stories
//@need_phone_number_privacy_exception True, if the current user needs to explicitly allow to share their phone number with the user when the method addContact is used
//@set_chat_background True, if the user set chat background for both chat users and it wasn't reverted yet
//@bio A short user bio; may be null for bots
//@premium_gift_options The list of available options for gifting Telegram Premium to the user
//@group_in_common_count Number of group chats where both the other user and the current user are a member; 0 for the current user
//@bot_info For bots, information about the bot; may be null if the user isn't a bot
userFullInfo personal_photo:chatPhoto photo:chatPhoto public_photo:chatPhoto block_list:BlockList can_be_called:Bool supports_video_calls:Bool has_private_calls:Bool has_private_forwards:Bool has_restricted_voice_and_video_note_messages:Bool has_pinned_stories:Bool need_phone_number_privacy_exception:Bool bio:formattedText premium_gift_options:vector<premiumPaymentOption> group_in_common_count:int32 bot_info:botInfo = UserFullInfo;
userFullInfo personal_photo:chatPhoto photo:chatPhoto public_photo:chatPhoto block_list:BlockList can_be_called:Bool supports_video_calls:Bool has_private_calls:Bool has_private_forwards:Bool has_restricted_voice_and_video_note_messages:Bool has_pinned_stories:Bool need_phone_number_privacy_exception:Bool set_chat_background:Bool bio:formattedText premium_gift_options:vector<premiumPaymentOption> group_in_common_count:int32 bot_info:botInfo = UserFullInfo;
//@description Represents a list of users @total_count Approximate total number of users found @user_ids A list of user identifiers
users total_count:int32 user_ids:vector<int53> = Users;
@ -1048,8 +1063,10 @@ basicGroupFullInfo photo:chatPhoto description:string creator_user_id:int53 memb
//@usernames Usernames of the supergroup or channel; may be null
//@date Point in time (Unix timestamp) when the current user joined, or the point in time when the supergroup or channel was created, in case the user is not a member
//@status Status of the current user in the supergroup or channel; custom title will always be empty
//@member_count Number of members in the supergroup or channel; 0 if unknown. Currently, it is guaranteed to be known only if the supergroup or channel was received
//-through searchPublicChats, searchChatsNearby, getInactiveSupergroupChats, getSuitableDiscussionChats, getGroupsInCommon, getUserPrivacySettingRules, or in chatFolderInviteLinkInfo.missing_chat_ids
//@member_count Number of members in the supergroup or channel; 0 if unknown. Currently, it is guaranteed to be known only if the supergroup or channel was received through
//-getChatSimilarChats, getChatsToSendStories, getCreatedPublicChats, getGroupsInCommon, getInactiveSupergroupChats, getSuitableDiscussionChats, getUserPrivacySettingRules, getVideoChatAvailableParticipants,
//-searchChatsNearby, searchPublicChats, or in chatFolderInviteLinkInfo.missing_chat_ids, or for public chats in which where sent messages and posted stories from storyPublicForwards,
//-or for public chats in which where sent messages from getMessagePublicForwards response
//@has_linked_chat True, if the channel has a discussion group, or the supergroup is the designated discussion group for a channel
//@has_location True, if the supergroup is connected to a location, i.e. the supergroup is a location-based supergroup
//@sign_messages True, if messages sent to the channel need to contain information about the sender. This field is only applicable to channels
@ -1058,7 +1075,7 @@ basicGroupFullInfo photo:chatPhoto description:string creator_user_id:int53 memb
//@is_slow_mode_enabled True, if the slow mode is enabled in the supergroup
//@is_channel True, if the supergroup is a channel
//@is_broadcast_group True, if the supergroup is a broadcast group, i.e. only administrators can send messages and there is no limit on the number of members
//@is_forum True, if the supergroup must be shown as a forum by default
//@is_forum True, if the supergroup is a forum with topics
//@is_verified True, if the supergroup or channel is verified
//@restriction_reason If non-empty, contains a human-readable description of the reason why access to this supergroup or channel must be restricted
//@is_scam True, if many users reported this supergroup or channel as a scam
@ -1134,7 +1151,7 @@ messageSenderChat chat_id:int53 = MessageSender;
messageSenders total_count:int32 senders:vector<MessageSender> = MessageSenders;
//@description Represents a message sender, which can be used to send messages in a chat @sender Available message senders @needs_premium True, if Telegram Premium is needed to use the message sender
//@description Represents a message sender, which can be used to send messages in a chat @sender The message sender @needs_premium True, if Telegram Premium is needed to use the message sender
chatMessageSender sender:MessageSender needs_premium:Bool = ChatMessageSender;
//@description Represents a list of message senders, which can be used to send messages in a chat @senders List of available message senders
@ -1202,7 +1219,7 @@ messageReplyInfo reply_count:int32 recent_replier_ids:vector<MessageSender> last
//@type Type of the reaction
//@total_count Number of times the reaction was added
//@is_chosen True, if the reaction is chosen by the current user
//@used_sender_id Identifier of the message sender used by the current user to add the reaction; null if unknown or the reaction isn't chosen
//@used_sender_id Identifier of the message sender used by the current user to add the reaction; may be null if unknown or the reaction isn't chosen
//@recent_sender_ids Identifiers of at most 3 recent message senders, added the reaction; available in private, basic group and supergroup chats
messageReaction type:ReactionType total_count:int32 is_chosen:Bool used_sender_id:MessageSender recent_sender_ids:vector<MessageSender> = MessageReaction;
@ -1236,19 +1253,30 @@ messageSendingStatePending sending_id:int32 = MessageSendingState;
messageSendingStateFailed error:error can_retry:Bool need_another_sender:Bool need_another_reply_quote:Bool need_drop_reply:Bool retry_after:double = MessageSendingState;
//@description Describes manually or automatically chosen quote from another message
//@text Text of the quote. Only Bold, Italic, Underline, Strikethrough, Spoiler, and CustomEmoji entities can be present in the text
//@position Approximate quote position in the original message in UTF-16 code units
//@is_manual True, if the quote was manually chosen by the message sender
textQuote text:formattedText position:int32 is_manual:Bool = TextQuote;
//@description Describes manually chosen quote from another message
//@text Text of the quote; 0-getOption("message_reply_quote_length_max") characters. Only Bold, Italic, Underline, Strikethrough, Spoiler, and CustomEmoji entities are allowed to be kept and must be kept in the quote
//@position Quote position in the original message in UTF-16 code units
inputTextQuote text:formattedText position:int32 = InputTextQuote;
//@class MessageReplyTo @description Contains information about the message or the story a message is replying to
//@description Describes a message replied by a given message
//@chat_id The identifier of the chat to which the message belongs; may be 0 if the replied message is in unknown chat
//@message_id The identifier of the message; may be 0 if the replied message is in unknown chat
//@quote Manually or automatically chosen quote from the replied message; may be null if none. Only Bold, Italic, Underline, Strikethrough, Spoiler, and CustomEmoji entities can be present in the quote
//@is_quote_manual True, if the quote was manually chosen by the message sender
//@origin Information about origin of the message if the message was replied from another chat; may be null for messages from the same chat
//@origin_send_date Point in time (Unix timestamp) when the message was sent if the message was replied from another chat; 0 for messages from the same chat
//@content Media content of the message if the message was replied from another chat; may be null for messages from the same chat and messages without media.
//@quote Chosen quote from the replied message; may be null if none
//@origin Information about origin of the message if the message was from another chat or topic; may be null for messages from the same chat
//@origin_send_date Point in time (Unix timestamp) when the message was sent if the message was from another chat or topic; 0 for messages from the same chat
//@content Media content of the message if the message was from another chat or topic; may be null for messages from the same chat and messages without media.
//-Can be only one of the following types: messageAnimation, messageAudio, messageContact, messageDice, messageDocument, messageGame, messageInvoice, messageLocation,
//-messagePhoto, messagePoll, messagePremiumGiveaway, messageSticker, messageStory, messageText (for link preview), messageVenue, messageVideo, messageVideoNote, or messageVoiceNote
messageReplyToMessage chat_id:int53 message_id:int53 quote:formattedText is_quote_manual:Bool origin:MessageOrigin origin_send_date:int32 content:MessageContent = MessageReplyTo;
messageReplyToMessage chat_id:int53 message_id:int53 quote:textQuote origin:MessageOrigin origin_send_date:int32 content:MessageContent = MessageReplyTo;
//@description Describes a story replied by a given message @story_sender_chat_id The identifier of the sender of the story @story_id The identifier of the story
messageReplyToStory story_sender_chat_id:int53 story_id:int32 = MessageReplyTo;
@ -1257,11 +1285,10 @@ messageReplyToStory story_sender_chat_id:int53 story_id:int32 = MessageReplyTo;
//@class InputMessageReplyTo @description Contains information about the message or the story to be replied
//@description Describes a message to be replied
//@chat_id The identifier of the chat to which the message to be replied belongs; pass 0 if the message to be replied is in the same chat. Must always be 0 for replies in secret chats. A message can be replied in another chat only if message.can_be_replied_in_another_chat
//@chat_id The identifier of the chat to which the message to be replied belongs; pass 0 if the message to be replied is in the same chat. Must always be 0 for replies in secret chats. A message can be replied in another chat or topic only if message.can_be_replied_in_another_chat
//@message_id The identifier of the message to be replied in the same or the specified chat
//@quote Manually chosen quote from the message to be replied; pass null if none; 0-getOption("message_reply_quote_length_max") characters. Must always be null for replies in secret chats.
//-Only Bold, Italic, Underline, Strikethrough, Spoiler, and CustomEmoji entities are allowed to be kept and must be kept in the quote
inputMessageReplyToMessage chat_id:int53 message_id:int53 quote:formattedText = InputMessageReplyTo;
//@quote Quote from the message to be replied; pass null if none. Must always be null for replies in secret chats
inputMessageReplyToMessage chat_id:int53 message_id:int53 quote:inputTextQuote = InputMessageReplyTo;
//@description Describes a story to be replied @story_sender_chat_id The identifier of the sender of the story. Currently, stories can be replied only in the sender's chat @story_id The identifier of the story
inputMessageReplyToStory story_sender_chat_id:int53 story_id:int32 = InputMessageReplyTo;
@ -1277,7 +1304,7 @@ inputMessageReplyToStory story_sender_chat_id:int53 story_id:int32 = InputMessag
//@is_pinned True, if the message is pinned
//@can_be_edited True, if the message can be edited. For live location and poll messages this fields shows whether editMessageLiveLocation or stopPoll can be used with this message by the application
//@can_be_forwarded True, if the message can be forwarded
//@can_be_replied_in_another_chat True, if the message can be replied in another chat
//@can_be_replied_in_another_chat True, if the message can be replied in another chat or topic
//@can_be_saved True, if content of the message can be saved locally or copied
//@can_be_deleted_only_for_self True, if the message can be deleted only for the current user while other users will continue to see it
//@can_be_deleted_for_all_users True, if the message can be deleted for all users
@ -1313,7 +1340,7 @@ message id:int53 sender_id:MessageSender chat_id:int53 sending_state:MessageSend
//@description Contains a list of messages @total_count Approximate total number of messages found @messages List of messages; messages may be null
messages total_count:int32 messages:vector<message> = Messages;
//@description Contains a list of messages found by a search @total_count Approximate total number of messages found; -1 if unknown @messages List of messages @next_offset The offset for the next request. If empty, there are no more results
//@description Contains a list of messages found by a search @total_count Approximate total number of messages found; -1 if unknown @messages List of messages @next_offset The offset for the next request. If empty, then there are no more results
foundMessages total_count:int32 messages:vector<message> next_offset:string = FoundMessages;
//@description Contains a list of messages found by a search in a given chat @total_count Approximate total number of messages found; -1 if unknown @messages List of messages @next_from_message_id The offset for the next request. If 0, there are no more results
@ -1370,6 +1397,9 @@ messageSourceOther = MessageSource;
//@description The sponsor is a bot @bot_user_id User identifier of the bot @link An internal link to be opened when the sponsored message is clicked
messageSponsorTypeBot bot_user_id:int53 link:InternalLinkType = MessageSponsorType;
//@description The sponsor is a web app @web_app_title Web App title @link An internal link to be opened when the sponsored message is clicked
messageSponsorTypeWebApp web_app_title:string link:InternalLinkType = MessageSponsorType;
//@description The sponsor is a public channel chat @chat_id Sponsor chat identifier @link An internal link to be opened when the sponsored message is clicked; may be null if the sponsor chat needs to be opened instead
messageSponsorTypePublicChannel chat_id:int53 link:InternalLinkType = MessageSponsorType;
@ -1391,8 +1421,9 @@ messageSponsor type:MessageSponsorType photo:chatPhotoInfo info:string = Message
//@is_recommended True, if the message needs to be labeled as "recommended" instead of "sponsored"
//@content Content of the message. Currently, can be only of the type messageText
//@sponsor Information about the sponsor of the message
//@button_text If non-empty, text for the message action button
//@additional_info If non-empty, additional information about the sponsored message to be shown along with the message
sponsoredMessage message_id:int53 is_recommended:Bool content:MessageContent sponsor:messageSponsor additional_info:string = SponsoredMessage;
sponsoredMessage message_id:int53 is_recommended:Bool content:MessageContent sponsor:messageSponsor button_text:string additional_info:string = SponsoredMessage;
//@description Contains a list of sponsored messages @messages List of sponsored messages @messages_between The minimum number of messages between shown sponsored messages, or 0 if only one sponsored message must be shown after all ordinary messages
sponsoredMessages messages:vector<sponsoredMessage> messages_between:int32 = SponsoredMessages;
@ -1415,7 +1446,7 @@ downloadedFileCounts active_count:int32 paused_count:int32 completed_count:int32
//@description Contains a list of downloaded files, found by a search
//@total_counts Total number of suitable files, ignoring offset
//@files The list of files
//@next_offset The offset for the next request. If empty, there are no more results
//@next_offset The offset for the next request. If empty, then there are no more results
foundFileDownloads total_counts:downloadedFileCounts files:vector<fileDownload> next_offset:string = FoundFileDownloads;
@ -1432,21 +1463,21 @@ notificationSettingsScopeChannelChats = NotificationSettingsScope;
//@description Contains information about notification settings for a chat or a forum topic
//@use_default_mute_for If true, mute_for is ignored and the value for the relevant type of chat or the forum chat is used instead
//@use_default_mute_for If true, the value for the relevant type of chat or the forum chat is used instead of mute_for
//@mute_for Time left before notifications will be unmuted, in seconds
//@use_default_sound If true, the value for the relevant type of chat or the forum chat is used instead of sound_id
//@sound_id Identifier of the notification sound to be played for messages; 0 if sound is disabled
//@use_default_show_preview If true, show_preview is ignored and the value for the relevant type of chat or the forum chat is used instead
//@use_default_show_preview If true, the value for the relevant type of chat or the forum chat is used instead of show_preview
//@show_preview True, if message content must be displayed in notifications
//@use_default_mute_stories If true, mute_stories is ignored and the value for the relevant type of chat is used instead
//@use_default_mute_stories If true, the value for the relevant type of chat is used instead of mute_stories
//@mute_stories True, if story notifications are disabled for the chat
//@use_default_story_sound If true, the value for the relevant type of chat is used instead of story_sound_id
//@story_sound_id Identifier of the notification sound to be played for stories; 0 if sound is disabled
//@use_default_show_story_sender If true, show_story_sender is ignored and the value for the relevant type of chat is used instead
//@use_default_show_story_sender If true, the value for the relevant type of chat is used instead of show_story_sender
//@show_story_sender True, if the sender of stories must be displayed in notifications
//@use_default_disable_pinned_message_notifications If true, disable_pinned_message_notifications is ignored and the value for the relevant type of chat or the forum chat is used instead
//@use_default_disable_pinned_message_notifications If true, the value for the relevant type of chat or the forum chat is used instead of disable_pinned_message_notifications
//@disable_pinned_message_notifications If true, notifications for incoming pinned messages will be created as for an ordinary unread message
//@use_default_disable_mention_notifications If true, disable_mention_notifications is ignored and the value for the relevant type of chat or the forum chat is used instead
//@use_default_disable_mention_notifications If true, the value for the relevant type of chat or the forum chat is used instead of disable_mention_notifications
//@disable_mention_notifications If true, notifications for messages with mentions will be created as for an ordinary unread message
chatNotificationSettings use_default_mute_for:Bool mute_for:int32 use_default_sound:Bool sound_id:int64 use_default_show_preview:Bool show_preview:Bool use_default_mute_stories:Bool mute_stories:Bool use_default_story_sound:Bool story_sound_id:int64 use_default_show_story_sender:Bool show_story_sender:Bool use_default_disable_pinned_message_notifications:Bool disable_pinned_message_notifications:Bool use_default_disable_mention_notifications:Bool disable_mention_notifications:Bool = ChatNotificationSettings;
@ -1454,8 +1485,8 @@ chatNotificationSettings use_default_mute_for:Bool mute_for:int32 use_default_so
//@mute_for Time left before notifications will be unmuted, in seconds
//@sound_id Identifier of the notification sound to be played; 0 if sound is disabled
//@show_preview True, if message content must be displayed in notifications
//@use_default_mute_stories If true, mute_stories is ignored and story notifications are received only for the first 5 chats from topChatCategoryUsers
//@mute_stories True, if story notifications are disabled for the chat
//@use_default_mute_stories If true, story notifications are received only for the first 5 chats from topChatCategoryUsers regardless of the value of mute_stories
//@mute_stories True, if story notifications are disabled
//@story_sound_id Identifier of the notification sound to be played for stories; 0 if sound is disabled
//@show_story_sender True, if the sender of stories must be displayed in notifications
//@disable_pinned_message_notifications True, if notifications for incoming pinned messages will be created as for an ordinary unread message
@ -1481,7 +1512,7 @@ chatTypeBasicGroup basic_group_id:int53 = ChatType;
//@description A supergroup or channel (with unlimited members) @supergroup_id Supergroup or channel identifier @is_channel True, if the supergroup is a channel
chatTypeSupergroup supergroup_id:int53 is_channel:Bool = ChatType;
//@description A secret chat with a user @secret_chat_id Secret chat identifier @user_id User identifier of the secret chat peer
//@description A secret chat with a user @secret_chat_id Secret chat identifier @user_id User identifier of the other user in the secret chat
chatTypeSecret secret_chat_id:int32 user_id:int53 = ChatType;
@ -1605,6 +1636,7 @@ videoChat group_call_id:int32 has_participants:Bool default_participant_id:Messa
//@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
//@view_as_topics True, if the chat is a forum supergroup that must be shown in the "View as topics" mode
//@has_scheduled_messages True, if the chat has scheduled messages
//@can_be_deleted_only_for_self True, if the chat messages can be deleted only for the current user while other users will continue to see the messages
//@can_be_deleted_for_all_users True, if the chat messages can be deleted for all users
@ -1626,7 +1658,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
//@draft_message A draft of a message in the chat; may be null if none
//@client_data Application-specific data associated with the chat. (For example, the chat scroll position or local chat notification settings can be stored here.) Persistent if the message database is used
chat id:int53 type:ChatType title:string photo:chatPhotoInfo accent_color_id:int32 background_custom_emoji_id:int64 permissions:chatPermissions last_message:message positions:vector<chatPosition> message_sender_id:MessageSender block_list:BlockList has_protected_content:Bool is_translatable:Bool is_marked_as_unread:Bool has_scheduled_messages:Bool can_be_deleted_only_for_self:Bool can_be_deleted_for_all_users:Bool can_be_reported:Bool default_disable_notification:Bool unread_count:int32 last_read_inbox_message_id:int53 last_read_outbox_message_id:int53 unread_mention_count:int32 unread_reaction_count:int32 notification_settings:chatNotificationSettings available_reactions:ChatAvailableReactions message_auto_delete_time:int32 background:chatBackground theme_name:string action_bar:ChatActionBar video_chat:videoChat pending_join_requests:chatJoinRequestsInfo reply_markup_message_id:int53 draft_message:draftMessage client_data:string = Chat;
chat id:int53 type:ChatType title:string photo:chatPhotoInfo accent_color_id:int32 background_custom_emoji_id:int64 permissions:chatPermissions last_message:message positions:vector<chatPosition> message_sender_id:MessageSender block_list:BlockList has_protected_content:Bool is_translatable:Bool is_marked_as_unread:Bool view_as_topics:Bool has_scheduled_messages:Bool can_be_deleted_only_for_self:Bool can_be_deleted_for_all_users:Bool can_be_reported:Bool default_disable_notification:Bool unread_count:int32 last_read_inbox_message_id:int53 last_read_outbox_message_id:int53 unread_mention_count:int32 unread_reaction_count:int32 notification_settings:chatNotificationSettings available_reactions:ChatAvailableReactions message_auto_delete_time:int32 background:chatBackground theme_name:string action_bar:ChatActionBar video_chat:videoChat pending_join_requests:chatJoinRequestsInfo reply_markup_message_id:int53 draft_message:draftMessage client_data:string = Chat;
//@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;
@ -1663,7 +1695,7 @@ chatActionBarInviteMembers = ChatActionBar;
//@description The chat is a private or secret chat, which can be reported using the method reportChat, or the other user can be blocked using the method setMessageSenderBlockList,
//-or the other user can be added to the contact list using the method addContact. If the chat is a private chat with a user with an emoji status, then a notice about emoji status usage must be shown
//@can_unarchive If true, the chat was automatically archived and can be moved back to the main chat list using addChatToList simultaneously with setting chat notification settings to default using setChatNotificationSettings
//@distance If non-negative, the current user was found by the peer through searchChatsNearby and this is the distance between the users
//@distance If non-negative, the current user was found by the other user through searchChatsNearby and this is the distance between the users
chatActionBarReportAddBlock can_unarchive:Bool distance:int32 = ChatActionBar;
//@description The chat is a private or secret chat and the other user can be added to the contact list using the method addContact
@ -2133,8 +2165,8 @@ webPageInstantView page_blocks:vector<PageBlock> view_count:int32 version:int32
//@embed_height Height of the embedded preview
//@duration Duration of the content, in seconds
//@author Author of the content
//@has_large_media True, if the preview has large media and its appearance can be changed
//@show_large_media True, if large media preview must be shown
//@has_large_media True, if size of media in the preview can be changed
//@show_large_media True, if large media preview must be shown; otherwise, the media preview must be shown small and only the first frame must be shown for videos
//@skip_confirmation True, if there is no need to show an ordinary open URL confirmation, when opening the URL from the preview, because the URL is shown in the message text in clear
//@show_above_text True, if the link preview must be shown above message text; otherwise, the link preview must be shown below the message text
//@animation Preview of the content as an animation, if available; may be null
@ -2639,7 +2671,7 @@ inputPassportElementError type:PassportElementType message:string source:InputPa
//@description A text message
//@text Text of the message
//@web_page A link preview attached to the message; may be null
//@link_preview_options Options which was used for generation of the link preview; may be null if default options were used
//@link_preview_options Options which were used for generation of the link preview; may be null if default options were used
messageText text:formattedText web_page:webPage link_preview_options:linkPreviewOptions = MessageContent;
//@description An animation message (GIF-style).
@ -2788,8 +2820,11 @@ messagePinMessage message_id:int53 = MessageContent;
//@description A screenshot of a message in the chat has been taken
messageScreenshotTaken = MessageContent;
//@description A new background was set in the chat @old_background_message_id Identifier of the message with a previously set same background; 0 if none. Can be an identifier of a deleted message @background The new background
messageChatSetBackground old_background_message_id:int53 background:chatBackground = MessageContent;
//@description A new background was set in the chat
//@old_background_message_id Identifier of the message with a previously set same background; 0 if none. Can be an identifier of a deleted message
//@background The new background
//@only_for_self True, if the background was set only for self
messageChatSetBackground old_background_message_id:int53 background:chatBackground only_for_self:Bool = 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
messageChatSetTheme theme_name:string = MessageContent;
@ -2872,6 +2907,12 @@ messagePremiumGiveawayCreated = MessageContent;
//@sticker A sticker to be shown in the message; may be null if unknown
messagePremiumGiveaway parameters:premiumGiveawayParameters winner_count:int32 month_count:int32 sticker:sticker = MessageContent;
//@description A Telegram Premium giveaway has been completed for the chat
//@giveaway_message_id Identifier of the message with the giveaway, can be an identifier of a deleted message
//@winner_count Number of winners in the giveaway
//@unclaimed_prize_count Number of undistributed prizes
messagePremiumGiveawayCompleted giveaway_message_id:int53 winner_count:int32 unclaimed_prize_count:int32 = MessageContent;
//@description A contact has registered with Telegram
messageContactRegistered = MessageContent;
@ -2981,7 +3022,7 @@ inputThumbnail thumbnail:InputFile width:int32 height:int32 = InputThumbnail;
//@description The message will be sent at the specified date @send_date Point in time (Unix timestamp) when the message will be sent. The date must be within 367 days in the future
messageSchedulingStateSendAtDate send_date:int32 = MessageSchedulingState;
//@description The message will be sent when the peer will be online. Applicable to private chats only and when the exact online status of the peer is known
//@description The message will be sent when the other user is online. Applicable to private chats only and when the exact online status of the other user is known
messageSchedulingStateSendWhenOnline = MessageSchedulingState;
@ -3042,7 +3083,7 @@ inputMessageAudio audio:InputFile album_cover_thumbnail:inputThumbnail duration:
//@description A document message (general file)
//@document Document to be sent
//@thumbnail Document thumbnail; pass null to skip thumbnail uploading
//@disable_content_type_detection If true, automatic file type detection will be disabled and the document will always be sent as file. Always true for files sent to secret chats
//@disable_content_type_detection True, if automatic file type detection is disabled and the document must be sent as a file. Always true for files sent to secret chats
//@caption Document caption; pass null to use an empty caption; 0-getOption("message_caption_length_max") characters
inputMessageDocument document:InputFile thumbnail:inputThumbnail disable_content_type_detection:Bool caption:formattedText = InputMessageContent;
@ -3353,7 +3394,7 @@ storyViewer user_id:int53 view_date:int32 block_list:BlockList chosen_reaction_t
//@total_count Approximate total number of story viewers found
//@total_reaction_count Approximate total number of reactions set by found story viewers
//@viewers List of story viewers
//@next_offset The offset for the next request. If empty, there are no more results
//@next_offset The offset for the next request. If empty, then there are no more results
storyViewers total_count:int32 total_reaction_count:int32 viewers:vector<storyViewer> next_offset:string = StoryViewers;
@ -3464,6 +3505,20 @@ storyListMain = StoryList;
storyListArchive = StoryList;
//@class StoryOrigin @description Contains information about the origin of a story that was reposted
//@description The original story was a public story with known sender @chat_id Identifier of the chat that posted original story @story_id Story identifier of the original story
storyOriginPublicStory chat_id:int53 story_id:int32 = StoryOrigin;
//@description The original story was sent by an unknown user @sender_name Name of the story sender
storyOriginHiddenUser sender_name:string = StoryOrigin;
//@description Contains information about original story that was reposted
//@origin Origin of the story that was reposted
//@is_content_modified True, if story content was modified during reposting; otherwise, story wasn't modified
storyRepostInfo origin:StoryOrigin is_content_modified:Bool = StoryRepostInfo;
//@description Contains information about interactions with a story
//@view_count Number of times the story was viewed
//@forward_count Number of times the story was forwarded; 0 if none or unknown
@ -3485,19 +3540,26 @@ storyInteractionInfo view_count:int32 forward_count:int32 reaction_count:int32 r
//@can_be_forwarded True, if the story can be forwarded as a message. Otherwise, screenshots and saving of the story content must be also forbidden
//@can_be_replied True, if the story can be replied in the chat with the story sender
//@can_toggle_is_pinned True, if the story's is_pinned value can be changed
//@can_get_statistics True, if the story statistics are available through getStoryStatistics
//@can_get_viewers True, if users viewed the story can be received through getStoryViewers
//@has_expired_viewers True, if users viewed the story can't be received, because the story has expired more than getOption("story_viewers_expiration_delay") seconds ago
//@repost_info Information about the original story; may be null if the story wasn't reposted
//@interaction_info Information about interactions with the story; may be null if the story isn't owned or there were no interactions
//@chosen_reaction_type Type of the chosen reaction; may be null if none
//@privacy_settings Privacy rules affecting story visibility; may be approximate for non-owned stories
//@content Content of the story
//@areas Clickable areas to be shown on the story content
//@caption Caption of the story
story id:int32 sender_chat_id:int53 date:int32 is_being_sent:Bool is_being_edited:Bool is_edited:Bool is_pinned:Bool is_visible_only_for_self:Bool can_be_deleted:Bool can_be_edited:Bool can_be_forwarded:Bool can_be_replied:Bool can_toggle_is_pinned:Bool can_get_viewers:Bool has_expired_viewers:Bool interaction_info:storyInteractionInfo chosen_reaction_type:ReactionType privacy_settings:StoryPrivacySettings content:StoryContent areas:vector<storyArea> caption:formattedText = Story;
story id:int32 sender_chat_id:int53 date:int32 is_being_sent:Bool is_being_edited:Bool is_edited:Bool is_pinned:Bool is_visible_only_for_self:Bool can_be_deleted:Bool can_be_edited:Bool can_be_forwarded:Bool can_be_replied:Bool can_toggle_is_pinned:Bool can_get_statistics:Bool can_get_viewers:Bool has_expired_viewers:Bool repost_info:storyRepostInfo interaction_info:storyInteractionInfo chosen_reaction_type:ReactionType privacy_settings:StoryPrivacySettings content:StoryContent areas:vector<storyArea> caption:formattedText = Story;
//@description Represents a list of stories @total_count Approximate total number of stories found @stories The list of stories
stories total_count:int32 stories:vector<story> = Stories;
//@description Contains identifier of a story along with identifier of its sender
//@sender_chat_id Identifier of the chat that posted the story
//@story_id Unique story identifier among stories of the given sender
storyFullId sender_chat_id:int53 story_id:int32 = StoryFullId;
//@description Contains basic information about a story
//@story_id Unique story identifier among stories of the given sender
//@date Point in time (Unix timestamp) when the story was published
@ -3513,6 +3575,22 @@ storyInfo story_id:int32 date:int32 is_for_close_friends:Bool = StoryInfo;
chatActiveStories chat_id:int53 list:StoryList order:int53 max_read_story_id:int32 stories:vector<storyInfo> = ChatActiveStories;
//@class StoryPublicForward @description Describes a public forward or repost of a story
//@description Contains a public forward of a story as a message @message Information about the message with the story
storyPublicForwardMessage message:message = StoryPublicForward;
//@description Contains a public repost of a story as a story @story Information about the reposted story
storyPublicForwardStory story:story = StoryPublicForward;
//@description Represents a list of public forwards and reposts of a story
//@total_count Approximate total number of messages and stories found
//@forwards List of found public forwards and reposts
//@next_offset The offset for the next request. If empty, then there are no more results
storyPublicForwards total_count:int32 forwards:vector<StoryPublicForward> next_offset:string = StoryPublicForwards;
//@class ChatBoostSource @description Describes source of a chat boost
//@description The chat created a Telegram Premium gift code for a user
@ -3560,7 +3638,7 @@ chatBoostStatus boost_url:string applied_slot_ids:vector<int32> level:int32 gift
//@expiration_date Point in time (Unix timestamp) when the boost will expire
chatBoost id:string count:int32 source:ChatBoostSource start_date:int32 expiration_date:int32 = ChatBoost;
//@description Contains a list of boosts applied to a chat @total_count Total number of boosts applied to the chat @boosts List of boosts @next_offset The offset for the next request. If empty, there are no more results
//@description Contains a list of boosts applied to a chat @total_count Total number of boosts applied to the chat @boosts List of boosts @next_offset The offset for the next request. If empty, then there are no more results
foundChatBoosts total_count:int32 boosts:vector<chatBoost> next_offset:string = FoundChatBoosts;
//@description Describes a slot for chat boost
@ -3640,7 +3718,7 @@ callStatePending is_created:Bool is_received:Bool = CallState;
callStateExchangingKeys = CallState;
//@description The call is ready to use
//@protocol Call protocols supported by the peer
//@protocol Call protocols supported by the other call participant
//@servers List of available call servers
//@config A JSON-encoded call config
//@encryption_key Call encryption key
@ -3694,7 +3772,7 @@ groupCallRecentSpeaker participant_id:MessageSender is_speaking:Bool = GroupCall
//@id Group call identifier
//@title Group call title
//@scheduled_start_date Point in time (Unix timestamp) when the group call is supposed to be started by an administrator; 0 if it is already active or was ended
//@enabled_start_notification True, if the group call is scheduled and the current user will receive a notification when the group call will start
//@enabled_start_notification True, if the group call is scheduled and the current user will receive a notification when the group call starts
//@is_active True, if the call is active
//@is_rtmp_stream True, if the chat is an RTMP stream instead of an ordinary video chat
//@is_joined True, if the call is joined
@ -3777,7 +3855,7 @@ callProblemPixelatedVideo = CallProblem;
//@description Describes a call
//@id Call identifier, not persistent
//@user_id Peer user identifier
//@user_id User identifier of the other call participant
//@is_outgoing True, if the call is outgoing
//@is_video True, if the call is a video call
//@state Call state
@ -3810,7 +3888,7 @@ phoneNumberAuthenticationSettings allow_flash_call:Bool allow_missed_call:Bool i
//@date Point in time (Unix timestamp) when the reaction was added
addedReaction type:ReactionType sender_id:MessageSender is_outgoing:Bool date:int32 = AddedReaction;
//@description Represents a list of reactions added to a message @total_count The total number of found reactions @reactions The list of added reactions @next_offset The offset for the next request. If empty, there are no more results
//@description Represents a list of reactions added to a message @total_count The total number of found reactions @reactions The list of added reactions @next_offset The offset for the next request. If empty, then there are no more results
addedReactions total_count:int32 reactions:vector<addedReaction> next_offset:string = AddedReactions;
//@description Represents an available reaction @type Type of the reaction @needs_premium True, if Telegram Premium is needed to send the reaction
@ -3820,7 +3898,7 @@ availableReaction type:ReactionType needs_premium:Bool = AvailableReaction;
//@top_reactions List of reactions to be shown at the top
//@recent_reactions List of recently used reactions
//@popular_reactions List of popular reactions
//@allow_custom_emoji True, if custom emoji reactions could be added by Telegram Premium subscribers
//@allow_custom_emoji True, if any custom emoji reaction can be added by Telegram Premium subscribers
availableReactions top_reactions:vector<availableReaction> recent_reactions:vector<availableReaction> popular_reactions:vector<availableReaction> allow_custom_emoji:Bool = AvailableReactions;
//@description Contains information about a emoji reaction
@ -3869,7 +3947,7 @@ speechRecognitionResultPending partial_text:string = SpeechRecognitionResult;
//@description The speech recognition successfully finished @text Recognized text
speechRecognitionResultText text:string = SpeechRecognitionResult;
//@description The speech recognition failed @error Recognition error
//@description The speech recognition failed @error Recognition error. An error with a message "MSG_VOICE_TOO_LONG" is returned when media duration is too big to be recognized
speechRecognitionResultError error:error = SpeechRecognitionResult;
@ -4161,7 +4239,7 @@ inlineQueryResultsButton text:string type:InlineQueryResultsButtonType = InlineQ
//@inline_query_id Unique identifier of the inline query
//@button Button to be shown above inline query results; may be null
//@results Results of the query
//@next_offset The offset for the next request. If empty, there are no more results
//@next_offset The offset for the next request. If empty, then there are no more results
inlineQueryResults inline_query_id:int64 button:inlineQueryResultsButton results:vector<InlineQueryResult> next_offset:string = InlineQueryResults;
@ -4245,7 +4323,7 @@ chatEventLocationChanged old_location:chatLocation new_location:chatLocation = C
//@description The message auto-delete timer was changed @old_message_auto_delete_time Previous value of message_auto_delete_time @new_message_auto_delete_time New value of message_auto_delete_time
chatEventMessageAutoDeleteTimeChanged old_message_auto_delete_time:int32 new_message_auto_delete_time:int32 = ChatEventAction;
//@description The chat permissions was changed @old_permissions Previous chat permissions @new_permissions New chat permissions
//@description The chat permissions were changed @old_permissions Previous chat permissions @new_permissions New chat permissions
chatEventPermissionsChanged old_permissions:chatPermissions new_permissions:chatPermissions = ChatEventAction;
//@description The chat photo was changed @old_photo Previous chat photo value; may be null @new_photo New chat photo value; may be null
@ -4456,6 +4534,9 @@ premiumLimitTypeStoryCaptionLength = PremiumLimitType;
//@description The maximum number of suggested reaction areas on a story
premiumLimitTypeStorySuggestedReactionAreaCount = PremiumLimitType;
//@description The maximum number of received similar chats
premiumLimitTypeSimilarChatCount = PremiumLimitType;
//@class PremiumFeature @description Describes a feature available to Premium users
@ -4510,9 +4591,12 @@ premiumFeatureUpgradedStories = PremiumFeature;
//@description The ability to boost chats
premiumFeatureChatBoost = PremiumFeature;
//@description The ability to choose accent color
//@description The ability to choose accent color for replies and user profile
premiumFeatureAccentColor = PremiumFeature;
//@description The ability to set private chat background for both users
premiumFeatureBackgroundForBoth = PremiumFeature;
//@class PremiumStoryFeature @description Describes a story feature available to Premium users
@ -4809,13 +4893,13 @@ resetPasswordResultDeclined retry_date:int32 = ResetPasswordResult;
//@class MessageFileType @description Contains information about a file with messages exported from another app
//@description The messages was exported from a private chat @name Name of the other party; may be empty if unrecognized
//@description The messages were exported from a private chat @name Name of the other party; may be empty if unrecognized
messageFileTypePrivate name:string = MessageFileType;
//@description The messages was exported from a group chat @title Title of the group chat; may be empty if unrecognized
//@description The messages were exported from a group chat @title Title of the group chat; may be empty if unrecognized
messageFileTypeGroup title:string = MessageFileType;
//@description The messages was exported from a chat of unknown type
//@description The messages were exported from a chat of unknown type
messageFileTypeUnknown = MessageFileType;
@ -5702,16 +5786,16 @@ autosaveSettings private_chat_settings:scopeAutosaveSettings group_settings:scop
//@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 Waiting for the network to become available. Use setNetworkType to change the available network type
connectionStateWaitingForNetwork = ConnectionState;
//@description Currently establishing a connection with a proxy server
//@description Establishing a connection with a proxy server
connectionStateConnectingToProxy = ConnectionState;
//@description Currently establishing a connection to the Telegram servers
//@description Establishing a connection to the Telegram servers
connectionStateConnecting = ConnectionState;
//@description Downloading data received while the application was offline
//@description Downloading data supposed to be received while the application was offline
connectionStateUpdating = ConnectionState;
//@description There is a working connection to the Telegram servers
@ -5882,11 +5966,21 @@ statisticalGraphAsync token:string = StatisticalGraph;
statisticalGraphError error_message:string = StatisticalGraph;
//@description Contains statistics about interactions with a message
//@message_id Message identifier
//@view_count Number of times the message was viewed
//@forward_count Number of times the message was forwarded
chatStatisticsMessageInteractionInfo message_id:int53 view_count:int32 forward_count:int32 = ChatStatisticsMessageInteractionInfo;
//@class ChatStatisticsObjectType @description Describes type of an object, for which statistics are provided
//@description Describes a message sent in the chat @message_id Message identifier
chatStatisticsObjectTypeMessage message_id:int53 = ChatStatisticsObjectType;
//@description Describes a story sent by the chat @story_id Story identifier
chatStatisticsObjectTypeStory story_id:int32 = ChatStatisticsObjectType;
//@description Contains statistics about interactions with a message sent in the chat or a story sent by the chat
//@object_type Type of the object
//@view_count Number of times the object was viewed
//@forward_count Number of times the object was forwarded
//@reaction_count Number of times reactions were added to the object
chatStatisticsInteractionInfo object_type:ChatStatisticsObjectType view_count:int32 forward_count:int32 reaction_count:int32 = ChatStatisticsInteractionInfo;
//@description Contains statistics about messages sent by a user
//@user_id User identifier
@ -5931,8 +6025,12 @@ chatStatisticsSupergroup period:dateRange member_count:statisticalValue message_
//@description A detailed statistics about a channel chat
//@period A period to which the statistics applies
//@member_count Number of members in the chat
//@mean_view_count Mean number of times the recently sent messages was viewed
//@mean_share_count Mean number of times the recently sent messages was shared
//@mean_message_view_count Mean number of times the recently sent messages were viewed
//@mean_message_share_count Mean number of times the recently sent messages were shared
//@mean_message_reaction_count Mean number of times reactions were added to the recently sent messages
//@mean_story_view_count Mean number of times the recently sent stories were viewed
//@mean_story_share_count Mean number of times the recently sent stories were shared
//@mean_story_reaction_count Mean number of times reactions were added to the recently sent stories
//@enabled_notifications_percentage A percentage of users with enabled notifications for the chat; 0-100
//@member_count_graph A graph containing number of members in the chat
//@join_graph A graph containing number of members joined and left the chat
@ -5942,13 +6040,23 @@ chatStatisticsSupergroup period:dateRange member_count:statisticalValue message_
//@join_by_source_graph A graph containing number of new member joins per source
//@language_graph A graph containing number of users viewed chat messages per language
//@message_interaction_graph A graph containing number of chat message views and shares
//@message_reaction_graph A graph containing number of reactions on messages
//@story_interaction_graph A graph containing number of story views and shares
//@story_reaction_graph A graph containing number of reactions on stories
//@instant_view_interaction_graph A graph containing number of views of associated with the chat instant views
//@recent_message_interactions Detailed statistics about number of views and shares of recently sent messages
chatStatisticsChannel period:dateRange member_count:statisticalValue mean_view_count:statisticalValue mean_share_count:statisticalValue enabled_notifications_percentage:double member_count_graph:StatisticalGraph join_graph:StatisticalGraph mute_graph:StatisticalGraph view_count_by_hour_graph:StatisticalGraph view_count_by_source_graph:StatisticalGraph join_by_source_graph:StatisticalGraph language_graph:StatisticalGraph message_interaction_graph:StatisticalGraph instant_view_interaction_graph:StatisticalGraph recent_message_interactions:vector<chatStatisticsMessageInteractionInfo> = ChatStatistics;
//@recent_interactions Detailed statistics about number of views and shares of recently sent messages and stories
chatStatisticsChannel period:dateRange member_count:statisticalValue mean_message_view_count:statisticalValue mean_message_share_count:statisticalValue mean_message_reaction_count:statisticalValue mean_story_view_count:statisticalValue mean_story_share_count:statisticalValue mean_story_reaction_count:statisticalValue enabled_notifications_percentage:double member_count_graph:StatisticalGraph join_graph:StatisticalGraph mute_graph:StatisticalGraph view_count_by_hour_graph:StatisticalGraph view_count_by_source_graph:StatisticalGraph join_by_source_graph:StatisticalGraph language_graph:StatisticalGraph message_interaction_graph:StatisticalGraph message_reaction_graph:StatisticalGraph story_interaction_graph:StatisticalGraph story_reaction_graph:StatisticalGraph instant_view_interaction_graph:StatisticalGraph recent_interactions:vector<chatStatisticsInteractionInfo> = ChatStatistics;
//@description A detailed statistics about a message @message_interaction_graph A graph containing number of message views and shares
messageStatistics message_interaction_graph:StatisticalGraph = MessageStatistics;
//@description A detailed statistics about a message
//@message_interaction_graph A graph containing number of message views and shares
//@message_reaction_graph A graph containing number of message reactions
messageStatistics message_interaction_graph:StatisticalGraph message_reaction_graph:StatisticalGraph = MessageStatistics;
//@description A detailed statistics about a story
//@story_interaction_graph A graph containing number of story views and shares
//@story_reaction_graph A graph containing number of story reactions
storyStatistics story_interaction_graph:StatisticalGraph story_reaction_graph:StatisticalGraph = StoryStatistics;
//@description A point on a Cartesian plane @x The point's first coordinate @y The point's second coordinate
@ -5996,8 +6104,8 @@ updateAuthorizationState authorization_state:AuthorizationState = Update;
//@description A new message was received; can also be an outgoing message @message The new message
updateNewMessage message:message = Update;
//@description A request to send a message has reached the Telegram server. This doesn't mean that the message will be sent successfully or even that the send message request will be processed.
//-This update will be sent only if the option "use_quick_ack" is set to true. This update may be sent multiple times for the same message
//@description A request to send a message has reached the Telegram server. This doesn't mean that the message will be sent successfully.
//-This update is sent only if the option "use_quick_ack" is set to true. This update may be sent multiple times for the same message
//@chat_id The chat identifier of the sent message
//@message_id A temporary message identifier
updateMessageSendAcknowledged chat_id:int53 message_id:int53 = Update;
@ -6057,10 +6165,10 @@ updateChatPhoto chat_id:int53 photo:chatPhotoInfo = Update;
//@description A chat accent color has changed @chat_id Chat identifier @accent_color_id The new chat accent color identifier
updateChatAccentColor chat_id:int53 accent_color_id:int32 = Update;
//@description A chat's custom emoji for reply background has changed @chat_id Chat identifier @background_custom_emoji_id The new tdentifier of a custom emoji to be shown on the reply header background
//@description A chat's custom emoji for reply background has changed @chat_id Chat identifier @background_custom_emoji_id The new identifier of a custom emoji to be shown on the reply header background; 0 if none
updateChatBackgroundCustomEmoji chat_id:int53 background_custom_emoji_id:int64 = Update;
//@description Chat permissions was changed @chat_id Chat identifier @permissions The new chat permissions
//@description Chat permissions were changed @chat_id Chat identifier @permissions The new chat permissions
updateChatPermissions chat_id:int53 permissions:chatPermissions = Update;
//@description The last message of a chat was changed
@ -6136,6 +6244,9 @@ 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 default appearance has changed @chat_id Chat identifier @view_as_topics New value of view_as_topics
updateChatViewAsTopics chat_id:int53 view_as_topics:Bool = Update;
//@description A chat was blocked or unblocked @chat_id Chat identifier @block_list Block list to which the chat is added; may be null if none
updateChatBlockList chat_id:int53 block_list:BlockList = Update;
@ -6146,7 +6257,7 @@ updateChatHasScheduledMessages chat_id:int53 has_scheduled_messages:Bool = Updat
updateChatFolders chat_folders:vector<chatFolderInfo> main_chat_list_position:int32 = Update;
//@description The number of online group members has changed. This update with non-zero number of online group members is sent only for currently opened chats.
//-There is no guarantee that it will be sent just after the number of online users has changed
//-There is no guarantee that it is sent just after the number of online users has changed
//@chat_id Identifier of the chat
//@online_member_count New number of online members in the chat, or 0 if unknown
updateChatOnlineMemberCount chat_id:int53 online_member_count:int32 = Update;
@ -6171,7 +6282,7 @@ updateNotification notification_group_id:int32 notification:notification = Updat
//@removed_notification_ids Identifiers of removed group notifications, sorted by notification identifier
updateNotificationGroup notification_group_id:int32 type:NotificationGroupType chat_id:int53 notification_settings_chat_id:int53 notification_sound_id:int64 total_count:int32 added_notifications:vector<notification> removed_notification_ids:vector<int32> = Update;
//@description Contains active notifications that was shown on previous application launches. This update is sent only if the message database is used. In that case it comes once before any updateNotification and updateNotificationGroup update @groups Lists of active notification groups
//@description Contains active notifications that were shown on previous application launches. This update is sent only if the message database is used. In that case it comes once before any updateNotification and updateNotificationGroup update @groups Lists of active notification groups
updateActiveNotifications groups:vector<notificationGroup> = Update;
//@description Describes whether there are some pending notification updates. Can be used to prevent application from killing, while there are some pending notifications
@ -6334,7 +6445,7 @@ updateFavoriteStickers sticker_ids:vector<int32> = Update;
//@description The list of saved animations was updated @animation_ids The new list of file identifiers of saved animations
updateSavedAnimations animation_ids:vector<int32> = Update;
//@description The list of saved notifications sounds was updated. This update may not be sent until information about a notification sound was requested for the first time @notification_sound_ids The new list of identifiers of saved notification sounds
//@description The list of saved notification sounds was updated. This update may not be sent until information about a notification sound was requested for the first time @notification_sound_ids The new list of identifiers of saved notification sounds
updateSavedNotificationSounds notification_sound_ids:vector<int64> = Update;
//@description The selected background has changed @for_dark_theme True, if background for dark theme has changed @background The new selected background; may be null
@ -6349,6 +6460,11 @@ updateChatThemes chat_themes:vector<chatTheme> = Update;
//@available_accent_color_ids The list of accent color identifiers, which can be set through setAccentColor and setChatAccentColor. The colors must be shown in the specififed order
updateAccentColors colors:vector<accentColor> available_accent_color_ids:vector<int32> = Update;
//@description The list of supported accent colors for user profiles has changed
//@colors Information about supported colors
//@available_accent_color_ids The list of accent color identifiers, which can be set through setProfileAccentColor. The colors must be shown in the specififed order
updateProfileAccentColors colors:vector<profileAccentColor> available_accent_color_ids:vector<int32> = Update;
//@description Some language pack strings have been updated @localization_target Localization target to which the language pack belongs @language_pack_id Identifier of the updated language pack @strings List of changed language pack strings; empty if all strings have changed
updateLanguagePackStrings localization_target:string language_pack_id:string strings:vector<languagePackString> = Update;
@ -6376,6 +6492,13 @@ updateActiveEmojiReactions emojis:vector<string> = Update;
//@description The type of default reaction has changed @reaction_type The new type of the default reaction
updateDefaultReactionType reaction_type:ReactionType = Update;
//@description The parameters of speech recognition without Telegram Premium subscription has changed
//@max_media_duration The maximum allowed duration of media for speech recognition without Telegram Premium subscription
//@weekly_count The total number of allowed speech recognitions per week; 0 if none
//@left_count Number of left speech recognition attempts this week
//@next_reset_date Point in time (Unix timestamp) when the weekly number of tries will reset; 0 if unknown
updateSpeechRecognitionTrial max_media_duration:int32 weekly_count:int32 left_count:int32 next_reset_date:int32 = Update;
//@description The list of supported dice emojis has changed @emojis The new list of supported dice emojis
updateDiceEmojis emojis:vector<string> = Update;
@ -6466,7 +6589,7 @@ updatePollAnswer poll_id:int64 voter_id:MessageSender option_ids:vector<int32> =
//@description User rights changed in a chat; for bots only
//@chat_id Chat identifier
//@actor_user_id Identifier of the user, changing the rights
//@date Point in time (Unix timestamp) when the user rights was changed
//@date Point in time (Unix timestamp) when the user rights were changed
//@invite_link If user has joined the chat using an invite link, the invite link; may be null
//@via_chat_folder_invite_link True, if the user has joined the chat using an invite link for a chat folder
//@old_chat_member Previous chat member
@ -6729,8 +6852,9 @@ 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
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
//-of the types messagePinMessage, messageGameScore, messagePaymentSuccessful, messageChatSetBackground and topic messages without replied message respectively
//@description Returns information about a non-bundled message that is replied by a given message. Also, returns the pinned message, the game message, the invoice message,
//-the message with a previously set same background, and the topic creation message for messages of the types
//-messagePinMessage, messageGameScore, messagePaymentSuccessful, messageChatSetBackground and topic messages without non-bundled replied message respectively
//@chat_id Identifier of the chat the message belongs to
//@message_id Identifier of the reply message
getRepliedMessage chat_id:int53 message_id:int53 = Message;
@ -6792,6 +6916,14 @@ searchChatsOnServer query:string limit:int32 = Chats;
//@location Current user location
searchChatsNearby location:location = ChatsNearby;
//@description Returns a list of chats similar to the given chat @chat_id Identifier of the target chat; must be an identifier of a channel chat
getChatSimilarChats chat_id:int53 = Chats;
//@description Returns approximate number of chats similar to the given chat
//@chat_id Identifier of the target chat; must be an identifier of a channel chat
//@return_local Pass true to get the number of chats without sending network requests, or -1 if the number of chats is unknown locally
getChatSimilarChatCount chat_id:int53 return_local:Bool = Count;
//@description Returns a list of frequently used chats @category Category of chats to be returned @limit The maximum number of chats to be returned; up to 30
getTopChats category:TopChatCategory limit:int32 = Chats;
@ -7009,7 +7141,7 @@ translateText text:formattedText to_language_code:string = FormattedText;
//-"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, must not be scheduled, and must be from a non-secret chat
//@chat_id Identifier of the chat to which the message belongs
//@message_id Identifier of the message
recognizeSpeech chat_id:int53 message_id:int53 = Ok;
@ -7072,7 +7204,7 @@ forwardMessages chat_id:int53 message_thread_id:int53 from_chat_id:int53 message
//@chat_id Identifier of the chat to send messages
//@message_ids Identifiers of the messages to resend. Message identifiers must be in a strictly increasing order
//@quote New manually chosen quote from the message to be replied; pass null if none. Ignored if more than one message is re-sent, or if messageSendingStateFailed.need_another_reply_quote == false
resendMessages chat_id:int53 message_ids:vector<int53> quote:formattedText = Messages;
resendMessages chat_id:int53 message_ids:vector<int53> quote:inputTextQuote = Messages;
//@description Sends a notification about a screenshot taken in a chat. Supported only in private and secret chats @chat_id Chat identifier
sendChatScreenshotTakenNotification chat_id:int53 = Ok;
@ -7696,12 +7828,19 @@ setChatMessageAutoDeleteTime chat_id:int53 message_auto_delete_time:int32 = Ok;
//@permissions New non-administrator members permissions in the chat
setChatPermissions chat_id:int53 permissions:chatPermissions = Ok;
//@description Changes the background in a specific chat. Supported only in private and secret chats with non-deleted users
//@description Sets the background in a specific chat. Supported only in private and secret chats with non-deleted users
//@chat_id Chat identifier
//@background The input background to use; pass null to create a new filled background or to remove the current background
//@type Background type; pass null to remove the current background
//@background The input background to use; pass null to create a new filled background
//@type Background type; pass null to use default background type for the chosen background
//@dark_theme_dimming Dimming of the background in dark themes, as a percentage; 0-100
setChatBackground chat_id:int53 background:InputBackground type:BackgroundType dark_theme_dimming:int32 = Ok;
//@only_for_self Pass true to set background only for self; pass false to set background for both chat users. Background can be set for both users only by Telegram Premium users and if set background isn't of the type inputBackgroundPrevious
setChatBackground chat_id:int53 background:InputBackground type:BackgroundType dark_theme_dimming:int32 only_for_self:Bool = Ok;
//@description Deletes background in a specific chat
//@chat_id Chat identifier
//@restore_previous Pass true to restore previously set background. Can be used only in private and secret chats with non-deleted users if userFullInfo.set_chat_background == true.
//-Supposed to be used from messageChatSetBackground messages with the currently set background that was set for both sides by the other user
deleteChatBackground chat_id:int53 restore_previous:Bool = Ok;
//@description Changes the chat theme. Supported only in private and secret chats @chat_id Chat identifier @theme_name Name of the new chat theme; pass an empty string to return the default theme
setChatTheme chat_id:int53 theme_name:string = Ok;
@ -7719,7 +7858,10 @@ setChatNotificationSettings chat_id:int53 notification_settings:chatNotification
//@has_protected_content New value of has_protected_content
toggleChatHasProtectedContent chat_id:int53 has_protected_content:Bool = Ok;
//@description Changes the translatable state of a chat; for Telegram Premium users only @chat_id Chat identifier @is_translatable New value of is_translatable
//@description Changes the view_as_topics setting of a forum chat @chat_id Chat identifier @view_as_topics New value of view_as_topics
toggleChatViewAsTopics chat_id:int53 view_as_topics:Bool = Ok;
//@description Changes the translatable state of a chat @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
@ -7728,7 +7870,9 @@ toggleChatIsMarkedAsUnread chat_id:int53 is_marked_as_unread:Bool = Ok;
//@description Changes the value of the default disable_notification parameter, used when a message is sent to a chat @chat_id Chat identifier @default_disable_notification New value of default_disable_notification
toggleChatDefaultDisableNotification chat_id:int53 default_disable_notification:Bool = Ok;
//@description Changes reactions, available in a chat. Available for basic groups, supergroups, and channels. Requires can_change_info administrator right @chat_id Identifier of the chat @available_reactions Reactions available in the chat. All emoji reactions must be active
//@description Changes reactions, available in a chat. Available for basic groups, supergroups, and channels. Requires can_change_info administrator right
//@chat_id Identifier of the chat
//@available_reactions Reactions available in the chat. All explicitly specified emoji reactions must be active. Up to the chat's boost level custom emoji reactions can be explicitly specified
setChatAvailableReactions chat_id:int53 available_reactions:ChatAvailableReactions = Ok;
//@description Changes application-specific data associated with a chat @chat_id Chat identifier @client_data New value of client_data
@ -7885,9 +8029,10 @@ canSendStory chat_id:int53 = CanSendStoryResult;
//@caption Story caption; pass null to use an empty caption; 0-getOption("story_caption_length_max") characters
//@privacy_settings The privacy settings for the story
//@active_period Period after which the story is moved to archive, in seconds; must be one of 6 * 3600, 12 * 3600, 86400, or 2 * 86400 for Telegram Premium users, and 86400 otherwise
//@from_story_full_id Full identifier of the original story, which content was used to create the story
//@is_pinned Pass true to keep the story accessible after expiration
//@protect_content Pass true if the content of the story must be protected from forwarding and screenshotting
sendStory chat_id:int53 content:InputStoryContent areas:inputStoryAreas caption:formattedText privacy_settings:StoryPrivacySettings active_period:int32 is_pinned:Bool protect_content:Bool = Story;
sendStory chat_id:int53 content:InputStoryContent areas:inputStoryAreas caption:formattedText privacy_settings:StoryPrivacySettings active_period:int32 from_story_full_id:storyFullId is_pinned:Bool protect_content:Bool = Story;
//@description Changes content and caption of a story. Can be called only if story.can_be_edited == true
//@story_sender_chat_id Identifier of the chat that posted the story
@ -7984,6 +8129,14 @@ reportStory story_sender_chat_id:int53 story_id:int32 reason:ReportReason text:s
//-and for the next "story_stealth_mode_future_period" seconds; for Telegram Premium users only
activateStoryStealthMode = Ok;
//@description Returns forwards of a story as a message to public chats and reposts by public channels. Can be used only if the story is posted on behalf of the current user or story.can_get_statistics == true.
//-For optimal performance, the number of returned messages and stories is chosen by TDLib
//@story_sender_chat_id The identifier of the sender of the story
//@story_id The identifier of the story
//@offset Offset of the first entry to return as received from the previous request; use empty string to get the first chunk of results
//@limit The maximum number of messages and stories to be returned; must be positive and can't be greater than 100. For optimal performance, the number of returned objects is chosen by TDLib and can be smaller than the specified limit
getStoryPublicForwards story_sender_chat_id:int53 story_id:int32 offset:string limit:int32 = StoryPublicForwards;
//@description Returns the list of available chat boost slots for the current user
getAvailableChatBoostSlots = ChatBoostSlots;
@ -8054,7 +8207,7 @@ cancelDownloadFile file_id:int32 only_if_pending:Bool = Ok;
getSuggestedFileName file_id:int32 directory:string = Text;
//@description Preliminary uploads a file to the cloud before sending it in a message, which can be useful for uploading of being recorded voice and video notes. Updates updateFile will be used
//-to notify about upload progress and successful completion of the upload. The file will not have a persistent remote identifier until it will be sent in a message
//-to notify about upload progress and successful completion of the upload. The file will not have a persistent remote identifier until it is sent in a message
//@file File to upload
//@file_type File type; pass null if unknown
//@priority Priority of the upload (1-32). The higher the priority, the earlier the file will be uploaded. If the priorities of two files are equal, then the first one for which preliminaryUploadFile was called will be uploaded first
@ -8275,7 +8428,7 @@ getGroupCall group_call_id:int32 = GroupCall;
//@description Starts a scheduled group call @group_call_id Group call identifier
startScheduledGroupCall group_call_id:int32 = Ok;
//@description Toggles whether the current user will receive a notification when the group call will start; scheduled group calls only
//@description Toggles whether the current user will receive a notification when the group call starts; scheduled group calls only
//@group_call_id Group call identifier
//@enabled_start_notification New value of the enabled_start_notification setting
toggleGroupCallEnabledStartNotification group_call_id:int32 enabled_start_notification:Bool = Ok;
@ -8507,8 +8660,10 @@ searchStickerSet name:string = StickerSet;
//@description Searches for installed sticker sets by looking for specified query in their title and name @sticker_type Type of the sticker sets to search for @query Query to search for @limit The maximum number of sticker sets to return
searchInstalledStickerSets sticker_type:StickerType query:string limit:int32 = StickerSets;
//@description Searches for ordinary sticker sets by looking for specified query in their title and name. Excludes installed sticker sets from the results @query Query to search for
searchStickerSets query:string = StickerSets;
//@description Searches for sticker sets by looking for specified query in their title and name. Excludes installed sticker sets from the results
//@sticker_type Type of the sticker sets to return
//@query Query to search for
searchStickerSets sticker_type:StickerType query:string = StickerSets;
//@description Installs/uninstalls or activates/archives a sticker set @set_id Identifier of the sticker set @is_installed The new value of is_installed @is_archived The new value of is_archived. A sticker set can't be installed and archived simultaneously
changeStickerSet set_id:int64 is_installed:Bool is_archived:Bool = Ok;
@ -8620,6 +8775,11 @@ deleteProfilePhoto profile_photo_id:int64 = Ok;
//@background_custom_emoji_id Identifier of a custom emoji to be shown on the reply header background; 0 if none
setAccentColor accent_color_id:int32 background_custom_emoji_id:int64 = Ok;
//@description Changes accent color and background custom emoji for profile of the current user; for Telegram Premium users only
//@profile_accent_color_id Identifier of the accent color to use for profile; pass -1 if none
//@profile_background_custom_emoji_id Identifier of a custom emoji to be shown in the on the user's profile photo background; 0 if none
setProfileAccentColor profile_accent_color_id:int32 profile_background_custom_emoji_id:int64 = Ok;
//@description Changes the first and last name of the current user @first_name The new value of the first name for the current user; 1-64 characters @last_name The new value of the optional last name for the current user; 0-64 characters
setName first_name:string last_name:string = Ok;
@ -9052,6 +9212,9 @@ getMessageStatistics chat_id:int53 message_id:int53 is_dark:Bool = MessageStatis
//@limit The maximum number of messages to be returned; must be positive and can't be greater than 100. For optimal performance, the number of returned messages is chosen by TDLib and can be smaller than the specified limit
getMessagePublicForwards chat_id:int53 message_id:int53 offset:string limit:int32 = FoundMessages;
//@description Returns detailed statistics about a story. Can be used only if story.can_get_statistics == true @chat_id Chat identifier @story_id Story identifier @is_dark Pass true if a dark theme is used by the application
getStoryStatistics chat_id:int53 story_id:int32 is_dark:Bool = StoryStatistics;
//@description Loads an asynchronous or a zoomed in statistical graph @chat_id Chat identifier @token The token for graph loading @x X-value for zoomed in graph or 0 otherwise
getStatisticalGraph chat_id:int53 token:string x:int53 = StatisticalGraph;