Update to TDLib 1.8.39

This commit is contained in:
c0re100 2024-11-01 06:19:36 +08:00
parent 8454bd8c86
commit 4330cb2fa1
No known key found for this signature in database
GPG key ID: 7C3B3004FE745AAF
4 changed files with 325 additions and 417 deletions

View file

@ -1828,32 +1828,6 @@ func (client *Client) SearchChatsOnServer(req *SearchChatsOnServerRequest) (*Cha
return UnmarshalChats(result.Data) return UnmarshalChats(result.Data)
} }
type SearchChatsNearbyRequest struct {
// Current user location
Location *Location `json:"location"`
}
// Returns a list of users and location-based supergroups nearby. The method was disabled and returns an empty list of chats now
func (client *Client) SearchChatsNearby(req *SearchChatsNearbyRequest) (*ChatsNearby, error) {
result, err := client.Send(Request{
meta: meta{
Type: "searchChatsNearby",
},
Data: map[string]interface{}{
"location": req.Location,
},
})
if err != nil {
return nil, err
}
if result.Type == "error" {
return nil, buildResponseError(result.Data)
}
return UnmarshalChatsNearby(result.Data)
}
// Returns a list of channel chats recommended to the current user // Returns a list of channel chats recommended to the current user
func (client *Client) GetRecommendedChats() (*Chats, error) { func (client *Client) GetRecommendedChats() (*Chats, error) {
result, err := client.Send(Request{ result, err := client.Send(Request{
@ -2939,6 +2913,8 @@ func (client *Client) SearchPublicMessagesByTag(req *SearchPublicMessagesByTagRe
} }
type SearchPublicStoriesByTagRequest struct { type SearchPublicStoriesByTagRequest struct {
// Identifier of the chat that posted the stories to search for; pass 0 to search stories in all chats
StorySenderChatId int64 `json:"story_sender_chat_id"`
// Hashtag or cashtag to search for // Hashtag or cashtag to search for
Tag string `json:"tag"` Tag string `json:"tag"`
// 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
@ -2954,6 +2930,7 @@ func (client *Client) SearchPublicStoriesByTag(req *SearchPublicStoriesByTagRequ
Type: "searchPublicStoriesByTag", Type: "searchPublicStoriesByTag",
}, },
Data: map[string]interface{}{ Data: map[string]interface{}{
"story_sender_chat_id": req.StorySenderChatId,
"tag": req.Tag, "tag": req.Tag,
"offset": req.Offset, "offset": req.Offset,
"limit": req.Limit, "limit": req.Limit,
@ -3379,7 +3356,7 @@ type GetChatSponsoredMessagesRequest struct {
ChatId int64 `json:"chat_id"` ChatId int64 `json:"chat_id"`
} }
// Returns sponsored messages to be shown in a chat; for channel chats only // Returns sponsored messages to be shown in a chat; for channel chats and chats with bots only
func (client *Client) GetChatSponsoredMessages(req *GetChatSponsoredMessagesRequest) (*SponsoredMessages, error) { func (client *Client) GetChatSponsoredMessages(req *GetChatSponsoredMessagesRequest) (*SponsoredMessages, error) {
result, err := client.Send(Request{ result, err := client.Send(Request{
meta: meta{ meta: meta{
@ -3982,7 +3959,7 @@ type ForwardMessagesRequest struct {
MessageIds []int64 `json:"message_ids"` MessageIds []int64 `json:"message_ids"`
// Options to be used to send the messages; pass null to use default options // Options to be used to send the messages; pass null to use default options
Options *MessageSendOptions `json:"options"` Options *MessageSendOptions `json:"options"`
// Pass true to copy content of the messages without reference to the original sender. Always true if the messages are forwarded to a secret chat or are local // Pass true to copy content of the messages without reference to the original sender. Always true if the messages are forwarded to a secret chat or are local. Use messageProperties.can_be_saved and messageProperties.can_be_copied_to_secret_chat to check whether the message is suitable
SendCopy bool `json:"send_copy"` SendCopy bool `json:"send_copy"`
// Pass true to remove media captions of message copies. Ignored if send_copy is false // Pass true to remove media captions of message copies. Ignored if send_copy is false
RemoveCaption bool `json:"remove_caption"` RemoveCaption bool `json:"remove_caption"`
@ -4321,7 +4298,7 @@ func (client *Client) EditMessageLiveLocation(req *EditMessageLiveLocationReques
type EditMessageMediaRequest struct { type EditMessageMediaRequest struct {
// The chat the message belongs to // The chat the message belongs to
ChatId int64 `json:"chat_id"` ChatId int64 `json:"chat_id"`
// Identifier of the message. Use messageProperties.can_be_edited to check whether the message can be edited // Identifier of the message. Use messageProperties.can_edit_media to check whether the message can be edited
MessageId int64 `json:"message_id"` MessageId int64 `json:"message_id"`
// The new message reply markup; pass null if none; for bots only // The new message reply markup; pass null if none; for bots only
ReplyMarkup ReplyMarkup `json:"reply_markup"` ReplyMarkup ReplyMarkup `json:"reply_markup"`
@ -4329,7 +4306,7 @@ type EditMessageMediaRequest struct {
InputMessageContent InputMessageContent `json:"input_message_content"` InputMessageContent InputMessageContent `json:"input_message_content"`
} }
// Edits the content of a message with an animation, an audio, a document, a photo or a video, including message caption. If only the caption needs to be edited, use editMessageCaption instead. The media can't be edited if the message was set to self-destruct or to a self-destructing media. The type of message content in an album can't be changed with exception of replacing a photo with a video or vice versa. Returns the edited message after the edit is completed on the server side // Edits the media content of a message, including message caption. If only the caption needs to be edited, use editMessageCaption instead. The type of message content in an album can't be changed with exception of replacing a photo with a video or vice versa. Returns the edited message after the edit is completed on the server side
func (client *Client) EditMessageMedia(req *EditMessageMediaRequest) (*Message, error) { func (client *Client) EditMessageMedia(req *EditMessageMediaRequest) (*Message, error) {
result, err := client.Send(Request{ result, err := client.Send(Request{
meta: meta{ meta: meta{
@ -4505,7 +4482,7 @@ type EditInlineMessageMediaRequest struct {
InputMessageContent InputMessageContent `json:"input_message_content"` InputMessageContent InputMessageContent `json:"input_message_content"`
} }
// Edits the content of a message with an animation, an audio, a document, a photo or a video in an inline message sent via a bot; for bots only // Edits the media content of a message with a text, an animation, an audio, a document, a photo or a video in an inline message sent via a bot; for bots only
func (client *Client) EditInlineMessageMedia(req *EditInlineMessageMediaRequest) (*Ok, error) { func (client *Client) EditInlineMessageMedia(req *EditInlineMessageMediaRequest) (*Ok, error) {
result, err := client.Send(Request{ result, err := client.Send(Request{
meta: meta{ meta: meta{
@ -4597,7 +4574,7 @@ type EditMessageSchedulingStateRequest struct {
ChatId int64 `json:"chat_id"` ChatId int64 `json:"chat_id"`
// Identifier of the message. Use messageProperties.can_edit_scheduling_state to check whether the message is suitable // Identifier of the message. Use messageProperties.can_edit_scheduling_state to check whether the message is suitable
MessageId int64 `json:"message_id"` MessageId int64 `json:"message_id"`
// The new message scheduling state; pass null to send the message immediately // The new message scheduling state; pass null to send the message immediately. Must be null for messages in the state messageSchedulingStateSendWhenVideoProcessed
SchedulingState MessageSchedulingState `json:"scheduling_state"` SchedulingState MessageSchedulingState `json:"scheduling_state"`
} }
@ -4845,7 +4822,7 @@ type EditBusinessMessageMediaRequest struct {
InputMessageContent InputMessageContent `json:"input_message_content"` InputMessageContent InputMessageContent `json:"input_message_content"`
} }
// Edits the content of a message with an animation, an audio, a document, a photo or a video in a message sent on behalf of a business account; for bots only // Edits the media content of a message with a text, an animation, an audio, a document, a photo or a video in a message sent on behalf of a business account; for bots only
func (client *Client) EditBusinessMessageMedia(req *EditBusinessMessageMediaRequest) (*BusinessMessage, error) { func (client *Client) EditBusinessMessageMedia(req *EditBusinessMessageMediaRequest) (*BusinessMessage, error) {
result, err := client.Send(Request{ result, err := client.Send(Request{
meta: meta{ meta: meta{
@ -5342,7 +5319,7 @@ type EditQuickReplyMessageRequest struct {
InputMessageContent InputMessageContent `json:"input_message_content"` InputMessageContent InputMessageContent `json:"input_message_content"`
} }
// Asynchronously edits the text, media or caption of a quick reply message. Use quickReplyMessage.can_be_edited to check whether a message can be edited. Text message can be edited only to a text message. The type of message content in an album can't be changed with exception of replacing a photo with a video or vice versa // Asynchronously edits the text, media or caption of a quick reply message. Use quickReplyMessage.can_be_edited to check whether a message can be edited. Media message can be edited only to a media message. The type of message content in an album can't be changed with exception of replacing a photo with a video or vice versa
func (client *Client) EditQuickReplyMessage(req *EditQuickReplyMessageRequest) (*Ok, error) { func (client *Client) EditQuickReplyMessage(req *EditQuickReplyMessageRequest) (*Ok, error) {
result, err := client.Send(Request{ result, err := client.Send(Request{
meta: meta{ meta: meta{
@ -6035,7 +6012,7 @@ type SetMessageReactionsRequest struct {
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"`
// Types of the reaction to set // Types of the reaction to set; pass an empty list to remove the reactions
ReactionTypes []ReactionType `json:"reaction_types"` ReactionTypes []ReactionType `json:"reaction_types"`
// Pass true if the reactions are added with a big animation // Pass true if the reactions are added with a big animation
IsBig bool `json:"is_big"` IsBig bool `json:"is_big"`
@ -14932,6 +14909,8 @@ func (client *Client) GetStickerSetName(req *GetStickerSetNameRequest) (*Text, e
type SearchStickerSetRequest struct { type SearchStickerSetRequest struct {
// Name of the sticker set // Name of the sticker set
Name string `json:"name"` Name string `json:"name"`
// Pass true to ignore local cache of sticker sets and always send a network request
IgnoreCache bool `json:"ignore_cache"`
} }
// Searches for a sticker set by its name // Searches for a sticker set by its name
@ -14942,6 +14921,7 @@ func (client *Client) SearchStickerSet(req *SearchStickerSetRequest) (*StickerSe
}, },
Data: map[string]interface{}{ Data: map[string]interface{}{
"name": req.Name, "name": req.Name,
"ignore_cache": req.IgnoreCache,
}, },
}) })
if err != nil { if err != nil {
@ -16059,32 +16039,6 @@ func (client *Client) SetEmojiStatus(req *SetEmojiStatusRequest) (*Ok, error) {
return UnmarshalOk(result.Data) return UnmarshalOk(result.Data)
} }
type SetLocationRequest struct {
// The new location of the user
Location *Location `json:"location"`
}
// Changes the location of the current user. Needs to be called if getOption("is_location_visible") is true and location changes for more than 1 kilometer. Must not be called if the user has a business location
func (client *Client) SetLocation(req *SetLocationRequest) (*Ok, error) {
result, err := client.Send(Request{
meta: meta{
Type: "setLocation",
},
Data: map[string]interface{}{
"location": req.Location,
},
})
if err != nil {
return nil, err
}
if result.Type == "error" {
return nil, buildResponseError(result.Data)
}
return UnmarshalOk(result.Data)
}
type ToggleHasSponsoredMessagesEnabledRequest struct { type ToggleHasSponsoredMessagesEnabledRequest struct {
// Pass true to enable sponsored messages for the current user; false to disable them // Pass true to enable sponsored messages for the current user; false to disable them
HasSponsoredMessagesEnabled bool `json:"has_sponsored_messages_enabled"` HasSponsoredMessagesEnabled bool `json:"has_sponsored_messages_enabled"`
@ -18513,7 +18467,7 @@ type SendGiftRequest struct {
IsPrivate bool `json:"is_private"` IsPrivate bool `json:"is_private"`
} }
// Send a gift to another user // Sends a gift to another user. May return an error with a message "STARGIFT_USAGE_LIMITED" if the gift was sold out
func (client *Client) SendGift(req *SendGiftRequest) (*Ok, error) { func (client *Client) SendGift(req *SendGiftRequest) (*Ok, error) {
result, err := client.Send(Request{ result, err := client.Send(Request{
meta: meta{ meta: meta{
@ -19773,7 +19727,7 @@ type GetChatRevenueStatisticsRequest struct {
IsDark bool `json:"is_dark"` IsDark bool `json:"is_dark"`
} }
// Returns detailed revenue statistics about a chat. Currently, this method can be used only for channels if supergroupFullInfo.can_get_revenue_statistics == true // Returns detailed revenue statistics about a chat. Currently, this method can be used only for channels if supergroupFullInfo.can_get_revenue_statistics == true or bots if userFullInfo.bot_info.can_get_revenue_statistics == true
func (client *Client) GetChatRevenueStatistics(req *GetChatRevenueStatisticsRequest) (*ChatRevenueStatistics, error) { func (client *Client) GetChatRevenueStatistics(req *GetChatRevenueStatisticsRequest) (*ChatRevenueStatistics, error) {
result, err := client.Send(Request{ result, err := client.Send(Request{
meta: meta{ meta: meta{
@ -19802,7 +19756,7 @@ type GetChatRevenueWithdrawalUrlRequest struct {
Password string `json:"password"` Password string `json:"password"`
} }
// Returns a URL for chat revenue withdrawal; requires owner privileges in the chat. Currently, this method can be used only for channels if supergroupFullInfo.can_get_revenue_statistics == true and getOption("can_withdraw_chat_revenue") // Returns a URL for chat revenue withdrawal; requires owner privileges in the channel chat or the bot. Currently, this method can be used only if getOption("can_withdraw_chat_revenue") for channels with supergroupFullInfo.can_get_revenue_statistics == true or bots with userFullInfo.bot_info.can_get_revenue_statistics == true
func (client *Client) GetChatRevenueWithdrawalUrl(req *GetChatRevenueWithdrawalUrlRequest) (*HttpUrl, error) { func (client *Client) GetChatRevenueWithdrawalUrl(req *GetChatRevenueWithdrawalUrlRequest) (*HttpUrl, error) {
result, err := client.Send(Request{ result, err := client.Send(Request{
meta: meta{ meta: meta{
@ -19833,7 +19787,7 @@ type GetChatRevenueTransactionsRequest struct {
Limit int32 `json:"limit"` Limit int32 `json:"limit"`
} }
// Returns the list of revenue transactions for a chat. Currently, this method can be used only for channels if supergroupFullInfo.can_get_revenue_statistics == true // Returns the list of revenue transactions for a chat. Currently, this method can be used only for channels if supergroupFullInfo.can_get_revenue_statistics == true or bots if userFullInfo.bot_info.can_get_revenue_statistics == true
func (client *Client) GetChatRevenueTransactions(req *GetChatRevenueTransactionsRequest) (*ChatRevenueTransactions, error) { func (client *Client) GetChatRevenueTransactions(req *GetChatRevenueTransactionsRequest) (*ChatRevenueTransactions, error) {
result, err := client.Send(Request{ result, err := client.Send(Request{
meta: meta{ meta: meta{
@ -23331,6 +23285,9 @@ func (client *Client) TestUseUpdate() (Update, error) {
case TypeUpdateMessageLiveLocationViewed: case TypeUpdateMessageLiveLocationViewed:
return UnmarshalUpdateMessageLiveLocationViewed(result.Data) return UnmarshalUpdateMessageLiveLocationViewed(result.Data)
case TypeUpdateVideoPublished:
return UnmarshalUpdateVideoPublished(result.Data)
case TypeUpdateNewChat: case TypeUpdateNewChat:
return UnmarshalUpdateNewChat(result.Data) return UnmarshalUpdateNewChat(result.Data)
@ -23619,9 +23576,6 @@ func (client *Client) TestUseUpdate() (Update, error) {
case TypeUpdateTermsOfService: case TypeUpdateTermsOfService:
return UnmarshalUpdateTermsOfService(result.Data) return UnmarshalUpdateTermsOfService(result.Data)
case TypeUpdateUsersNearby:
return UnmarshalUpdateUsersNearby(result.Data)
case TypeUpdateUnconfirmedSession: case TypeUpdateUnconfirmedSession:
return UnmarshalUpdateUnconfirmedSession(result.Data) return UnmarshalUpdateUnconfirmedSession(result.Data)

View file

@ -344,8 +344,6 @@ const (
ClassFailedToAddMember = "FailedToAddMember" ClassFailedToAddMember = "FailedToAddMember"
ClassFailedToAddMembers = "FailedToAddMembers" ClassFailedToAddMembers = "FailedToAddMembers"
ClassCreatedBasicGroupChat = "CreatedBasicGroupChat" ClassCreatedBasicGroupChat = "CreatedBasicGroupChat"
ClassChatNearby = "ChatNearby"
ClassChatsNearby = "ChatsNearby"
ClassKeyboardButton = "KeyboardButton" ClassKeyboardButton = "KeyboardButton"
ClassInlineKeyboardButton = "InlineKeyboardButton" ClassInlineKeyboardButton = "InlineKeyboardButton"
ClassFoundWebApp = "FoundWebApp" ClassFoundWebApp = "FoundWebApp"
@ -741,6 +739,7 @@ const (
TypeStarTransactionPartnerGooglePlay = "starTransactionPartnerGooglePlay" TypeStarTransactionPartnerGooglePlay = "starTransactionPartnerGooglePlay"
TypeStarTransactionPartnerFragment = "starTransactionPartnerFragment" TypeStarTransactionPartnerFragment = "starTransactionPartnerFragment"
TypeStarTransactionPartnerTelegramAds = "starTransactionPartnerTelegramAds" TypeStarTransactionPartnerTelegramAds = "starTransactionPartnerTelegramAds"
TypeStarTransactionPartnerTelegramApi = "starTransactionPartnerTelegramApi"
TypeStarTransactionPartnerBot = "starTransactionPartnerBot" TypeStarTransactionPartnerBot = "starTransactionPartnerBot"
TypeStarTransactionPartnerBusiness = "starTransactionPartnerBusiness" TypeStarTransactionPartnerBusiness = "starTransactionPartnerBusiness"
TypeStarTransactionPartnerChat = "starTransactionPartnerChat" TypeStarTransactionPartnerChat = "starTransactionPartnerChat"
@ -929,12 +928,9 @@ const (
TypeFailedToAddMember = "failedToAddMember" TypeFailedToAddMember = "failedToAddMember"
TypeFailedToAddMembers = "failedToAddMembers" TypeFailedToAddMembers = "failedToAddMembers"
TypeCreatedBasicGroupChat = "createdBasicGroupChat" TypeCreatedBasicGroupChat = "createdBasicGroupChat"
TypeChatNearby = "chatNearby"
TypeChatsNearby = "chatsNearby"
TypePublicChatTypeHasUsername = "publicChatTypeHasUsername" TypePublicChatTypeHasUsername = "publicChatTypeHasUsername"
TypePublicChatTypeIsLocationBased = "publicChatTypeIsLocationBased" TypePublicChatTypeIsLocationBased = "publicChatTypeIsLocationBased"
TypeChatActionBarReportSpam = "chatActionBarReportSpam" TypeChatActionBarReportSpam = "chatActionBarReportSpam"
TypeChatActionBarReportUnrelatedLocation = "chatActionBarReportUnrelatedLocation"
TypeChatActionBarInviteMembers = "chatActionBarInviteMembers" TypeChatActionBarInviteMembers = "chatActionBarInviteMembers"
TypeChatActionBarReportAddBlock = "chatActionBarReportAddBlock" TypeChatActionBarReportAddBlock = "chatActionBarReportAddBlock"
TypeChatActionBarAddContact = "chatActionBarAddContact" TypeChatActionBarAddContact = "chatActionBarAddContact"
@ -1287,6 +1283,7 @@ const (
TypeInputPaidMedia = "inputPaidMedia" TypeInputPaidMedia = "inputPaidMedia"
TypeMessageSchedulingStateSendAtDate = "messageSchedulingStateSendAtDate" TypeMessageSchedulingStateSendAtDate = "messageSchedulingStateSendAtDate"
TypeMessageSchedulingStateSendWhenOnline = "messageSchedulingStateSendWhenOnline" TypeMessageSchedulingStateSendWhenOnline = "messageSchedulingStateSendWhenOnline"
TypeMessageSchedulingStateSendWhenVideoProcessed = "messageSchedulingStateSendWhenVideoProcessed"
TypeMessageSelfDestructTypeTimer = "messageSelfDestructTypeTimer" TypeMessageSelfDestructTypeTimer = "messageSelfDestructTypeTimer"
TypeMessageSelfDestructTypeImmediately = "messageSelfDestructTypeImmediately" TypeMessageSelfDestructTypeImmediately = "messageSelfDestructTypeImmediately"
TypeMessageSendOptions = "messageSendOptions" TypeMessageSendOptions = "messageSendOptions"
@ -1663,7 +1660,6 @@ const (
TypeBusinessFeaturePromotionAnimation = "businessFeaturePromotionAnimation" TypeBusinessFeaturePromotionAnimation = "businessFeaturePromotionAnimation"
TypePremiumState = "premiumState" TypePremiumState = "premiumState"
TypeStorePaymentPurposePremiumSubscription = "storePaymentPurposePremiumSubscription" TypeStorePaymentPurposePremiumSubscription = "storePaymentPurposePremiumSubscription"
TypeStorePaymentPurposeGiftedPremium = "storePaymentPurposeGiftedPremium"
TypeStorePaymentPurposePremiumGiftCodes = "storePaymentPurposePremiumGiftCodes" TypeStorePaymentPurposePremiumGiftCodes = "storePaymentPurposePremiumGiftCodes"
TypeStorePaymentPurposePremiumGiveaway = "storePaymentPurposePremiumGiveaway" TypeStorePaymentPurposePremiumGiveaway = "storePaymentPurposePremiumGiveaway"
TypeStorePaymentPurposeStarGiveaway = "storePaymentPurposeStarGiveaway" TypeStorePaymentPurposeStarGiveaway = "storePaymentPurposeStarGiveaway"
@ -2054,6 +2050,7 @@ const (
TypeUpdateMessageUnreadReactions = "updateMessageUnreadReactions" TypeUpdateMessageUnreadReactions = "updateMessageUnreadReactions"
TypeUpdateMessageFactCheck = "updateMessageFactCheck" TypeUpdateMessageFactCheck = "updateMessageFactCheck"
TypeUpdateMessageLiveLocationViewed = "updateMessageLiveLocationViewed" TypeUpdateMessageLiveLocationViewed = "updateMessageLiveLocationViewed"
TypeUpdateVideoPublished = "updateVideoPublished"
TypeUpdateNewChat = "updateNewChat" TypeUpdateNewChat = "updateNewChat"
TypeUpdateChatTitle = "updateChatTitle" TypeUpdateChatTitle = "updateChatTitle"
TypeUpdateChatPhoto = "updateChatPhoto" TypeUpdateChatPhoto = "updateChatPhoto"
@ -2150,7 +2147,6 @@ const (
TypeUpdateLanguagePackStrings = "updateLanguagePackStrings" TypeUpdateLanguagePackStrings = "updateLanguagePackStrings"
TypeUpdateConnectionState = "updateConnectionState" TypeUpdateConnectionState = "updateConnectionState"
TypeUpdateTermsOfService = "updateTermsOfService" TypeUpdateTermsOfService = "updateTermsOfService"
TypeUpdateUsersNearby = "updateUsersNearby"
TypeUpdateUnconfirmedSession = "updateUnconfirmedSession" TypeUpdateUnconfirmedSession = "updateUnconfirmedSession"
TypeUpdateAttachmentMenuBots = "updateAttachmentMenuBots" TypeUpdateAttachmentMenuBots = "updateAttachmentMenuBots"
TypeUpdateWebAppMessageSent = "updateWebAppMessageSent" TypeUpdateWebAppMessageSent = "updateWebAppMessageSent"
@ -7317,7 +7313,7 @@ type StarSubscriptions struct {
meta meta
// The amount of owned Telegram Stars // The amount of owned Telegram Stars
StarCount int64 `json:"star_count"` StarCount int64 `json:"star_count"`
// List of subbscriptions for Telegram Stars // List of subscriptions for Telegram Stars
Subscriptions []*StarSubscription `json:"subscriptions"` Subscriptions []*StarSubscription `json:"subscriptions"`
// The number of Telegram Stars required to buy to extend subscriptions expiring soon // The number of Telegram Stars required to buy to extend subscriptions expiring soon
RequiredStarCount int64 `json:"required_star_count"` RequiredStarCount int64 `json:"required_star_count"`
@ -7464,6 +7460,8 @@ type PremiumGiftCodePaymentOption struct {
Currency string `json:"currency"` Currency string `json:"currency"`
// The amount to pay, in the smallest units of the currency // The amount to pay, in the smallest units of the currency
Amount int64 `json:"amount"` Amount int64 `json:"amount"`
// The discount associated with this option, as a percentage
DiscountPercentage int32 `json:"discount_percentage"`
// Number of users which will be able to activate the gift codes // Number of users which will be able to activate the gift codes
WinnerCount int32 `json:"winner_count"` WinnerCount int32 `json:"winner_count"`
// Number of months the Telegram Premium subscription will be active // Number of months the Telegram Premium subscription will be active
@ -7472,6 +7470,8 @@ type PremiumGiftCodePaymentOption struct {
StoreProductId string `json:"store_product_id"` StoreProductId string `json:"store_product_id"`
// Number of times the store product must be paid // Number of times the store product must be paid
StoreProductQuantity int32 `json:"store_product_quantity"` StoreProductQuantity int32 `json:"store_product_quantity"`
// A sticker to be shown along with the gift code; may be null if unknown
Sticker *Sticker `json:"sticker"`
} }
func (entity *PremiumGiftCodePaymentOption) MarshalJSON() ([]byte, error) { func (entity *PremiumGiftCodePaymentOption) MarshalJSON() ([]byte, error) {
@ -7729,10 +7729,14 @@ type Gift struct {
StarCount int64 `json:"star_count"` StarCount int64 `json:"star_count"`
// Number of Telegram Stars that can be claimed by the receiver instead of the gift by default. If the gift was paid with just bought Telegram Stars, then full value can be claimed // Number of Telegram Stars that can be claimed by the receiver instead of the gift by default. If the gift was paid with just bought Telegram Stars, then full value can be claimed
DefaultSellStarCount int64 `json:"default_sell_star_count"` DefaultSellStarCount int64 `json:"default_sell_star_count"`
// Number of remaining times the gift can be purchased by all users; 0 if not limited // Number of remaining times the gift can be purchased by all users; 0 if not limited or the gift was sold out
RemainingCount int32 `json:"remaining_count"` RemainingCount int32 `json:"remaining_count"`
// Number of total times the gift can be purchased by all users; 0 if not limited // Number of total times the gift can be purchased by all users; 0 if not limited
TotalCount int32 `json:"total_count"` TotalCount int32 `json:"total_count"`
// Point in time (Unix timestamp) when the gift was send for the first time; for sold out gifts only
FirstSendDate int32 `json:"first_send_date"`
// Point in time (Unix timestamp) when the gift was send for the last time; for sold out gifts only
LastSendDate int32 `json:"last_send_date"`
} }
func (entity *Gift) MarshalJSON() ([]byte, error) { func (entity *Gift) MarshalJSON() ([]byte, error) {
@ -7891,7 +7895,7 @@ func (*StarTransactionDirectionOutgoing) StarTransactionDirectionType() string {
// Paid media were bought // Paid media were bought
type BotTransactionPurposePaidMedia struct { type BotTransactionPurposePaidMedia struct {
meta meta
// The bought media if the trancastion wasn't refunded // The bought media if the transaction wasn't refunded
Media []PaidMedia `json:"media"` Media []PaidMedia `json:"media"`
// Bot-provided payload; for bots only // Bot-provided payload; for bots only
Payload string `json:"payload"` Payload string `json:"payload"`
@ -7970,7 +7974,7 @@ type ChatTransactionPurposePaidMedia struct {
meta meta
// Identifier of the corresponding message with paid media; can be 0 or an identifier of a deleted message // Identifier of the corresponding message with paid media; can be 0 or an identifier of a deleted message
MessageId int64 `json:"message_id"` MessageId int64 `json:"message_id"`
// The bought media if the trancastion wasn't refunded // The bought media if the transaction wasn't refunded
Media []PaidMedia `json:"media"` Media []PaidMedia `json:"media"`
} }
@ -8253,7 +8257,7 @@ func (*StarTransactionPartnerGooglePlay) StarTransactionPartnerType() string {
// The transaction is a transaction with Fragment // The transaction is a transaction with Fragment
type StarTransactionPartnerFragment struct { type StarTransactionPartnerFragment struct {
meta meta
// State of the withdrawal; may be null for refunds from Fragment // State of the withdrawal; may be null for refunds from Fragment or for Telegram Stars bought on Fragment
WithdrawalState RevenueWithdrawalState `json:"withdrawal_state"` WithdrawalState RevenueWithdrawalState `json:"withdrawal_state"`
} }
@ -8318,6 +8322,33 @@ func (*StarTransactionPartnerTelegramAds) StarTransactionPartnerType() string {
return TypeStarTransactionPartnerTelegramAds return TypeStarTransactionPartnerTelegramAds
} }
// The transaction is a transaction with Telegram for API usage
type StarTransactionPartnerTelegramApi struct {
meta
// The number of billed requests
RequestCount int32 `json:"request_count"`
}
func (entity *StarTransactionPartnerTelegramApi) MarshalJSON() ([]byte, error) {
entity.meta.Type = entity.GetType()
type stub StarTransactionPartnerTelegramApi
return json.Marshal((*stub)(entity))
}
func (*StarTransactionPartnerTelegramApi) GetClass() string {
return ClassStarTransactionPartner
}
func (*StarTransactionPartnerTelegramApi) GetType() string {
return TypeStarTransactionPartnerTelegramApi
}
func (*StarTransactionPartnerTelegramApi) StarTransactionPartnerType() string {
return TypeStarTransactionPartnerTelegramApi
}
// The transaction is a transaction with a bot // The transaction is a transaction with a bot
type StarTransactionPartnerBot struct { type StarTransactionPartnerBot struct {
meta meta
@ -8371,7 +8402,7 @@ type StarTransactionPartnerBusiness struct {
meta meta
// Identifier of the business account user // Identifier of the business account user
UserId int64 `json:"user_id"` UserId int64 `json:"user_id"`
// The bought media if the trancastion wasn't refunded // The bought media if the transaction wasn't refunded
Media []PaidMedia `json:"media"` Media []PaidMedia `json:"media"`
} }
@ -8462,7 +8493,7 @@ func (starTransactionPartnerChat *StarTransactionPartnerChat) UnmarshalJSON(data
return nil return nil
} }
// The transaction is a transcation with another user // The transaction is a transaction with another user
type StarTransactionPartnerUser struct { type StarTransactionPartnerUser struct {
meta meta
// Identifier of the user; 0 if the user was anonymous // Identifier of the user; 0 if the user was anonymous
@ -9235,6 +9266,8 @@ type BotInfo struct {
DefaultGroupAdministratorRights *ChatAdministratorRights `json:"default_group_administrator_rights"` DefaultGroupAdministratorRights *ChatAdministratorRights `json:"default_group_administrator_rights"`
// Default administrator rights for adding the bot to channels; may be null // Default administrator rights for adding the bot to channels; may be null
DefaultChannelAdministratorRights *ChatAdministratorRights `json:"default_channel_administrator_rights"` DefaultChannelAdministratorRights *ChatAdministratorRights `json:"default_channel_administrator_rights"`
// True, if the bot's revenue statistics are available
CanGetRevenueStatistics bool `json:"can_get_revenue_statistics"`
// True, if the bot has media previews // True, if the bot has media previews
HasMediaPreviews bool `json:"has_media_previews"` HasMediaPreviews bool `json:"has_media_previews"`
// The internal link, which can be used to edit bot commands; may be null // The internal link, which can be used to edit bot commands; may be null
@ -9274,6 +9307,7 @@ func (botInfo *BotInfo) UnmarshalJSON(data []byte) error {
PrivacyPolicyUrl string `json:"privacy_policy_url"` PrivacyPolicyUrl string `json:"privacy_policy_url"`
DefaultGroupAdministratorRights *ChatAdministratorRights `json:"default_group_administrator_rights"` DefaultGroupAdministratorRights *ChatAdministratorRights `json:"default_group_administrator_rights"`
DefaultChannelAdministratorRights *ChatAdministratorRights `json:"default_channel_administrator_rights"` DefaultChannelAdministratorRights *ChatAdministratorRights `json:"default_channel_administrator_rights"`
CanGetRevenueStatistics bool `json:"can_get_revenue_statistics"`
HasMediaPreviews bool `json:"has_media_previews"` HasMediaPreviews bool `json:"has_media_previews"`
EditCommandsLink json.RawMessage `json:"edit_commands_link"` EditCommandsLink json.RawMessage `json:"edit_commands_link"`
EditDescriptionLink json.RawMessage `json:"edit_description_link"` EditDescriptionLink json.RawMessage `json:"edit_description_link"`
@ -9295,6 +9329,7 @@ func (botInfo *BotInfo) UnmarshalJSON(data []byte) error {
botInfo.PrivacyPolicyUrl = tmp.PrivacyPolicyUrl botInfo.PrivacyPolicyUrl = tmp.PrivacyPolicyUrl
botInfo.DefaultGroupAdministratorRights = tmp.DefaultGroupAdministratorRights botInfo.DefaultGroupAdministratorRights = tmp.DefaultGroupAdministratorRights
botInfo.DefaultChannelAdministratorRights = tmp.DefaultChannelAdministratorRights botInfo.DefaultChannelAdministratorRights = tmp.DefaultChannelAdministratorRights
botInfo.CanGetRevenueStatistics = tmp.CanGetRevenueStatistics
botInfo.HasMediaPreviews = tmp.HasMediaPreviews botInfo.HasMediaPreviews = tmp.HasMediaPreviews
fieldEditCommandsLink, _ := UnmarshalInternalLinkType(tmp.EditCommandsLink) fieldEditCommandsLink, _ := UnmarshalInternalLinkType(tmp.EditCommandsLink)
@ -9347,8 +9382,6 @@ type UserFullInfo struct {
Birthdate *Birthdate `json:"birthdate"` Birthdate *Birthdate `json:"birthdate"`
// Identifier of the personal chat of the user; 0 if none // Identifier of the personal chat of the user; 0 if none
PersonalChatId int64 `json:"personal_chat_id"` PersonalChatId int64 `json:"personal_chat_id"`
// The list of available options for gifting Telegram Premium to the user
PremiumGiftOptions []*PremiumPaymentOption `json:"premium_gift_options"`
// Number of gifts saved to profile by the user // Number of gifts saved to profile by the user
GiftCount int32 `json:"gift_count"` GiftCount int32 `json:"gift_count"`
// Number of group chats where both the other user and the current user are a member; 0 for the current user // Number of group chats where both the other user and the current user are a member; 0 for the current user
@ -9393,7 +9426,6 @@ func (userFullInfo *UserFullInfo) UnmarshalJSON(data []byte) error {
Bio *FormattedText `json:"bio"` Bio *FormattedText `json:"bio"`
Birthdate *Birthdate `json:"birthdate"` Birthdate *Birthdate `json:"birthdate"`
PersonalChatId int64 `json:"personal_chat_id"` PersonalChatId int64 `json:"personal_chat_id"`
PremiumGiftOptions []*PremiumPaymentOption `json:"premium_gift_options"`
GiftCount int32 `json:"gift_count"` GiftCount int32 `json:"gift_count"`
GroupInCommonCount int32 `json:"group_in_common_count"` GroupInCommonCount int32 `json:"group_in_common_count"`
BusinessInfo *BusinessInfo `json:"business_info"` BusinessInfo *BusinessInfo `json:"business_info"`
@ -9420,7 +9452,6 @@ func (userFullInfo *UserFullInfo) UnmarshalJSON(data []byte) error {
userFullInfo.Bio = tmp.Bio userFullInfo.Bio = tmp.Bio
userFullInfo.Birthdate = tmp.Birthdate userFullInfo.Birthdate = tmp.Birthdate
userFullInfo.PersonalChatId = tmp.PersonalChatId userFullInfo.PersonalChatId = tmp.PersonalChatId
userFullInfo.PremiumGiftOptions = tmp.PremiumGiftOptions
userFullInfo.GiftCount = tmp.GiftCount userFullInfo.GiftCount = tmp.GiftCount
userFullInfo.GroupInCommonCount = tmp.GroupInCommonCount userFullInfo.GroupInCommonCount = tmp.GroupInCommonCount
userFullInfo.BusinessInfo = tmp.BusinessInfo userFullInfo.BusinessInfo = tmp.BusinessInfo
@ -10735,7 +10766,7 @@ type Supergroup struct {
Date int32 `json:"date"` Date int32 `json:"date"`
// Status of the current user in the supergroup or channel; custom title will always be empty // Status of the current user in the supergroup or channel; custom title will always be empty
Status ChatMemberStatus `json:"status"` Status ChatMemberStatus `json:"status"`
// 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, getRecommendedChats, getSuitableDiscussionChats, getUserPrivacySettingRules, getVideoChatAvailableParticipants, searchChatsNearby, searchPublicChats, or in chatFolderInviteLinkInfo.missing_chat_ids, or in userFullInfo.personal_chat_id, or for chats with messages or stories from publicForwards and foundStories // 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, getRecommendedChats, getSuitableDiscussionChats, getUserPrivacySettingRules, getVideoChatAvailableParticipants, searchPublicChats, or in chatFolderInviteLinkInfo.missing_chat_ids, or in userFullInfo.personal_chat_id, or for chats with messages or stories from publicForwards and foundStories
MemberCount int32 `json:"member_count"` MemberCount int32 `json:"member_count"`
// Approximate boost level for the chat // Approximate boost level for the chat
BoostLevel int32 `json:"boost_level"` BoostLevel int32 `json:"boost_level"`
@ -12492,9 +12523,9 @@ type Message struct {
IsTopicMessage bool `json:"is_topic_message"` IsTopicMessage bool `json:"is_topic_message"`
// True, if the message contains an unread mention for the current user // True, if the message contains an unread mention for the current user
ContainsUnreadMention bool `json:"contains_unread_mention"` ContainsUnreadMention bool `json:"contains_unread_mention"`
// Point in time (Unix timestamp) when the message was sent // Point in time (Unix timestamp) when the message was sent; 0 for scheduled messages
Date int32 `json:"date"` Date int32 `json:"date"`
// Point in time (Unix timestamp) when the message was last edited // Point in time (Unix timestamp) when the message was last edited; 0 for scheduled messages
EditDate int32 `json:"edit_date"` EditDate int32 `json:"edit_date"`
// Information about the initial message sender; may be null if none or unknown // Information about the initial message sender; may be null if none or unknown
ForwardInfo *MessageForwardInfo `json:"forward_info"` ForwardInfo *MessageForwardInfo `json:"forward_info"`
@ -14979,56 +15010,6 @@ func (*CreatedBasicGroupChat) GetType() string {
return TypeCreatedBasicGroupChat return TypeCreatedBasicGroupChat
} }
// Describes a chat located nearby
type ChatNearby struct {
meta
// Chat identifier
ChatId int64 `json:"chat_id"`
// Distance to the chat location, in meters
Distance int32 `json:"distance"`
}
func (entity *ChatNearby) MarshalJSON() ([]byte, error) {
entity.meta.Type = entity.GetType()
type stub ChatNearby
return json.Marshal((*stub)(entity))
}
func (*ChatNearby) GetClass() string {
return ClassChatNearby
}
func (*ChatNearby) GetType() string {
return TypeChatNearby
}
// Represents a list of chats located nearby
type ChatsNearby struct {
meta
// List of users nearby
UsersNearby []*ChatNearby `json:"users_nearby"`
// List of location-based supergroups nearby
SupergroupsNearby []*ChatNearby `json:"supergroups_nearby"`
}
func (entity *ChatsNearby) MarshalJSON() ([]byte, error) {
entity.meta.Type = entity.GetType()
type stub ChatsNearby
return json.Marshal((*stub)(entity))
}
func (*ChatsNearby) GetClass() string {
return ClassChatsNearby
}
func (*ChatsNearby) GetType() string {
return TypeChatsNearby
}
// The chat is public, because it has an active username // The chat is public, because it has an active username
type PublicChatTypeHasUsername struct{ type PublicChatTypeHasUsername struct{
meta meta
@ -15079,7 +15060,7 @@ func (*PublicChatTypeIsLocationBased) PublicChatTypeType() string {
return TypePublicChatTypeIsLocationBased return TypePublicChatTypeIsLocationBased
} }
// The chat can be reported as spam using the method reportChat with the reason reportReasonSpam. If the chat is a private chat with a user with an emoji status, then a notice about emoji status usage must be shown // The chat can be reported as spam using the method reportChat with an empty option_id and message_ids. If the chat is a private chat with a user with an emoji status, then a notice about emoji status usage must be shown
type ChatActionBarReportSpam struct { type ChatActionBarReportSpam struct {
meta meta
// 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 // 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
@ -15106,31 +15087,6 @@ func (*ChatActionBarReportSpam) ChatActionBarType() string {
return TypeChatActionBarReportSpam return TypeChatActionBarReportSpam
} }
// The chat is a location-based supergroup, which can be reported as having unrelated location using the method reportChat with the reason reportReasonUnrelatedLocation
type ChatActionBarReportUnrelatedLocation struct{
meta
}
func (entity *ChatActionBarReportUnrelatedLocation) MarshalJSON() ([]byte, error) {
entity.meta.Type = entity.GetType()
type stub ChatActionBarReportUnrelatedLocation
return json.Marshal((*stub)(entity))
}
func (*ChatActionBarReportUnrelatedLocation) GetClass() string {
return ClassChatActionBar
}
func (*ChatActionBarReportUnrelatedLocation) GetType() string {
return TypeChatActionBarReportUnrelatedLocation
}
func (*ChatActionBarReportUnrelatedLocation) ChatActionBarType() string {
return TypeChatActionBarReportUnrelatedLocation
}
// The chat is a recently created group chat to which new members can be invited // The chat is a recently created group chat to which new members can be invited
type ChatActionBarInviteMembers struct{ type ChatActionBarInviteMembers struct{
meta meta
@ -15161,8 +15117,6 @@ type ChatActionBarReportAddBlock struct {
meta meta
// 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 // 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
CanUnarchive bool `json:"can_unarchive"` CanUnarchive bool `json:"can_unarchive"`
// If non-negative, the current user was found by the other user through searchChatsNearby and this is the distance between the users
Distance int32 `json:"distance"`
} }
func (entity *ChatActionBarReportAddBlock) MarshalJSON() ([]byte, error) { func (entity *ChatActionBarReportAddBlock) MarshalJSON() ([]byte, error) {
@ -19711,7 +19665,7 @@ type LinkPreviewTypeTheme struct {
meta meta
// The list of files with theme description // The list of files with theme description
Documents []*Document `json:"documents"` Documents []*Document `json:"documents"`
// Settings for the cloud theme // Settings for the cloud theme; may be null if unknown
Settings *ThemeSettings `json:"settings"` Settings *ThemeSettings `json:"settings"`
} }
@ -19902,7 +19856,7 @@ func (*LinkPreviewTypeVoiceNote) LinkPreviewTypeType() string {
// The link is a link to a Web App // The link is a link to a Web App
type LinkPreviewTypeWebApp struct { type LinkPreviewTypeWebApp struct {
meta meta
// Web App photo // Web App photo; may be null if none
Photo *Photo `json:"photo"` Photo *Photo `json:"photo"`
} }
@ -20299,35 +20253,35 @@ func (*LocationAddress) GetType() string {
// Contains parameters of the application theme // Contains parameters of the application theme
type ThemeParameters struct { type ThemeParameters struct {
meta meta
// A color of the background in the RGB24 format // A color of the background in the RGB format
BackgroundColor int32 `json:"background_color"` BackgroundColor int32 `json:"background_color"`
// A secondary color for the background in the RGB24 format // A secondary color for the background in the RGB format
SecondaryBackgroundColor int32 `json:"secondary_background_color"` SecondaryBackgroundColor int32 `json:"secondary_background_color"`
// A color of the header background in the RGB24 format // A color of the header background in the RGB format
HeaderBackgroundColor int32 `json:"header_background_color"` HeaderBackgroundColor int32 `json:"header_background_color"`
// A color of the bottom bar background in the RGB24 format // A color of the bottom bar background in the RGB format
BottomBarBackgroundColor int32 `json:"bottom_bar_background_color"` BottomBarBackgroundColor int32 `json:"bottom_bar_background_color"`
// A color of the section background in the RGB24 format // A color of the section background in the RGB format
SectionBackgroundColor int32 `json:"section_background_color"` SectionBackgroundColor int32 `json:"section_background_color"`
// A color of the section separator in the RGB24 format // A color of the section separator in the RGB format
SectionSeparatorColor int32 `json:"section_separator_color"` SectionSeparatorColor int32 `json:"section_separator_color"`
// A color of text in the RGB24 format // A color of text in the RGB format
TextColor int32 `json:"text_color"` TextColor int32 `json:"text_color"`
// An accent color of the text in the RGB24 format // An accent color of the text in the RGB format
AccentTextColor int32 `json:"accent_text_color"` AccentTextColor int32 `json:"accent_text_color"`
// A color of text on the section headers in the RGB24 format // A color of text on the section headers in the RGB format
SectionHeaderTextColor int32 `json:"section_header_text_color"` SectionHeaderTextColor int32 `json:"section_header_text_color"`
// A color of the subtitle text in the RGB24 format // A color of the subtitle text in the RGB format
SubtitleTextColor int32 `json:"subtitle_text_color"` SubtitleTextColor int32 `json:"subtitle_text_color"`
// A color of the text for destructive actions in the RGB24 format // A color of the text for destructive actions in the RGB format
DestructiveTextColor int32 `json:"destructive_text_color"` DestructiveTextColor int32 `json:"destructive_text_color"`
// A color of hints in the RGB24 format // A color of hints in the RGB format
HintColor int32 `json:"hint_color"` HintColor int32 `json:"hint_color"`
// A color of links in the RGB24 format // A color of links in the RGB format
LinkColor int32 `json:"link_color"` LinkColor int32 `json:"link_color"`
// A color of the buttons in the RGB24 format // A color of the buttons in the RGB format
ButtonColor int32 `json:"button_color"` ButtonColor int32 `json:"button_color"`
// A color of text on the buttons in the RGB24 format // A color of text on the buttons in the RGB format
ButtonTextColor int32 `json:"button_text_color"` ButtonTextColor int32 `json:"button_text_color"`
} }
@ -21050,7 +21004,7 @@ type InputInvoiceMessage struct {
meta meta
// Chat identifier of the message // Chat identifier of the message
ChatId int64 `json:"chat_id"` ChatId int64 `json:"chat_id"`
// Message identifier // Message identifier. Use messageProperties.can_be_paid to check whether the message can be used in the method
MessageId int64 `json:"message_id"` MessageId int64 `json:"message_id"`
} }
@ -25201,6 +25155,8 @@ type MessageGiftedPremium struct {
GifterUserId int64 `json:"gifter_user_id"` GifterUserId int64 `json:"gifter_user_id"`
// The identifier of a user that received Telegram Premium; 0 if the gift is incoming // The identifier of a user that received Telegram Premium; 0 if the gift is incoming
ReceiverUserId int64 `json:"receiver_user_id"` ReceiverUserId int64 `json:"receiver_user_id"`
// Message added to the gifted Telegram Premium by the sender
Text *FormattedText `json:"text"`
// Currency for the paid amount // Currency for the paid amount
Currency string `json:"currency"` Currency string `json:"currency"`
// The paid amount, in the smallest units of the currency // The paid amount, in the smallest units of the currency
@ -25240,6 +25196,8 @@ type MessagePremiumGiftCode struct {
meta meta
// Identifier of a chat or a user that created the gift code; may be null if unknown // Identifier of a chat or a user that created the gift code; may be null if unknown
CreatorId MessageSender `json:"creator_id"` CreatorId MessageSender `json:"creator_id"`
// Message added to the gift
Text *FormattedText `json:"text"`
// True, if the gift code was created for a giveaway // True, if the gift code was created for a giveaway
IsFromGiveaway bool `json:"is_from_giveaway"` IsFromGiveaway bool `json:"is_from_giveaway"`
// True, if the winner for the corresponding Telegram Premium subscription wasn't chosen // True, if the winner for the corresponding Telegram Premium subscription wasn't chosen
@ -25283,6 +25241,7 @@ func (*MessagePremiumGiftCode) MessageContentType() string {
func (messagePremiumGiftCode *MessagePremiumGiftCode) UnmarshalJSON(data []byte) error { func (messagePremiumGiftCode *MessagePremiumGiftCode) UnmarshalJSON(data []byte) error {
var tmp struct { var tmp struct {
CreatorId json.RawMessage `json:"creator_id"` CreatorId json.RawMessage `json:"creator_id"`
Text *FormattedText `json:"text"`
IsFromGiveaway bool `json:"is_from_giveaway"` IsFromGiveaway bool `json:"is_from_giveaway"`
IsUnclaimed bool `json:"is_unclaimed"` IsUnclaimed bool `json:"is_unclaimed"`
Currency string `json:"currency"` Currency string `json:"currency"`
@ -25299,6 +25258,7 @@ func (messagePremiumGiftCode *MessagePremiumGiftCode) UnmarshalJSON(data []byte)
return err return err
} }
messagePremiumGiftCode.Text = tmp.Text
messagePremiumGiftCode.IsFromGiveaway = tmp.IsFromGiveaway messagePremiumGiftCode.IsFromGiveaway = tmp.IsFromGiveaway
messagePremiumGiftCode.IsUnclaimed = tmp.IsUnclaimed messagePremiumGiftCode.IsUnclaimed = tmp.IsUnclaimed
messagePremiumGiftCode.Currency = tmp.Currency messagePremiumGiftCode.Currency = tmp.Currency
@ -25990,7 +25950,7 @@ func (*TextEntityTypeMention) TextEntityTypeType() string {
return TypeTextEntityTypeMention return TypeTextEntityTypeMention
} }
// A hashtag text, beginning with "#" // A hashtag text, beginning with "#" and optionally containing a chat username at the end
type TextEntityTypeHashtag struct{ type TextEntityTypeHashtag struct{
meta meta
} }
@ -26015,7 +25975,7 @@ func (*TextEntityTypeHashtag) TextEntityTypeType() string {
return TypeTextEntityTypeHashtag return TypeTextEntityTypeHashtag
} }
// A cashtag text, beginning with "$" and consisting of capital English letters (e.g., "$USD") // A cashtag text, beginning with "$", consisting of capital English letters (e.g., "$USD"), and optionally containing a chat username at the end
type TextEntityTypeCashtag struct{ type TextEntityTypeCashtag struct{
meta meta
} }
@ -26741,6 +26701,33 @@ func (*MessageSchedulingStateSendWhenOnline) MessageSchedulingStateType() string
return TypeMessageSchedulingStateSendWhenOnline return TypeMessageSchedulingStateSendWhenOnline
} }
// The message will be sent when the video in the message is converted and optimized; can be used only by the server
type MessageSchedulingStateSendWhenVideoProcessed struct {
meta
// Approximate point in time (Unix timestamp) when the message is expected to be sent
SendDate int32 `json:"send_date"`
}
func (entity *MessageSchedulingStateSendWhenVideoProcessed) MarshalJSON() ([]byte, error) {
entity.meta.Type = entity.GetType()
type stub MessageSchedulingStateSendWhenVideoProcessed
return json.Marshal((*stub)(entity))
}
func (*MessageSchedulingStateSendWhenVideoProcessed) GetClass() string {
return ClassMessageSchedulingState
}
func (*MessageSchedulingStateSendWhenVideoProcessed) GetType() string {
return TypeMessageSchedulingStateSendWhenVideoProcessed
}
func (*MessageSchedulingStateSendWhenVideoProcessed) MessageSchedulingStateType() string {
return TypeMessageSchedulingStateSendWhenVideoProcessed
}
// The message will be self-destructed in the specified time after its content was opened // The message will be self-destructed in the specified time after its content was opened
type MessageSelfDestructTypeTimer struct { type MessageSelfDestructTypeTimer struct {
meta meta
@ -26802,6 +26789,8 @@ type MessageSendOptions struct {
FromBackground bool `json:"from_background"` FromBackground bool `json:"from_background"`
// Pass true if the content of the message must be protected from forwarding and saving; for bots only // Pass true if the content of the message must be protected from forwarding and saving; for bots only
ProtectContent bool `json:"protect_content"` ProtectContent bool `json:"protect_content"`
// Pass true to allow the message to ignore regular broadcast limits for a small fee; for bots only
AllowPaidBroadcast bool `json:"allow_paid_broadcast"`
// Pass true if the user explicitly chosen a sticker or a custom emoji from an installed sticker set; applicable only to sendMessage and sendMessageAlbum // Pass true if the user explicitly chosen a sticker or a custom emoji from an installed sticker set; applicable only to sendMessage and sendMessageAlbum
UpdateOrderOfInstalledStickerSets bool `json:"update_order_of_installed_sticker_sets"` UpdateOrderOfInstalledStickerSets bool `json:"update_order_of_installed_sticker_sets"`
// Message scheduling state; pass null to send message immediately. Messages sent to a secret chat, live location messages and self-destructing messages can't be scheduled // Message scheduling state; pass null to send message immediately. Messages sent to a secret chat, live location messages and self-destructing messages can't be scheduled
@ -26835,6 +26824,7 @@ func (messageSendOptions *MessageSendOptions) UnmarshalJSON(data []byte) error {
DisableNotification bool `json:"disable_notification"` DisableNotification bool `json:"disable_notification"`
FromBackground bool `json:"from_background"` FromBackground bool `json:"from_background"`
ProtectContent bool `json:"protect_content"` ProtectContent bool `json:"protect_content"`
AllowPaidBroadcast bool `json:"allow_paid_broadcast"`
UpdateOrderOfInstalledStickerSets bool `json:"update_order_of_installed_sticker_sets"` UpdateOrderOfInstalledStickerSets bool `json:"update_order_of_installed_sticker_sets"`
SchedulingState json.RawMessage `json:"scheduling_state"` SchedulingState json.RawMessage `json:"scheduling_state"`
EffectId JsonInt64 `json:"effect_id"` EffectId JsonInt64 `json:"effect_id"`
@ -26850,6 +26840,7 @@ func (messageSendOptions *MessageSendOptions) UnmarshalJSON(data []byte) error {
messageSendOptions.DisableNotification = tmp.DisableNotification messageSendOptions.DisableNotification = tmp.DisableNotification
messageSendOptions.FromBackground = tmp.FromBackground messageSendOptions.FromBackground = tmp.FromBackground
messageSendOptions.ProtectContent = tmp.ProtectContent messageSendOptions.ProtectContent = tmp.ProtectContent
messageSendOptions.AllowPaidBroadcast = tmp.AllowPaidBroadcast
messageSendOptions.UpdateOrderOfInstalledStickerSets = tmp.UpdateOrderOfInstalledStickerSets messageSendOptions.UpdateOrderOfInstalledStickerSets = tmp.UpdateOrderOfInstalledStickerSets
messageSendOptions.EffectId = tmp.EffectId messageSendOptions.EffectId = tmp.EffectId
messageSendOptions.SendingId = tmp.SendingId messageSendOptions.SendingId = tmp.SendingId
@ -26864,7 +26855,7 @@ func (messageSendOptions *MessageSendOptions) UnmarshalJSON(data []byte) error {
// Options to be used when a message content is copied without reference to the original sender. Service messages, messages with messageInvoice, messagePaidMedia, messageGiveaway, or messageGiveawayWinners content can't be copied // Options to be used when a message content is copied without reference to the original sender. Service messages, messages with messageInvoice, messagePaidMedia, messageGiveaway, or messageGiveawayWinners content can't be copied
type MessageCopyOptions struct { type MessageCopyOptions struct {
meta meta
// True, if content of the message needs to be copied without reference to the original sender. Always true if the message is forwarded to a secret chat or is local // True, if content of the message needs to be copied without reference to the original sender. Always true if the message is forwarded to a secret chat or is local. Use messageProperties.can_be_saved and messageProperties.can_be_copied_to_secret_chat to check whether the message is suitable
SendCopy bool `json:"send_copy"` SendCopy bool `json:"send_copy"`
// True, if media caption of the message copy needs to be replaced. Ignored if send_copy is false // True, if media caption of the message copy needs to be replaced. Ignored if send_copy is false
ReplaceCaption bool `json:"replace_caption"` ReplaceCaption bool `json:"replace_caption"`
@ -27379,7 +27370,7 @@ func (inputMessageVideo *InputMessageVideo) UnmarshalJSON(data []byte) error {
// A video note message // A video note message
type InputMessageVideoNote struct { type InputMessageVideoNote struct {
meta meta
// Video note to be sent // Video note to be sent. The video is expected to be encoded to MPEG4 format with H.264 codec and have no data outside of the visible circle
VideoNote InputFile `json:"video_note"` VideoNote InputFile `json:"video_note"`
// Video thumbnail; may be null if empty; pass null to skip thumbnail uploading // Video thumbnail; may be null if empty; pass null to skip thumbnail uploading
Thumbnail *InputThumbnail `json:"thumbnail"` Thumbnail *InputThumbnail `json:"thumbnail"`
@ -27835,7 +27826,7 @@ type MessageProperties struct {
CanBeDeletedOnlyForSelf bool `json:"can_be_deleted_only_for_self"` CanBeDeletedOnlyForSelf bool `json:"can_be_deleted_only_for_self"`
// True, if the message can be deleted for all users using the method deleteMessages with revoke == true // True, if the message can be deleted for all users using the method deleteMessages with revoke == true
CanBeDeletedForAllUsers bool `json:"can_be_deleted_for_all_users"` CanBeDeletedForAllUsers bool `json:"can_be_deleted_for_all_users"`
// True, if the message can be edited using the methods editMessageText, editMessageMedia, editMessageCaption, or editMessageReplyMarkup. For live location and poll messages this fields shows whether editMessageLiveLocation or stopPoll can be used with this message // True, if the message can be edited using the methods editMessageText, editMessageCaption, or editMessageReplyMarkup. For live location and poll messages this fields shows whether editMessageLiveLocation or stopPoll can be used with this message
CanBeEdited bool `json:"can_be_edited"` CanBeEdited bool `json:"can_be_edited"`
// True, if the message can be forwarded using inputMessageForwarded or forwardMessages // True, if the message can be forwarded using inputMessageForwarded or forwardMessages
CanBeForwarded bool `json:"can_be_forwarded"` CanBeForwarded bool `json:"can_be_forwarded"`
@ -27851,6 +27842,8 @@ type MessageProperties struct {
CanBeSaved bool `json:"can_be_saved"` CanBeSaved bool `json:"can_be_saved"`
// True, if the message can be shared in a story using inputStoryAreaTypeMessage // True, if the message can be shared in a story using inputStoryAreaTypeMessage
CanBeSharedInStory bool `json:"can_be_shared_in_story"` CanBeSharedInStory bool `json:"can_be_shared_in_story"`
// True, if the message can be edited using the method editMessageMedia
CanEditMedia bool `json:"can_edit_media"`
// True, if scheduling state of the message can be edited // True, if scheduling state of the message can be edited
CanEditSchedulingState bool `json:"can_edit_scheduling_state"` CanEditSchedulingState bool `json:"can_edit_scheduling_state"`
// True, if code for message embedding can be received using getMessageEmbeddingCode // True, if code for message embedding can be received using getMessageEmbeddingCode
@ -33544,9 +33537,9 @@ func (*BusinessConnection) GetType() string {
// Describes a color to highlight a bot added to attachment menu // Describes a color to highlight a bot added to attachment menu
type AttachmentMenuBotColor struct { type AttachmentMenuBotColor struct {
meta meta
// Color in the RGB24 format for light themes // Color in the RGB format for light themes
LightColor int32 `json:"light_color"` LightColor int32 `json:"light_color"`
// Color in the RGB24 format for dark themes // Color in the RGB format for dark themes
DarkColor int32 `json:"dark_color"` DarkColor int32 `json:"dark_color"`
} }
@ -39389,37 +39382,6 @@ func (*StorePaymentPurposePremiumSubscription) StorePaymentPurposeType() string
return TypeStorePaymentPurposePremiumSubscription return TypeStorePaymentPurposePremiumSubscription
} }
// The user gifting Telegram Premium to another user
type StorePaymentPurposeGiftedPremium struct {
meta
// Identifier of the user to which Telegram Premium is gifted
UserId int64 `json:"user_id"`
// ISO 4217 currency code of the payment currency
Currency string `json:"currency"`
// Paid amount, in the smallest units of the currency
Amount int64 `json:"amount"`
}
func (entity *StorePaymentPurposeGiftedPremium) MarshalJSON() ([]byte, error) {
entity.meta.Type = entity.GetType()
type stub StorePaymentPurposeGiftedPremium
return json.Marshal((*stub)(entity))
}
func (*StorePaymentPurposeGiftedPremium) GetClass() string {
return ClassStorePaymentPurpose
}
func (*StorePaymentPurposeGiftedPremium) GetType() string {
return TypeStorePaymentPurposeGiftedPremium
}
func (*StorePaymentPurposeGiftedPremium) StorePaymentPurposeType() string {
return TypeStorePaymentPurposeGiftedPremium
}
// The user creating Telegram Premium gift codes for other users // The user creating Telegram Premium gift codes for other users
type StorePaymentPurposePremiumGiftCodes struct { type StorePaymentPurposePremiumGiftCodes struct {
meta meta
@ -39431,6 +39393,8 @@ type StorePaymentPurposePremiumGiftCodes struct {
Amount int64 `json:"amount"` Amount int64 `json:"amount"`
// Identifiers of the users which can activate the gift codes // Identifiers of the users which can activate the gift codes
UserIds []int64 `json:"user_ids"` UserIds []int64 `json:"user_ids"`
// Text to show along with the gift codes; 0-getOption("gift_text_length_max") characters. Only Bold, Italic, Underline, Strikethrough, Spoiler, and CustomEmoji entities are allowed
Text *FormattedText `json:"text"`
} }
func (entity *StorePaymentPurposePremiumGiftCodes) MarshalJSON() ([]byte, error) { func (entity *StorePaymentPurposePremiumGiftCodes) MarshalJSON() ([]byte, error) {
@ -39596,6 +39560,8 @@ type TelegramPaymentPurposePremiumGiftCodes struct {
UserIds []int64 `json:"user_ids"` UserIds []int64 `json:"user_ids"`
// Number of months the Telegram Premium subscription will be active for the users // Number of months the Telegram Premium subscription will be active for the users
MonthCount int32 `json:"month_count"` MonthCount int32 `json:"month_count"`
// Text to show along with the gift codes; 0-getOption("gift_text_length_max") characters. Only Bold, Italic, Underline, Strikethrough, Spoiler, and CustomEmoji entities are allowed
Text *FormattedText `json:"text"`
} }
func (entity *TelegramPaymentPurposePremiumGiftCodes) MarshalJSON() ([]byte, error) { func (entity *TelegramPaymentPurposePremiumGiftCodes) MarshalJSON() ([]byte, error) {
@ -40143,7 +40109,7 @@ func (*PushReceiverId) GetType() string {
// Describes a solid fill of a background // Describes a solid fill of a background
type BackgroundFillSolid struct { type BackgroundFillSolid struct {
meta meta
// A color of the background in the RGB24 format // A color of the background in the RGB format
Color int32 `json:"color"` Color int32 `json:"color"`
} }
@ -40170,9 +40136,9 @@ func (*BackgroundFillSolid) BackgroundFillType() string {
// Describes a gradient fill of a background // Describes a gradient fill of a background
type BackgroundFillGradient struct { type BackgroundFillGradient struct {
meta meta
// A top color of the background in the RGB24 format // A top color of the background in the RGB format
TopColor int32 `json:"top_color"` TopColor int32 `json:"top_color"`
// A bottom color of the background in the RGB24 format // A bottom color of the background in the RGB format
BottomColor int32 `json:"bottom_color"` BottomColor int32 `json:"bottom_color"`
// Clockwise rotation angle of the gradient, in degrees; 0-359. Must always be divisible by 45 // Clockwise rotation angle of the gradient, in degrees; 0-359. Must always be divisible by 45
RotationAngle int32 `json:"rotation_angle"` RotationAngle int32 `json:"rotation_angle"`
@ -40201,7 +40167,7 @@ func (*BackgroundFillGradient) BackgroundFillType() string {
// Describes a freeform gradient fill of a background // Describes a freeform gradient fill of a background
type BackgroundFillFreeformGradient struct { type BackgroundFillFreeformGradient struct {
meta meta
// A list of 3 or 4 colors of the freeform gradient in the RGB24 format // A list of 3 or 4 colors of the freeform gradient in the RGB format
Colors []int32 `json:"colors"` Colors []int32 `json:"colors"`
} }
@ -45783,7 +45749,7 @@ func (*InternalLinkTypePremiumFeatures) InternalLinkTypeType() string {
return TypeInternalLinkTypePremiumFeatures return TypeInternalLinkTypePremiumFeatures
} }
// The link is a link to the screen for gifting Telegram Premium subscriptions to friends via inputInvoiceTelegram payments or in-store purchases // The link is a link to the screen for gifting Telegram Premium subscriptions to friends via inputInvoiceTelegram with telegramPaymentPurposePremiumGiftCodes payments or in-store purchases
type InternalLinkTypePremiumGift struct { type InternalLinkTypePremiumGift struct {
meta meta
// Referrer specified in the link // Referrer specified in the link
@ -50477,7 +50443,7 @@ func (*UpdateMessageSendAcknowledged) UpdateType() string {
// A message has been successfully sent // A message has been successfully sent
type UpdateMessageSendSucceeded struct { type UpdateMessageSendSucceeded struct {
meta meta
// The sent message. Usually only the message identifier, date, and content are changed, but almost all other fields can also change // The sent message. Almost any field of the new message can be different from the corresponding field of the original message. For example, the field scheduling_state may change, making the message scheduled, or non-scheduled
Message *Message `json:"message"` Message *Message `json:"message"`
// The previous temporary message identifier // The previous temporary message identifier
OldMessageId int64 `json:"old_message_id"` OldMessageId int64 `json:"old_message_id"`
@ -50857,6 +50823,35 @@ func (*UpdateMessageLiveLocationViewed) UpdateType() string {
return TypeUpdateMessageLiveLocationViewed return TypeUpdateMessageLiveLocationViewed
} }
// An automatically scheduled message with video has been successfully sent after conversion
type UpdateVideoPublished struct {
meta
// Identifier of the chat with the message
ChatId int64 `json:"chat_id"`
// Identifier of the sent message
MessageId int64 `json:"message_id"`
}
func (entity *UpdateVideoPublished) MarshalJSON() ([]byte, error) {
entity.meta.Type = entity.GetType()
type stub UpdateVideoPublished
return json.Marshal((*stub)(entity))
}
func (*UpdateVideoPublished) GetClass() string {
return ClassUpdate
}
func (*UpdateVideoPublished) GetType() string {
return TypeUpdateVideoPublished
}
func (*UpdateVideoPublished) UpdateType() string {
return TypeUpdateVideoPublished
}
// A new chat has been loaded/created. This update is guaranteed to come before the chat identifier is returned to the application. The chat field changes will be reported through separate updates // A new chat has been loaded/created. This update is guaranteed to come before the chat identifier is returned to the application. The chat field changes will be reported through separate updates
type UpdateNewChat struct { type UpdateNewChat struct {
meta meta
@ -54060,33 +54055,6 @@ func (*UpdateTermsOfService) UpdateType() string {
return TypeUpdateTermsOfService return TypeUpdateTermsOfService
} }
// The list of users nearby has changed. The update is guaranteed to be sent only 60 seconds after a successful searchChatsNearby request
type UpdateUsersNearby struct {
meta
// The new list of users nearby
UsersNearby []*ChatNearby `json:"users_nearby"`
}
func (entity *UpdateUsersNearby) MarshalJSON() ([]byte, error) {
entity.meta.Type = entity.GetType()
type stub UpdateUsersNearby
return json.Marshal((*stub)(entity))
}
func (*UpdateUsersNearby) GetClass() string {
return ClassUpdate
}
func (*UpdateUsersNearby) GetType() string {
return TypeUpdateUsersNearby
}
func (*UpdateUsersNearby) UpdateType() string {
return TypeUpdateUsersNearby
}
// The first unconfirmed session has changed // The first unconfirmed session has changed
type UpdateUnconfirmedSession struct { type UpdateUnconfirmedSession struct {
meta meta

View file

@ -828,6 +828,9 @@ func UnmarshalStarTransactionPartner(data json.RawMessage) (StarTransactionPartn
case TypeStarTransactionPartnerTelegramAds: case TypeStarTransactionPartnerTelegramAds:
return UnmarshalStarTransactionPartnerTelegramAds(data) return UnmarshalStarTransactionPartnerTelegramAds(data)
case TypeStarTransactionPartnerTelegramApi:
return UnmarshalStarTransactionPartnerTelegramApi(data)
case TypeStarTransactionPartnerBot: case TypeStarTransactionPartnerBot:
return UnmarshalStarTransactionPartnerBot(data) return UnmarshalStarTransactionPartnerBot(data)
@ -1853,9 +1856,6 @@ func UnmarshalChatActionBar(data json.RawMessage) (ChatActionBar, error) {
case TypeChatActionBarReportSpam: case TypeChatActionBarReportSpam:
return UnmarshalChatActionBarReportSpam(data) return UnmarshalChatActionBarReportSpam(data)
case TypeChatActionBarReportUnrelatedLocation:
return UnmarshalChatActionBarReportUnrelatedLocation(data)
case TypeChatActionBarInviteMembers: case TypeChatActionBarInviteMembers:
return UnmarshalChatActionBarInviteMembers(data) return UnmarshalChatActionBarInviteMembers(data)
@ -3491,6 +3491,9 @@ func UnmarshalMessageSchedulingState(data json.RawMessage) (MessageSchedulingSta
case TypeMessageSchedulingStateSendWhenOnline: case TypeMessageSchedulingStateSendWhenOnline:
return UnmarshalMessageSchedulingStateSendWhenOnline(data) return UnmarshalMessageSchedulingStateSendWhenOnline(data)
case TypeMessageSchedulingStateSendWhenVideoProcessed:
return UnmarshalMessageSchedulingStateSendWhenVideoProcessed(data)
default: default:
return nil, fmt.Errorf("Error unmarshaling. Unknown type: " + meta.Type) return nil, fmt.Errorf("Error unmarshaling. Unknown type: " + meta.Type)
} }
@ -5441,9 +5444,6 @@ func UnmarshalStorePaymentPurpose(data json.RawMessage) (StorePaymentPurpose, er
case TypeStorePaymentPurposePremiumSubscription: case TypeStorePaymentPurposePremiumSubscription:
return UnmarshalStorePaymentPurposePremiumSubscription(data) return UnmarshalStorePaymentPurposePremiumSubscription(data)
case TypeStorePaymentPurposeGiftedPremium:
return UnmarshalStorePaymentPurposeGiftedPremium(data)
case TypeStorePaymentPurposePremiumGiftCodes: case TypeStorePaymentPurposePremiumGiftCodes:
return UnmarshalStorePaymentPurposePremiumGiftCodes(data) return UnmarshalStorePaymentPurposePremiumGiftCodes(data)
@ -7713,6 +7713,9 @@ func UnmarshalUpdate(data json.RawMessage) (Update, error) {
case TypeUpdateMessageLiveLocationViewed: case TypeUpdateMessageLiveLocationViewed:
return UnmarshalUpdateMessageLiveLocationViewed(data) return UnmarshalUpdateMessageLiveLocationViewed(data)
case TypeUpdateVideoPublished:
return UnmarshalUpdateVideoPublished(data)
case TypeUpdateNewChat: case TypeUpdateNewChat:
return UnmarshalUpdateNewChat(data) return UnmarshalUpdateNewChat(data)
@ -8001,9 +8004,6 @@ func UnmarshalUpdate(data json.RawMessage) (Update, error) {
case TypeUpdateTermsOfService: case TypeUpdateTermsOfService:
return UnmarshalUpdateTermsOfService(data) return UnmarshalUpdateTermsOfService(data)
case TypeUpdateUsersNearby:
return UnmarshalUpdateUsersNearby(data)
case TypeUpdateUnconfirmedSession: case TypeUpdateUnconfirmedSession:
return UnmarshalUpdateUnconfirmedSession(data) return UnmarshalUpdateUnconfirmedSession(data)
@ -9532,6 +9532,14 @@ func UnmarshalStarTransactionPartnerTelegramAds(data json.RawMessage) (*StarTran
return &resp, err return &resp, err
} }
func UnmarshalStarTransactionPartnerTelegramApi(data json.RawMessage) (*StarTransactionPartnerTelegramApi, error) {
var resp StarTransactionPartnerTelegramApi
err := json.Unmarshal(data, &resp)
return &resp, err
}
func UnmarshalStarTransactionPartnerBot(data json.RawMessage) (*StarTransactionPartnerBot, error) { func UnmarshalStarTransactionPartnerBot(data json.RawMessage) (*StarTransactionPartnerBot, error) {
var resp StarTransactionPartnerBot var resp StarTransactionPartnerBot
@ -11036,22 +11044,6 @@ func UnmarshalCreatedBasicGroupChat(data json.RawMessage) (*CreatedBasicGroupCha
return &resp, err return &resp, err
} }
func UnmarshalChatNearby(data json.RawMessage) (*ChatNearby, error) {
var resp ChatNearby
err := json.Unmarshal(data, &resp)
return &resp, err
}
func UnmarshalChatsNearby(data json.RawMessage) (*ChatsNearby, error) {
var resp ChatsNearby
err := json.Unmarshal(data, &resp)
return &resp, err
}
func UnmarshalPublicChatTypeHasUsername(data json.RawMessage) (*PublicChatTypeHasUsername, error) { func UnmarshalPublicChatTypeHasUsername(data json.RawMessage) (*PublicChatTypeHasUsername, error) {
var resp PublicChatTypeHasUsername var resp PublicChatTypeHasUsername
@ -11076,14 +11068,6 @@ func UnmarshalChatActionBarReportSpam(data json.RawMessage) (*ChatActionBarRepor
return &resp, err return &resp, err
} }
func UnmarshalChatActionBarReportUnrelatedLocation(data json.RawMessage) (*ChatActionBarReportUnrelatedLocation, error) {
var resp ChatActionBarReportUnrelatedLocation
err := json.Unmarshal(data, &resp)
return &resp, err
}
func UnmarshalChatActionBarInviteMembers(data json.RawMessage) (*ChatActionBarInviteMembers, error) { func UnmarshalChatActionBarInviteMembers(data json.RawMessage) (*ChatActionBarInviteMembers, error) {
var resp ChatActionBarInviteMembers var resp ChatActionBarInviteMembers
@ -13900,6 +13884,14 @@ func UnmarshalMessageSchedulingStateSendWhenOnline(data json.RawMessage) (*Messa
return &resp, err return &resp, err
} }
func UnmarshalMessageSchedulingStateSendWhenVideoProcessed(data json.RawMessage) (*MessageSchedulingStateSendWhenVideoProcessed, error) {
var resp MessageSchedulingStateSendWhenVideoProcessed
err := json.Unmarshal(data, &resp)
return &resp, err
}
func UnmarshalMessageSelfDestructTypeTimer(data json.RawMessage) (*MessageSelfDestructTypeTimer, error) { func UnmarshalMessageSelfDestructTypeTimer(data json.RawMessage) (*MessageSelfDestructTypeTimer, error) {
var resp MessageSelfDestructTypeTimer var resp MessageSelfDestructTypeTimer
@ -16908,14 +16900,6 @@ func UnmarshalStorePaymentPurposePremiumSubscription(data json.RawMessage) (*Sto
return &resp, err return &resp, err
} }
func UnmarshalStorePaymentPurposeGiftedPremium(data json.RawMessage) (*StorePaymentPurposeGiftedPremium, error) {
var resp StorePaymentPurposeGiftedPremium
err := json.Unmarshal(data, &resp)
return &resp, err
}
func UnmarshalStorePaymentPurposePremiumGiftCodes(data json.RawMessage) (*StorePaymentPurposePremiumGiftCodes, error) { func UnmarshalStorePaymentPurposePremiumGiftCodes(data json.RawMessage) (*StorePaymentPurposePremiumGiftCodes, error) {
var resp StorePaymentPurposePremiumGiftCodes var resp StorePaymentPurposePremiumGiftCodes
@ -20036,6 +20020,14 @@ func UnmarshalUpdateMessageLiveLocationViewed(data json.RawMessage) (*UpdateMess
return &resp, err return &resp, err
} }
func UnmarshalUpdateVideoPublished(data json.RawMessage) (*UpdateVideoPublished, error) {
var resp UpdateVideoPublished
err := json.Unmarshal(data, &resp)
return &resp, err
}
func UnmarshalUpdateNewChat(data json.RawMessage) (*UpdateNewChat, error) { func UnmarshalUpdateNewChat(data json.RawMessage) (*UpdateNewChat, error) {
var resp UpdateNewChat var resp UpdateNewChat
@ -20804,14 +20796,6 @@ func UnmarshalUpdateTermsOfService(data json.RawMessage) (*UpdateTermsOfService,
return &resp, err return &resp, err
} }
func UnmarshalUpdateUsersNearby(data json.RawMessage) (*UpdateUsersNearby, error) {
var resp UpdateUsersNearby
err := json.Unmarshal(data, &resp)
return &resp, err
}
func UnmarshalUpdateUnconfirmedSession(data json.RawMessage) (*UpdateUnconfirmedSession, error) { func UnmarshalUpdateUnconfirmedSession(data json.RawMessage) (*UpdateUnconfirmedSession, error) {
var resp UpdateUnconfirmedSession var resp UpdateUnconfirmedSession
@ -21760,6 +21744,9 @@ func UnmarshalType(data json.RawMessage) (Type, error) {
case TypeStarTransactionPartnerTelegramAds: case TypeStarTransactionPartnerTelegramAds:
return UnmarshalStarTransactionPartnerTelegramAds(data) return UnmarshalStarTransactionPartnerTelegramAds(data)
case TypeStarTransactionPartnerTelegramApi:
return UnmarshalStarTransactionPartnerTelegramApi(data)
case TypeStarTransactionPartnerBot: case TypeStarTransactionPartnerBot:
return UnmarshalStarTransactionPartnerBot(data) return UnmarshalStarTransactionPartnerBot(data)
@ -22324,12 +22311,6 @@ func UnmarshalType(data json.RawMessage) (Type, error) {
case TypeCreatedBasicGroupChat: case TypeCreatedBasicGroupChat:
return UnmarshalCreatedBasicGroupChat(data) return UnmarshalCreatedBasicGroupChat(data)
case TypeChatNearby:
return UnmarshalChatNearby(data)
case TypeChatsNearby:
return UnmarshalChatsNearby(data)
case TypePublicChatTypeHasUsername: case TypePublicChatTypeHasUsername:
return UnmarshalPublicChatTypeHasUsername(data) return UnmarshalPublicChatTypeHasUsername(data)
@ -22339,9 +22320,6 @@ func UnmarshalType(data json.RawMessage) (Type, error) {
case TypeChatActionBarReportSpam: case TypeChatActionBarReportSpam:
return UnmarshalChatActionBarReportSpam(data) return UnmarshalChatActionBarReportSpam(data)
case TypeChatActionBarReportUnrelatedLocation:
return UnmarshalChatActionBarReportUnrelatedLocation(data)
case TypeChatActionBarInviteMembers: case TypeChatActionBarInviteMembers:
return UnmarshalChatActionBarInviteMembers(data) return UnmarshalChatActionBarInviteMembers(data)
@ -23398,6 +23376,9 @@ func UnmarshalType(data json.RawMessage) (Type, error) {
case TypeMessageSchedulingStateSendWhenOnline: case TypeMessageSchedulingStateSendWhenOnline:
return UnmarshalMessageSchedulingStateSendWhenOnline(data) return UnmarshalMessageSchedulingStateSendWhenOnline(data)
case TypeMessageSchedulingStateSendWhenVideoProcessed:
return UnmarshalMessageSchedulingStateSendWhenVideoProcessed(data)
case TypeMessageSelfDestructTypeTimer: case TypeMessageSelfDestructTypeTimer:
return UnmarshalMessageSelfDestructTypeTimer(data) return UnmarshalMessageSelfDestructTypeTimer(data)
@ -24526,9 +24507,6 @@ func UnmarshalType(data json.RawMessage) (Type, error) {
case TypeStorePaymentPurposePremiumSubscription: case TypeStorePaymentPurposePremiumSubscription:
return UnmarshalStorePaymentPurposePremiumSubscription(data) return UnmarshalStorePaymentPurposePremiumSubscription(data)
case TypeStorePaymentPurposeGiftedPremium:
return UnmarshalStorePaymentPurposeGiftedPremium(data)
case TypeStorePaymentPurposePremiumGiftCodes: case TypeStorePaymentPurposePremiumGiftCodes:
return UnmarshalStorePaymentPurposePremiumGiftCodes(data) return UnmarshalStorePaymentPurposePremiumGiftCodes(data)
@ -25699,6 +25677,9 @@ func UnmarshalType(data json.RawMessage) (Type, error) {
case TypeUpdateMessageLiveLocationViewed: case TypeUpdateMessageLiveLocationViewed:
return UnmarshalUpdateMessageLiveLocationViewed(data) return UnmarshalUpdateMessageLiveLocationViewed(data)
case TypeUpdateVideoPublished:
return UnmarshalUpdateVideoPublished(data)
case TypeUpdateNewChat: case TypeUpdateNewChat:
return UnmarshalUpdateNewChat(data) return UnmarshalUpdateNewChat(data)
@ -25987,9 +25968,6 @@ func UnmarshalType(data json.RawMessage) (Type, error) {
case TypeUpdateTermsOfService: case TypeUpdateTermsOfService:
return UnmarshalUpdateTermsOfService(data) return UnmarshalUpdateTermsOfService(data)
case TypeUpdateUsersNearby:
return UnmarshalUpdateUsersNearby(data)
case TypeUpdateUnconfirmedSession: case TypeUpdateUnconfirmedSession:
return UnmarshalUpdateUnconfirmedSession(data) return UnmarshalUpdateUnconfirmedSession(data)

View file

@ -829,7 +829,7 @@ starSubscription id:string chat_id:int53 expiration_date:int32 can_reuse:Bool is
//@description Represents a list of Telegram Star subscriptions //@description Represents a list of Telegram Star subscriptions
//@star_count The amount of owned Telegram Stars //@star_count The amount of owned Telegram Stars
//@subscriptions List of subbscriptions for Telegram Stars //@subscriptions List of subscriptions for Telegram Stars
//@required_star_count The number of Telegram Stars required to buy to extend subscriptions expiring soon //@required_star_count The number of Telegram Stars required to buy to extend subscriptions expiring soon
//@next_offset The offset for the next request. If empty, then there are no more results //@next_offset The offset for the next request. If empty, then there are no more results
starSubscriptions star_count:int53 subscriptions:vector<starSubscription> required_star_count:int53 next_offset:string = StarSubscriptions; starSubscriptions star_count:int53 subscriptions:vector<starSubscription> required_star_count:int53 next_offset:string = StarSubscriptions;
@ -861,11 +861,13 @@ premiumStatePaymentOption payment_option:premiumPaymentOption is_current:Bool is
//@description Describes an option for creating Telegram Premium gift codes or Telegram Premium giveaway. Use telegramPaymentPurposePremiumGiftCodes or telegramPaymentPurposePremiumGiveaway for out-of-store payments //@description Describes an option for creating Telegram Premium gift codes or Telegram Premium giveaway. Use telegramPaymentPurposePremiumGiftCodes or telegramPaymentPurposePremiumGiveaway for out-of-store payments
//@currency ISO 4217 currency code for Telegram Premium gift code payment //@currency ISO 4217 currency code for Telegram Premium gift code payment
//@amount The amount to pay, in the smallest units of the currency //@amount The amount to pay, in the smallest units of the currency
//@discount_percentage The discount associated with this option, as a percentage
//@winner_count Number of users which will be able to activate the gift codes //@winner_count Number of users which will be able to activate the gift codes
//@month_count Number of months the Telegram Premium subscription will be active //@month_count Number of months the Telegram Premium subscription will be active
//@store_product_id Identifier of the store product associated with the option; may be empty if none //@store_product_id Identifier of the store product associated with the option; may be empty if none
//@store_product_quantity Number of times the store product must be paid //@store_product_quantity Number of times the store product must be paid
premiumGiftCodePaymentOption currency:string amount:int53 winner_count:int32 month_count:int32 store_product_id:string store_product_quantity:int32 = PremiumGiftCodePaymentOption; //@sticker A sticker to be shown along with the gift code; may be null if unknown
premiumGiftCodePaymentOption currency:string amount:int53 discount_percentage:int32 winner_count:int32 month_count:int32 store_product_id:string store_product_quantity:int32 sticker:sticker = PremiumGiftCodePaymentOption;
//@description Contains a list of options for creating Telegram Premium gift codes or Telegram Premium giveaway @options The list of options //@description Contains a list of options for creating Telegram Premium gift codes or Telegram Premium giveaway @options The list of options
premiumGiftCodePaymentOptions options:vector<premiumGiftCodePaymentOption> = PremiumGiftCodePaymentOptions; premiumGiftCodePaymentOptions options:vector<premiumGiftCodePaymentOption> = PremiumGiftCodePaymentOptions;
@ -916,9 +918,11 @@ starGiveawayPaymentOptions options:vector<starGiveawayPaymentOption> = StarGivea
//@sticker The sticker representing the gift //@sticker The sticker representing the gift
//@star_count Number of Telegram Stars that must be paid for the gift //@star_count Number of Telegram Stars that must be paid for the gift
//@default_sell_star_count Number of Telegram Stars that can be claimed by the receiver instead of the gift by default. If the gift was paid with just bought Telegram Stars, then full value can be claimed //@default_sell_star_count Number of Telegram Stars that can be claimed by the receiver instead of the gift by default. If the gift was paid with just bought Telegram Stars, then full value can be claimed
//@remaining_count Number of remaining times the gift can be purchased by all users; 0 if not limited //@remaining_count Number of remaining times the gift can be purchased by all users; 0 if not limited or the gift was sold out
//@total_count Number of total times the gift can be purchased by all users; 0 if not limited //@total_count Number of total times the gift can be purchased by all users; 0 if not limited
gift id:int64 sticker:sticker star_count:int53 default_sell_star_count:int53 remaining_count:int32 total_count:int32 = Gift; //@first_send_date Point in time (Unix timestamp) when the gift was send for the first time; for sold out gifts only
//@last_send_date Point in time (Unix timestamp) when the gift was send for the last time; for sold out gifts only
gift id:int64 sticker:sticker star_count:int53 default_sell_star_count:int53 remaining_count:int32 total_count:int32 first_send_date:int32 last_send_date:int32 = Gift;
//@description Contains a list of gifts that can be sent to another user @gifts The list of gifts //@description Contains a list of gifts that can be sent to another user @gifts The list of gifts
gifts gifts:vector<gift> = Gifts; gifts gifts:vector<gift> = Gifts;
@ -952,7 +956,7 @@ starTransactionDirectionOutgoing = StarTransactionDirection;
//@class BotTransactionPurpose @description Describes purpose of a transaction with a bot //@class BotTransactionPurpose @description Describes purpose of a transaction with a bot
//@description Paid media were bought @media The bought media if the trancastion wasn't refunded @payload Bot-provided payload; for bots only //@description Paid media were bought @media The bought media if the transaction wasn't refunded @payload Bot-provided payload; for bots only
botTransactionPurposePaidMedia media:vector<PaidMedia> payload:string = BotTransactionPurpose; botTransactionPurposePaidMedia media:vector<PaidMedia> payload:string = BotTransactionPurpose;
//@description User bought a product from the bot //@description User bought a product from the bot
@ -965,7 +969,7 @@ botTransactionPurposeInvoicePayment product_info:productInfo invoice_payload:byt
//@description Paid media were bought //@description Paid media were bought
//@message_id Identifier of the corresponding message with paid media; can be 0 or an identifier of a deleted message //@message_id Identifier of the corresponding message with paid media; can be 0 or an identifier of a deleted message
//@media The bought media if the trancastion wasn't refunded //@media The bought media if the transaction wasn't refunded
chatTransactionPurposePaidMedia message_id:int53 media:vector<PaidMedia> = ChatTransactionPurpose; chatTransactionPurposePaidMedia message_id:int53 media:vector<PaidMedia> = ChatTransactionPurpose;
//@description User joined the channel and subscribed to regular payments in Telegram Stars //@description User joined the channel and subscribed to regular payments in Telegram Stars
@ -1003,22 +1007,25 @@ starTransactionPartnerAppStore = StarTransactionPartner;
//@description The transaction is a transaction with Google Play //@description The transaction is a transaction with Google Play
starTransactionPartnerGooglePlay = StarTransactionPartner; starTransactionPartnerGooglePlay = StarTransactionPartner;
//@description The transaction is a transaction with Fragment @withdrawal_state State of the withdrawal; may be null for refunds from Fragment //@description The transaction is a transaction with Fragment @withdrawal_state State of the withdrawal; may be null for refunds from Fragment or for Telegram Stars bought on Fragment
starTransactionPartnerFragment withdrawal_state:RevenueWithdrawalState = StarTransactionPartner; starTransactionPartnerFragment withdrawal_state:RevenueWithdrawalState = StarTransactionPartner;
//@description The transaction is a transaction with Telegram Ad platform //@description The transaction is a transaction with Telegram Ad platform
starTransactionPartnerTelegramAds = StarTransactionPartner; starTransactionPartnerTelegramAds = StarTransactionPartner;
//@description The transaction is a transaction with Telegram for API usage @request_count The number of billed requests
starTransactionPartnerTelegramApi request_count:int32 = StarTransactionPartner;
//@description The transaction is a transaction with a bot @user_id Identifier of the bot @purpose Purpose of the transaction //@description The transaction is a transaction with a bot @user_id Identifier of the bot @purpose Purpose of the transaction
starTransactionPartnerBot user_id:int53 purpose:BotTransactionPurpose = StarTransactionPartner; starTransactionPartnerBot user_id:int53 purpose:BotTransactionPurpose = StarTransactionPartner;
//@description The transaction is a transaction with a business account @user_id Identifier of the business account user @media The bought media if the trancastion wasn't refunded //@description The transaction is a transaction with a business account @user_id Identifier of the business account user @media The bought media if the transaction wasn't refunded
starTransactionPartnerBusiness user_id:int53 media:vector<PaidMedia> = StarTransactionPartner; starTransactionPartnerBusiness user_id:int53 media:vector<PaidMedia> = StarTransactionPartner;
//@description The transaction is a transaction with a supergroup or a channel chat @chat_id Identifier of the chat @purpose Purpose of the transaction //@description The transaction is a transaction with a supergroup or a channel chat @chat_id Identifier of the chat @purpose Purpose of the transaction
starTransactionPartnerChat chat_id:int53 purpose:ChatTransactionPurpose = StarTransactionPartner; starTransactionPartnerChat chat_id:int53 purpose:ChatTransactionPurpose = StarTransactionPartner;
//@description The transaction is a transcation with another user @user_id Identifier of the user; 0 if the user was anonymous @purpose Purpose of the transaction //@description The transaction is a transaction with another user @user_id Identifier of the user; 0 if the user was anonymous @purpose Purpose of the transaction
starTransactionPartnerUser user_id:int53 purpose:UserTransactionPurpose = StarTransactionPartner; starTransactionPartnerUser user_id:int53 purpose:UserTransactionPurpose = StarTransactionPartner;
//@description The transaction is a transaction with unknown partner //@description The transaction is a transaction with unknown partner
@ -1169,12 +1176,13 @@ user id:int53 access_hash:int64 first_name:string last_name:string usernames:use
//@privacy_policy_url The HTTP link to the privacy policy of the bot. If empty, then /privacy command must be used if supported by the bot. If the command isn't supported, then https://telegram.org/privacy-tpa must be opened //@privacy_policy_url The HTTP link to the privacy policy of the bot. If empty, then /privacy command must be used if supported by the bot. If the command isn't supported, then https://telegram.org/privacy-tpa must be opened
//@default_group_administrator_rights Default administrator rights for adding the bot to basic group and supergroup chats; may be null //@default_group_administrator_rights Default administrator rights for adding the bot to basic group and supergroup chats; may be null
//@default_channel_administrator_rights Default administrator rights for adding the bot to channels; may be null //@default_channel_administrator_rights Default administrator rights for adding the bot to channels; may be null
//@can_get_revenue_statistics True, if the bot's revenue statistics are available
//@has_media_previews True, if the bot has media previews //@has_media_previews True, if the bot has media previews
//@edit_commands_link The internal link, which can be used to edit bot commands; may be null //@edit_commands_link The internal link, which can be used to edit bot commands; may be null
//@edit_description_link The internal link, which can be used to edit bot description; may be null //@edit_description_link The internal link, which can be used to edit bot description; may be null
//@edit_description_media_link The internal link, which can be used to edit the photo or animation shown in the chat with the bot if the chat is empty; may be null //@edit_description_media_link The internal link, which can be used to edit the photo or animation shown in the chat with the bot if the chat is empty; may be null
//@edit_settings_link The internal link, which can be used to edit bot settings; may be null //@edit_settings_link The internal link, which can be used to edit bot settings; may be null
botInfo short_description:string description:string photo:photo animation:animation menu_button:botMenuButton commands:vector<botCommand> privacy_policy_url:string default_group_administrator_rights:chatAdministratorRights default_channel_administrator_rights:chatAdministratorRights has_media_previews:Bool edit_commands_link:InternalLinkType edit_description_link:InternalLinkType edit_description_media_link:InternalLinkType edit_settings_link:InternalLinkType = BotInfo; botInfo short_description:string description:string photo:photo animation:animation menu_button:botMenuButton commands:vector<botCommand> privacy_policy_url:string default_group_administrator_rights:chatAdministratorRights default_channel_administrator_rights:chatAdministratorRights can_get_revenue_statistics:Bool has_media_previews:Bool edit_commands_link:InternalLinkType edit_description_link:InternalLinkType edit_description_media_link:InternalLinkType edit_settings_link:InternalLinkType = BotInfo;
//@description Contains full information about a user //@description Contains full information about a user
//@personal_photo User profile photo set by the current user for the contact; may be null. If null and user.profile_photo is null, then the photo is empty; otherwise, it is unknown. //@personal_photo User profile photo set by the current user for the contact; may be null. If null and user.profile_photo is null, then the photo is empty; otherwise, it is unknown.
@ -1196,12 +1204,11 @@ botInfo short_description:string description:string photo:photo animation:animat
//@bio A short user bio; may be null for bots //@bio A short user bio; may be null for bots
//@birthdate Birthdate of the user; may be null if unknown //@birthdate Birthdate of the user; may be null if unknown
//@personal_chat_id Identifier of the personal chat of the user; 0 if none //@personal_chat_id Identifier of the personal chat of the user; 0 if none
//@premium_gift_options The list of available options for gifting Telegram Premium to the user
//@gift_count Number of gifts saved to profile by the user //@gift_count Number of gifts saved to profile by 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 //@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
//@business_info Information about business settings for Telegram Business accounts; may be null if none //@business_info Information about business settings for Telegram Business accounts; may be null if none
//@bot_info For bots, information about the bot; may be null if the user isn't a bot //@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_posted_to_profile_stories:Bool has_sponsored_messages_enabled:Bool need_phone_number_privacy_exception:Bool set_chat_background:Bool bio:formattedText birthdate:birthdate personal_chat_id:int53 premium_gift_options:vector<premiumPaymentOption> gift_count:int32 group_in_common_count:int32 business_info:businessInfo 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_posted_to_profile_stories:Bool has_sponsored_messages_enabled:Bool need_phone_number_privacy_exception:Bool set_chat_background:Bool bio:formattedText birthdate:birthdate personal_chat_id:int53 gift_count:int32 group_in_common_count:int32 business_info:businessInfo 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 //@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; users total_count:int32 user_ids:vector<int53> = Users;
@ -1430,7 +1437,7 @@ basicGroupFullInfo photo:chatPhoto description:string creator_user_id:int53 memb
//@status Status of the current user in the supergroup or channel; custom title will always be empty //@status Status of the current user in the supergroup or channel; custom title will always be empty
//@member_count Number of members in the supergroup or channel; 0 if unknown. Currently, it is guaranteed to be known only if the supergroup or channel was received through //@member_count Number of members in the supergroup or channel; 0 if unknown. Currently, it is guaranteed to be known only if the supergroup or channel was received through
//-getChatSimilarChats, getChatsToSendStories, getCreatedPublicChats, getGroupsInCommon, getInactiveSupergroupChats, getRecommendedChats, getSuitableDiscussionChats, //-getChatSimilarChats, getChatsToSendStories, getCreatedPublicChats, getGroupsInCommon, getInactiveSupergroupChats, getRecommendedChats, getSuitableDiscussionChats,
//-getUserPrivacySettingRules, getVideoChatAvailableParticipants, searchChatsNearby, searchPublicChats, or in chatFolderInviteLinkInfo.missing_chat_ids, or in userFullInfo.personal_chat_id, //-getUserPrivacySettingRules, getVideoChatAvailableParticipants, searchPublicChats, or in chatFolderInviteLinkInfo.missing_chat_ids, or in userFullInfo.personal_chat_id,
//-or for chats with messages or stories from publicForwards and foundStories //-or for chats with messages or stories from publicForwards and foundStories
//@boost_level Approximate boost level for the chat //@boost_level Approximate boost level for the chat
//@has_linked_chat True, if the channel has a discussion group, or the supergroup is the designated discussion group for a channel //@has_linked_chat True, if the channel has a discussion group, or the supergroup is the designated discussion group for a channel
@ -1760,8 +1767,8 @@ factCheck text:formattedText country_code:string = FactCheck;
//@is_channel_post True, if the message is a channel post. All messages to channels are channel posts, all other messages are not channel posts //@is_channel_post True, if the message is a channel post. All messages to channels are channel posts, all other messages are not channel posts
//@is_topic_message True, if the message is a forum topic message //@is_topic_message True, if the message is a forum topic message
//@contains_unread_mention True, if the message contains an unread mention for the current user //@contains_unread_mention True, if the message contains an unread mention for the current user
//@date Point in time (Unix timestamp) when the message was sent //@date Point in time (Unix timestamp) when the message was sent; 0 for scheduled messages
//@edit_date Point in time (Unix timestamp) when the message was last edited //@edit_date Point in time (Unix timestamp) when the message was last edited; 0 for scheduled messages
//@forward_info Information about the initial message sender; may be null if none or unknown //@forward_info Information about the initial message sender; may be null if none or unknown
//@import_info Information about the initial message for messages created with importMessages; may be null if the message isn't imported //@import_info Information about the initial message for messages created with importMessages; may be null if the message isn't imported
//@interaction_info Information about interactions with the message; may be null if none //@interaction_info Information about interactions with the message; may be null if none
@ -2189,13 +2196,6 @@ failedToAddMembers failed_to_add_members:vector<failedToAddMember> = FailedToAdd
createdBasicGroupChat chat_id:int53 failed_to_add_members:failedToAddMembers = CreatedBasicGroupChat; createdBasicGroupChat chat_id:int53 failed_to_add_members:failedToAddMembers = CreatedBasicGroupChat;
//@description Describes a chat located nearby @chat_id Chat identifier @distance Distance to the chat location, in meters
chatNearby chat_id:int53 distance:int32 = ChatNearby;
//@description Represents a list of chats located nearby @users_nearby List of users nearby @supergroups_nearby List of location-based supergroups nearby
chatsNearby users_nearby:vector<chatNearby> supergroups_nearby:vector<chatNearby> = ChatsNearby;
//@class PublicChatType @description Describes type of public chat //@class PublicChatType @description Describes type of public chat
//@description The chat is public, because it has an active username //@description The chat is public, because it has an active username
@ -2207,21 +2207,17 @@ publicChatTypeIsLocationBased = PublicChatType;
//@class ChatActionBar @description Describes actions which must be possible to do through a chat action bar //@class ChatActionBar @description Describes actions which must be possible to do through a chat action bar
//@description The chat can be reported as spam using the method reportChat with the reason reportReasonSpam. If the chat is a private chat with a user with an emoji status, then a notice about emoji status usage must be shown //@description The chat can be reported as spam using the method reportChat with an empty option_id and message_ids. 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 //@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
chatActionBarReportSpam can_unarchive:Bool = ChatActionBar; chatActionBarReportSpam can_unarchive:Bool = ChatActionBar;
//@description The chat is a location-based supergroup, which can be reported as having unrelated location using the method reportChat with the reason reportReasonUnrelatedLocation
chatActionBarReportUnrelatedLocation = ChatActionBar;
//@description The chat is a recently created group chat to which new members can be invited //@description The chat is a recently created group chat to which new members can be invited
chatActionBarInviteMembers = ChatActionBar; 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, //@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 //-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 //@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 other user through searchChatsNearby and this is the distance between the users chatActionBarReportAddBlock can_unarchive:Bool = ChatActionBar;
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 //@description The chat is a private or secret chat and the other user can be added to the contact list using the method addContact
chatActionBarAddContact = ChatActionBar; chatActionBarAddContact = ChatActionBar;
@ -2844,7 +2840,7 @@ linkPreviewTypeStory story_sender_chat_id:int53 story_id:int32 = LinkPreviewType
//@description The link is a link to boost a supergroup chat @photo Photo of the chat; may be null //@description The link is a link to boost a supergroup chat @photo Photo of the chat; may be null
linkPreviewTypeSupergroupBoost photo:chatPhoto = LinkPreviewType; linkPreviewTypeSupergroupBoost photo:chatPhoto = LinkPreviewType;
//@description The link is a link to a cloud theme. TDLib has no theme support yet @documents The list of files with theme description @settings Settings for the cloud theme //@description The link is a link to a cloud theme. TDLib has no theme support yet @documents The list of files with theme description @settings Settings for the cloud theme; may be null if unknown
linkPreviewTypeTheme documents:vector<document> settings:themeSettings = LinkPreviewType; linkPreviewTypeTheme documents:vector<document> settings:themeSettings = LinkPreviewType;
//@description The link preview type is unsupported yet //@description The link preview type is unsupported yet
@ -2867,7 +2863,7 @@ linkPreviewTypeVideoNote video_note:videoNote = LinkPreviewType;
//@description The link is a link to a voice note message @voice_note The voice note //@description The link is a link to a voice note message @voice_note The voice note
linkPreviewTypeVoiceNote voice_note:voiceNote = LinkPreviewType; linkPreviewTypeVoiceNote voice_note:voiceNote = LinkPreviewType;
//@description The link is a link to a Web App @photo Web App photo //@description The link is a link to a Web App @photo Web App photo; may be null if none
linkPreviewTypeWebApp photo:photo = LinkPreviewType; linkPreviewTypeWebApp photo:photo = LinkPreviewType;
@ -2951,21 +2947,21 @@ locationAddress country_code:string state:string city:string street:string = Loc
//@description Contains parameters of the application theme //@description Contains parameters of the application theme
//@background_color A color of the background in the RGB24 format //@background_color A color of the background in the RGB format
//@secondary_background_color A secondary color for the background in the RGB24 format //@secondary_background_color A secondary color for the background in the RGB format
//@header_background_color A color of the header background in the RGB24 format //@header_background_color A color of the header background in the RGB format
//@bottom_bar_background_color A color of the bottom bar background in the RGB24 format //@bottom_bar_background_color A color of the bottom bar background in the RGB format
//@section_background_color A color of the section background in the RGB24 format //@section_background_color A color of the section background in the RGB format
//@section_separator_color A color of the section separator in the RGB24 format //@section_separator_color A color of the section separator in the RGB format
//@text_color A color of text in the RGB24 format //@text_color A color of text in the RGB format
//@accent_text_color An accent color of the text in the RGB24 format //@accent_text_color An accent color of the text in the RGB format
//@section_header_text_color A color of text on the section headers in the RGB24 format //@section_header_text_color A color of text on the section headers in the RGB format
//@subtitle_text_color A color of the subtitle text in the RGB24 format //@subtitle_text_color A color of the subtitle text in the RGB format
//@destructive_text_color A color of the text for destructive actions in the RGB24 format //@destructive_text_color A color of the text for destructive actions in the RGB format
//@hint_color A color of hints in the RGB24 format //@hint_color A color of hints in the RGB format
//@link_color A color of links in the RGB24 format //@link_color A color of links in the RGB format
//@button_color A color of the buttons in the RGB24 format //@button_color A color of the buttons in the RGB format
//@button_text_color A color of text on the buttons in the RGB24 format //@button_text_color A color of text on the buttons in the RGB format
themeParameters background_color:int32 secondary_background_color:int32 header_background_color:int32 bottom_bar_background_color:int32 section_background_color:int32 section_separator_color:int32 text_color:int32 accent_text_color:int32 section_header_text_color:int32 subtitle_text_color:int32 destructive_text_color:int32 hint_color:int32 link_color:int32 button_color:int32 button_text_color:int32 = ThemeParameters; themeParameters background_color:int32 secondary_background_color:int32 header_background_color:int32 bottom_bar_background_color:int32 section_background_color:int32 section_separator_color:int32 text_color:int32 accent_text_color:int32 section_header_text_color:int32 subtitle_text_color:int32 destructive_text_color:int32 hint_color:int32 link_color:int32 button_color:int32 button_text_color:int32 = ThemeParameters;
@ -3101,7 +3097,7 @@ paymentReceipt product_info:productInfo date:int32 seller_bot_user_id:int53 type
//@description An invoice from a message of the type messageInvoice or paid media purchase from messagePaidMedia //@description An invoice from a message of the type messageInvoice or paid media purchase from messagePaidMedia
//@chat_id Chat identifier of the message //@chat_id Chat identifier of the message
//@message_id Message identifier //@message_id Message identifier. Use messageProperties.can_be_paid to check whether the message can be used in the method
inputInvoiceMessage chat_id:int53 message_id:int53 = InputInvoice; inputInvoiceMessage chat_id:int53 message_id:int53 = InputInvoice;
//@description An invoice from a link of the type internalLinkTypeInvoice @name Name of the invoice //@description An invoice from a link of the type internalLinkTypeInvoice @name Name of the invoice
@ -3666,16 +3662,18 @@ messagePaymentRefunded owner_id:MessageSender currency:string total_amount:int53
//@description Telegram Premium was gifted to a user //@description Telegram Premium was gifted to a user
//@gifter_user_id The identifier of a user that gifted Telegram Premium; 0 if the gift was anonymous or is outgoing //@gifter_user_id The identifier of a user that gifted Telegram Premium; 0 if the gift was anonymous or is outgoing
//@receiver_user_id The identifier of a user that received Telegram Premium; 0 if the gift is incoming //@receiver_user_id The identifier of a user that received Telegram Premium; 0 if the gift is incoming
//@text Message added to the gifted Telegram Premium by the sender
//@currency Currency for the paid amount //@currency Currency for the paid amount
//@amount The paid amount, in the smallest units of the currency //@amount The paid amount, in the smallest units of the currency
//@cryptocurrency Cryptocurrency used to pay for the gift; may be empty if none //@cryptocurrency Cryptocurrency used to pay for the gift; may be empty if none
//@cryptocurrency_amount The paid amount, in the smallest units of the cryptocurrency; 0 if none //@cryptocurrency_amount The paid amount, in the smallest units of the cryptocurrency; 0 if none
//@month_count Number of months the Telegram Premium subscription will be active //@month_count Number of months the Telegram Premium subscription will be active
//@sticker A sticker to be shown in the message; may be null if unknown //@sticker A sticker to be shown in the message; may be null if unknown
messageGiftedPremium gifter_user_id:int53 receiver_user_id:int53 currency:string amount:int53 cryptocurrency:string cryptocurrency_amount:int64 month_count:int32 sticker:sticker = MessageContent; messageGiftedPremium gifter_user_id:int53 receiver_user_id:int53 text:formattedText currency:string amount:int53 cryptocurrency:string cryptocurrency_amount:int64 month_count:int32 sticker:sticker = MessageContent;
//@description A Telegram Premium gift code was created for the user //@description A Telegram Premium gift code was created for the user
//@creator_id Identifier of a chat or a user that created the gift code; may be null if unknown //@creator_id Identifier of a chat or a user that created the gift code; may be null if unknown
//@text Message added to the gift
//@is_from_giveaway True, if the gift code was created for a giveaway //@is_from_giveaway True, if the gift code was created for a giveaway
//@is_unclaimed True, if the winner for the corresponding Telegram Premium subscription wasn't chosen //@is_unclaimed True, if the winner for the corresponding Telegram Premium subscription wasn't chosen
//@currency Currency for the paid amount; empty if unknown //@currency Currency for the paid amount; empty if unknown
@ -3685,7 +3683,7 @@ messageGiftedPremium gifter_user_id:int53 receiver_user_id:int53 currency:string
//@month_count Number of months the Telegram Premium subscription will be active after code activation //@month_count Number of months the Telegram Premium subscription will be active after code activation
//@sticker A sticker to be shown in the message; may be null if unknown //@sticker A sticker to be shown in the message; may be null if unknown
//@code The gift code //@code The gift code
messagePremiumGiftCode creator_id:MessageSender is_from_giveaway:Bool is_unclaimed:Bool currency:string amount:int53 cryptocurrency:string cryptocurrency_amount:int64 month_count:int32 sticker:sticker code:string = MessageContent; messagePremiumGiftCode creator_id:MessageSender text:formattedText is_from_giveaway:Bool is_unclaimed:Bool currency:string amount:int53 cryptocurrency:string cryptocurrency_amount:int64 month_count:int32 sticker:sticker code:string = MessageContent;
//@description A giveaway was created for the chat. Use telegramPaymentPurposePremiumGiveaway, storePaymentPurposePremiumGiveaway, telegramPaymentPurposeStarGiveaway, or storePaymentPurposeStarGiveaway to create a giveaway //@description A giveaway was created for the chat. Use telegramPaymentPurposePremiumGiveaway, storePaymentPurposePremiumGiveaway, telegramPaymentPurposeStarGiveaway, or storePaymentPurposeStarGiveaway to create a giveaway
//@star_count Number of Telegram Stars that will be shared by winners of the giveaway; 0 for Telegram Premium giveaways //@star_count Number of Telegram Stars that will be shared by winners of the giveaway; 0 for Telegram Premium giveaways
@ -3785,10 +3783,10 @@ messageUnsupported = MessageContent;
//@description A mention of a user, a supergroup, or a channel by their username //@description A mention of a user, a supergroup, or a channel by their username
textEntityTypeMention = TextEntityType; textEntityTypeMention = TextEntityType;
//@description A hashtag text, beginning with "#" //@description A hashtag text, beginning with "#" and optionally containing a chat username at the end
textEntityTypeHashtag = TextEntityType; textEntityTypeHashtag = TextEntityType;
//@description A cashtag text, beginning with "$" and consisting of capital English letters (e.g., "$USD") //@description A cashtag text, beginning with "$", consisting of capital English letters (e.g., "$USD"), and optionally containing a chat username at the end
textEntityTypeCashtag = TextEntityType; textEntityTypeCashtag = TextEntityType;
//@description A bot command, beginning with "/" //@description A bot command, beginning with "/"
@ -3885,6 +3883,10 @@ messageSchedulingStateSendAtDate send_date:int32 = MessageSchedulingState;
//@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 //@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; messageSchedulingStateSendWhenOnline = MessageSchedulingState;
//@description The message will be sent when the video in the message is converted and optimized; can be used only by the server
//@send_date Approximate point in time (Unix timestamp) when the message is expected to be sent
messageSchedulingStateSendWhenVideoProcessed send_date:int32 = MessageSchedulingState;
//@class MessageSelfDestructType @description Describes when a message will be self-destructed //@class MessageSelfDestructType @description Describes when a message will be self-destructed
@ -3899,15 +3901,17 @@ messageSelfDestructTypeImmediately = MessageSelfDestructType;
//@disable_notification Pass true to disable notification for the message //@disable_notification Pass true to disable notification for the message
//@from_background Pass true if the message is sent from the background //@from_background Pass true if the message is sent from the background
//@protect_content Pass true if the content of the message must be protected from forwarding and saving; for bots only //@protect_content Pass true if the content of the message must be protected from forwarding and saving; for bots only
//@allow_paid_broadcast Pass true to allow the message to ignore regular broadcast limits for a small fee; for bots only
//@update_order_of_installed_sticker_sets Pass true if the user explicitly chosen a sticker or a custom emoji from an installed sticker set; applicable only to sendMessage and sendMessageAlbum //@update_order_of_installed_sticker_sets Pass true if the user explicitly chosen a sticker or a custom emoji from an installed sticker set; applicable only to sendMessage and sendMessageAlbum
//@scheduling_state Message scheduling state; pass null to send message immediately. Messages sent to a secret chat, live location messages and self-destructing messages can't be scheduled //@scheduling_state Message scheduling state; pass null to send message immediately. Messages sent to a secret chat, live location messages and self-destructing messages can't be scheduled
//@effect_id Identifier of the effect to apply to the message; pass 0 if none; applicable only to sendMessage and sendMessageAlbum in private chats //@effect_id Identifier of the effect to apply to the message; pass 0 if none; applicable only to sendMessage and sendMessageAlbum in private chats
//@sending_id Non-persistent identifier, which will be returned back in messageSendingStatePending object and can be used to match sent messages and corresponding updateNewMessage updates //@sending_id Non-persistent identifier, which will be returned back in messageSendingStatePending object and can be used to match sent messages and corresponding updateNewMessage updates
//@only_preview Pass true to get a fake message instead of actually sending them //@only_preview Pass true to get a fake message instead of actually sending them
messageSendOptions disable_notification:Bool from_background:Bool protect_content:Bool update_order_of_installed_sticker_sets:Bool scheduling_state:MessageSchedulingState effect_id:int64 sending_id:int32 only_preview:Bool = MessageSendOptions; messageSendOptions disable_notification:Bool from_background:Bool protect_content:Bool allow_paid_broadcast:Bool update_order_of_installed_sticker_sets:Bool scheduling_state:MessageSchedulingState effect_id:int64 sending_id:int32 only_preview:Bool = MessageSendOptions;
//@description Options to be used when a message content is copied without reference to the original sender. Service messages, messages with messageInvoice, messagePaidMedia, messageGiveaway, or messageGiveawayWinners content can't be copied //@description Options to be used when a message content is copied without reference to the original sender. Service messages, messages with messageInvoice, messagePaidMedia, messageGiveaway, or messageGiveawayWinners content can't be copied
//@send_copy True, if content of the message needs to be copied without reference to the original sender. Always true if the message is forwarded to a secret chat or is local //@send_copy True, if content of the message needs to be copied without reference to the original sender. Always true if the message is forwarded to a secret chat or is local.
//-Use messageProperties.can_be_saved and messageProperties.can_be_copied_to_secret_chat to check whether the message is suitable
//@replace_caption True, if media caption of the message copy needs to be replaced. Ignored if send_copy is false //@replace_caption True, if media caption of the message copy needs to be replaced. Ignored if send_copy is false
//@new_caption New message caption; pass null to copy message without caption. Ignored if replace_caption is false //@new_caption New message caption; pass null to copy message without caption. Ignored if replace_caption is false
//@new_show_caption_above_media True, if new caption must be shown above the media; otherwise, new caption must be shown below the media; not supported in secret chats. Ignored if replace_caption is false //@new_show_caption_above_media True, if new caption must be shown above the media; otherwise, new caption must be shown below the media; not supported in secret chats. Ignored if replace_caption is false
@ -3994,7 +3998,7 @@ inputMessageSticker sticker:InputFile thumbnail:inputThumbnail width:int32 heigh
inputMessageVideo video:InputFile thumbnail:inputThumbnail added_sticker_file_ids:vector<int32> duration:int32 width:int32 height:int32 supports_streaming:Bool caption:formattedText show_caption_above_media:Bool self_destruct_type:MessageSelfDestructType has_spoiler:Bool = InputMessageContent; inputMessageVideo video:InputFile thumbnail:inputThumbnail added_sticker_file_ids:vector<int32> duration:int32 width:int32 height:int32 supports_streaming:Bool caption:formattedText show_caption_above_media:Bool self_destruct_type:MessageSelfDestructType has_spoiler:Bool = InputMessageContent;
//@description A video note message //@description A video note message
//@video_note Video note to be sent //@video_note Video note to be sent. The video is expected to be encoded to MPEG4 format with H.264 codec and have no data outside of the visible circle
//@thumbnail Video thumbnail; may be null if empty; pass null to skip thumbnail uploading //@thumbnail Video thumbnail; may be null if empty; pass null to skip thumbnail uploading
//@duration Duration of the video, in seconds; 0-60 //@duration Duration of the video, in seconds; 0-60
//@length Video width and height; must be positive and not greater than 640 //@length Video width and height; must be positive and not greater than 640
@ -4071,7 +4075,7 @@ inputMessageForwarded from_chat_id:int53 message_id:int53 in_game_share:Bool cop
//@can_be_copied_to_secret_chat True, if content of the message can be copied to a secret chat using inputMessageForwarded or forwardMessages with copy options //@can_be_copied_to_secret_chat True, if content of the message can be copied to a secret chat using inputMessageForwarded or forwardMessages with copy options
//@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 using the method deleteMessages with revoke == false //@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 using the method deleteMessages with revoke == false
//@can_be_deleted_for_all_users True, if the message can be deleted for all users using the method deleteMessages with revoke == true //@can_be_deleted_for_all_users True, if the message can be deleted for all users using the method deleteMessages with revoke == true
//@can_be_edited True, if the message can be edited using the methods editMessageText, editMessageMedia, editMessageCaption, or editMessageReplyMarkup. //@can_be_edited True, if the message can be edited using the methods editMessageText, editMessageCaption, or editMessageReplyMarkup.
//-For live location and poll messages this fields shows whether editMessageLiveLocation or stopPoll can be used with this message //-For live location and poll messages this fields shows whether editMessageLiveLocation or stopPoll can be used with this message
//@can_be_forwarded True, if the message can be forwarded using inputMessageForwarded or forwardMessages //@can_be_forwarded True, if the message can be forwarded using inputMessageForwarded or forwardMessages
//@can_be_paid True, if the message can be paid using inputInvoiceMessage //@can_be_paid True, if the message can be paid using inputInvoiceMessage
@ -4080,6 +4084,7 @@ inputMessageForwarded from_chat_id:int53 message_id:int53 in_game_share:Bool cop
//@can_be_replied_in_another_chat True, if the message can be replied in another chat or forum topic using inputMessageReplyToExternalMessage //@can_be_replied_in_another_chat True, if the message can be replied in another chat or forum topic using inputMessageReplyToExternalMessage
//@can_be_saved True, if content of the message can be saved locally or copied using inputMessageForwarded or forwardMessages with copy options //@can_be_saved True, if content of the message can be saved locally or copied using inputMessageForwarded or forwardMessages with copy options
//@can_be_shared_in_story True, if the message can be shared in a story using inputStoryAreaTypeMessage //@can_be_shared_in_story True, if the message can be shared in a story using inputStoryAreaTypeMessage
//@can_edit_media True, if the message can be edited using the method editMessageMedia
//@can_edit_scheduling_state True, if scheduling state of the message can be edited //@can_edit_scheduling_state True, if scheduling state of the message can be edited
//@can_get_embedding_code True, if code for message embedding can be received using getMessageEmbeddingCode //@can_get_embedding_code True, if code for message embedding can be received using getMessageEmbeddingCode
//@can_get_link True, if a link can be generated for the message using getMessageLink //@can_get_link True, if a link can be generated for the message using getMessageLink
@ -4094,7 +4099,7 @@ inputMessageForwarded from_chat_id:int53 message_id:int53 in_game_share:Bool cop
//@can_report_supergroup_spam True, if the message can be reported using reportSupergroupSpam //@can_report_supergroup_spam True, if the message can be reported using reportSupergroupSpam
//@can_set_fact_check True, if fact check for the message can be changed through setMessageFactCheck //@can_set_fact_check True, if fact check for the message can be changed through setMessageFactCheck
//@need_show_statistics True, if message statistics must be available from context menu of the message //@need_show_statistics True, if message statistics must be available from context menu of the message
messageProperties can_be_copied_to_secret_chat:Bool can_be_deleted_only_for_self:Bool can_be_deleted_for_all_users:Bool can_be_edited:Bool can_be_forwarded:Bool can_be_paid:Bool can_be_pinned:Bool can_be_replied:Bool can_be_replied_in_another_chat:Bool can_be_saved:Bool can_be_shared_in_story:Bool can_edit_scheduling_state:Bool can_get_embedding_code:Bool can_get_link:Bool can_get_media_timestamp_links:Bool can_get_message_thread:Bool can_get_read_date:Bool can_get_statistics:Bool can_get_viewers:Bool can_recognize_speech:Bool can_report_chat:Bool can_report_reactions:Bool can_report_supergroup_spam:Bool can_set_fact_check:Bool need_show_statistics:Bool = MessageProperties; messageProperties can_be_copied_to_secret_chat:Bool can_be_deleted_only_for_self:Bool can_be_deleted_for_all_users:Bool can_be_edited:Bool can_be_forwarded:Bool can_be_paid:Bool can_be_pinned:Bool can_be_replied:Bool can_be_replied_in_another_chat:Bool can_be_saved:Bool can_be_shared_in_story:Bool can_edit_media:Bool can_edit_scheduling_state:Bool can_get_embedding_code:Bool can_get_link:Bool can_get_media_timestamp_links:Bool can_get_message_thread:Bool can_get_read_date:Bool can_get_statistics:Bool can_get_viewers:Bool can_recognize_speech:Bool can_report_chat:Bool can_report_reactions:Bool can_report_supergroup_spam:Bool can_set_fact_check:Bool need_show_statistics:Bool = MessageProperties;
//@class SearchMessagesFilter @description Represents a filter for message search results //@class SearchMessagesFilter @description Represents a filter for message search results
@ -5045,7 +5050,7 @@ speechRecognitionResultError error:error = SpeechRecognitionResult;
businessConnection id:string user_id:int53 user_chat_id:int53 date:int32 can_reply:Bool is_enabled:Bool = BusinessConnection; businessConnection id:string user_id:int53 user_chat_id:int53 date:int32 can_reply:Bool is_enabled:Bool = BusinessConnection;
//@description Describes a color to highlight a bot added to attachment menu @light_color Color in the RGB24 format for light themes @dark_color Color in the RGB24 format for dark themes //@description Describes a color to highlight a bot added to attachment menu @light_color Color in the RGB format for light themes @dark_color Color in the RGB format for dark themes
attachmentMenuBotColor light_color:int32 dark_color:int32 = AttachmentMenuBotColor; attachmentMenuBotColor light_color:int32 dark_color:int32 = AttachmentMenuBotColor;
//@description Represents a bot, which can be added to attachment or side menu //@description Represents a bot, which can be added to attachment or side menu
@ -5848,18 +5853,13 @@ premiumState state:formattedText payment_options:vector<premiumStatePaymentOptio
//@description The user subscribing to Telegram Premium @is_restore Pass true if this is a restore of a Telegram Premium purchase; only for App Store @is_upgrade Pass true if this is an upgrade from a monthly subscription to early subscription; only for App Store //@description The user subscribing to Telegram Premium @is_restore Pass true if this is a restore of a Telegram Premium purchase; only for App Store @is_upgrade Pass true if this is an upgrade from a monthly subscription to early subscription; only for App Store
storePaymentPurposePremiumSubscription is_restore:Bool is_upgrade:Bool = StorePaymentPurpose; storePaymentPurposePremiumSubscription is_restore:Bool is_upgrade:Bool = StorePaymentPurpose;
//@description The user gifting Telegram Premium to another user
//@user_id Identifier of the user to which Telegram Premium is gifted
//@currency ISO 4217 currency code of the payment currency
//@amount Paid amount, in the smallest units of the currency
storePaymentPurposeGiftedPremium user_id:int53 currency:string amount:int53 = StorePaymentPurpose;
//@description The user creating Telegram Premium gift codes for other users //@description The user creating Telegram Premium gift codes for other users
//@boosted_chat_id Identifier of the supergroup or channel chat, which will be automatically boosted by the users for duration of the Premium subscription and which is administered by the user; 0 if none //@boosted_chat_id Identifier of the supergroup or channel chat, which will be automatically boosted by the users for duration of the Premium subscription and which is administered by the user; 0 if none
//@currency ISO 4217 currency code of the payment currency //@currency ISO 4217 currency code of the payment currency
//@amount Paid amount, in the smallest units of the currency //@amount Paid amount, in the smallest units of the currency
//@user_ids Identifiers of the users which can activate the gift codes //@user_ids Identifiers of the users which can activate the gift codes
storePaymentPurposePremiumGiftCodes boosted_chat_id:int53 currency:string amount:int53 user_ids:vector<int53> = StorePaymentPurpose; //@text Text to show along with the gift codes; 0-getOption("gift_text_length_max") characters. Only Bold, Italic, Underline, Strikethrough, Spoiler, and CustomEmoji entities are allowed
storePaymentPurposePremiumGiftCodes boosted_chat_id:int53 currency:string amount:int53 user_ids:vector<int53> text:formattedText = StorePaymentPurpose;
//@description The user creating a Telegram Premium giveaway //@description The user creating a Telegram Premium giveaway
//@parameters Giveaway parameters //@parameters Giveaway parameters
@ -5897,7 +5897,8 @@ storePaymentPurposeGiftedStars user_id:int53 currency:string amount:int53 star_c
//@amount Paid amount, in the smallest units of the currency //@amount Paid amount, in the smallest units of the currency
//@user_ids Identifiers of the users which can activate the gift codes //@user_ids Identifiers of the users which can activate the gift codes
//@month_count Number of months the Telegram Premium subscription will be active for the users //@month_count Number of months the Telegram Premium subscription will be active for the users
telegramPaymentPurposePremiumGiftCodes boosted_chat_id:int53 currency:string amount:int53 user_ids:vector<int53> month_count:int32 = TelegramPaymentPurpose; //@text Text to show along with the gift codes; 0-getOption("gift_text_length_max") characters. Only Bold, Italic, Underline, Strikethrough, Spoiler, and CustomEmoji entities are allowed
telegramPaymentPurposePremiumGiftCodes boosted_chat_id:int53 currency:string amount:int53 user_ids:vector<int53> month_count:int32 text:formattedText = TelegramPaymentPurpose;
//@description The user creating a Telegram Premium giveaway //@description The user creating a Telegram Premium giveaway
//@parameters Giveaway parameters //@parameters Giveaway parameters
@ -5980,16 +5981,16 @@ pushReceiverId id:int64 = PushReceiverId;
//@class BackgroundFill @description Describes a fill of a background //@class BackgroundFill @description Describes a fill of a background
//@description Describes a solid fill of a background @color A color of the background in the RGB24 format //@description Describes a solid fill of a background @color A color of the background in the RGB format
backgroundFillSolid color:int32 = BackgroundFill; backgroundFillSolid color:int32 = BackgroundFill;
//@description Describes a gradient fill of a background //@description Describes a gradient fill of a background
//@top_color A top color of the background in the RGB24 format //@top_color A top color of the background in the RGB format
//@bottom_color A bottom color of the background in the RGB24 format //@bottom_color A bottom color of the background in the RGB format
//@rotation_angle Clockwise rotation angle of the gradient, in degrees; 0-359. Must always be divisible by 45 //@rotation_angle Clockwise rotation angle of the gradient, in degrees; 0-359. Must always be divisible by 45
backgroundFillGradient top_color:int32 bottom_color:int32 rotation_angle:int32 = BackgroundFill; backgroundFillGradient top_color:int32 bottom_color:int32 rotation_angle:int32 = BackgroundFill;
//@description Describes a freeform gradient fill of a background @colors A list of 3 or 4 colors of the freeform gradient in the RGB24 format //@description Describes a freeform gradient fill of a background @colors A list of 3 or 4 colors of the freeform gradient in the RGB format
backgroundFillFreeformGradient colors:vector<int32> = BackgroundFill; backgroundFillFreeformGradient colors:vector<int32> = BackgroundFill;
@ -6824,7 +6825,8 @@ internalLinkTypePhoneNumberConfirmation hash:string phone_number:string = Intern
//@referrer Referrer specified in the link //@referrer Referrer specified in the link
internalLinkTypePremiumFeatures referrer:string = InternalLinkType; internalLinkTypePremiumFeatures referrer:string = InternalLinkType;
//@description The link is a link to the screen for gifting Telegram Premium subscriptions to friends via inputInvoiceTelegram payments or in-store purchases @referrer Referrer specified in the link //@description The link is a link to the screen for gifting Telegram Premium subscriptions to friends via inputInvoiceTelegram with telegramPaymentPurposePremiumGiftCodes payments or in-store purchases
//@referrer Referrer specified in the link
internalLinkTypePremiumGift referrer:string = InternalLinkType; internalLinkTypePremiumGift referrer:string = InternalLinkType;
//@description The link is a link with a Telegram Premium gift code. Call checkPremiumGiftCode with the given code to process the link. //@description The link is a link with a Telegram Premium gift code. Call checkPremiumGiftCode with the given code to process the link.
@ -7557,7 +7559,10 @@ updateNewMessage message:message = Update;
//@message_id A temporary message identifier //@message_id A temporary message identifier
updateMessageSendAcknowledged chat_id:int53 message_id:int53 = Update; updateMessageSendAcknowledged chat_id:int53 message_id:int53 = Update;
//@description A message has been successfully sent @message The sent message. Usually only the message identifier, date, and content are changed, but almost all other fields can also change @old_message_id The previous temporary message identifier //@description A message has been successfully sent
//@message The sent message. Almost any field of the new message can be different from the corresponding field of the original message.
//-For example, the field scheduling_state may change, making the message scheduled, or non-scheduled
//@old_message_id The previous temporary message identifier
updateMessageSendSucceeded message:message old_message_id:int53 = Update; updateMessageSendSucceeded message:message old_message_id:int53 = Update;
//@description A message failed to send. Be aware that some messages being sent can be irrecoverably deleted, in which case updateDeleteMessages will be received instead of this update //@description A message failed to send. Be aware that some messages being sent can be irrecoverably deleted, in which case updateDeleteMessages will be received instead of this update
@ -7606,6 +7611,11 @@ updateMessageFactCheck chat_id:int53 message_id:int53 fact_check:factCheck = Upd
//@message_id Identifier of the message with live location //@message_id Identifier of the message with live location
updateMessageLiveLocationViewed chat_id:int53 message_id:int53 = Update; updateMessageLiveLocationViewed chat_id:int53 message_id:int53 = Update;
//@description An automatically scheduled message with video has been successfully sent after conversion
//@chat_id Identifier of the chat with the message
//@message_id Identifier of the sent message
updateVideoPublished chat_id:int53 message_id:int53 = Update;
//@description A new chat has been loaded/created. This update is guaranteed to come before the chat identifier is returned to the application. The chat field changes will be reported through separate updates @chat The chat //@description A new chat has been loaded/created. This update is guaranteed to come before the chat identifier is returned to the application. The chat field changes will be reported through separate updates @chat The chat
updateNewChat chat:chat = Update; updateNewChat chat:chat = Update;
@ -7981,9 +7991,6 @@ updateConnectionState state:ConnectionState = Update;
//@description New terms of service must be accepted by the user. If the terms of service are declined, then the deleteAccount method must be called with the reason "Decline ToS update" @terms_of_service_id Identifier of the terms of service @terms_of_service The new terms of service //@description New terms of service must be accepted by the user. If the terms of service are declined, then the deleteAccount method must be called with the reason "Decline ToS update" @terms_of_service_id Identifier of the terms of service @terms_of_service The new terms of service
updateTermsOfService terms_of_service_id:string terms_of_service:termsOfService = Update; updateTermsOfService terms_of_service_id:string terms_of_service:termsOfService = Update;
//@description The list of users nearby has changed. The update is guaranteed to be sent only 60 seconds after a successful searchChatsNearby request @users_nearby The new list of users nearby
updateUsersNearby users_nearby:vector<chatNearby> = Update;
//@description The first unconfirmed session has changed @session The unconfirmed session; may be null if none //@description The first unconfirmed session has changed @session The unconfirmed session; may be null if none
updateUnconfirmedSession session:unconfirmedSession = Update; updateUnconfirmedSession session:unconfirmedSession = Update;
@ -8515,9 +8522,6 @@ searchChats query:string limit:int32 = Chats;
//@description Searches for the specified query in the title and username of already known chats via request to the server. Returns chats in the order seen in the main chat list @query Query to search for @limit The maximum number of chats to be returned //@description Searches for the specified query in the title and username of already known chats via request to the server. Returns chats in the order seen in the main chat list @query Query to search for @limit The maximum number of chats to be returned
searchChatsOnServer query:string limit:int32 = Chats; searchChatsOnServer query:string limit:int32 = Chats;
//@description Returns a list of users and location-based supergroups nearby. The method was disabled and returns an empty list of chats now @location Current user location
searchChatsNearby location:location = ChatsNearby;
//@description Returns a list of channel chats recommended to the current user //@description Returns a list of channel chats recommended to the current user
getRecommendedChats = Chats; getRecommendedChats = Chats;
@ -8715,10 +8719,11 @@ searchOutgoingDocumentMessages query:string limit:int32 = FoundMessages;
searchPublicMessagesByTag tag:string offset:string limit:int32 = FoundMessages; searchPublicMessagesByTag tag:string offset:string limit:int32 = FoundMessages;
//@description Searches for public stories containing the given hashtag or cashtag. For optimal performance, the number of returned stories is chosen by TDLib and can be smaller than the specified limit //@description Searches for public stories containing the given hashtag or cashtag. For optimal performance, the number of returned stories is chosen by TDLib and can be smaller than the specified limit
//@story_sender_chat_id Identifier of the chat that posted the stories to search for; pass 0 to search stories in all chats
//@tag Hashtag or cashtag to search for //@tag Hashtag or cashtag to search for
//@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 stories to be returned; up to 100. For optimal performance, the number of returned stories is chosen by TDLib and can be smaller than the specified limit //@limit The maximum number of stories to be returned; up to 100. For optimal performance, the number of returned stories is chosen by TDLib and can be smaller than the specified limit
searchPublicStoriesByTag tag:string offset:string limit:int32 = FoundStories; searchPublicStoriesByTag story_sender_chat_id:int53 tag:string offset:string limit:int32 = FoundStories;
//@description Searches for public stories by the given address location. For optimal performance, the number of returned stories is chosen by TDLib and can be smaller than the specified limit //@description Searches for public stories by the given address location. For optimal performance, the number of returned stories is chosen by TDLib and can be smaller than the specified limit
//@address Address of the location //@address Address of the location
@ -8787,7 +8792,7 @@ getChatMessagePosition chat_id:int53 message_id:int53 filter:SearchMessagesFilte
//@description Returns all scheduled messages in a chat. The messages are returned in reverse chronological order (i.e., in order of decreasing message_id) @chat_id Chat identifier //@description Returns all scheduled messages in a chat. The messages are returned in reverse chronological order (i.e., in order of decreasing message_id) @chat_id Chat identifier
getChatScheduledMessages chat_id:int53 = Messages; getChatScheduledMessages chat_id:int53 = Messages;
//@description Returns sponsored messages to be shown in a chat; for channel chats only @chat_id Identifier of the chat //@description Returns sponsored messages to be shown in a chat; for channel chats and chats with bots only @chat_id Identifier of the chat
getChatSponsoredMessages chat_id:int53 = SponsoredMessages; getChatSponsoredMessages chat_id:int53 = SponsoredMessages;
//@description Informs TDLib that the user opened the sponsored chat via the button, the name, the chat photo, a mention in the sponsored message text, or the media in the sponsored message //@description Informs TDLib that the user opened the sponsored chat via the button, the name, the chat photo, a mention in the sponsored message text, or the media in the sponsored message
@ -8904,7 +8909,8 @@ sendInlineQueryResultMessage chat_id:int53 message_thread_id:int53 reply_to:Inpu
//@from_chat_id Identifier of the chat from which to forward messages //@from_chat_id Identifier of the chat from which to forward messages
//@message_ids Identifiers of the messages to forward. Message identifiers must be in a strictly increasing order. At most 100 messages can be forwarded simultaneously. A message can be forwarded only if messageProperties.can_be_forwarded //@message_ids Identifiers of the messages to forward. Message identifiers must be in a strictly increasing order. At most 100 messages can be forwarded simultaneously. A message can be forwarded only if messageProperties.can_be_forwarded
//@options Options to be used to send the messages; pass null to use default options //@options Options to be used to send the messages; pass null to use default options
//@send_copy Pass true to copy content of the messages without reference to the original sender. Always true if the messages are forwarded to a secret chat or are local //@send_copy Pass true to copy content of the messages without reference to the original sender. Always true if the messages are forwarded to a secret chat or are local.
//-Use messageProperties.can_be_saved and messageProperties.can_be_copied_to_secret_chat to check whether the message is suitable
//@remove_caption Pass true to remove media captions of message copies. Ignored if send_copy is false //@remove_caption Pass true to remove media captions of message copies. Ignored if send_copy is false
forwardMessages chat_id:int53 message_thread_id:int53 from_chat_id:int53 message_ids:vector<int53> options:messageSendOptions send_copy:Bool remove_caption:Bool = Messages; forwardMessages chat_id:int53 message_thread_id:int53 from_chat_id:int53 message_ids:vector<int53> options:messageSendOptions send_copy:Bool remove_caption:Bool = Messages;
@ -8968,11 +8974,10 @@ editMessageText chat_id:int53 message_id:int53 reply_markup:ReplyMarkup input_me
//@proximity_alert_radius The new maximum distance for proximity alerts, in meters (0-100000). Pass 0 if the notification is disabled //@proximity_alert_radius The new maximum distance for proximity alerts, in meters (0-100000). Pass 0 if the notification is disabled
editMessageLiveLocation chat_id:int53 message_id:int53 reply_markup:ReplyMarkup location:location live_period:int32 heading:int32 proximity_alert_radius:int32 = Message; editMessageLiveLocation chat_id:int53 message_id:int53 reply_markup:ReplyMarkup location:location live_period:int32 heading:int32 proximity_alert_radius:int32 = Message;
//@description Edits the content of a message with an animation, an audio, a document, a photo or a video, including message caption. If only the caption needs to be edited, use editMessageCaption instead. //@description Edits the media content of a message, including message caption. If only the caption needs to be edited, use editMessageCaption instead.
//-The media can't be edited if the message was set to self-destruct or to a self-destructing media. The type of message content in an album can't be changed with exception of replacing a photo with a video or vice versa. //-The type of message content in an album can't be changed with exception of replacing a photo with a video or vice versa. Returns the edited message after the edit is completed on the server side
//-Returns the edited message after the edit is completed on the server side
//@chat_id The chat the message belongs to //@chat_id The chat the message belongs to
//@message_id Identifier of the message. Use messageProperties.can_be_edited to check whether the message can be edited //@message_id Identifier of the message. Use messageProperties.can_edit_media to check whether the message can be edited
//@reply_markup The new message reply markup; pass null if none; for bots only //@reply_markup The new message reply markup; pass null if none; for bots only
//@input_message_content New content of the message. Must be one of the following types: inputMessageAnimation, inputMessageAudio, inputMessageDocument, inputMessagePhoto or inputMessageVideo //@input_message_content New content of the message. Must be one of the following types: inputMessageAnimation, inputMessageAudio, inputMessageDocument, inputMessagePhoto or inputMessageVideo
editMessageMedia chat_id:int53 message_id:int53 reply_markup:ReplyMarkup input_message_content:InputMessageContent = Message; editMessageMedia chat_id:int53 message_id:int53 reply_markup:ReplyMarkup input_message_content:InputMessageContent = Message;
@ -9007,7 +9012,7 @@ editInlineMessageText inline_message_id:string reply_markup:ReplyMarkup input_me
//@proximity_alert_radius The new maximum distance for proximity alerts, in meters (0-100000). Pass 0 if the notification is disabled //@proximity_alert_radius The new maximum distance for proximity alerts, in meters (0-100000). Pass 0 if the notification is disabled
editInlineMessageLiveLocation inline_message_id:string reply_markup:ReplyMarkup location:location live_period:int32 heading:int32 proximity_alert_radius:int32 = Ok; editInlineMessageLiveLocation inline_message_id:string reply_markup:ReplyMarkup location:location live_period:int32 heading:int32 proximity_alert_radius:int32 = Ok;
//@description Edits the content of a message with an animation, an audio, a document, a photo or a video in an inline message sent via a bot; for bots only //@description Edits the media content of a message with a text, an animation, an audio, a document, a photo or a video in an inline message sent via a bot; for bots only
//@inline_message_id Inline message identifier //@inline_message_id Inline message identifier
//@reply_markup The new message reply markup; pass null if none; for bots only //@reply_markup The new message reply markup; pass null if none; for bots only
//@input_message_content New content of the message. Must be one of the following types: inputMessageAnimation, inputMessageAudio, inputMessageDocument, inputMessagePhoto or inputMessageVideo //@input_message_content New content of the message. Must be one of the following types: inputMessageAnimation, inputMessageAudio, inputMessageDocument, inputMessagePhoto or inputMessageVideo
@ -9028,9 +9033,10 @@ editInlineMessageReplyMarkup inline_message_id:string reply_markup:ReplyMarkup =
//@description Edits the time when a scheduled message will be sent. Scheduling state of all messages in the same album or forwarded together with the message will be also changed //@description Edits the time when a scheduled message will be sent. Scheduling state of all messages in the same album or forwarded together with the message will be also changed
//@chat_id The chat the message belongs to //@chat_id The chat the message belongs to
//@message_id Identifier of the message. Use messageProperties.can_edit_scheduling_state to check whether the message is suitable //@message_id Identifier of the message. Use messageProperties.can_edit_scheduling_state to check whether the message is suitable
//@scheduling_state The new message scheduling state; pass null to send the message immediately //@scheduling_state The new message scheduling state; pass null to send the message immediately. Must be null for messages in the state messageSchedulingStateSendWhenVideoProcessed
editMessageSchedulingState chat_id:int53 message_id:int53 scheduling_state:MessageSchedulingState = Ok; editMessageSchedulingState chat_id:int53 message_id:int53 scheduling_state:MessageSchedulingState = Ok;
//@description Changes the fact-check of a message. Can be only used if messageProperties.can_set_fact_check == true //@description Changes the fact-check of a message. Can be only used if messageProperties.can_set_fact_check == true
//@chat_id The channel chat the message belongs to //@chat_id The channel chat the message belongs to
//@message_id Identifier of the message //@message_id Identifier of the message
@ -9080,7 +9086,7 @@ editBusinessMessageText business_connection_id:string chat_id:int53 message_id:i
//@proximity_alert_radius The new maximum distance for proximity alerts, in meters (0-100000). Pass 0 if the notification is disabled //@proximity_alert_radius The new maximum distance for proximity alerts, in meters (0-100000). Pass 0 if the notification is disabled
editBusinessMessageLiveLocation business_connection_id:string chat_id:int53 message_id:int53 reply_markup:ReplyMarkup location:location live_period:int32 heading:int32 proximity_alert_radius:int32 = BusinessMessage; editBusinessMessageLiveLocation business_connection_id:string chat_id:int53 message_id:int53 reply_markup:ReplyMarkup location:location live_period:int32 heading:int32 proximity_alert_radius:int32 = BusinessMessage;
//@description Edits the content of a message with an animation, an audio, a document, a photo or a video in a message sent on behalf of a business account; for bots only //@description Edits the media content of a message with a text, an animation, an audio, a document, a photo or a video in a message sent on behalf of a business account; for bots only
//@business_connection_id Unique identifier of business connection on behalf of which the message was sent //@business_connection_id Unique identifier of business connection on behalf of which the message was sent
//@chat_id The chat the message belongs to //@chat_id The chat the message belongs to
//@message_id Identifier of the message //@message_id Identifier of the message
@ -9173,7 +9179,7 @@ addQuickReplyShortcutMessageAlbum shortcut_name:string reply_to_message_id:int53
readdQuickReplyShortcutMessages shortcut_name:string message_ids:vector<int53> = QuickReplyMessages; readdQuickReplyShortcutMessages shortcut_name:string message_ids:vector<int53> = QuickReplyMessages;
//@description Asynchronously edits the text, media or caption of a quick reply message. Use quickReplyMessage.can_be_edited to check whether a message can be edited. //@description Asynchronously edits the text, media or caption of a quick reply message. Use quickReplyMessage.can_be_edited to check whether a message can be edited.
//-Text message can be edited only to a text message. The type of message content in an album can't be changed with exception of replacing a photo with a video or vice versa //-Media message can be edited only to a media message. The type of message content in an album can't be changed with exception of replacing a photo with a video or vice versa
//@shortcut_id Unique identifier of the quick reply shortcut with the message //@shortcut_id Unique identifier of the quick reply shortcut with the message
//@message_id Identifier of the message //@message_id Identifier of the message
//@input_message_content New content of the message. Must be one of the following types: inputMessageText, inputMessageAnimation, inputMessageAudio, inputMessageDocument, inputMessagePhoto or inputMessageVideo //@input_message_content New content of the message. Must be one of the following types: inputMessageText, inputMessageAnimation, inputMessageAudio, inputMessageDocument, inputMessagePhoto or inputMessageVideo
@ -9296,7 +9302,7 @@ togglePaidMessageReactionIsAnonymous chat_id:int53 message_id:int53 is_anonymous
//@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
//@message_id Identifier of the message //@message_id Identifier of the message
//@reaction_types Types of the reaction to set //@reaction_types Types of the reaction to set; pass an empty list to remove the reactions
//@is_big Pass true if the reactions are added with a big animation //@is_big Pass true if the reactions are added with a big animation
setMessageReactions chat_id:int53 message_id:int53 reaction_types:vector<ReactionType> is_big:Bool = Ok; setMessageReactions chat_id:int53 message_id:int53 reaction_types:vector<ReactionType> is_big:Bool = Ok;
@ -10701,8 +10707,8 @@ getStickerSet set_id:int64 = StickerSet;
//@description Returns name of a sticker set by its identifier @set_id Identifier of the sticker set //@description Returns name of a sticker set by its identifier @set_id Identifier of the sticker set
getStickerSetName set_id:int64 = Text; getStickerSetName set_id:int64 = Text;
//@description Searches for a sticker set by its name @name Name of the sticker set //@description Searches for a sticker set by its name @name Name of the sticker set @ignore_cache Pass true to ignore local cache of sticker sets and always send a network request
searchStickerSet name:string = StickerSet; searchStickerSet name:string ignore_cache:Bool = 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 //@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; searchInstalledStickerSets sticker_type:StickerType query:string limit:int32 = StickerSets;
@ -10861,9 +10867,6 @@ setPersonalChat chat_id:int53 = Ok;
//@description Changes the emoji status of the current user; for Telegram Premium users only @emoji_status New emoji status; pass null to switch to the default badge //@description Changes the emoji status of the current user; for Telegram Premium users only @emoji_status New emoji status; pass null to switch to the default badge
setEmojiStatus emoji_status:emojiStatus = Ok; setEmojiStatus emoji_status:emojiStatus = Ok;
//@description Changes the location of the current user. Needs to be called if getOption("is_location_visible") is true and location changes for more than 1 kilometer. Must not be called if the user has a business location @location The new location of the user
setLocation location:location = Ok;
//@description Toggles whether the current user has sponsored messages enabled. The setting has no effect for users without Telegram Premium for which sponsored messages are always enabled //@description Toggles whether the current user has sponsored messages enabled. The setting has no effect for users without Telegram Premium for which sponsored messages are always enabled
//@has_sponsored_messages_enabled Pass true to enable sponsored messages for the current user; false to disable them //@has_sponsored_messages_enabled Pass true to enable sponsored messages for the current user; false to disable them
toggleHasSponsoredMessagesEnabled has_sponsored_messages_enabled:Bool = Ok; toggleHasSponsoredMessagesEnabled has_sponsored_messages_enabled:Bool = Ok;
@ -11250,7 +11253,7 @@ deleteSavedCredentials = Ok;
//@description Returns gifts that can be sent to other users //@description Returns gifts that can be sent to other users
getAvailableGifts = Gifts; getAvailableGifts = Gifts;
//@description Send a gift to another user //@description Sends a gift to another user. May return an error with a message "STARGIFT_USAGE_LIMITED" if the gift was sold out
//@gift_id Identifier of the gift to send //@gift_id Identifier of the gift to send
//@user_id Identifier of the user that will receive the gift //@user_id Identifier of the user that will receive the gift
//@text Text to show along with the gift; 0-getOption("gift_text_length_max") characters. Only Bold, Italic, Underline, Strikethrough, Spoiler, and CustomEmoji entities are allowed //@text Text to show along with the gift; 0-getOption("gift_text_length_max") characters. Only Bold, Italic, Underline, Strikethrough, Spoiler, and CustomEmoji entities are allowed
@ -11443,15 +11446,20 @@ reportChatPhoto chat_id:int53 file_id:int32 reason:ReportReason text:string = Ok
reportMessageReactions chat_id:int53 message_id:int53 sender_id:MessageSender = Ok; reportMessageReactions chat_id:int53 message_id:int53 sender_id:MessageSender = Ok;
//@description Returns detailed revenue statistics about a chat. Currently, this method can be used only for channels if supergroupFullInfo.can_get_revenue_statistics == true @chat_id Chat identifier @is_dark Pass true if a dark theme is used by the application //@description Returns detailed revenue statistics about a chat. Currently, this method can be used only
//-for channels if supergroupFullInfo.can_get_revenue_statistics == true or bots if userFullInfo.bot_info.can_get_revenue_statistics == true
//@chat_id Chat identifier
//@is_dark Pass true if a dark theme is used by the application
getChatRevenueStatistics chat_id:int53 is_dark:Bool = ChatRevenueStatistics; getChatRevenueStatistics chat_id:int53 is_dark:Bool = ChatRevenueStatistics;
//@description Returns a URL for chat revenue withdrawal; requires owner privileges in the chat. Currently, this method can be used only for channels if supergroupFullInfo.can_get_revenue_statistics == true and getOption("can_withdraw_chat_revenue") //@description Returns a URL for chat revenue withdrawal; requires owner privileges in the channel chat or the bot. Currently, this method can be used only
//-if getOption("can_withdraw_chat_revenue") for channels with supergroupFullInfo.can_get_revenue_statistics == true or bots with userFullInfo.bot_info.can_get_revenue_statistics == true
//@chat_id Chat identifier //@chat_id Chat identifier
//@password The 2-step verification password of the current user //@password The 2-step verification password of the current user
getChatRevenueWithdrawalUrl chat_id:int53 password:string = HttpUrl; getChatRevenueWithdrawalUrl chat_id:int53 password:string = HttpUrl;
//@description Returns the list of revenue transactions for a chat. Currently, this method can be used only for channels if supergroupFullInfo.can_get_revenue_statistics == true //@description Returns the list of revenue transactions for a chat. Currently, this method can be used only
//-for channels if supergroupFullInfo.can_get_revenue_statistics == true or bots if userFullInfo.bot_info.can_get_revenue_statistics == true
//@chat_id Chat identifier //@chat_id Chat identifier
//@offset Number of transactions to skip //@offset Number of transactions to skip
//@limit The maximum number of transactions to be returned; up to 200 //@limit The maximum number of transactions to be returned; up to 200