Update to TDLib 1.8.45

This commit is contained in:
c0re100 2025-02-14 02:21:05 +08:00
parent bda4018ed3
commit baee9b059d
No known key found for this signature in database
GPG key ID: 7C3B3004FE745AAF
4 changed files with 374 additions and 48 deletions

View file

@ -5963,6 +5963,32 @@ func (client *Client) RemoveMessageReaction(req *RemoveMessageReactionRequest) (
return UnmarshalOk(result.Data) return UnmarshalOk(result.Data)
} }
type GetChatAvailablePaidMessageReactionSendersRequest struct {
// Chat identifier
ChatId int64 `json:"chat_id"`
}
// Returns the list of message sender identifiers, which can be used to send a paid reaction in a chat
func (client *Client) GetChatAvailablePaidMessageReactionSenders(req *GetChatAvailablePaidMessageReactionSendersRequest) (*MessageSenders, error) {
result, err := client.Send(Request{
meta: meta{
Type: "getChatAvailablePaidMessageReactionSenders",
},
Data: map[string]interface{}{
"chat_id": req.ChatId,
},
})
if err != nil {
return nil, err
}
if result.Type == "error" {
return nil, buildResponseError(result.Data)
}
return UnmarshalMessageSenders(result.Data)
}
type AddPendingPaidMessageReactionRequest struct { type AddPendingPaidMessageReactionRequest struct {
// Identifier of the chat to which the message belongs // Identifier of the chat to which the message belongs
ChatId int64 `json:"chat_id"` ChatId int64 `json:"chat_id"`
@ -5970,10 +5996,8 @@ type AddPendingPaidMessageReactionRequest struct {
MessageId int64 `json:"message_id"` MessageId int64 `json:"message_id"`
// Number of Telegram Stars to be used for the reaction. The total number of pending paid reactions must not exceed getOption("paid_reaction_star_count_max") // Number of Telegram Stars to be used for the reaction. The total number of pending paid reactions must not exceed getOption("paid_reaction_star_count_max")
StarCount int64 `json:"star_count"` StarCount int64 `json:"star_count"`
// Pass true if the user didn't choose anonymity explicitly, for example, the reaction is set from the message bubble // Type of the paid reaction; pass null if the user didn't choose reaction type explicitly, for example, the reaction is set from the message bubble
UseDefaultIsAnonymous bool `json:"use_default_is_anonymous"` Type PaidReactionType `json:"type"`
// Pass true to make paid reaction of the user on the message anonymous; pass false to make the user's profile visible among top reactors. Ignored if use_default_is_anonymous == true
IsAnonymous bool `json:"is_anonymous"`
} }
// Adds the paid message reaction to a message. Use getMessageAvailableReactions to check whether the reaction is available for the message // Adds the paid message reaction to a message. Use getMessageAvailableReactions to check whether the reaction is available for the message
@ -5986,8 +6010,7 @@ func (client *Client) AddPendingPaidMessageReaction(req *AddPendingPaidMessageRe
"chat_id": req.ChatId, "chat_id": req.ChatId,
"message_id": req.MessageId, "message_id": req.MessageId,
"star_count": req.StarCount, "star_count": req.StarCount,
"use_default_is_anonymous": req.UseDefaultIsAnonymous, "type": req.Type,
"is_anonymous": req.IsAnonymous,
}, },
}) })
if err != nil { if err != nil {
@ -6059,25 +6082,25 @@ func (client *Client) RemovePendingPaidMessageReactions(req *RemovePendingPaidMe
return UnmarshalOk(result.Data) return UnmarshalOk(result.Data)
} }
type TogglePaidMessageReactionIsAnonymousRequest struct { type SetPaidMessageReactionTypeRequest struct {
// Identifier of the chat to which the message belongs // Identifier of the chat to which the message belongs
ChatId int64 `json:"chat_id"` ChatId int64 `json:"chat_id"`
// Identifier of the message // Identifier of the message
MessageId int64 `json:"message_id"` MessageId int64 `json:"message_id"`
// Pass true to make paid reaction of the user on the message anonymous; pass false to make the user's profile visible among top reactors // New type of the paid reaction
IsAnonymous bool `json:"is_anonymous"` Type PaidReactionType `json:"type"`
} }
// Changes whether the paid message reaction of the user to a message is anonymous. The message must have paid reaction added by the user // Changes type of paid message reaction of the current user on a message. The message must have paid reaction added by the current user
func (client *Client) TogglePaidMessageReactionIsAnonymous(req *TogglePaidMessageReactionIsAnonymousRequest) (*Ok, error) { func (client *Client) SetPaidMessageReactionType(req *SetPaidMessageReactionTypeRequest) (*Ok, error) {
result, err := client.Send(Request{ result, err := client.Send(Request{
meta: meta{ meta: meta{
Type: "togglePaidMessageReactionIsAnonymous", Type: "setPaidMessageReactionType",
}, },
Data: map[string]interface{}{ Data: map[string]interface{}{
"chat_id": req.ChatId, "chat_id": req.ChatId,
"message_id": req.MessageId, "message_id": req.MessageId,
"is_anonymous": req.IsAnonymous, "type": req.Type,
}, },
}) })
if err != nil { if err != nil {
@ -7318,7 +7341,7 @@ func (client *Client) GetWebAppLinkUrl(req *GetWebAppLinkUrlRequest) (*HttpUrl,
type GetMainWebAppRequest struct { type GetMainWebAppRequest struct {
// Identifier of the chat in which the Web App is opened; pass 0 if none // Identifier of the chat in which the Web App is opened; pass 0 if none
ChatId int64 `json:"chat_id"` ChatId int64 `json:"chat_id"`
// Identifier of the target bot // Identifier of the target bot. If the bot is restricted for the current user, then show an error instead of calling the method
BotUserId int64 `json:"bot_user_id"` BotUserId int64 `json:"bot_user_id"`
// Start parameter from internalLinkTypeMainWebApp // Start parameter from internalLinkTypeMainWebApp
StartParameter string `json:"start_parameter"` StartParameter string `json:"start_parameter"`
@ -7351,7 +7374,7 @@ func (client *Client) GetMainWebApp(req *GetMainWebAppRequest) (*MainWebApp, err
} }
type GetWebAppUrlRequest struct { type GetWebAppUrlRequest struct {
// Identifier of the target bot // Identifier of the target bot. If the bot is restricted for the current user, then show an error instead of calling the method
BotUserId int64 `json:"bot_user_id"` BotUserId int64 `json:"bot_user_id"`
// The URL from a keyboardButtonTypeWebApp button, inlineQueryResultsButtonTypeWebApp button, or an empty string when the bot is opened from the side menu // The URL from a keyboardButtonTypeWebApp button, inlineQueryResultsButtonTypeWebApp button, or an empty string when the bot is opened from the side menu
Url string `json:"url"` Url string `json:"url"`
@ -7417,7 +7440,7 @@ func (client *Client) SendWebAppData(req *SendWebAppDataRequest) (*Ok, error) {
type OpenWebAppRequest struct { type OpenWebAppRequest struct {
// Identifier of the chat in which the Web App is opened. The Web App can't be opened in secret chats // Identifier of the chat in which the Web App is opened. The Web App can't be opened in secret chats
ChatId int64 `json:"chat_id"` ChatId int64 `json:"chat_id"`
// Identifier of the bot, providing the Web App // Identifier of the bot, providing the Web App. If the bot is restricted for the current user, then show an error instead of calling the method
BotUserId int64 `json:"bot_user_id"` BotUserId int64 `json:"bot_user_id"`
// The URL from an inlineKeyboardButtonTypeWebApp button, a botMenuButton button, an internalLinkTypeAttachmentMenuBot link, or an empty string otherwise // The URL from an inlineKeyboardButtonTypeWebApp button, a botMenuButton button, an internalLinkTypeAttachmentMenuBot link, or an empty string otherwise
Url string `json:"url"` Url string `json:"url"`
@ -12551,13 +12574,13 @@ func (client *Client) SearchFileDownloads(req *SearchFileDownloadsRequest) (*Fou
} }
type SetApplicationVerificationTokenRequest struct { type SetApplicationVerificationTokenRequest struct {
// Unique identifier for the verification process as received from updateApplicationVerificationRequired // Unique identifier for the verification process as received from updateApplicationVerificationRequired or updateApplicationRecaptchaVerificationRequired
VerificationId int64 `json:"verification_id"` VerificationId int64 `json:"verification_id"`
// Play Integrity API token for the Android application, or secret from push notification for the iOS application; pass an empty string to abort verification and receive error VERIFICATION_FAILED for the request // Play Integrity API token for the Android application, or secret from push notification for the iOS application for application verification, or reCAPTCHA token for reCAPTCHA verifications; pass an empty string to abort verification and receive error VERIFICATION_FAILED for the request
Token string `json:"token"` Token string `json:"token"`
} }
// Application verification has been completed. Can be called before authorization // Application or reCAPTCHA verification has been completed. Can be called before authorization
func (client *Client) SetApplicationVerificationToken(req *SetApplicationVerificationTokenRequest) (*Ok, error) { func (client *Client) SetApplicationVerificationToken(req *SetApplicationVerificationTokenRequest) (*Ok, error) {
result, err := client.Send(Request{ result, err := client.Send(Request{
meta: meta{ meta: meta{
@ -19097,15 +19120,15 @@ type GetReceivedGiftsRequest struct {
OwnerId MessageSender `json:"owner_id"` OwnerId MessageSender `json:"owner_id"`
// Pass true to exclude gifts that aren't saved to the chat's profile page. Always true for gifts received by other users and channel chats without can_post_messages administrator right // Pass true to exclude gifts that aren't saved to the chat's profile page. Always true for gifts received by other users and channel chats without can_post_messages administrator right
ExcludeUnsaved bool `json:"exclude_unsaved"` ExcludeUnsaved bool `json:"exclude_unsaved"`
// Pass true to exclude gifts that are saved to the chat's profile page; for channel chats with can_post_messages administrator right only // Pass true to exclude gifts that are saved to the chat's profile page. Always false for gifts received by other users and channel chats without can_post_messages administrator right
ExcludeSaved bool `json:"exclude_saved"` ExcludeSaved bool `json:"exclude_saved"`
// Pass true to exclude gifts that can be purchased unlimited number of times; for channel chats with can_post_messages administrator right only // Pass true to exclude gifts that can be purchased unlimited number of times
ExcludeUnlimited bool `json:"exclude_unlimited"` ExcludeUnlimited bool `json:"exclude_unlimited"`
// Pass true to exclude gifts that can be purchased limited number of times; for channel chats with can_post_messages administrator right only // Pass true to exclude gifts that can be purchased limited number of times
ExcludeLimited bool `json:"exclude_limited"` ExcludeLimited bool `json:"exclude_limited"`
// Pass true to exclude upgraded gifts; for channel chats with can_post_messages administrator right only // Pass true to exclude upgraded gifts
ExcludeUpgraded bool `json:"exclude_upgraded"` ExcludeUpgraded bool `json:"exclude_upgraded"`
// Pass true to sort results by gift price instead of send date; for channel chats with can_post_messages administrator right only // Pass true to sort results by gift price instead of send date
SortByPrice bool `json:"sort_by_price"` SortByPrice bool `json:"sort_by_price"`
// Offset of the first entry to return as received from the previous request; use empty string to get the first chunk of results // Offset of the first entry to return as received from the previous request; use empty string to get the first chunk of results
Offset string `json:"offset"` Offset string `json:"offset"`
@ -24375,6 +24398,9 @@ func (client *Client) TestUseUpdate() (Update, error) {
case TypeUpdateApplicationVerificationRequired: case TypeUpdateApplicationVerificationRequired:
return UnmarshalUpdateApplicationVerificationRequired(result.Data) return UnmarshalUpdateApplicationVerificationRequired(result.Data)
case TypeUpdateApplicationRecaptchaVerificationRequired:
return UnmarshalUpdateApplicationRecaptchaVerificationRequired(result.Data)
case TypeUpdateCall: case TypeUpdateCall:
return UnmarshalUpdateCall(result.Data) return UnmarshalUpdateCall(result.Data)
@ -24480,6 +24506,9 @@ func (client *Client) TestUseUpdate() (Update, error) {
case TypeUpdateDefaultReactionType: case TypeUpdateDefaultReactionType:
return UnmarshalUpdateDefaultReactionType(result.Data) return UnmarshalUpdateDefaultReactionType(result.Data)
case TypeUpdateDefaultPaidReactionType:
return UnmarshalUpdateDefaultPaidReactionType(result.Data)
case TypeUpdateSavedMessagesTags: case TypeUpdateSavedMessagesTags:
return UnmarshalUpdateSavedMessagesTags(result.Data) return UnmarshalUpdateSavedMessagesTags(result.Data)

View file

@ -42,6 +42,7 @@ const (
ClassMessageReadDate = "MessageReadDate" ClassMessageReadDate = "MessageReadDate"
ClassMessageOrigin = "MessageOrigin" ClassMessageOrigin = "MessageOrigin"
ClassReactionType = "ReactionType" ClassReactionType = "ReactionType"
ClassPaidReactionType = "PaidReactionType"
ClassMessageEffectType = "MessageEffectType" ClassMessageEffectType = "MessageEffectType"
ClassMessageSendingState = "MessageSendingState" ClassMessageSendingState = "MessageSendingState"
ClassMessageReplyTo = "MessageReplyTo" ClassMessageReplyTo = "MessageReplyTo"
@ -904,6 +905,9 @@ const (
TypeReactionTypeEmoji = "reactionTypeEmoji" TypeReactionTypeEmoji = "reactionTypeEmoji"
TypeReactionTypeCustomEmoji = "reactionTypeCustomEmoji" TypeReactionTypeCustomEmoji = "reactionTypeCustomEmoji"
TypeReactionTypePaid = "reactionTypePaid" TypeReactionTypePaid = "reactionTypePaid"
TypePaidReactionTypeRegular = "paidReactionTypeRegular"
TypePaidReactionTypeAnonymous = "paidReactionTypeAnonymous"
TypePaidReactionTypeChat = "paidReactionTypeChat"
TypePaidReactor = "paidReactor" TypePaidReactor = "paidReactor"
TypeMessageForwardInfo = "messageForwardInfo" TypeMessageForwardInfo = "messageForwardInfo"
TypeMessageImportInfo = "messageImportInfo" TypeMessageImportInfo = "messageImportInfo"
@ -2217,6 +2221,7 @@ const (
TypeUpdateFileDownload = "updateFileDownload" TypeUpdateFileDownload = "updateFileDownload"
TypeUpdateFileRemovedFromDownloads = "updateFileRemovedFromDownloads" TypeUpdateFileRemovedFromDownloads = "updateFileRemovedFromDownloads"
TypeUpdateApplicationVerificationRequired = "updateApplicationVerificationRequired" TypeUpdateApplicationVerificationRequired = "updateApplicationVerificationRequired"
TypeUpdateApplicationRecaptchaVerificationRequired = "updateApplicationRecaptchaVerificationRequired"
TypeUpdateCall = "updateCall" TypeUpdateCall = "updateCall"
TypeUpdateGroupCall = "updateGroupCall" TypeUpdateGroupCall = "updateGroupCall"
TypeUpdateGroupCallParticipant = "updateGroupCallParticipant" TypeUpdateGroupCallParticipant = "updateGroupCallParticipant"
@ -2252,6 +2257,7 @@ const (
TypeUpdateActiveEmojiReactions = "updateActiveEmojiReactions" TypeUpdateActiveEmojiReactions = "updateActiveEmojiReactions"
TypeUpdateAvailableMessageEffects = "updateAvailableMessageEffects" TypeUpdateAvailableMessageEffects = "updateAvailableMessageEffects"
TypeUpdateDefaultReactionType = "updateDefaultReactionType" TypeUpdateDefaultReactionType = "updateDefaultReactionType"
TypeUpdateDefaultPaidReactionType = "updateDefaultPaidReactionType"
TypeUpdateSavedMessagesTags = "updateSavedMessagesTags" TypeUpdateSavedMessagesTags = "updateSavedMessagesTags"
TypeUpdateActiveLiveLocationMessages = "updateActiveLiveLocationMessages" TypeUpdateActiveLiveLocationMessages = "updateActiveLiveLocationMessages"
TypeUpdateOwnedStarCount = "updateOwnedStarCount" TypeUpdateOwnedStarCount = "updateOwnedStarCount"
@ -2477,6 +2483,11 @@ type ReactionType interface {
ReactionTypeType() string ReactionTypeType() string
} }
// Describes type of paid message reaction
type PaidReactionType interface {
PaidReactionTypeType() string
}
// Describes type of emoji effect // Describes type of emoji effect
type MessageEffectType interface { type MessageEffectType interface {
MessageEffectTypeType() string MessageEffectTypeType() string
@ -8651,6 +8662,8 @@ type UpgradedGift struct {
OwnerAddress string `json:"owner_address"` OwnerAddress string `json:"owner_address"`
// Name of the owner for the case when owner identifier and address aren't known // Name of the owner for the case when owner identifier and address aren't known
OwnerName string `json:"owner_name"` OwnerName string `json:"owner_name"`
// Address of the gift NFT in TON blockchain; may be empty if none
GiftAddress string `json:"gift_address"`
// Model of the upgraded gift // Model of the upgraded gift
Model *UpgradedGiftModel `json:"model"` Model *UpgradedGiftModel `json:"model"`
// Symbol of the upgraded gift // Symbol of the upgraded gift
@ -8688,6 +8701,7 @@ func (upgradedGift *UpgradedGift) UnmarshalJSON(data []byte) error {
OwnerId json.RawMessage `json:"owner_id"` OwnerId json.RawMessage `json:"owner_id"`
OwnerAddress string `json:"owner_address"` OwnerAddress string `json:"owner_address"`
OwnerName string `json:"owner_name"` OwnerName string `json:"owner_name"`
GiftAddress string `json:"gift_address"`
Model *UpgradedGiftModel `json:"model"` Model *UpgradedGiftModel `json:"model"`
Symbol *UpgradedGiftSymbol `json:"symbol"` Symbol *UpgradedGiftSymbol `json:"symbol"`
Backdrop *UpgradedGiftBackdrop `json:"backdrop"` Backdrop *UpgradedGiftBackdrop `json:"backdrop"`
@ -8707,6 +8721,7 @@ func (upgradedGift *UpgradedGift) UnmarshalJSON(data []byte) error {
upgradedGift.MaxUpgradedCount = tmp.MaxUpgradedCount upgradedGift.MaxUpgradedCount = tmp.MaxUpgradedCount
upgradedGift.OwnerAddress = tmp.OwnerAddress upgradedGift.OwnerAddress = tmp.OwnerAddress
upgradedGift.OwnerName = tmp.OwnerName upgradedGift.OwnerName = tmp.OwnerName
upgradedGift.GiftAddress = tmp.GiftAddress
upgradedGift.Model = tmp.Model upgradedGift.Model = tmp.Model
upgradedGift.Symbol = tmp.Symbol upgradedGift.Symbol = tmp.Symbol
upgradedGift.Backdrop = tmp.Backdrop upgradedGift.Backdrop = tmp.Backdrop
@ -13166,6 +13181,83 @@ func (*ReactionTypePaid) ReactionTypeType() string {
return TypeReactionTypePaid return TypeReactionTypePaid
} }
// A paid reaction on behalf of the current user
type PaidReactionTypeRegular struct{
meta
}
func (entity *PaidReactionTypeRegular) MarshalJSON() ([]byte, error) {
entity.meta.Type = entity.GetType()
type stub PaidReactionTypeRegular
return json.Marshal((*stub)(entity))
}
func (*PaidReactionTypeRegular) GetClass() string {
return ClassPaidReactionType
}
func (*PaidReactionTypeRegular) GetType() string {
return TypePaidReactionTypeRegular
}
func (*PaidReactionTypeRegular) PaidReactionTypeType() string {
return TypePaidReactionTypeRegular
}
// An anonymous paid reaction
type PaidReactionTypeAnonymous struct{
meta
}
func (entity *PaidReactionTypeAnonymous) MarshalJSON() ([]byte, error) {
entity.meta.Type = entity.GetType()
type stub PaidReactionTypeAnonymous
return json.Marshal((*stub)(entity))
}
func (*PaidReactionTypeAnonymous) GetClass() string {
return ClassPaidReactionType
}
func (*PaidReactionTypeAnonymous) GetType() string {
return TypePaidReactionTypeAnonymous
}
func (*PaidReactionTypeAnonymous) PaidReactionTypeType() string {
return TypePaidReactionTypeAnonymous
}
// A paid reaction on behalf of an owned chat
type PaidReactionTypeChat struct {
meta
// Identifier of the chat
ChatId int64 `json:"chat_id"`
}
func (entity *PaidReactionTypeChat) MarshalJSON() ([]byte, error) {
entity.meta.Type = entity.GetType()
type stub PaidReactionTypeChat
return json.Marshal((*stub)(entity))
}
func (*PaidReactionTypeChat) GetClass() string {
return ClassPaidReactionType
}
func (*PaidReactionTypeChat) GetType() string {
return TypePaidReactionTypeChat
}
func (*PaidReactionTypeChat) PaidReactionTypeType() string {
return TypePaidReactionTypeChat
}
// Contains information about a user that added paid reactions // Contains information about a user that added paid reactions
type PaidReactor struct { type PaidReactor struct {
meta meta
@ -21459,6 +21551,10 @@ type LinkPreviewTypeVideo struct {
meta meta
// The video description // The video description
Video *Video `json:"video"` Video *Video `json:"video"`
// Cover of the video; may be null if none
Cover *Photo `json:"cover"`
// Timestamp from which the video playing must start, in seconds
StartTimestamp int32 `json:"start_timestamp"`
} }
func (entity *LinkPreviewTypeVideo) MarshalJSON() ([]byte, error) { func (entity *LinkPreviewTypeVideo) MarshalJSON() ([]byte, error) {
@ -48591,7 +48687,7 @@ func (*InternalLinkTypeVideoChat) InternalLinkTypeType() string {
return TypeInternalLinkTypeVideoChat return TypeInternalLinkTypeVideoChat
} }
// The link is a link to a Web App. Call searchPublicChat with the given bot username, check that the user is a bot, then call searchWebApp with the received bot and the given web_app_short_name. Process received foundWebApp by showing a confirmation dialog if needed. If the bot can be added to attachment or side menu, but isn't added yet, then show a disclaimer about Mini Apps being third-party applications instead of the dialog and ask the user to accept their Terms of service. If the user accept the terms and confirms adding, then use toggleBotIsAddedToAttachmentMenu to add the bot. Then, call getWebAppLinkUrl and open the returned URL as a Web App // The link is a link to a Web App. Call searchPublicChat with the given bot username, check that the user is a bot. If the bot is restricted for the current user, then show an error message. Otherwise, call searchWebApp with the received bot and the given web_app_short_name. Process received foundWebApp by showing a confirmation dialog if needed. If the bot can be added to attachment or side menu, but isn't added yet, then show a disclaimer about Mini Apps being third-party applications instead of the dialog and ask the user to accept their Terms of service. If the user accept the terms and confirms adding, then use toggleBotIsAddedToAttachmentMenu to add the bot. Then, call getWebAppLinkUrl and open the returned URL as a Web App
type InternalLinkTypeWebApp struct { type InternalLinkTypeWebApp struct {
meta meta
// Username of the bot that owns the Web App // Username of the bot that owns the Web App
@ -55542,6 +55638,37 @@ func (*UpdateApplicationVerificationRequired) UpdateType() string {
return TypeUpdateApplicationVerificationRequired return TypeUpdateApplicationVerificationRequired
} }
// A request can't be completed unless reCAPTCHA verification is performed; for official mobile applications only. The method setApplicationVerificationToken must be called once the verification is completed or failed
type UpdateApplicationRecaptchaVerificationRequired struct {
meta
// Unique identifier for the verification process
VerificationId int64 `json:"verification_id"`
// The action for the check
Action string `json:"action"`
// Identifier of the reCAPTCHA key
RecaptchaKeyId string `json:"recaptcha_key_id"`
}
func (entity *UpdateApplicationRecaptchaVerificationRequired) MarshalJSON() ([]byte, error) {
entity.meta.Type = entity.GetType()
type stub UpdateApplicationRecaptchaVerificationRequired
return json.Marshal((*stub)(entity))
}
func (*UpdateApplicationRecaptchaVerificationRequired) GetClass() string {
return ClassUpdate
}
func (*UpdateApplicationRecaptchaVerificationRequired) GetType() string {
return TypeUpdateApplicationRecaptchaVerificationRequired
}
func (*UpdateApplicationRecaptchaVerificationRequired) UpdateType() string {
return TypeUpdateApplicationRecaptchaVerificationRequired
}
// New call was created or information about a call was updated // New call was created or information about a call was updated
type UpdateCall struct { type UpdateCall struct {
meta meta
@ -56737,6 +56864,49 @@ func (updateDefaultReactionType *UpdateDefaultReactionType) UnmarshalJSON(data [
return nil return nil
} }
// The type of default paid reaction has changed
type UpdateDefaultPaidReactionType struct {
meta
// The new type of the default paid reaction
Type PaidReactionType `json:"type"`
}
func (entity *UpdateDefaultPaidReactionType) MarshalJSON() ([]byte, error) {
entity.meta.Type = entity.GetType()
type stub UpdateDefaultPaidReactionType
return json.Marshal((*stub)(entity))
}
func (*UpdateDefaultPaidReactionType) GetClass() string {
return ClassUpdate
}
func (*UpdateDefaultPaidReactionType) GetType() string {
return TypeUpdateDefaultPaidReactionType
}
func (*UpdateDefaultPaidReactionType) UpdateType() string {
return TypeUpdateDefaultPaidReactionType
}
func (updateDefaultPaidReactionType *UpdateDefaultPaidReactionType) UnmarshalJSON(data []byte) error {
var tmp struct {
Type json.RawMessage `json:"type"`
}
err := json.Unmarshal(data, &tmp)
if err != nil {
return err
}
fieldType, _ := UnmarshalPaidReactionType(tmp.Type)
updateDefaultPaidReactionType.Type = fieldType
return nil
}
// Tags used in Saved Messages or a Saved Messages topic have changed // Tags used in Saved Messages or a Saved Messages topic have changed
type UpdateSavedMessagesTags struct { type UpdateSavedMessagesTags struct {
meta meta

View file

@ -1464,6 +1464,43 @@ func UnmarshalListOfReactionType(dataList []json.RawMessage) ([]ReactionType, er
return list, nil return list, nil
} }
func UnmarshalPaidReactionType(data json.RawMessage) (PaidReactionType, error) {
var meta meta
err := json.Unmarshal(data, &meta)
if err != nil {
return nil, err
}
switch meta.Type {
case TypePaidReactionTypeRegular:
return UnmarshalPaidReactionTypeRegular(data)
case TypePaidReactionTypeAnonymous:
return UnmarshalPaidReactionTypeAnonymous(data)
case TypePaidReactionTypeChat:
return UnmarshalPaidReactionTypeChat(data)
default:
return nil, fmt.Errorf("Error unmarshaling. Unknown type: " + meta.Type)
}
}
func UnmarshalListOfPaidReactionType(dataList []json.RawMessage) ([]PaidReactionType, error) {
list := []PaidReactionType{}
for _, data := range dataList {
entity, err := UnmarshalPaidReactionType(data)
if err != nil {
return nil, err
}
list = append(list, entity)
}
return list, nil
}
func UnmarshalMessageEffectType(data json.RawMessage) (MessageEffectType, error) { func UnmarshalMessageEffectType(data json.RawMessage) (MessageEffectType, error) {
var meta meta var meta meta
@ -8158,6 +8195,9 @@ func UnmarshalUpdate(data json.RawMessage) (Update, error) {
case TypeUpdateApplicationVerificationRequired: case TypeUpdateApplicationVerificationRequired:
return UnmarshalUpdateApplicationVerificationRequired(data) return UnmarshalUpdateApplicationVerificationRequired(data)
case TypeUpdateApplicationRecaptchaVerificationRequired:
return UnmarshalUpdateApplicationRecaptchaVerificationRequired(data)
case TypeUpdateCall: case TypeUpdateCall:
return UnmarshalUpdateCall(data) return UnmarshalUpdateCall(data)
@ -8263,6 +8303,9 @@ func UnmarshalUpdate(data json.RawMessage) (Update, error) {
case TypeUpdateDefaultReactionType: case TypeUpdateDefaultReactionType:
return UnmarshalUpdateDefaultReactionType(data) return UnmarshalUpdateDefaultReactionType(data)
case TypeUpdateDefaultPaidReactionType:
return UnmarshalUpdateDefaultPaidReactionType(data)
case TypeUpdateSavedMessagesTags: case TypeUpdateSavedMessagesTags:
return UnmarshalUpdateSavedMessagesTags(data) return UnmarshalUpdateSavedMessagesTags(data)
@ -10853,6 +10896,30 @@ func UnmarshalReactionTypePaid(data json.RawMessage) (*ReactionTypePaid, error)
return &resp, err return &resp, err
} }
func UnmarshalPaidReactionTypeRegular(data json.RawMessage) (*PaidReactionTypeRegular, error) {
var resp PaidReactionTypeRegular
err := json.Unmarshal(data, &resp)
return &resp, err
}
func UnmarshalPaidReactionTypeAnonymous(data json.RawMessage) (*PaidReactionTypeAnonymous, error) {
var resp PaidReactionTypeAnonymous
err := json.Unmarshal(data, &resp)
return &resp, err
}
func UnmarshalPaidReactionTypeChat(data json.RawMessage) (*PaidReactionTypeChat, error) {
var resp PaidReactionTypeChat
err := json.Unmarshal(data, &resp)
return &resp, err
}
func UnmarshalPaidReactor(data json.RawMessage) (*PaidReactor, error) { func UnmarshalPaidReactor(data json.RawMessage) (*PaidReactor, error) {
var resp PaidReactor var resp PaidReactor
@ -21357,6 +21424,14 @@ func UnmarshalUpdateApplicationVerificationRequired(data json.RawMessage) (*Upda
return &resp, err return &resp, err
} }
func UnmarshalUpdateApplicationRecaptchaVerificationRequired(data json.RawMessage) (*UpdateApplicationRecaptchaVerificationRequired, error) {
var resp UpdateApplicationRecaptchaVerificationRequired
err := json.Unmarshal(data, &resp)
return &resp, err
}
func UnmarshalUpdateCall(data json.RawMessage) (*UpdateCall, error) { func UnmarshalUpdateCall(data json.RawMessage) (*UpdateCall, error) {
var resp UpdateCall var resp UpdateCall
@ -21637,6 +21712,14 @@ func UnmarshalUpdateDefaultReactionType(data json.RawMessage) (*UpdateDefaultRea
return &resp, err return &resp, err
} }
func UnmarshalUpdateDefaultPaidReactionType(data json.RawMessage) (*UpdateDefaultPaidReactionType, error) {
var resp UpdateDefaultPaidReactionType
err := json.Unmarshal(data, &resp)
return &resp, err
}
func UnmarshalUpdateSavedMessagesTags(data json.RawMessage) (*UpdateSavedMessagesTags, error) { func UnmarshalUpdateSavedMessagesTags(data json.RawMessage) (*UpdateSavedMessagesTags, error) {
var resp UpdateSavedMessagesTags var resp UpdateSavedMessagesTags
@ -22942,6 +23025,15 @@ func UnmarshalType(data json.RawMessage) (Type, error) {
case TypeReactionTypePaid: case TypeReactionTypePaid:
return UnmarshalReactionTypePaid(data) return UnmarshalReactionTypePaid(data)
case TypePaidReactionTypeRegular:
return UnmarshalPaidReactionTypeRegular(data)
case TypePaidReactionTypeAnonymous:
return UnmarshalPaidReactionTypeAnonymous(data)
case TypePaidReactionTypeChat:
return UnmarshalPaidReactionTypeChat(data)
case TypePaidReactor: case TypePaidReactor:
return UnmarshalPaidReactor(data) return UnmarshalPaidReactor(data)
@ -26881,6 +26973,9 @@ func UnmarshalType(data json.RawMessage) (Type, error) {
case TypeUpdateApplicationVerificationRequired: case TypeUpdateApplicationVerificationRequired:
return UnmarshalUpdateApplicationVerificationRequired(data) return UnmarshalUpdateApplicationVerificationRequired(data)
case TypeUpdateApplicationRecaptchaVerificationRequired:
return UnmarshalUpdateApplicationRecaptchaVerificationRequired(data)
case TypeUpdateCall: case TypeUpdateCall:
return UnmarshalUpdateCall(data) return UnmarshalUpdateCall(data)
@ -26986,6 +27081,9 @@ func UnmarshalType(data json.RawMessage) (Type, error) {
case TypeUpdateDefaultReactionType: case TypeUpdateDefaultReactionType:
return UnmarshalUpdateDefaultReactionType(data) return UnmarshalUpdateDefaultReactionType(data)
case TypeUpdateDefaultPaidReactionType:
return UnmarshalUpdateDefaultPaidReactionType(data)
case TypeUpdateSavedMessagesTags: case TypeUpdateSavedMessagesTags:
return UnmarshalUpdateSavedMessagesTags(data) return UnmarshalUpdateSavedMessagesTags(data)

View file

@ -1086,11 +1086,12 @@ gifts gifts:vector<gift> = Gifts;
//@owner_id Identifier of the user or the chat that owns the upgraded gift; may be null if none or unknown //@owner_id Identifier of the user or the chat that owns the upgraded gift; may be null if none or unknown
//@owner_address Address of the gift NFT owner in TON blockchain; may be empty if none //@owner_address Address of the gift NFT owner in TON blockchain; may be empty if none
//@owner_name Name of the owner for the case when owner identifier and address aren't known //@owner_name Name of the owner for the case when owner identifier and address aren't known
//@gift_address Address of the gift NFT in TON blockchain; may be empty if none
//@model Model of the upgraded gift //@model Model of the upgraded gift
//@symbol Symbol of the upgraded gift //@symbol Symbol of the upgraded gift
//@backdrop Backdrop of the upgraded gift //@backdrop Backdrop of the upgraded gift
//@original_details Information about the originally sent gift; may be null if unknown //@original_details Information about the originally sent gift; may be null if unknown
upgradedGift id:int64 title:string name:string number:int32 total_upgraded_count:int32 max_upgraded_count:int32 owner_id:MessageSender owner_address:string owner_name:string model:upgradedGiftModel symbol:upgradedGiftSymbol backdrop:upgradedGiftBackdrop original_details:upgradedGiftOriginalDetails = UpgradedGift; upgradedGift id:int64 title:string name:string number:int32 total_upgraded_count:int32 max_upgraded_count:int32 owner_id:MessageSender owner_address:string owner_name:string gift_address:string model:upgradedGiftModel symbol:upgradedGiftSymbol backdrop:upgradedGiftBackdrop original_details:upgradedGiftOriginalDetails = UpgradedGift;
//@description Contains result of gift upgrading //@description Contains result of gift upgrading
//@gift The upgraded gift //@gift The upgraded gift
@ -1874,6 +1875,18 @@ reactionTypeCustomEmoji custom_emoji_id:int64 = ReactionType;
reactionTypePaid = ReactionType; reactionTypePaid = ReactionType;
//@class PaidReactionType @description Describes type of paid message reaction
//@description A paid reaction on behalf of the current user
paidReactionTypeRegular = PaidReactionType;
//@description An anonymous paid reaction
paidReactionTypeAnonymous = PaidReactionType;
//@description A paid reaction on behalf of an owned chat @chat_id Identifier of the chat
paidReactionTypeChat chat_id:int53 = PaidReactionType;
//@description Contains information about a user that added paid reactions //@description Contains information about a user that added paid reactions
//@sender_id Identifier of the user or chat that added the reactions; may be null for anonymous reactors that aren't the current user //@sender_id Identifier of the user or chat that added the reactions; may be null for anonymous reactors that aren't the current user
//@star_count Number of Telegram Stars added //@star_count Number of Telegram Stars added
@ -3160,8 +3173,11 @@ linkPreviewTypeUpgradedGift gift:upgradedGift = LinkPreviewType;
//@description The link is a link to a user @photo Photo of the user; may be null if none @is_bot True, if the user is a bot //@description The link is a link to a user @photo Photo of the user; may be null if none @is_bot True, if the user is a bot
linkPreviewTypeUser photo:chatPhoto is_bot:Bool = LinkPreviewType; linkPreviewTypeUser photo:chatPhoto is_bot:Bool = LinkPreviewType;
//@description The link is a link to a video @video The video description //@description The link is a link to a video
linkPreviewTypeVideo video:video = LinkPreviewType; //@video The video description
//@cover Cover of the video; may be null if none
//@start_timestamp Timestamp from which the video playing must start, in seconds
linkPreviewTypeVideo video:video cover:photo start_timestamp:int32 = LinkPreviewType;
//@description The link is a link to a video chat //@description The link is a link to a video chat
//@photo Photo of the chat with the video chat; may be null if none //@photo Photo of the chat with the video chat; may be null if none
@ -7296,9 +7312,10 @@ internalLinkTypeUserToken token:string = InternalLinkType;
//@is_live_stream True, if the video chat is expected to be a live stream in a channel or a broadcast group //@is_live_stream True, if the video chat is expected to be a live stream in a channel or a broadcast group
internalLinkTypeVideoChat chat_username:string invite_hash:string is_live_stream:Bool = InternalLinkType; internalLinkTypeVideoChat chat_username:string invite_hash:string is_live_stream:Bool = InternalLinkType;
//@description The link is a link to a Web App. Call searchPublicChat with the given bot username, check that the user is a bot, then call searchWebApp with the received bot and the given web_app_short_name. //@description The link is a link to a Web App. Call searchPublicChat with the given bot username, check that the user is a bot. If the bot is restricted for the current user, then show an error message.
//-Process received foundWebApp by showing a confirmation dialog if needed. If the bot can be added to attachment or side menu, but isn't added yet, then show a disclaimer about Mini Apps being third-party applications //-Otherwise, call searchWebApp with the received bot and the given web_app_short_name. Process received foundWebApp by showing a confirmation dialog if needed.
//-instead of the dialog and ask the user to accept their Terms of service. If the user accept the terms and confirms adding, then use toggleBotIsAddedToAttachmentMenu to add the bot. //-If the bot can be added to attachment or side menu, but isn't added yet, then show a disclaimer about Mini Apps being third-party applications instead of the dialog
//-and ask the user to accept their Terms of service. If the user accept the terms and confirms adding, then use toggleBotIsAddedToAttachmentMenu to add the bot.
//-Then, call getWebAppLinkUrl and open the returned URL as a Web App //-Then, call getWebAppLinkUrl and open the returned URL as a Web App
//@bot_username Username of the bot that owns the Web App //@bot_username Username of the bot that owns the Web App
//@web_app_short_name Short name of the Web App //@web_app_short_name Short name of the Web App
@ -8291,6 +8308,13 @@ updateFileRemovedFromDownloads file_id:int32 counts:downloadedFileCounts = Updat
//@cloud_project_number Cloud project number to pass to the Play Integrity API on Android //@cloud_project_number Cloud project number to pass to the Play Integrity API on Android
updateApplicationVerificationRequired verification_id:int53 nonce:string cloud_project_number:int64 = Update; updateApplicationVerificationRequired verification_id:int53 nonce:string cloud_project_number:int64 = Update;
//@description A request can't be completed unless reCAPTCHA verification is performed; for official mobile applications only.
//-The method setApplicationVerificationToken must be called once the verification is completed or failed
//@verification_id Unique identifier for the verification process
//@action The action for the check
//@recaptcha_key_id Identifier of the reCAPTCHA key
updateApplicationRecaptchaVerificationRequired verification_id:int53 action:string recaptcha_key_id:string = Update;
//@description New call was created or information about a call was updated @call New data about a call //@description New call was created or information about a call was updated @call New data about a call
updateCall call:call = Update; updateCall call:call = Update;
@ -8420,6 +8444,9 @@ updateAvailableMessageEffects reaction_effect_ids:vector<int64> sticker_effect_i
//@description The type of default reaction has changed @reaction_type The new type of the default reaction //@description The type of default reaction has changed @reaction_type The new type of the default reaction
updateDefaultReactionType reaction_type:ReactionType = Update; updateDefaultReactionType reaction_type:ReactionType = Update;
//@description The type of default paid reaction has changed @type The new type of the default paid reaction
updateDefaultPaidReactionType type:PaidReactionType = Update;
//@description Tags used in Saved Messages or a Saved Messages topic have changed //@description Tags used in Saved Messages or a Saved Messages topic have changed
//@saved_messages_topic_id Identifier of Saved Messages topic which tags were changed; 0 if tags for the whole chat has changed //@saved_messages_topic_id Identifier of Saved Messages topic which tags were changed; 0 if tags for the whole chat has changed
//@tags The new tags //@tags The new tags
@ -9701,13 +9728,15 @@ addMessageReaction chat_id:int53 message_id:int53 reaction_type:ReactionType is_
//@reaction_type Type of the reaction to remove. The paid reaction can't be removed //@reaction_type Type of the reaction to remove. The paid reaction can't be removed
removeMessageReaction chat_id:int53 message_id:int53 reaction_type:ReactionType = Ok; removeMessageReaction chat_id:int53 message_id:int53 reaction_type:ReactionType = Ok;
//@description Returns the list of message sender identifiers, which can be used to send a paid reaction in a chat @chat_id Chat identifier
getChatAvailablePaidMessageReactionSenders chat_id:int53 = MessageSenders;
//@description Adds the paid message reaction to a message. Use getMessageAvailableReactions to check whether the reaction is available for the message //@description Adds the paid message reaction to a message. Use getMessageAvailableReactions to check whether the reaction is available for the message
//@chat_id Identifier of the chat to which the message belongs //@chat_id Identifier of the chat to which the message belongs
//@message_id Identifier of the message //@message_id Identifier of the message
//@star_count Number of Telegram Stars to be used for the reaction. The total number of pending paid reactions must not exceed getOption("paid_reaction_star_count_max") //@star_count Number of Telegram Stars to be used for the reaction. The total number of pending paid reactions must not exceed getOption("paid_reaction_star_count_max")
//@use_default_is_anonymous Pass true if the user didn't choose anonymity explicitly, for example, the reaction is set from the message bubble //@type Type of the paid reaction; pass null if the user didn't choose reaction type explicitly, for example, the reaction is set from the message bubble
//@is_anonymous Pass true to make paid reaction of the user on the message anonymous; pass false to make the user's profile visible among top reactors. Ignored if use_default_is_anonymous == true addPendingPaidMessageReaction chat_id:int53 message_id:int53 star_count:int53 type:PaidReactionType = Ok;
addPendingPaidMessageReaction chat_id:int53 message_id:int53 star_count:int53 use_default_is_anonymous:Bool is_anonymous:Bool = Ok;
//@description Applies all pending paid reactions on a message @chat_id Identifier of the chat to which the message belongs @message_id Identifier of the message //@description Applies all pending paid reactions on a message @chat_id Identifier of the chat to which the message belongs @message_id Identifier of the message
commitPendingPaidMessageReactions chat_id:int53 message_id:int53 = Ok; commitPendingPaidMessageReactions chat_id:int53 message_id:int53 = Ok;
@ -9715,11 +9744,11 @@ commitPendingPaidMessageReactions chat_id:int53 message_id:int53 = Ok;
//@description Removes all pending paid reactions on a message @chat_id Identifier of the chat to which the message belongs @message_id Identifier of the message //@description Removes all pending paid reactions on a message @chat_id Identifier of the chat to which the message belongs @message_id Identifier of the message
removePendingPaidMessageReactions chat_id:int53 message_id:int53 = Ok; removePendingPaidMessageReactions chat_id:int53 message_id:int53 = Ok;
//@description Changes whether the paid message reaction of the user to a message is anonymous. The message must have paid reaction added by the user //@description Changes type of paid message reaction of the current user on a message. The message must have paid reaction added by the current user
//@chat_id Identifier of the chat to which the message belongs //@chat_id Identifier of the chat to which the message belongs
//@message_id Identifier of the message //@message_id Identifier of the message
//@is_anonymous Pass true to make paid reaction of the user on the message anonymous; pass false to make the user's profile visible among top reactors //@type New type of the paid reaction
togglePaidMessageReactionIsAnonymous chat_id:int53 message_id:int53 is_anonymous:Bool = Ok; setPaidMessageReactionType chat_id:int53 message_id:int53 type:PaidReactionType = Ok;
//@description Sets reactions on a message; for bots only //@description Sets reactions on a message; for bots only
//@chat_id Identifier of the chat to which the message belongs //@chat_id Identifier of the chat to which the message belongs
@ -9920,13 +9949,13 @@ getWebAppLinkUrl chat_id:int53 bot_user_id:int53 web_app_short_name:string start
//@description Returns information needed to open the main Web App of a bot //@description Returns information needed to open the main Web App of a bot
//@chat_id Identifier of the chat in which the Web App is opened; pass 0 if none //@chat_id Identifier of the chat in which the Web App is opened; pass 0 if none
//@bot_user_id Identifier of the target bot //@bot_user_id Identifier of the target bot. If the bot is restricted for the current user, then show an error instead of calling the method
//@start_parameter Start parameter from internalLinkTypeMainWebApp //@start_parameter Start parameter from internalLinkTypeMainWebApp
//@parameters Parameters to use to open the Web App //@parameters Parameters to use to open the Web App
getMainWebApp chat_id:int53 bot_user_id:int53 start_parameter:string parameters:webAppOpenParameters = MainWebApp; getMainWebApp chat_id:int53 bot_user_id:int53 start_parameter:string parameters:webAppOpenParameters = MainWebApp;
//@description Returns an HTTPS URL of a Web App to open from the side menu, a keyboardButtonTypeWebApp button, or an inlineQueryResultsButtonTypeWebApp button //@description Returns an HTTPS URL of a Web App to open from the side menu, a keyboardButtonTypeWebApp button, or an inlineQueryResultsButtonTypeWebApp button
//@bot_user_id Identifier of the target bot //@bot_user_id Identifier of the target bot. If the bot is restricted for the current user, then show an error instead of calling the method
//@url The URL from a keyboardButtonTypeWebApp button, inlineQueryResultsButtonTypeWebApp button, or an empty string when the bot is opened from the side menu //@url The URL from a keyboardButtonTypeWebApp button, inlineQueryResultsButtonTypeWebApp button, or an empty string when the bot is opened from the side menu
//@parameters Parameters to use to open the Web App //@parameters Parameters to use to open the Web App
getWebAppUrl bot_user_id:int53 url:string parameters:webAppOpenParameters = HttpUrl; getWebAppUrl bot_user_id:int53 url:string parameters:webAppOpenParameters = HttpUrl;
@ -9940,7 +9969,7 @@ sendWebAppData bot_user_id:int53 button_text:string data:string = Ok;
//@description Informs TDLib that a Web App is being opened from the attachment menu, a botMenuButton button, an internalLinkTypeAttachmentMenuBot link, or an inlineKeyboardButtonTypeWebApp button. //@description Informs TDLib that a Web App is being opened from the attachment menu, a botMenuButton button, an internalLinkTypeAttachmentMenuBot link, or an inlineKeyboardButtonTypeWebApp button.
//-For each bot, a confirmation alert about data sent to the bot must be shown once //-For each bot, a confirmation alert about data sent to the bot must be shown once
//@chat_id Identifier of the chat in which the Web App is opened. The Web App can't be opened in secret chats //@chat_id Identifier of the chat in which the Web App is opened. The Web App can't be opened in secret chats
//@bot_user_id Identifier of the bot, providing the Web App //@bot_user_id Identifier of the bot, providing the Web App. If the bot is restricted for the current user, then show an error instead of calling the method
//@url The URL from an inlineKeyboardButtonTypeWebApp button, a botMenuButton button, an internalLinkTypeAttachmentMenuBot link, or an empty string otherwise //@url The URL from an inlineKeyboardButtonTypeWebApp button, a botMenuButton button, an internalLinkTypeAttachmentMenuBot link, or an empty string otherwise
//@message_thread_id If not 0, the message thread identifier in which the message will be sent //@message_thread_id If not 0, the message thread identifier in which the message will be sent
//@reply_to Information about the message or story to be replied in the message sent by the Web App; pass null if none //@reply_to Information about the message or story to be replied in the message sent by the Web App; pass null if none
@ -10736,9 +10765,9 @@ removeAllFilesFromDownloads only_active:Bool only_completed:Bool delete_from_cac
searchFileDownloads query:string only_active:Bool only_completed:Bool offset:string limit:int32 = FoundFileDownloads; searchFileDownloads query:string only_active:Bool only_completed:Bool offset:string limit:int32 = FoundFileDownloads;
//@description Application verification has been completed. Can be called before authorization //@description Application or reCAPTCHA verification has been completed. Can be called before authorization
//@verification_id Unique identifier for the verification process as received from updateApplicationVerificationRequired //@verification_id Unique identifier for the verification process as received from updateApplicationVerificationRequired or updateApplicationRecaptchaVerificationRequired
//@token Play Integrity API token for the Android application, or secret from push notification for the iOS application; //@token Play Integrity API token for the Android application, or secret from push notification for the iOS application for application verification, or reCAPTCHA token for reCAPTCHA verifications;
//-pass an empty string to abort verification and receive error VERIFICATION_FAILED for the request //-pass an empty string to abort verification and receive error VERIFICATION_FAILED for the request
setApplicationVerificationToken verification_id:int53 token:string = Ok; setApplicationVerificationToken verification_id:int53 token:string = Ok;
@ -11771,11 +11800,11 @@ transferGift received_gift_id:string new_owner_id:MessageSender star_count:int53
//@description Returns gifts received by the given user or chat //@description Returns gifts received by the given user or chat
//@owner_id Identifier of the gift receiver //@owner_id Identifier of the gift receiver
//@exclude_unsaved Pass true to exclude gifts that aren't saved to the chat's profile page. Always true for gifts received by other users and channel chats without can_post_messages administrator right //@exclude_unsaved Pass true to exclude gifts that aren't saved to the chat's profile page. Always true for gifts received by other users and channel chats without can_post_messages administrator right
//@exclude_saved Pass true to exclude gifts that are saved to the chat's profile page; for channel chats with can_post_messages administrator right only //@exclude_saved Pass true to exclude gifts that are saved to the chat's profile page. Always false for gifts received by other users and channel chats without can_post_messages administrator right
//@exclude_unlimited Pass true to exclude gifts that can be purchased unlimited number of times; for channel chats with can_post_messages administrator right only //@exclude_unlimited Pass true to exclude gifts that can be purchased unlimited number of times
//@exclude_limited Pass true to exclude gifts that can be purchased limited number of times; for channel chats with can_post_messages administrator right only //@exclude_limited Pass true to exclude gifts that can be purchased limited number of times
//@exclude_upgraded Pass true to exclude upgraded gifts; for channel chats with can_post_messages administrator right only //@exclude_upgraded Pass true to exclude upgraded gifts
//@sort_by_price Pass true to sort results by gift price instead of send date; for channel chats with can_post_messages administrator right only //@sort_by_price Pass true to sort results by gift price instead of send date
//@offset Offset of the first entry to return as received from the previous request; use empty string to get the first chunk of results //@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 gifts to be returned; must be positive and can't be greater than 100. For optimal performance, the number of returned objects is chosen by TDLib and can be smaller than the specified limit //@limit The maximum number of gifts 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
getReceivedGifts owner_id:MessageSender exclude_unsaved:Bool exclude_saved:Bool exclude_unlimited:Bool exclude_limited:Bool exclude_upgraded:Bool sort_by_price:Bool offset:string limit:int32 = ReceivedGifts; getReceivedGifts owner_id:MessageSender exclude_unsaved:Bool exclude_saved:Bool exclude_unlimited:Bool exclude_limited:Bool exclude_upgraded:Bool sort_by_price:Bool offset:string limit:int32 = ReceivedGifts;