mirror of
https://github.com/c0re100/gotdlib.git
synced 2026-02-21 20:20:17 +01:00
Update to TDLib 1.8.37
This commit is contained in:
parent
ec1fb9c5e2
commit
8454bd8c86
4 changed files with 1392 additions and 152 deletions
|
|
@ -1304,7 +1304,7 @@ type GetMessageRequest struct {
|
||||||
MessageId int64 `json:"message_id"`
|
MessageId int64 `json:"message_id"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// Returns information about a message
|
// Returns information about a message. Returns a 404 error if the message doesn't exist
|
||||||
func (client *Client) GetMessage(req *GetMessageRequest) (*Message, error) {
|
func (client *Client) GetMessage(req *GetMessageRequest) (*Message, error) {
|
||||||
result, err := client.Send(Request{
|
result, err := client.Send(Request{
|
||||||
meta: meta{
|
meta: meta{
|
||||||
|
|
@ -1333,7 +1333,7 @@ type GetMessageLocallyRequest struct {
|
||||||
MessageId int64 `json:"message_id"`
|
MessageId int64 `json:"message_id"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// Returns information about a message, if it is available without sending network request. This is an offline request
|
// Returns information about a message, if it is available without sending network request. Returns a 404 error if message isn't available locally. This is an offline request
|
||||||
func (client *Client) GetMessageLocally(req *GetMessageLocallyRequest) (*Message, error) {
|
func (client *Client) GetMessageLocally(req *GetMessageLocallyRequest) (*Message, error) {
|
||||||
result, err := client.Send(Request{
|
result, err := client.Send(Request{
|
||||||
meta: meta{
|
meta: meta{
|
||||||
|
|
@ -1362,7 +1362,7 @@ type GetRepliedMessageRequest struct {
|
||||||
MessageId int64 `json:"message_id"`
|
MessageId int64 `json:"message_id"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// Returns information about a non-bundled message that is replied by a given message. Also, returns the pinned message, the game message, the invoice message, the message with a previously set same background, the giveaway message, and the topic creation message for messages of the types messagePinMessage, messageGameScore, messagePaymentSuccessful, messageChatSetBackground, messageGiveawayCompleted and topic messages without non-bundled replied message respectively
|
// Returns information about a non-bundled message that is replied by a given message. Also, returns the pinned message, the game message, the invoice message, the message with a previously set same background, the giveaway message, and the topic creation message for messages of the types messagePinMessage, messageGameScore, messagePaymentSuccessful, messageChatSetBackground, messageGiveawayCompleted and topic messages without non-bundled replied message respectively. Returns a 404 error if the message doesn't exist
|
||||||
func (client *Client) GetRepliedMessage(req *GetRepliedMessageRequest) (*Message, error) {
|
func (client *Client) GetRepliedMessage(req *GetRepliedMessageRequest) (*Message, error) {
|
||||||
result, err := client.Send(Request{
|
result, err := client.Send(Request{
|
||||||
meta: meta{
|
meta: meta{
|
||||||
|
|
@ -1389,7 +1389,7 @@ type GetChatPinnedMessageRequest struct {
|
||||||
ChatId int64 `json:"chat_id"`
|
ChatId int64 `json:"chat_id"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// Returns information about a newest pinned message in the chat
|
// Returns information about a newest pinned message in the chat. Returns a 404 error if the message doesn't exist
|
||||||
func (client *Client) GetChatPinnedMessage(req *GetChatPinnedMessageRequest) (*Message, error) {
|
func (client *Client) GetChatPinnedMessage(req *GetChatPinnedMessageRequest) (*Message, error) {
|
||||||
result, err := client.Send(Request{
|
result, err := client.Send(Request{
|
||||||
meta: meta{
|
meta: meta{
|
||||||
|
|
@ -1833,7 +1833,7 @@ type SearchChatsNearbyRequest struct {
|
||||||
Location *Location `json:"location"`
|
Location *Location `json:"location"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// Returns a list of users and location-based supergroups nearby. The list of users nearby will be updated for 60 seconds after the request by the updates updateUsersNearby. The request must be sent again every 25 seconds with adjusted location to not miss new chats
|
// 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) {
|
func (client *Client) SearchChatsNearby(req *SearchChatsNearbyRequest) (*ChatsNearby, error) {
|
||||||
result, err := client.Send(Request{
|
result, err := client.Send(Request{
|
||||||
meta: meta{
|
meta: meta{
|
||||||
|
|
@ -3180,7 +3180,7 @@ type GetChatMessageByDateRequest struct {
|
||||||
Date int32 `json:"date"`
|
Date int32 `json:"date"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// Returns the last message sent in a chat no later than the specified date
|
// Returns the last message sent in a chat no later than the specified date. Returns a 404 error if such message doesn't exist
|
||||||
func (client *Client) GetChatMessageByDate(req *GetChatMessageByDateRequest) (*Message, error) {
|
func (client *Client) GetChatMessageByDate(req *GetChatMessageByDateRequest) (*Message, error) {
|
||||||
result, err := client.Send(Request{
|
result, err := client.Send(Request{
|
||||||
meta: meta{
|
meta: meta{
|
||||||
|
|
@ -3405,9 +3405,13 @@ type ClickChatSponsoredMessageRequest struct {
|
||||||
ChatId int64 `json:"chat_id"`
|
ChatId int64 `json:"chat_id"`
|
||||||
// Identifier of the sponsored message
|
// Identifier of the sponsored message
|
||||||
MessageId int64 `json:"message_id"`
|
MessageId int64 `json:"message_id"`
|
||||||
|
// Pass true if the media was clicked in the sponsored message
|
||||||
|
IsMediaClick bool `json:"is_media_click"`
|
||||||
|
// Pass true if the user expanded the video from the sponsored message fullscreen before the click
|
||||||
|
FromFullscreen bool `json:"from_fullscreen"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// Informs TDLib that the user opened the sponsored chat via the button, the name, the photo, or a mention in the sponsored message
|
// 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
|
||||||
func (client *Client) ClickChatSponsoredMessage(req *ClickChatSponsoredMessageRequest) (*Ok, error) {
|
func (client *Client) ClickChatSponsoredMessage(req *ClickChatSponsoredMessageRequest) (*Ok, error) {
|
||||||
result, err := client.Send(Request{
|
result, err := client.Send(Request{
|
||||||
meta: meta{
|
meta: meta{
|
||||||
|
|
@ -3416,6 +3420,8 @@ func (client *Client) ClickChatSponsoredMessage(req *ClickChatSponsoredMessageRe
|
||||||
Data: map[string]interface{}{
|
Data: map[string]interface{}{
|
||||||
"chat_id": req.ChatId,
|
"chat_id": req.ChatId,
|
||||||
"message_id": req.MessageId,
|
"message_id": req.MessageId,
|
||||||
|
"is_media_click": req.IsMediaClick,
|
||||||
|
"from_fullscreen": req.FromFullscreen,
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
@ -4356,7 +4362,7 @@ type EditMessageCaptionRequest struct {
|
||||||
ReplyMarkup ReplyMarkup `json:"reply_markup"`
|
ReplyMarkup ReplyMarkup `json:"reply_markup"`
|
||||||
// New message content caption; 0-getOption("message_caption_length_max") characters; pass null to remove caption
|
// New message content caption; 0-getOption("message_caption_length_max") characters; pass null to remove caption
|
||||||
Caption *FormattedText `json:"caption"`
|
Caption *FormattedText `json:"caption"`
|
||||||
// Pass true to show the caption above the media; otherwise, the caption will be shown below the media. Can be true only for animation, photo, and video messages
|
// Pass true to show the caption above the media; otherwise, the caption will be shown below the media. May be true only for animation, photo, and video messages
|
||||||
ShowCaptionAboveMedia bool `json:"show_caption_above_media"`
|
ShowCaptionAboveMedia bool `json:"show_caption_above_media"`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -4529,7 +4535,7 @@ type EditInlineMessageCaptionRequest struct {
|
||||||
ReplyMarkup ReplyMarkup `json:"reply_markup"`
|
ReplyMarkup ReplyMarkup `json:"reply_markup"`
|
||||||
// New message content caption; pass null to remove caption; 0-getOption("message_caption_length_max") characters
|
// New message content caption; pass null to remove caption; 0-getOption("message_caption_length_max") characters
|
||||||
Caption *FormattedText `json:"caption"`
|
Caption *FormattedText `json:"caption"`
|
||||||
// Pass true to show the caption above the media; otherwise, the caption will be shown below the media. Can be true only for animation, photo, and video messages
|
// Pass true to show the caption above the media; otherwise, the caption will be shown below the media. May be true only for animation, photo, and video messages
|
||||||
ShowCaptionAboveMedia bool `json:"show_caption_above_media"`
|
ShowCaptionAboveMedia bool `json:"show_caption_above_media"`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -4875,7 +4881,7 @@ type EditBusinessMessageCaptionRequest struct {
|
||||||
ReplyMarkup ReplyMarkup `json:"reply_markup"`
|
ReplyMarkup ReplyMarkup `json:"reply_markup"`
|
||||||
// New message content caption; pass null to remove caption; 0-getOption("message_caption_length_max") characters
|
// New message content caption; pass null to remove caption; 0-getOption("message_caption_length_max") characters
|
||||||
Caption *FormattedText `json:"caption"`
|
Caption *FormattedText `json:"caption"`
|
||||||
// Pass true to show the caption above the media; otherwise, the caption will be shown below the media. Can be true only for animation, photo, and video messages
|
// Pass true to show the caption above the media; otherwise, the caption will be shown below the media. May be true only for animation, photo, and video messages
|
||||||
ShowCaptionAboveMedia bool `json:"show_caption_above_media"`
|
ShowCaptionAboveMedia bool `json:"show_caption_above_media"`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -6466,7 +6472,7 @@ type CleanFileNameRequest struct {
|
||||||
FileName string `json:"file_name"`
|
FileName string `json:"file_name"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// Removes potentially dangerous characters from the name of a file. The encoding of the file name is supposed to be UTF-8. Returns an empty string on failure. Can be called synchronously
|
// Removes potentially dangerous characters from the name of a file. Returns an empty string on failure. Can be called synchronously
|
||||||
func CleanFileName(req *CleanFileNameRequest) (*Text, error) {
|
func CleanFileName(req *CleanFileNameRequest) (*Text, error) {
|
||||||
result, err := Execute(Request{
|
result, err := Execute(Request{
|
||||||
meta: meta{
|
meta: meta{
|
||||||
|
|
@ -6488,7 +6494,7 @@ func CleanFileName(req *CleanFileNameRequest) (*Text, error) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// deprecated
|
// deprecated
|
||||||
// Removes potentially dangerous characters from the name of a file. The encoding of the file name is supposed to be UTF-8. Returns an empty string on failure. Can be called synchronously
|
// Removes potentially dangerous characters from the name of a file. Returns an empty string on failure. Can be called synchronously
|
||||||
func (client *Client) CleanFileName(req *CleanFileNameRequest) (*Text, error) {
|
func (client *Client) CleanFileName(req *CleanFileNameRequest) (*Text, error) {
|
||||||
return CleanFileName(req)}
|
return CleanFileName(req)}
|
||||||
|
|
||||||
|
|
@ -11296,14 +11302,14 @@ type ReportStoryRequest struct {
|
||||||
StorySenderChatId int64 `json:"story_sender_chat_id"`
|
StorySenderChatId int64 `json:"story_sender_chat_id"`
|
||||||
// The identifier of the story to report
|
// The identifier of the story to report
|
||||||
StoryId int32 `json:"story_id"`
|
StoryId int32 `json:"story_id"`
|
||||||
// The reason for reporting the story
|
// Option identifier chosen by the user; leave empty for the initial request
|
||||||
Reason ReportReason `json:"reason"`
|
OptionId []byte `json:"option_id"`
|
||||||
// Additional report details; 0-1024 characters
|
// Additional report details; 0-1024 characters; leave empty for the initial request
|
||||||
Text string `json:"text"`
|
Text string `json:"text"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// Reports a story to the Telegram moderators
|
// Reports a story to the Telegram moderators
|
||||||
func (client *Client) ReportStory(req *ReportStoryRequest) (*Ok, error) {
|
func (client *Client) ReportStory(req *ReportStoryRequest) (ReportStoryResult, error) {
|
||||||
result, err := client.Send(Request{
|
result, err := client.Send(Request{
|
||||||
meta: meta{
|
meta: meta{
|
||||||
Type: "reportStory",
|
Type: "reportStory",
|
||||||
|
|
@ -11311,7 +11317,7 @@ func (client *Client) ReportStory(req *ReportStoryRequest) (*Ok, error) {
|
||||||
Data: map[string]interface{}{
|
Data: map[string]interface{}{
|
||||||
"story_sender_chat_id": req.StorySenderChatId,
|
"story_sender_chat_id": req.StorySenderChatId,
|
||||||
"story_id": req.StoryId,
|
"story_id": req.StoryId,
|
||||||
"reason": req.Reason,
|
"option_id": req.OptionId,
|
||||||
"text": req.Text,
|
"text": req.Text,
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
@ -11323,7 +11329,19 @@ func (client *Client) ReportStory(req *ReportStoryRequest) (*Ok, error) {
|
||||||
return nil, buildResponseError(result.Data)
|
return nil, buildResponseError(result.Data)
|
||||||
}
|
}
|
||||||
|
|
||||||
return UnmarshalOk(result.Data)
|
switch result.Type {
|
||||||
|
case TypeReportStoryResultOk:
|
||||||
|
return UnmarshalReportStoryResultOk(result.Data)
|
||||||
|
|
||||||
|
case TypeReportStoryResultOptionRequired:
|
||||||
|
return UnmarshalReportStoryResultOptionRequired(result.Data)
|
||||||
|
|
||||||
|
case TypeReportStoryResultTextRequired:
|
||||||
|
return UnmarshalReportStoryResultTextRequired(result.Data)
|
||||||
|
|
||||||
|
default:
|
||||||
|
return nil, errors.New("invalid type")
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Activates stealth mode for stories, which hides all views of stories from the current user in the last "story_stealth_mode_past_period" seconds and for the next "story_stealth_mode_future_period" seconds; for Telegram Premium users only
|
// Activates stealth mode for stories, which hides all views of stories from the current user in the last "story_stealth_mode_past_period" seconds and for the next "story_stealth_mode_future_period" seconds; for Telegram Premium users only
|
||||||
|
|
@ -11915,7 +11933,7 @@ func (client *Client) CancelDownloadFile(req *CancelDownloadFileRequest) (*Ok, e
|
||||||
type GetSuggestedFileNameRequest struct {
|
type GetSuggestedFileNameRequest struct {
|
||||||
// Identifier of the file
|
// Identifier of the file
|
||||||
FileId int32 `json:"file_id"`
|
FileId int32 `json:"file_id"`
|
||||||
// Directory in which the file is supposed to be saved
|
// Directory in which the file is expected to be saved
|
||||||
Directory string `json:"directory"`
|
Directory string `json:"directory"`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -11978,7 +11996,7 @@ type CancelPreliminaryUploadFileRequest struct {
|
||||||
FileId int32 `json:"file_id"`
|
FileId int32 `json:"file_id"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// Stops the preliminary uploading of a file. Supported only for files uploaded by using preliminaryUploadFile. For other files the behavior is undefined
|
// Stops the preliminary uploading of a file. Supported only for files uploaded by using preliminaryUploadFile
|
||||||
func (client *Client) CancelPreliminaryUploadFile(req *CancelPreliminaryUploadFileRequest) (*Ok, error) {
|
func (client *Client) CancelPreliminaryUploadFile(req *CancelPreliminaryUploadFileRequest) (*Ok, error) {
|
||||||
result, err := client.Send(Request{
|
result, err := client.Send(Request{
|
||||||
meta: meta{
|
meta: meta{
|
||||||
|
|
@ -13289,7 +13307,7 @@ type CreateVideoChatRequest struct {
|
||||||
ChatId int64 `json:"chat_id"`
|
ChatId int64 `json:"chat_id"`
|
||||||
// Group call title; if empty, chat title will be used
|
// Group call title; if empty, chat title will be used
|
||||||
Title string `json:"title"`
|
Title string `json:"title"`
|
||||||
// Point in time (Unix timestamp) when the group call is supposed to be started by an administrator; 0 to start the video chat immediately. The date must be at least 10 seconds and at most 8 days in the future
|
// Point in time (Unix timestamp) when the group call is expected to be started by an administrator; 0 to start the video chat immediately. The date must be at least 10 seconds and at most 8 days in the future
|
||||||
StartDate int32 `json:"start_date"`
|
StartDate int32 `json:"start_date"`
|
||||||
// Pass true to create an RTMP stream instead of an ordinary video chat; requires owner privileges
|
// Pass true to create an RTMP stream instead of an ordinary video chat; requires owner privileges
|
||||||
IsRtmpStream bool `json:"is_rtmp_stream"`
|
IsRtmpStream bool `json:"is_rtmp_stream"`
|
||||||
|
|
@ -18101,7 +18119,7 @@ func (client *Client) ToggleSupergroupIsBroadcastGroup(req *ToggleSupergroupIsBr
|
||||||
type ReportSupergroupSpamRequest struct {
|
type ReportSupergroupSpamRequest struct {
|
||||||
// Supergroup identifier
|
// Supergroup identifier
|
||||||
SupergroupId int64 `json:"supergroup_id"`
|
SupergroupId int64 `json:"supergroup_id"`
|
||||||
// Identifiers of messages to report. Use messageProperties.can_be_reported to check whether the message can be reported
|
// Identifiers of messages to report. Use messageProperties.can_report_supergroup_spam to check whether the message can be reported
|
||||||
MessageIds []int64 `json:"message_ids"`
|
MessageIds []int64 `json:"message_ids"`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -18465,6 +18483,153 @@ func (client *Client) DeleteSavedCredentials() (*Ok, error) {
|
||||||
return UnmarshalOk(result.Data)
|
return UnmarshalOk(result.Data)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Returns gifts that can be sent to other users
|
||||||
|
func (client *Client) GetAvailableGifts() (*Gifts, error) {
|
||||||
|
result, err := client.Send(Request{
|
||||||
|
meta: meta{
|
||||||
|
Type: "getAvailableGifts",
|
||||||
|
},
|
||||||
|
Data: map[string]interface{}{},
|
||||||
|
})
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
if result.Type == "error" {
|
||||||
|
return nil, buildResponseError(result.Data)
|
||||||
|
}
|
||||||
|
|
||||||
|
return UnmarshalGifts(result.Data)
|
||||||
|
}
|
||||||
|
|
||||||
|
type SendGiftRequest struct {
|
||||||
|
// Identifier of the gift to send
|
||||||
|
GiftId JsonInt64 `json:"gift_id"`
|
||||||
|
// Identifier of the user that will receive the gift
|
||||||
|
UserId int64 `json:"user_id"`
|
||||||
|
// 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 *FormattedText `json:"text"`
|
||||||
|
// Pass true to show the current user as sender and gift text only to the gift receiver; otherwise, everyone will be able to see them
|
||||||
|
IsPrivate bool `json:"is_private"`
|
||||||
|
}
|
||||||
|
|
||||||
|
// Send a gift to another user
|
||||||
|
func (client *Client) SendGift(req *SendGiftRequest) (*Ok, error) {
|
||||||
|
result, err := client.Send(Request{
|
||||||
|
meta: meta{
|
||||||
|
Type: "sendGift",
|
||||||
|
},
|
||||||
|
Data: map[string]interface{}{
|
||||||
|
"gift_id": req.GiftId,
|
||||||
|
"user_id": req.UserId,
|
||||||
|
"text": req.Text,
|
||||||
|
"is_private": req.IsPrivate,
|
||||||
|
},
|
||||||
|
})
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
if result.Type == "error" {
|
||||||
|
return nil, buildResponseError(result.Data)
|
||||||
|
}
|
||||||
|
|
||||||
|
return UnmarshalOk(result.Data)
|
||||||
|
}
|
||||||
|
|
||||||
|
type SellGiftRequest struct {
|
||||||
|
// Identifier of the user that sent the gift
|
||||||
|
SenderUserId int64 `json:"sender_user_id"`
|
||||||
|
// Identifier of the message with the gift in the chat with the user
|
||||||
|
MessageId int64 `json:"message_id"`
|
||||||
|
}
|
||||||
|
|
||||||
|
// Sells a gift received by the current user for Telegram Stars
|
||||||
|
func (client *Client) SellGift(req *SellGiftRequest) (*Ok, error) {
|
||||||
|
result, err := client.Send(Request{
|
||||||
|
meta: meta{
|
||||||
|
Type: "sellGift",
|
||||||
|
},
|
||||||
|
Data: map[string]interface{}{
|
||||||
|
"sender_user_id": req.SenderUserId,
|
||||||
|
"message_id": req.MessageId,
|
||||||
|
},
|
||||||
|
})
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
if result.Type == "error" {
|
||||||
|
return nil, buildResponseError(result.Data)
|
||||||
|
}
|
||||||
|
|
||||||
|
return UnmarshalOk(result.Data)
|
||||||
|
}
|
||||||
|
|
||||||
|
type ToggleGiftIsSavedRequest struct {
|
||||||
|
// Identifier of the user that sent the gift
|
||||||
|
SenderUserId int64 `json:"sender_user_id"`
|
||||||
|
// Identifier of the message with the gift in the chat with the user
|
||||||
|
MessageId int64 `json:"message_id"`
|
||||||
|
// Pass true to display the gift on the user's profile page; pass false to remove it from the profile page
|
||||||
|
IsSaved bool `json:"is_saved"`
|
||||||
|
}
|
||||||
|
|
||||||
|
// Toggles whether a gift is shown on the current user's profile page
|
||||||
|
func (client *Client) ToggleGiftIsSaved(req *ToggleGiftIsSavedRequest) (*Ok, error) {
|
||||||
|
result, err := client.Send(Request{
|
||||||
|
meta: meta{
|
||||||
|
Type: "toggleGiftIsSaved",
|
||||||
|
},
|
||||||
|
Data: map[string]interface{}{
|
||||||
|
"sender_user_id": req.SenderUserId,
|
||||||
|
"message_id": req.MessageId,
|
||||||
|
"is_saved": req.IsSaved,
|
||||||
|
},
|
||||||
|
})
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
if result.Type == "error" {
|
||||||
|
return nil, buildResponseError(result.Data)
|
||||||
|
}
|
||||||
|
|
||||||
|
return UnmarshalOk(result.Data)
|
||||||
|
}
|
||||||
|
|
||||||
|
type GetUserGiftsRequest struct {
|
||||||
|
// Identifier of the user
|
||||||
|
UserId int64 `json:"user_id"`
|
||||||
|
// Offset of the first entry to return as received from the previous request; use empty string to get the first chunk of results
|
||||||
|
Offset string `json:"offset"`
|
||||||
|
// The maximum number of gifts to be returned; must be positive and can't be greater than 100. For optimal performance, the number of returned objects is chosen by TDLib and can be smaller than the specified limit
|
||||||
|
Limit int32 `json:"limit"`
|
||||||
|
}
|
||||||
|
|
||||||
|
// Returns gifts saved to profile by the given user
|
||||||
|
func (client *Client) GetUserGifts(req *GetUserGiftsRequest) (*UserGifts, error) {
|
||||||
|
result, err := client.Send(Request{
|
||||||
|
meta: meta{
|
||||||
|
Type: "getUserGifts",
|
||||||
|
},
|
||||||
|
Data: map[string]interface{}{
|
||||||
|
"user_id": req.UserId,
|
||||||
|
"offset": req.Offset,
|
||||||
|
"limit": req.Limit,
|
||||||
|
},
|
||||||
|
})
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
if result.Type == "error" {
|
||||||
|
return nil, buildResponseError(result.Data)
|
||||||
|
}
|
||||||
|
|
||||||
|
return UnmarshalUserGifts(result.Data)
|
||||||
|
}
|
||||||
|
|
||||||
type CreateInvoiceLinkRequest struct {
|
type CreateInvoiceLinkRequest struct {
|
||||||
// Information about the invoice of the type inputMessageInvoice
|
// Information about the invoice of the type inputMessageInvoice
|
||||||
Invoice InputMessageContent `json:"invoice"`
|
Invoice InputMessageContent `json:"invoice"`
|
||||||
|
|
@ -18498,7 +18663,7 @@ type RefundStarPaymentRequest struct {
|
||||||
TelegramPaymentChargeId string `json:"telegram_payment_charge_id"`
|
TelegramPaymentChargeId string `json:"telegram_payment_charge_id"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// Refunds a previously done payment in Telegram Stars
|
// Refunds a previously done payment in Telegram Stars; for bots only
|
||||||
func (client *Client) RefundStarPayment(req *RefundStarPaymentRequest) (*Ok, error) {
|
func (client *Client) RefundStarPayment(req *RefundStarPaymentRequest) (*Ok, error) {
|
||||||
result, err := client.Send(Request{
|
result, err := client.Send(Request{
|
||||||
meta: meta{
|
meta: meta{
|
||||||
|
|
@ -19487,24 +19652,24 @@ func (client *Client) RemoveChatActionBar(req *RemoveChatActionBarRequest) (*Ok,
|
||||||
type ReportChatRequest struct {
|
type ReportChatRequest struct {
|
||||||
// Chat identifier
|
// Chat identifier
|
||||||
ChatId int64 `json:"chat_id"`
|
ChatId int64 `json:"chat_id"`
|
||||||
// Identifiers of reported messages; may be empty to report the whole chat. Use messageProperties.can_be_reported to check whether the message can be reported
|
// Option identifier chosen by the user; leave empty for the initial request
|
||||||
|
OptionId []byte `json:"option_id"`
|
||||||
|
// Identifiers of reported messages. Use messageProperties.can_report_chat to check whether the message can be reported
|
||||||
MessageIds []int64 `json:"message_ids"`
|
MessageIds []int64 `json:"message_ids"`
|
||||||
// The reason for reporting the chat
|
// Additional report details if asked by the server; 0-1024 characters; leave empty for the initial request
|
||||||
Reason ReportReason `json:"reason"`
|
|
||||||
// Additional report details; 0-1024 characters
|
|
||||||
Text string `json:"text"`
|
Text string `json:"text"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// Reports a chat to the Telegram moderators. A chat can be reported only from the chat action bar, or if chat.can_be_reported
|
// Reports a chat to the Telegram moderators. A chat can be reported only from the chat action bar, or if chat.can_be_reported
|
||||||
func (client *Client) ReportChat(req *ReportChatRequest) (*Ok, error) {
|
func (client *Client) ReportChat(req *ReportChatRequest) (ReportChatResult, error) {
|
||||||
result, err := client.Send(Request{
|
result, err := client.Send(Request{
|
||||||
meta: meta{
|
meta: meta{
|
||||||
Type: "reportChat",
|
Type: "reportChat",
|
||||||
},
|
},
|
||||||
Data: map[string]interface{}{
|
Data: map[string]interface{}{
|
||||||
"chat_id": req.ChatId,
|
"chat_id": req.ChatId,
|
||||||
|
"option_id": req.OptionId,
|
||||||
"message_ids": req.MessageIds,
|
"message_ids": req.MessageIds,
|
||||||
"reason": req.Reason,
|
|
||||||
"text": req.Text,
|
"text": req.Text,
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
@ -19516,7 +19681,22 @@ func (client *Client) ReportChat(req *ReportChatRequest) (*Ok, error) {
|
||||||
return nil, buildResponseError(result.Data)
|
return nil, buildResponseError(result.Data)
|
||||||
}
|
}
|
||||||
|
|
||||||
return UnmarshalOk(result.Data)
|
switch result.Type {
|
||||||
|
case TypeReportChatResultOk:
|
||||||
|
return UnmarshalReportChatResultOk(result.Data)
|
||||||
|
|
||||||
|
case TypeReportChatResultOptionRequired:
|
||||||
|
return UnmarshalReportChatResultOptionRequired(result.Data)
|
||||||
|
|
||||||
|
case TypeReportChatResultTextRequired:
|
||||||
|
return UnmarshalReportChatResultTextRequired(result.Data)
|
||||||
|
|
||||||
|
case TypeReportChatResultMessagesRequired:
|
||||||
|
return UnmarshalReportChatResultMessagesRequired(result.Data)
|
||||||
|
|
||||||
|
default:
|
||||||
|
return nil, errors.New("invalid type")
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
type ReportChatPhotoRequest struct {
|
type ReportChatPhotoRequest struct {
|
||||||
|
|
@ -21347,6 +21527,32 @@ func (client *Client) GetPremiumStickerExamples() (*Stickers, error) {
|
||||||
return UnmarshalStickers(result.Data)
|
return UnmarshalStickers(result.Data)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
type GetPremiumInfoStickerRequest struct {
|
||||||
|
// Number of months the Telegram Premium subscription will be active
|
||||||
|
MonthCount int32 `json:"month_count"`
|
||||||
|
}
|
||||||
|
|
||||||
|
// Returns the sticker to be used as representation of the Telegram Premium subscription
|
||||||
|
func (client *Client) GetPremiumInfoSticker(req *GetPremiumInfoStickerRequest) (*Sticker, error) {
|
||||||
|
result, err := client.Send(Request{
|
||||||
|
meta: meta{
|
||||||
|
Type: "getPremiumInfoSticker",
|
||||||
|
},
|
||||||
|
Data: map[string]interface{}{
|
||||||
|
"month_count": req.MonthCount,
|
||||||
|
},
|
||||||
|
})
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
if result.Type == "error" {
|
||||||
|
return nil, buildResponseError(result.Data)
|
||||||
|
}
|
||||||
|
|
||||||
|
return UnmarshalSticker(result.Data)
|
||||||
|
}
|
||||||
|
|
||||||
type ViewPremiumFeatureRequest struct {
|
type ViewPremiumFeatureRequest struct {
|
||||||
// The viewed premium feature
|
// The viewed premium feature
|
||||||
Feature PremiumFeature `json:"feature"`
|
Feature PremiumFeature `json:"feature"`
|
||||||
|
|
|
||||||
678
client/type.go
678
client/type.go
File diff suppressed because it is too large
Load diff
|
|
@ -767,6 +767,43 @@ func UnmarshalListOfChatTransactionPurpose(dataList []json.RawMessage) ([]ChatTr
|
||||||
return list, nil
|
return list, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func UnmarshalUserTransactionPurpose(data json.RawMessage) (UserTransactionPurpose, error) {
|
||||||
|
var meta meta
|
||||||
|
|
||||||
|
err := json.Unmarshal(data, &meta)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
switch meta.Type {
|
||||||
|
case TypeUserTransactionPurposeGiftedStars:
|
||||||
|
return UnmarshalUserTransactionPurposeGiftedStars(data)
|
||||||
|
|
||||||
|
case TypeUserTransactionPurposeGiftSell:
|
||||||
|
return UnmarshalUserTransactionPurposeGiftSell(data)
|
||||||
|
|
||||||
|
case TypeUserTransactionPurposeGiftSend:
|
||||||
|
return UnmarshalUserTransactionPurposeGiftSend(data)
|
||||||
|
|
||||||
|
default:
|
||||||
|
return nil, fmt.Errorf("Error unmarshaling. Unknown type: " + meta.Type)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func UnmarshalListOfUserTransactionPurpose(dataList []json.RawMessage) ([]UserTransactionPurpose, error) {
|
||||||
|
list := []UserTransactionPurpose{}
|
||||||
|
|
||||||
|
for _, data := range dataList {
|
||||||
|
entity, err := UnmarshalUserTransactionPurpose(data)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
list = append(list, entity)
|
||||||
|
}
|
||||||
|
|
||||||
|
return list, nil
|
||||||
|
}
|
||||||
|
|
||||||
func UnmarshalStarTransactionPartner(data json.RawMessage) (StarTransactionPartner, error) {
|
func UnmarshalStarTransactionPartner(data json.RawMessage) (StarTransactionPartner, error) {
|
||||||
var meta meta
|
var meta meta
|
||||||
|
|
||||||
|
|
@ -1938,6 +1975,9 @@ func UnmarshalInlineKeyboardButtonType(data json.RawMessage) (InlineKeyboardButt
|
||||||
case TypeInlineKeyboardButtonTypeUser:
|
case TypeInlineKeyboardButtonTypeUser:
|
||||||
return UnmarshalInlineKeyboardButtonTypeUser(data)
|
return UnmarshalInlineKeyboardButtonTypeUser(data)
|
||||||
|
|
||||||
|
case TypeInlineKeyboardButtonTypeCopyText:
|
||||||
|
return UnmarshalInlineKeyboardButtonTypeCopyText(data)
|
||||||
|
|
||||||
default:
|
default:
|
||||||
return nil, fmt.Errorf("Error unmarshaling. Unknown type: " + meta.Type)
|
return nil, fmt.Errorf("Error unmarshaling. Unknown type: " + meta.Type)
|
||||||
}
|
}
|
||||||
|
|
@ -3256,6 +3296,9 @@ func UnmarshalMessageContent(data json.RawMessage) (MessageContent, error) {
|
||||||
case TypeMessageGiveawayPrizeStars:
|
case TypeMessageGiveawayPrizeStars:
|
||||||
return UnmarshalMessageGiveawayPrizeStars(data)
|
return UnmarshalMessageGiveawayPrizeStars(data)
|
||||||
|
|
||||||
|
case TypeMessageGift:
|
||||||
|
return UnmarshalMessageGift(data)
|
||||||
|
|
||||||
case TypeMessageContactRegistered:
|
case TypeMessageContactRegistered:
|
||||||
return UnmarshalMessageContactRegistered(data)
|
return UnmarshalMessageContactRegistered(data)
|
||||||
|
|
||||||
|
|
@ -5956,6 +5999,9 @@ func UnmarshalPushMessageContent(data json.RawMessage) (PushMessageContent, erro
|
||||||
case TypePushMessageContentGiveaway:
|
case TypePushMessageContentGiveaway:
|
||||||
return UnmarshalPushMessageContentGiveaway(data)
|
return UnmarshalPushMessageContentGiveaway(data)
|
||||||
|
|
||||||
|
case TypePushMessageContentGift:
|
||||||
|
return UnmarshalPushMessageContentGift(data)
|
||||||
|
|
||||||
case TypePushMessageContentScreenshotTaken:
|
case TypePushMessageContentScreenshotTaken:
|
||||||
return UnmarshalPushMessageContentScreenshotTaken(data)
|
return UnmarshalPushMessageContentScreenshotTaken(data)
|
||||||
|
|
||||||
|
|
@ -6531,6 +6577,83 @@ func UnmarshalListOfReportReason(dataList []json.RawMessage) ([]ReportReason, er
|
||||||
return list, nil
|
return list, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func UnmarshalReportChatResult(data json.RawMessage) (ReportChatResult, error) {
|
||||||
|
var meta meta
|
||||||
|
|
||||||
|
err := json.Unmarshal(data, &meta)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
switch meta.Type {
|
||||||
|
case TypeReportChatResultOk:
|
||||||
|
return UnmarshalReportChatResultOk(data)
|
||||||
|
|
||||||
|
case TypeReportChatResultOptionRequired:
|
||||||
|
return UnmarshalReportChatResultOptionRequired(data)
|
||||||
|
|
||||||
|
case TypeReportChatResultTextRequired:
|
||||||
|
return UnmarshalReportChatResultTextRequired(data)
|
||||||
|
|
||||||
|
case TypeReportChatResultMessagesRequired:
|
||||||
|
return UnmarshalReportChatResultMessagesRequired(data)
|
||||||
|
|
||||||
|
default:
|
||||||
|
return nil, fmt.Errorf("Error unmarshaling. Unknown type: " + meta.Type)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func UnmarshalListOfReportChatResult(dataList []json.RawMessage) ([]ReportChatResult, error) {
|
||||||
|
list := []ReportChatResult{}
|
||||||
|
|
||||||
|
for _, data := range dataList {
|
||||||
|
entity, err := UnmarshalReportChatResult(data)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
list = append(list, entity)
|
||||||
|
}
|
||||||
|
|
||||||
|
return list, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func UnmarshalReportStoryResult(data json.RawMessage) (ReportStoryResult, error) {
|
||||||
|
var meta meta
|
||||||
|
|
||||||
|
err := json.Unmarshal(data, &meta)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
switch meta.Type {
|
||||||
|
case TypeReportStoryResultOk:
|
||||||
|
return UnmarshalReportStoryResultOk(data)
|
||||||
|
|
||||||
|
case TypeReportStoryResultOptionRequired:
|
||||||
|
return UnmarshalReportStoryResultOptionRequired(data)
|
||||||
|
|
||||||
|
case TypeReportStoryResultTextRequired:
|
||||||
|
return UnmarshalReportStoryResultTextRequired(data)
|
||||||
|
|
||||||
|
default:
|
||||||
|
return nil, fmt.Errorf("Error unmarshaling. Unknown type: " + meta.Type)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func UnmarshalListOfReportStoryResult(dataList []json.RawMessage) ([]ReportStoryResult, error) {
|
||||||
|
list := []ReportStoryResult{}
|
||||||
|
|
||||||
|
for _, data := range dataList {
|
||||||
|
entity, err := UnmarshalReportStoryResult(data)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
list = append(list, entity)
|
||||||
|
}
|
||||||
|
|
||||||
|
return list, nil
|
||||||
|
}
|
||||||
|
|
||||||
func UnmarshalTargetChat(data json.RawMessage) (TargetChat, error) {
|
func UnmarshalTargetChat(data json.RawMessage) (TargetChat, error) {
|
||||||
var meta meta
|
var meta meta
|
||||||
|
|
||||||
|
|
@ -8777,6 +8900,14 @@ func UnmarshalPoll(data json.RawMessage) (*Poll, error) {
|
||||||
return &resp, err
|
return &resp, err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func UnmarshalAlternativeVideo(data json.RawMessage) (*AlternativeVideo, error) {
|
||||||
|
var resp AlternativeVideo
|
||||||
|
|
||||||
|
err := json.Unmarshal(data, &resp)
|
||||||
|
|
||||||
|
return &resp, err
|
||||||
|
}
|
||||||
|
|
||||||
func UnmarshalBackground(data json.RawMessage) (*Background, error) {
|
func UnmarshalBackground(data json.RawMessage) (*Background, error) {
|
||||||
var resp Background
|
var resp Background
|
||||||
|
|
||||||
|
|
@ -9241,6 +9372,38 @@ func UnmarshalStarGiveawayPaymentOptions(data json.RawMessage) (*StarGiveawayPay
|
||||||
return &resp, err
|
return &resp, err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func UnmarshalGift(data json.RawMessage) (*Gift, error) {
|
||||||
|
var resp Gift
|
||||||
|
|
||||||
|
err := json.Unmarshal(data, &resp)
|
||||||
|
|
||||||
|
return &resp, err
|
||||||
|
}
|
||||||
|
|
||||||
|
func UnmarshalGifts(data json.RawMessage) (*Gifts, error) {
|
||||||
|
var resp Gifts
|
||||||
|
|
||||||
|
err := json.Unmarshal(data, &resp)
|
||||||
|
|
||||||
|
return &resp, err
|
||||||
|
}
|
||||||
|
|
||||||
|
func UnmarshalUserGift(data json.RawMessage) (*UserGift, error) {
|
||||||
|
var resp UserGift
|
||||||
|
|
||||||
|
err := json.Unmarshal(data, &resp)
|
||||||
|
|
||||||
|
return &resp, err
|
||||||
|
}
|
||||||
|
|
||||||
|
func UnmarshalUserGifts(data json.RawMessage) (*UserGifts, error) {
|
||||||
|
var resp UserGifts
|
||||||
|
|
||||||
|
err := json.Unmarshal(data, &resp)
|
||||||
|
|
||||||
|
return &resp, err
|
||||||
|
}
|
||||||
|
|
||||||
func UnmarshalStarTransactionDirectionIncoming(data json.RawMessage) (*StarTransactionDirectionIncoming, error) {
|
func UnmarshalStarTransactionDirectionIncoming(data json.RawMessage) (*StarTransactionDirectionIncoming, error) {
|
||||||
var resp StarTransactionDirectionIncoming
|
var resp StarTransactionDirectionIncoming
|
||||||
|
|
||||||
|
|
@ -9305,6 +9468,30 @@ func UnmarshalChatTransactionPurposeGiveaway(data json.RawMessage) (*ChatTransac
|
||||||
return &resp, err
|
return &resp, err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func UnmarshalUserTransactionPurposeGiftedStars(data json.RawMessage) (*UserTransactionPurposeGiftedStars, error) {
|
||||||
|
var resp UserTransactionPurposeGiftedStars
|
||||||
|
|
||||||
|
err := json.Unmarshal(data, &resp)
|
||||||
|
|
||||||
|
return &resp, err
|
||||||
|
}
|
||||||
|
|
||||||
|
func UnmarshalUserTransactionPurposeGiftSell(data json.RawMessage) (*UserTransactionPurposeGiftSell, error) {
|
||||||
|
var resp UserTransactionPurposeGiftSell
|
||||||
|
|
||||||
|
err := json.Unmarshal(data, &resp)
|
||||||
|
|
||||||
|
return &resp, err
|
||||||
|
}
|
||||||
|
|
||||||
|
func UnmarshalUserTransactionPurposeGiftSend(data json.RawMessage) (*UserTransactionPurposeGiftSend, error) {
|
||||||
|
var resp UserTransactionPurposeGiftSend
|
||||||
|
|
||||||
|
err := json.Unmarshal(data, &resp)
|
||||||
|
|
||||||
|
return &resp, err
|
||||||
|
}
|
||||||
|
|
||||||
func UnmarshalStarTransactionPartnerTelegram(data json.RawMessage) (*StarTransactionPartnerTelegram, error) {
|
func UnmarshalStarTransactionPartnerTelegram(data json.RawMessage) (*StarTransactionPartnerTelegram, error) {
|
||||||
var resp StarTransactionPartnerTelegram
|
var resp StarTransactionPartnerTelegram
|
||||||
|
|
||||||
|
|
@ -10449,8 +10636,8 @@ func UnmarshalSponsoredMessages(data json.RawMessage) (*SponsoredMessages, error
|
||||||
return &resp, err
|
return &resp, err
|
||||||
}
|
}
|
||||||
|
|
||||||
func UnmarshalReportChatSponsoredMessageOption(data json.RawMessage) (*ReportChatSponsoredMessageOption, error) {
|
func UnmarshalReportOption(data json.RawMessage) (*ReportOption, error) {
|
||||||
var resp ReportChatSponsoredMessageOption
|
var resp ReportOption
|
||||||
|
|
||||||
err := json.Unmarshal(data, &resp)
|
err := json.Unmarshal(data, &resp)
|
||||||
|
|
||||||
|
|
@ -11073,6 +11260,14 @@ func UnmarshalInlineKeyboardButtonTypeUser(data json.RawMessage) (*InlineKeyboar
|
||||||
return &resp, err
|
return &resp, err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func UnmarshalInlineKeyboardButtonTypeCopyText(data json.RawMessage) (*InlineKeyboardButtonTypeCopyText, error) {
|
||||||
|
var resp InlineKeyboardButtonTypeCopyText
|
||||||
|
|
||||||
|
err := json.Unmarshal(data, &resp)
|
||||||
|
|
||||||
|
return &resp, err
|
||||||
|
}
|
||||||
|
|
||||||
func UnmarshalInlineKeyboardButton(data json.RawMessage) (*InlineKeyboardButton, error) {
|
func UnmarshalInlineKeyboardButton(data json.RawMessage) (*InlineKeyboardButton, error) {
|
||||||
var resp InlineKeyboardButton
|
var resp InlineKeyboardButton
|
||||||
|
|
||||||
|
|
@ -13393,6 +13588,14 @@ func UnmarshalMessageGiveawayPrizeStars(data json.RawMessage) (*MessageGiveawayP
|
||||||
return &resp, err
|
return &resp, err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func UnmarshalMessageGift(data json.RawMessage) (*MessageGift, error) {
|
||||||
|
var resp MessageGift
|
||||||
|
|
||||||
|
err := json.Unmarshal(data, &resp)
|
||||||
|
|
||||||
|
return &resp, err
|
||||||
|
}
|
||||||
|
|
||||||
func UnmarshalMessageContactRegistered(data json.RawMessage) (*MessageContactRegistered, error) {
|
func UnmarshalMessageContactRegistered(data json.RawMessage) (*MessageContactRegistered, error) {
|
||||||
var resp MessageContactRegistered
|
var resp MessageContactRegistered
|
||||||
|
|
||||||
|
|
@ -17337,6 +17540,14 @@ func UnmarshalPushMessageContentGiveaway(data json.RawMessage) (*PushMessageCont
|
||||||
return &resp, err
|
return &resp, err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func UnmarshalPushMessageContentGift(data json.RawMessage) (*PushMessageContentGift, error) {
|
||||||
|
var resp PushMessageContentGift
|
||||||
|
|
||||||
|
err := json.Unmarshal(data, &resp)
|
||||||
|
|
||||||
|
return &resp, err
|
||||||
|
}
|
||||||
|
|
||||||
func UnmarshalPushMessageContentScreenshotTaken(data json.RawMessage) (*PushMessageContentScreenshotTaken, error) {
|
func UnmarshalPushMessageContentScreenshotTaken(data json.RawMessage) (*PushMessageContentScreenshotTaken, error) {
|
||||||
var resp PushMessageContentScreenshotTaken
|
var resp PushMessageContentScreenshotTaken
|
||||||
|
|
||||||
|
|
@ -18193,6 +18404,62 @@ func UnmarshalReportReasonCustom(data json.RawMessage) (*ReportReasonCustom, err
|
||||||
return &resp, err
|
return &resp, err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func UnmarshalReportChatResultOk(data json.RawMessage) (*ReportChatResultOk, error) {
|
||||||
|
var resp ReportChatResultOk
|
||||||
|
|
||||||
|
err := json.Unmarshal(data, &resp)
|
||||||
|
|
||||||
|
return &resp, err
|
||||||
|
}
|
||||||
|
|
||||||
|
func UnmarshalReportChatResultOptionRequired(data json.RawMessage) (*ReportChatResultOptionRequired, error) {
|
||||||
|
var resp ReportChatResultOptionRequired
|
||||||
|
|
||||||
|
err := json.Unmarshal(data, &resp)
|
||||||
|
|
||||||
|
return &resp, err
|
||||||
|
}
|
||||||
|
|
||||||
|
func UnmarshalReportChatResultTextRequired(data json.RawMessage) (*ReportChatResultTextRequired, error) {
|
||||||
|
var resp ReportChatResultTextRequired
|
||||||
|
|
||||||
|
err := json.Unmarshal(data, &resp)
|
||||||
|
|
||||||
|
return &resp, err
|
||||||
|
}
|
||||||
|
|
||||||
|
func UnmarshalReportChatResultMessagesRequired(data json.RawMessage) (*ReportChatResultMessagesRequired, error) {
|
||||||
|
var resp ReportChatResultMessagesRequired
|
||||||
|
|
||||||
|
err := json.Unmarshal(data, &resp)
|
||||||
|
|
||||||
|
return &resp, err
|
||||||
|
}
|
||||||
|
|
||||||
|
func UnmarshalReportStoryResultOk(data json.RawMessage) (*ReportStoryResultOk, error) {
|
||||||
|
var resp ReportStoryResultOk
|
||||||
|
|
||||||
|
err := json.Unmarshal(data, &resp)
|
||||||
|
|
||||||
|
return &resp, err
|
||||||
|
}
|
||||||
|
|
||||||
|
func UnmarshalReportStoryResultOptionRequired(data json.RawMessage) (*ReportStoryResultOptionRequired, error) {
|
||||||
|
var resp ReportStoryResultOptionRequired
|
||||||
|
|
||||||
|
err := json.Unmarshal(data, &resp)
|
||||||
|
|
||||||
|
return &resp, err
|
||||||
|
}
|
||||||
|
|
||||||
|
func UnmarshalReportStoryResultTextRequired(data json.RawMessage) (*ReportStoryResultTextRequired, error) {
|
||||||
|
var resp ReportStoryResultTextRequired
|
||||||
|
|
||||||
|
err := json.Unmarshal(data, &resp)
|
||||||
|
|
||||||
|
return &resp, err
|
||||||
|
}
|
||||||
|
|
||||||
func UnmarshalTargetChatCurrent(data json.RawMessage) (*TargetChatCurrent, error) {
|
func UnmarshalTargetChatCurrent(data json.RawMessage) (*TargetChatCurrent, error) {
|
||||||
var resp TargetChatCurrent
|
var resp TargetChatCurrent
|
||||||
|
|
||||||
|
|
@ -21256,6 +21523,9 @@ func UnmarshalType(data json.RawMessage) (Type, error) {
|
||||||
case TypePoll:
|
case TypePoll:
|
||||||
return UnmarshalPoll(data)
|
return UnmarshalPoll(data)
|
||||||
|
|
||||||
|
case TypeAlternativeVideo:
|
||||||
|
return UnmarshalAlternativeVideo(data)
|
||||||
|
|
||||||
case TypeBackground:
|
case TypeBackground:
|
||||||
return UnmarshalBackground(data)
|
return UnmarshalBackground(data)
|
||||||
|
|
||||||
|
|
@ -21430,6 +21700,18 @@ func UnmarshalType(data json.RawMessage) (Type, error) {
|
||||||
case TypeStarGiveawayPaymentOptions:
|
case TypeStarGiveawayPaymentOptions:
|
||||||
return UnmarshalStarGiveawayPaymentOptions(data)
|
return UnmarshalStarGiveawayPaymentOptions(data)
|
||||||
|
|
||||||
|
case TypeGift:
|
||||||
|
return UnmarshalGift(data)
|
||||||
|
|
||||||
|
case TypeGifts:
|
||||||
|
return UnmarshalGifts(data)
|
||||||
|
|
||||||
|
case TypeUserGift:
|
||||||
|
return UnmarshalUserGift(data)
|
||||||
|
|
||||||
|
case TypeUserGifts:
|
||||||
|
return UnmarshalUserGifts(data)
|
||||||
|
|
||||||
case TypeStarTransactionDirectionIncoming:
|
case TypeStarTransactionDirectionIncoming:
|
||||||
return UnmarshalStarTransactionDirectionIncoming(data)
|
return UnmarshalStarTransactionDirectionIncoming(data)
|
||||||
|
|
||||||
|
|
@ -21454,6 +21736,15 @@ func UnmarshalType(data json.RawMessage) (Type, error) {
|
||||||
case TypeChatTransactionPurposeGiveaway:
|
case TypeChatTransactionPurposeGiveaway:
|
||||||
return UnmarshalChatTransactionPurposeGiveaway(data)
|
return UnmarshalChatTransactionPurposeGiveaway(data)
|
||||||
|
|
||||||
|
case TypeUserTransactionPurposeGiftedStars:
|
||||||
|
return UnmarshalUserTransactionPurposeGiftedStars(data)
|
||||||
|
|
||||||
|
case TypeUserTransactionPurposeGiftSell:
|
||||||
|
return UnmarshalUserTransactionPurposeGiftSell(data)
|
||||||
|
|
||||||
|
case TypeUserTransactionPurposeGiftSend:
|
||||||
|
return UnmarshalUserTransactionPurposeGiftSend(data)
|
||||||
|
|
||||||
case TypeStarTransactionPartnerTelegram:
|
case TypeStarTransactionPartnerTelegram:
|
||||||
return UnmarshalStarTransactionPartnerTelegram(data)
|
return UnmarshalStarTransactionPartnerTelegram(data)
|
||||||
|
|
||||||
|
|
@ -21883,8 +22174,8 @@ func UnmarshalType(data json.RawMessage) (Type, error) {
|
||||||
case TypeSponsoredMessages:
|
case TypeSponsoredMessages:
|
||||||
return UnmarshalSponsoredMessages(data)
|
return UnmarshalSponsoredMessages(data)
|
||||||
|
|
||||||
case TypeReportChatSponsoredMessageOption:
|
case TypeReportOption:
|
||||||
return UnmarshalReportChatSponsoredMessageOption(data)
|
return UnmarshalReportOption(data)
|
||||||
|
|
||||||
case TypeReportChatSponsoredMessageResultOk:
|
case TypeReportChatSponsoredMessageResultOk:
|
||||||
return UnmarshalReportChatSponsoredMessageResultOk(data)
|
return UnmarshalReportChatSponsoredMessageResultOk(data)
|
||||||
|
|
@ -22117,6 +22408,9 @@ func UnmarshalType(data json.RawMessage) (Type, error) {
|
||||||
case TypeInlineKeyboardButtonTypeUser:
|
case TypeInlineKeyboardButtonTypeUser:
|
||||||
return UnmarshalInlineKeyboardButtonTypeUser(data)
|
return UnmarshalInlineKeyboardButtonTypeUser(data)
|
||||||
|
|
||||||
|
case TypeInlineKeyboardButtonTypeCopyText:
|
||||||
|
return UnmarshalInlineKeyboardButtonTypeCopyText(data)
|
||||||
|
|
||||||
case TypeInlineKeyboardButton:
|
case TypeInlineKeyboardButton:
|
||||||
return UnmarshalInlineKeyboardButton(data)
|
return UnmarshalInlineKeyboardButton(data)
|
||||||
|
|
||||||
|
|
@ -22987,6 +23281,9 @@ func UnmarshalType(data json.RawMessage) (Type, error) {
|
||||||
case TypeMessageGiveawayPrizeStars:
|
case TypeMessageGiveawayPrizeStars:
|
||||||
return UnmarshalMessageGiveawayPrizeStars(data)
|
return UnmarshalMessageGiveawayPrizeStars(data)
|
||||||
|
|
||||||
|
case TypeMessageGift:
|
||||||
|
return UnmarshalMessageGift(data)
|
||||||
|
|
||||||
case TypeMessageContactRegistered:
|
case TypeMessageContactRegistered:
|
||||||
return UnmarshalMessageContactRegistered(data)
|
return UnmarshalMessageContactRegistered(data)
|
||||||
|
|
||||||
|
|
@ -24466,6 +24763,9 @@ func UnmarshalType(data json.RawMessage) (Type, error) {
|
||||||
case TypePushMessageContentGiveaway:
|
case TypePushMessageContentGiveaway:
|
||||||
return UnmarshalPushMessageContentGiveaway(data)
|
return UnmarshalPushMessageContentGiveaway(data)
|
||||||
|
|
||||||
|
case TypePushMessageContentGift:
|
||||||
|
return UnmarshalPushMessageContentGift(data)
|
||||||
|
|
||||||
case TypePushMessageContentScreenshotTaken:
|
case TypePushMessageContentScreenshotTaken:
|
||||||
return UnmarshalPushMessageContentScreenshotTaken(data)
|
return UnmarshalPushMessageContentScreenshotTaken(data)
|
||||||
|
|
||||||
|
|
@ -24787,6 +25087,27 @@ func UnmarshalType(data json.RawMessage) (Type, error) {
|
||||||
case TypeReportReasonCustom:
|
case TypeReportReasonCustom:
|
||||||
return UnmarshalReportReasonCustom(data)
|
return UnmarshalReportReasonCustom(data)
|
||||||
|
|
||||||
|
case TypeReportChatResultOk:
|
||||||
|
return UnmarshalReportChatResultOk(data)
|
||||||
|
|
||||||
|
case TypeReportChatResultOptionRequired:
|
||||||
|
return UnmarshalReportChatResultOptionRequired(data)
|
||||||
|
|
||||||
|
case TypeReportChatResultTextRequired:
|
||||||
|
return UnmarshalReportChatResultTextRequired(data)
|
||||||
|
|
||||||
|
case TypeReportChatResultMessagesRequired:
|
||||||
|
return UnmarshalReportChatResultMessagesRequired(data)
|
||||||
|
|
||||||
|
case TypeReportStoryResultOk:
|
||||||
|
return UnmarshalReportStoryResultOk(data)
|
||||||
|
|
||||||
|
case TypeReportStoryResultOptionRequired:
|
||||||
|
return UnmarshalReportStoryResultOptionRequired(data)
|
||||||
|
|
||||||
|
case TypeReportStoryResultTextRequired:
|
||||||
|
return UnmarshalReportStoryResultTextRequired(data)
|
||||||
|
|
||||||
case TypeTargetChatCurrent:
|
case TypeTargetChatCurrent:
|
||||||
return UnmarshalTargetChatCurrent(data)
|
return UnmarshalTargetChatCurrent(data)
|
||||||
|
|
||||||
|
|
|
||||||
271
data/td_api.tl
271
data/td_api.tl
|
|
@ -65,7 +65,7 @@ authenticationCodeTypeFirebaseAndroid device_verification_parameters:FirebaseDev
|
||||||
|
|
||||||
//@description A digit-only authentication code is delivered via Firebase Authentication to the official iOS application
|
//@description A digit-only authentication code is delivered via Firebase Authentication to the official iOS application
|
||||||
//@receipt Receipt of successful application token validation to compare with receipt from push notification
|
//@receipt Receipt of successful application token validation to compare with receipt from push notification
|
||||||
//@push_timeout Time after the next authentication method is supposed to be used if verification push notification isn't received, in seconds
|
//@push_timeout Time after the next authentication method is expected to be used if verification push notification isn't received, in seconds
|
||||||
//@length Length of the code
|
//@length Length of the code
|
||||||
authenticationCodeTypeFirebaseIos receipt:string push_timeout:int32 length:int32 = AuthenticationCodeType;
|
authenticationCodeTypeFirebaseIos receipt:string push_timeout:int32 length:int32 = AuthenticationCodeType;
|
||||||
|
|
||||||
|
|
@ -246,10 +246,10 @@ inputFileRemote id:string = InputFile;
|
||||||
//@description A file defined by a local path @path Local path to the file
|
//@description A file defined by a local path @path Local path to the file
|
||||||
inputFileLocal path:string = InputFile;
|
inputFileLocal path:string = InputFile;
|
||||||
|
|
||||||
//@description A file generated by the application
|
//@description A file generated by the application. The application must handle updates updateFileGenerationStart and updateFileGenerationStop to generate the file when asked by TDLib
|
||||||
//@original_path Local path to a file from which the file is generated; may be empty if there is no such file
|
//@original_path Local path to a file from which the file is generated. The path doesn't have to be a valid path and is used by TDLib only to detect name and MIME type of the generated file
|
||||||
//@conversion String specifying the conversion applied to the original file; must be persistent across application restarts. Conversions beginning with '#' are reserved for internal TDLib usage
|
//@conversion String specifying the conversion applied to the original file; must be persistent across application restarts. Conversions beginning with '#' are reserved for internal TDLib usage
|
||||||
//@expected_size Expected size of the generated file, in bytes; 0 if unknown
|
//@expected_size Expected size of the generated file, in bytes; pass 0 if unknown
|
||||||
inputFileGenerated original_path:string conversion:string expected_size:int53 = InputFile;
|
inputFileGenerated original_path:string conversion:string expected_size:int53 = InputFile;
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -400,7 +400,7 @@ animation duration:int32 width:int32 height:int32 file_name:string mime_type:str
|
||||||
//@file_name Original name of the file; as defined by the sender
|
//@file_name Original name of the file; as defined by the sender
|
||||||
//@mime_type The MIME type of the file; as defined by the sender
|
//@mime_type The MIME type of the file; as defined by the sender
|
||||||
//@album_cover_minithumbnail The minithumbnail of the album cover; may be null
|
//@album_cover_minithumbnail The minithumbnail of the album cover; may be null
|
||||||
//@album_cover_thumbnail The thumbnail of the album cover in JPEG format; as defined by the sender. The full size thumbnail is supposed to be extracted from the downloaded audio file; may be null
|
//@album_cover_thumbnail The thumbnail of the album cover in JPEG format; as defined by the sender. The full size thumbnail is expected to be extracted from the downloaded audio file; may be null
|
||||||
//@external_album_covers Album cover variants to use if the downloaded audio file contains no album cover. Provided thumbnail dimensions are approximate
|
//@external_album_covers Album cover variants to use if the downloaded audio file contains no album cover. Provided thumbnail dimensions are approximate
|
||||||
//@audio File containing the audio
|
//@audio File containing the audio
|
||||||
audio duration:int32 title:string performer:string file_name:string mime_type:string album_cover_minithumbnail:minithumbnail album_cover_thumbnail:thumbnail external_album_covers:vector<thumbnail> audio:file = Audio;
|
audio duration:int32 title:string performer:string file_name:string mime_type:string album_cover_minithumbnail:minithumbnail album_cover_thumbnail:thumbnail external_album_covers:vector<thumbnail> audio:file = Audio;
|
||||||
|
|
@ -439,7 +439,7 @@ sticker id:int64 set_id:int64 width:int32 height:int32 emoji:string format:Stick
|
||||||
//@file_name Original name of the file; as defined by the sender
|
//@file_name Original name of the file; as defined by the sender
|
||||||
//@mime_type MIME type of the file; as defined by the sender
|
//@mime_type MIME type of the file; as defined by the sender
|
||||||
//@has_stickers True, if stickers were added to the video. The list of corresponding sticker sets can be received using getAttachedStickerSets
|
//@has_stickers True, if stickers were added to the video. The list of corresponding sticker sets can be received using getAttachedStickerSets
|
||||||
//@supports_streaming True, if the video is supposed to be streamed
|
//@supports_streaming True, if the video is expected to be streamed
|
||||||
//@minithumbnail Video minithumbnail; may be null
|
//@minithumbnail Video minithumbnail; may be null
|
||||||
//@thumbnail Video thumbnail in JPEG or MPEG4 format; as defined by the sender; may be null
|
//@thumbnail Video thumbnail in JPEG or MPEG4 format; as defined by the sender; may be null
|
||||||
//@video File containing the video
|
//@video File containing the video
|
||||||
|
|
@ -526,6 +526,15 @@ webApp short_name:string title:string description:string photo:photo animation:a
|
||||||
poll id:int64 question:formattedText options:vector<pollOption> total_voter_count:int32 recent_voter_ids:vector<MessageSender> is_anonymous:Bool type:PollType open_period:int32 close_date:int32 is_closed:Bool = Poll;
|
poll id:int64 question:formattedText options:vector<pollOption> total_voter_count:int32 recent_voter_ids:vector<MessageSender> is_anonymous:Bool type:PollType open_period:int32 close_date:int32 is_closed:Bool = Poll;
|
||||||
|
|
||||||
|
|
||||||
|
//@description Describes an alternative reencoded quality of a video file
|
||||||
|
//@width Video width
|
||||||
|
//@height Video height
|
||||||
|
//@codec Codec used for video file encoding, for example, "h264", "h265", or "av1"
|
||||||
|
//@hls_file HLS file describing the video
|
||||||
|
//@video File containing the video
|
||||||
|
alternativeVideo width:int32 height:int32 codec:string hls_file:file video:file = AlternativeVideo;
|
||||||
|
|
||||||
|
|
||||||
//@description Describes a chat background
|
//@description Describes a chat background
|
||||||
//@id Unique background identifier
|
//@id Unique background identifier
|
||||||
//@is_default True, if this is one of default backgrounds
|
//@is_default True, if this is one of default backgrounds
|
||||||
|
|
@ -837,7 +846,7 @@ productInfo title:string description:formattedText photo:photo = ProductInfo;
|
||||||
//@currency ISO 4217 currency code for Telegram Premium subscription payment
|
//@currency ISO 4217 currency code for Telegram Premium subscription payment
|
||||||
//@amount The amount to pay, in the smallest units of the currency
|
//@amount The amount to pay, in the smallest units of the currency
|
||||||
//@discount_percentage The discount associated with this option, as a percentage
|
//@discount_percentage The discount associated with this option, as a percentage
|
||||||
//@month_count Number of months the Telegram Premium subscription will be active
|
//@month_count Number of months the Telegram Premium subscription will be active. Use getPremiumInfoSticker to get the sticker to be used as representation of the Telegram Premium subscription
|
||||||
//@store_product_id Identifier of the store product associated with the option
|
//@store_product_id Identifier of the store product associated with the option
|
||||||
//@payment_link An internal link to be opened for buying Telegram Premium to the user if store payment isn't possible; may be null if direct payment isn't available
|
//@payment_link An internal link to be opened for buying Telegram Premium to the user if store payment isn't possible; may be null if direct payment isn't available
|
||||||
premiumPaymentOption currency:string amount:int53 discount_percentage:int32 month_count:int32 store_product_id:string payment_link:InternalLinkType = PremiumPaymentOption;
|
premiumPaymentOption currency:string amount:int53 discount_percentage:int32 month_count:int32 store_product_id:string payment_link:InternalLinkType = PremiumPaymentOption;
|
||||||
|
|
@ -902,6 +911,35 @@ starGiveawayPaymentOption currency:string amount:int53 star_count:int53 store_pr
|
||||||
//@description Contains a list of options for creating Telegram Star giveaway @options The list of options
|
//@description Contains a list of options for creating Telegram Star giveaway @options The list of options
|
||||||
starGiveawayPaymentOptions options:vector<starGiveawayPaymentOption> = StarGiveawayPaymentOptions;
|
starGiveawayPaymentOptions options:vector<starGiveawayPaymentOption> = StarGiveawayPaymentOptions;
|
||||||
|
|
||||||
|
//@description Describes a gift that can be sent to another user
|
||||||
|
//@id Unique identifier of the gift
|
||||||
|
//@sticker The sticker representing 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
|
||||||
|
//@remaining_count Number of remaining 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;
|
||||||
|
|
||||||
|
//@description Contains a list of gifts that can be sent to another user @gifts The list of gifts
|
||||||
|
gifts gifts:vector<gift> = Gifts;
|
||||||
|
|
||||||
|
//@description Represents a gift received by a user
|
||||||
|
//@sender_user_id Identifier of the user that sent the gift; 0 if unknown
|
||||||
|
//@text Message added to the gift
|
||||||
|
//@is_private True, if the sender and gift text are shown only to the gift receiver; otherwise, everyone are able to see them
|
||||||
|
//@is_saved True, if the gift is displayed on the user's profile page; may be false only for the receiver of the gift
|
||||||
|
//@date Point in time (Unix timestamp) when the gift was sent
|
||||||
|
//@gift The gift
|
||||||
|
//@message_id Identifier of the message with the gift in the chat with the sender of the gift; can be 0 or an identifier of a deleted message; only for the gift receiver
|
||||||
|
//@sell_star_count Number of Telegram Stars that can be claimed by the receiver instead of the gift; only for the gift receiver
|
||||||
|
userGift sender_user_id:int53 text:formattedText is_private:Bool is_saved:Bool date:int32 gift:gift message_id:int53 sell_star_count:int53 = UserGift;
|
||||||
|
|
||||||
|
//@description Represents a list of gifts received by a user
|
||||||
|
//@total_count The total number of received gifts
|
||||||
|
//@gifts The list of gifts
|
||||||
|
//@next_offset The offset for the next request. If empty, then there are no more results
|
||||||
|
userGifts total_count:int32 gifts:vector<userGift> next_offset:string = UserGifts;
|
||||||
|
|
||||||
|
|
||||||
//@class StarTransactionDirection @description Describes direction of a transaction with Telegram Stars
|
//@class StarTransactionDirection @description Describes direction of a transaction with Telegram Stars
|
||||||
|
|
||||||
|
|
@ -942,6 +980,18 @@ chatTransactionPurposeReaction message_id:int53 = ChatTransactionPurpose;
|
||||||
chatTransactionPurposeGiveaway giveaway_message_id:int53 = ChatTransactionPurpose;
|
chatTransactionPurposeGiveaway giveaway_message_id:int53 = ChatTransactionPurpose;
|
||||||
|
|
||||||
|
|
||||||
|
//@class UserTransactionPurpose @description Describes purpose of a transaction with a user
|
||||||
|
|
||||||
|
//@description A user gifted Telegram Stars @sticker A sticker to be shown in the transaction information; may be null if unknown
|
||||||
|
userTransactionPurposeGiftedStars sticker:sticker = UserTransactionPurpose;
|
||||||
|
|
||||||
|
//@description The current user sold a gift received from another user @gift The gift
|
||||||
|
userTransactionPurposeGiftSell gift:gift = UserTransactionPurpose;
|
||||||
|
|
||||||
|
//@description The current user sent a gift to another user @gift The gift
|
||||||
|
userTransactionPurposeGiftSend gift:gift = UserTransactionPurpose;
|
||||||
|
|
||||||
|
|
||||||
//@class StarTransactionPartner @description Describes source or recipient of a transaction with Telegram Stars
|
//@class StarTransactionPartner @description Describes source or recipient of a transaction with Telegram Stars
|
||||||
|
|
||||||
//@description The transaction is a transaction with Telegram through a bot
|
//@description The transaction is a transaction with Telegram through a bot
|
||||||
|
|
@ -968,10 +1018,8 @@ starTransactionPartnerBusiness user_id:int53 media:vector<PaidMedia> = StarTrans
|
||||||
//@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 gift of Telegram Stars from another user
|
//@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
|
||||||
//@user_id Identifier of the user; 0 if the gift was anonymous
|
starTransactionPartnerUser user_id:int53 purpose:UserTransactionPurpose = StarTransactionPartner;
|
||||||
//@sticker A sticker to be shown in the transaction information; may be null if unknown
|
|
||||||
starTransactionPartnerUser user_id:int53 sticker:sticker = StarTransactionPartner;
|
|
||||||
|
|
||||||
//@description The transaction is a transaction with unknown partner
|
//@description The transaction is a transaction with unknown partner
|
||||||
starTransactionPartnerUnsupported = StarTransactionPartner;
|
starTransactionPartnerUnsupported = StarTransactionPartner;
|
||||||
|
|
@ -1023,7 +1071,7 @@ giveawayInfoOngoing creation_date:int32 status:GiveawayParticipantStatus is_ende
|
||||||
//@creation_date Point in time (Unix timestamp) when the giveaway was created
|
//@creation_date Point in time (Unix timestamp) when the giveaway was created
|
||||||
//@actual_winners_selection_date Point in time (Unix timestamp) when the winners were selected. May be bigger than winners selection date specified in parameters of the giveaway
|
//@actual_winners_selection_date Point in time (Unix timestamp) when the winners were selected. May be bigger than winners selection date specified in parameters of the giveaway
|
||||||
//@was_refunded True, if the giveaway was canceled and was fully refunded
|
//@was_refunded True, if the giveaway was canceled and was fully refunded
|
||||||
//@is_winner True, if the cuurent user is a winner of the giveaway
|
//@is_winner True, if the current user is a winner of the giveaway
|
||||||
//@winner_count Number of winners in the giveaway
|
//@winner_count Number of winners in the giveaway
|
||||||
//@activation_count Number of winners, which activated their gift codes; for Telegram Premium giveaways only
|
//@activation_count Number of winners, which activated their gift codes; for Telegram Premium giveaways only
|
||||||
//@gift_code Telegram Premium gift code that was received by the current user; empty if the user isn't a winner in the giveaway or the giveaway isn't a Telegram Premium giveaway
|
//@gift_code Telegram Premium gift code that was received by the current user; empty if the user isn't a winner in the giveaway or the giveaway isn't a Telegram Premium giveaway
|
||||||
|
|
@ -1149,10 +1197,11 @@ botInfo short_description:string description:string photo:photo animation:animat
|
||||||
//@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
|
//@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
|
||||||
//@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> 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 premium_gift_options:vector<premiumPaymentOption> 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;
|
||||||
|
|
@ -1555,7 +1604,7 @@ reactionTypePaid = ReactionType;
|
||||||
//@description Contains information about a user that added paid reactions
|
//@description Contains information about a user that added paid reactions
|
||||||
//@sender_id Identifier of the user or chat that added the reactions; may be null for anonymous reactors that aren't the current user
|
//@sender_id Identifier of the user or chat that added the reactions; may be null for anonymous reactors that aren't the current user
|
||||||
//@star_count Number of Telegram Stars added
|
//@star_count Number of Telegram Stars added
|
||||||
//@is_top True, if the reactor is one of the most active reactors; can be false if the reactor is the current user
|
//@is_top True, if the reactor is one of the most active reactors; may be false if the reactor is the current user
|
||||||
//@is_me True, if the paid reaction was added by the current user
|
//@is_me True, if the paid reaction was added by the current user
|
||||||
//@is_anonymous True, if the reactor is anonymous
|
//@is_anonymous True, if the reactor is anonymous
|
||||||
paidReactor sender_id:MessageSender star_count:int32 is_top:Bool is_me:Bool is_anonymous:Bool = PaidReactor;
|
paidReactor sender_id:MessageSender star_count:int32 is_top:Bool is_me:Bool is_anonymous:Bool = PaidReactor;
|
||||||
|
|
@ -1706,7 +1755,7 @@ factCheck text:formattedText country_code:string = FactCheck;
|
||||||
//@is_outgoing True, if the message is outgoing
|
//@is_outgoing True, if the message is outgoing
|
||||||
//@is_pinned True, if the message is pinned
|
//@is_pinned True, if the message is pinned
|
||||||
//@is_from_offline True, if the message was sent because of a scheduled action by the message sender, for example, as away, or greeting service message
|
//@is_from_offline True, if the message was sent because of a scheduled action by the message sender, for example, as away, or greeting service message
|
||||||
//@can_be_saved True, if content of the message can be saved locally or copied
|
//@can_be_saved True, if content of the message can be saved locally or copied using inputMessageForwarded or forwardMessages with copy options
|
||||||
//@has_timestamped_media True, if media timestamp entities refers to a media in this message as opposed to a media in the replied message
|
//@has_timestamped_media True, if media timestamp entities refers to a media in this message as opposed to a media in the replied message
|
||||||
//@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
|
||||||
|
|
@ -1809,7 +1858,7 @@ messageSponsor url:string photo:photo info:string = MessageSponsor;
|
||||||
//@message_id Message identifier; unique for the chat to which the sponsored message belongs among both ordinary and sponsored messages
|
//@message_id Message identifier; unique for the chat to which the sponsored message belongs among both ordinary and sponsored messages
|
||||||
//@is_recommended True, if the message needs to be labeled as "recommended" instead of "sponsored"
|
//@is_recommended True, if the message needs to be labeled as "recommended" instead of "sponsored"
|
||||||
//@can_be_reported True, if the message can be reported to Telegram moderators through reportChatSponsoredMessage
|
//@can_be_reported True, if the message can be reported to Telegram moderators through reportChatSponsoredMessage
|
||||||
//@content Content of the message. Currently, can be only of the types messageText, messageAnimation, messagePhoto, or messageVideo
|
//@content Content of the message. Currently, can be only of the types messageText, messageAnimation, messagePhoto, or messageVideo. Video messages can be viewed fullscreen
|
||||||
//@sponsor Information about the sponsor of the message
|
//@sponsor Information about the sponsor of the message
|
||||||
//@title Title of the sponsored message
|
//@title Title of the sponsored message
|
||||||
//@button_text Text for the message action button
|
//@button_text Text for the message action button
|
||||||
|
|
@ -1821,8 +1870,9 @@ sponsoredMessage message_id:int53 is_recommended:Bool can_be_reported:Bool conte
|
||||||
//@description Contains a list of sponsored messages @messages List of sponsored messages @messages_between The minimum number of messages between shown sponsored messages, or 0 if only one sponsored message must be shown after all ordinary messages
|
//@description Contains a list of sponsored messages @messages List of sponsored messages @messages_between The minimum number of messages between shown sponsored messages, or 0 if only one sponsored message must be shown after all ordinary messages
|
||||||
sponsoredMessages messages:vector<sponsoredMessage> messages_between:int32 = SponsoredMessages;
|
sponsoredMessages messages:vector<sponsoredMessage> messages_between:int32 = SponsoredMessages;
|
||||||
|
|
||||||
//@description Describes an option to report a sponsored message @id Unique identifier of the option @text Text of the option
|
|
||||||
reportChatSponsoredMessageOption id:bytes text:string = ReportChatSponsoredMessageOption;
|
//@description Describes an option to report an entity to Telegram @id Unique identifier of the option @text Text of the option
|
||||||
|
reportOption id:bytes text:string = ReportOption;
|
||||||
|
|
||||||
|
|
||||||
//@class ReportChatSponsoredMessageResult @description Describes result of sponsored message report
|
//@class ReportChatSponsoredMessageResult @description Describes result of sponsored message report
|
||||||
|
|
@ -1834,7 +1884,7 @@ reportChatSponsoredMessageResultOk = ReportChatSponsoredMessageResult;
|
||||||
reportChatSponsoredMessageResultFailed = ReportChatSponsoredMessageResult;
|
reportChatSponsoredMessageResultFailed = ReportChatSponsoredMessageResult;
|
||||||
|
|
||||||
//@description The user must choose an option to report the message and repeat request with the chosen option @title Title for the option choice @options List of available options
|
//@description The user must choose an option to report the message and repeat request with the chosen option @title Title for the option choice @options List of available options
|
||||||
reportChatSponsoredMessageResultOptionRequired title:string options:vector<reportChatSponsoredMessageOption> = ReportChatSponsoredMessageResult;
|
reportChatSponsoredMessageResultOptionRequired title:string options:vector<reportOption> = ReportChatSponsoredMessageResult;
|
||||||
|
|
||||||
//@description Sponsored messages were hidden for the user in all chats
|
//@description Sponsored messages were hidden for the user in all chats
|
||||||
reportChatSponsoredMessageResultAdsHidden = ReportChatSponsoredMessageResult;
|
reportChatSponsoredMessageResultAdsHidden = ReportChatSponsoredMessageResult;
|
||||||
|
|
@ -2265,6 +2315,9 @@ inlineKeyboardButtonTypeBuy = InlineKeyboardButtonType;
|
||||||
//@description A button with a user reference to be handled in the same way as textEntityTypeMentionName entities @user_id User identifier
|
//@description A button with a user reference to be handled in the same way as textEntityTypeMentionName entities @user_id User identifier
|
||||||
inlineKeyboardButtonTypeUser user_id:int53 = InlineKeyboardButtonType;
|
inlineKeyboardButtonTypeUser user_id:int53 = InlineKeyboardButtonType;
|
||||||
|
|
||||||
|
//@description A button that copies specified text to clipboard @text The text to copy to clipboard
|
||||||
|
inlineKeyboardButtonTypeCopyText text:string = InlineKeyboardButtonType;
|
||||||
|
|
||||||
|
|
||||||
//@description Represents a single button in an inline keyboard @text Text of the button @type Type of the button
|
//@description Represents a single button in an inline keyboard @text Text of the button @type Type of the button
|
||||||
inlineKeyboardButton text:string type:InlineKeyboardButtonType = InlineKeyboardButton;
|
inlineKeyboardButton text:string type:InlineKeyboardButtonType = InlineKeyboardButton;
|
||||||
|
|
@ -2283,7 +2336,7 @@ replyMarkupForceReply is_personal:Bool input_field_placeholder:string = ReplyMar
|
||||||
|
|
||||||
//@description Contains a custom keyboard layout to quickly reply to bots
|
//@description Contains a custom keyboard layout to quickly reply to bots
|
||||||
//@rows A list of rows of bot keyboard buttons
|
//@rows A list of rows of bot keyboard buttons
|
||||||
//@is_persistent True, if the keyboard is supposed to always be shown when the ordinary keyboard is hidden
|
//@is_persistent True, if the keyboard is expected to always be shown when the ordinary keyboard is hidden
|
||||||
//@resize_keyboard True, if the application needs to resize the keyboard vertically
|
//@resize_keyboard True, if the application needs to resize the keyboard vertically
|
||||||
//@one_time True, if the application needs to hide the keyboard after use
|
//@one_time True, if the application needs to hide the keyboard after use
|
||||||
//@is_personal True, if the keyboard must automatically be shown to the current user. For outgoing messages, specify true to show the keyboard only for the mentioned users and for the target user of a reply
|
//@is_personal True, if the keyboard must automatically be shown to the current user. For outgoing messages, specify true to show the keyboard only for the mentioned users and for the target user of a reply
|
||||||
|
|
@ -3412,11 +3465,12 @@ messageSticker sticker:sticker is_premium:Bool = MessageContent;
|
||||||
|
|
||||||
//@description A video message
|
//@description A video message
|
||||||
//@video The video description
|
//@video The video description
|
||||||
|
//@alternative_videos Alternative qualities of the video
|
||||||
//@caption Video caption
|
//@caption Video caption
|
||||||
//@show_caption_above_media True, if the caption must be shown above the video; otherwise, the caption must be shown below the video
|
//@show_caption_above_media True, if the caption must be shown above the video; otherwise, the caption must be shown below the video
|
||||||
//@has_spoiler True, if the video preview must be covered by a spoiler animation
|
//@has_spoiler True, if the video preview must be covered by a spoiler animation
|
||||||
//@is_secret True, if the video thumbnail must be blurred and the video must be shown only while tapped
|
//@is_secret True, if the video thumbnail must be blurred and the video must be shown only while tapped
|
||||||
messageVideo video:video caption:formattedText show_caption_above_media:Bool has_spoiler:Bool is_secret:Bool = MessageContent;
|
messageVideo video:video alternative_videos:vector<alternativeVideo> caption:formattedText show_caption_above_media:Bool has_spoiler:Bool is_secret:Bool = MessageContent;
|
||||||
|
|
||||||
//@description A video note message @video_note The video note description @is_viewed True, if at least one of the recipients has viewed the video note @is_secret True, if the video note thumbnail must be blurred and the video note must be shown only while tapped
|
//@description A video note message @video_note The video note description @is_viewed True, if at least one of the recipients has viewed the video note @is_secret True, if the video note thumbnail must be blurred and the video note must be shown only while tapped
|
||||||
messageVideoNote video_note:videoNote is_viewed:Bool is_secret:Bool = MessageContent;
|
messageVideoNote video_note:videoNote is_viewed:Bool is_secret:Bool = MessageContent;
|
||||||
|
|
@ -3488,7 +3542,7 @@ messageInvoice product_info:productInfo currency:string total_amount:int53 start
|
||||||
//@description A message with information about an ended call @is_video True, if the call was a video call @discard_reason Reason why the call was discarded @duration Call duration, in seconds
|
//@description A message with information about an ended call @is_video True, if the call was a video call @discard_reason Reason why the call was discarded @duration Call duration, in seconds
|
||||||
messageCall is_video:Bool discard_reason:CallDiscardReason duration:int32 = MessageContent;
|
messageCall is_video:Bool discard_reason:CallDiscardReason duration:int32 = MessageContent;
|
||||||
|
|
||||||
//@description A new video chat was scheduled @group_call_id Identifier of the video chat. The video chat can be received through the method getGroupCall @start_date Point in time (Unix timestamp) when the group call is supposed to be started by an administrator
|
//@description A new video chat was scheduled @group_call_id Identifier of the video chat. The video chat can be received through the method getGroupCall @start_date Point in time (Unix timestamp) when the group call is expected to be started by an administrator
|
||||||
messageVideoChatScheduled group_call_id:int32 start_date:int32 = MessageContent;
|
messageVideoChatScheduled group_call_id:int32 start_date:int32 = MessageContent;
|
||||||
|
|
||||||
//@description A newly created video chat @group_call_id Identifier of the video chat. The video chat can be received through the method getGroupCall
|
//@description A newly created video chat @group_call_id Identifier of the video chat. The video chat can be received through the method getGroupCall
|
||||||
|
|
@ -3677,7 +3731,7 @@ messageGiveawayWinners boosted_chat_id:int53 giveaway_message_id:int53 additiona
|
||||||
//@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
|
||||||
messageGiftedStars gifter_user_id:int53 receiver_user_id:int53 currency:string amount:int53 cryptocurrency:string cryptocurrency_amount:int64 star_count:int53 transaction_id:string sticker:sticker = MessageContent;
|
messageGiftedStars gifter_user_id:int53 receiver_user_id:int53 currency:string amount:int53 cryptocurrency:string cryptocurrency_amount:int64 star_count:int53 transaction_id:string sticker:sticker = MessageContent;
|
||||||
|
|
||||||
//@description A Telegram Stars were received by the cuurent user from a giveaway
|
//@description A Telegram Stars were received by the current user from a giveaway
|
||||||
//@star_count Number of Telegram Stars that were received
|
//@star_count Number of Telegram Stars that were received
|
||||||
//@transaction_id Identifier of the transaction for Telegram Stars credit
|
//@transaction_id Identifier of the transaction for Telegram Stars credit
|
||||||
//@boosted_chat_id Identifier of the supergroup or channel chat, which was automatically boosted by the winners of the giveaway
|
//@boosted_chat_id Identifier of the supergroup or channel chat, which was automatically boosted by the winners of the giveaway
|
||||||
|
|
@ -3686,6 +3740,15 @@ messageGiftedStars gifter_user_id:int53 receiver_user_id:int53 currency:string a
|
||||||
//@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
|
||||||
messageGiveawayPrizeStars star_count:int53 transaction_id:string boosted_chat_id:int53 giveaway_message_id:int53 is_unclaimed:Bool sticker:sticker = MessageContent;
|
messageGiveawayPrizeStars star_count:int53 transaction_id:string boosted_chat_id:int53 giveaway_message_id:int53 is_unclaimed:Bool sticker:sticker = MessageContent;
|
||||||
|
|
||||||
|
//@description A gift was received or sent by the current user
|
||||||
|
//@gift The gift
|
||||||
|
//@text Message added to the gift
|
||||||
|
//@sell_star_count Number of Telegram Stars that can be claimed by the receiver instead of the gift
|
||||||
|
//@is_private True, if the sender and gift text are shown only to the gift receiver; otherwise, everyone will be able to see them
|
||||||
|
//@is_saved True, if the gift is displayed on the user's profile page; only for the receiver of the gift
|
||||||
|
//@was_converted True, if the gift was converted to Telegram Stars; only for the receiver of the gift
|
||||||
|
messageGift gift:gift text:formattedText sell_star_count:int53 is_private:Bool is_saved:Bool was_converted:Bool = MessageContent;
|
||||||
|
|
||||||
//@description A contact has registered with Telegram
|
//@description A contact has registered with Telegram
|
||||||
messageContactRegistered = MessageContent;
|
messageContactRegistered = MessageContent;
|
||||||
|
|
||||||
|
|
@ -3800,7 +3863,7 @@ inputPaidMediaTypePhoto = InputPaidMediaType;
|
||||||
|
|
||||||
//@description The media is a video
|
//@description The media is a video
|
||||||
//@duration Duration of the video, in seconds
|
//@duration Duration of the video, in seconds
|
||||||
//@supports_streaming True, if the video is supposed to be streamed
|
//@supports_streaming True, if the video is expected to be streamed
|
||||||
inputPaidMediaTypeVideo duration:int32 supports_streaming:Bool = InputPaidMediaType;
|
inputPaidMediaTypeVideo duration:int32 supports_streaming:Bool = InputPaidMediaType;
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -3847,7 +3910,7 @@ messageSendOptions disable_notification:Bool from_background:Bool protect_conten
|
||||||
//@send_copy True, if content of the message needs to be copied without reference to the original sender. Always true if the message is forwarded to a secret chat or is local
|
//@send_copy True, if content of the message needs to be copied without reference to the original sender. Always true if the message is forwarded to a secret chat or is local
|
||||||
//@replace_caption True, if media caption of the message copy needs to be replaced. Ignored if send_copy is false
|
//@replace_caption True, if media caption of the message copy needs to be replaced. Ignored if send_copy is false
|
||||||
//@new_caption New message caption; pass null to copy message without caption. Ignored if replace_caption is false
|
//@new_caption New message caption; pass null to copy message without caption. Ignored if replace_caption is false
|
||||||
//@new_show_caption_above_media True, if new caption must be shown above the animation; otherwise, new caption must be shown below the animation; 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
|
||||||
messageCopyOptions send_copy:Bool replace_caption:Bool new_caption:formattedText new_show_caption_above_media:Bool = MessageCopyOptions;
|
messageCopyOptions send_copy:Bool replace_caption:Bool new_caption:formattedText new_show_caption_above_media:Bool = MessageCopyOptions;
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -3892,7 +3955,7 @@ inputMessageDocument document:InputFile thumbnail:inputThumbnail disable_content
|
||||||
//@star_count The number of Telegram Stars that must be paid to see the media; 1-getOption("paid_media_message_star_count_max")
|
//@star_count The number of Telegram Stars that must be paid to see the media; 1-getOption("paid_media_message_star_count_max")
|
||||||
//@paid_media The content of the paid media
|
//@paid_media The content of the paid media
|
||||||
//@caption Message caption; pass null to use an empty caption; 0-getOption("message_caption_length_max") characters
|
//@caption Message caption; pass null to use an empty caption; 0-getOption("message_caption_length_max") characters
|
||||||
//@show_caption_above_media True, if the caption must be shown above the video; otherwise, the caption must be shown below the video; not supported in secret chats
|
//@show_caption_above_media True, if the caption must be shown above the media; otherwise, the caption must be shown below the media; not supported in secret chats
|
||||||
//@payload Bot-provided data for the paid media; bots only
|
//@payload Bot-provided data for the paid media; bots only
|
||||||
inputMessagePaidMedia star_count:int53 paid_media:vector<inputPaidMedia> caption:formattedText show_caption_above_media:Bool payload:string = InputMessageContent;
|
inputMessagePaidMedia star_count:int53 paid_media:vector<inputPaidMedia> caption:formattedText show_caption_above_media:Bool payload:string = InputMessageContent;
|
||||||
|
|
||||||
|
|
@ -3917,13 +3980,13 @@ inputMessagePhoto photo:InputFile thumbnail:inputThumbnail added_sticker_file_id
|
||||||
inputMessageSticker sticker:InputFile thumbnail:inputThumbnail width:int32 height:int32 emoji:string = InputMessageContent;
|
inputMessageSticker sticker:InputFile thumbnail:inputThumbnail width:int32 height:int32 emoji:string = InputMessageContent;
|
||||||
|
|
||||||
//@description A video message
|
//@description A video message
|
||||||
//@video Video to be sent
|
//@video Video to be sent. The video is expected to be reencoded to MPEG4 format with H.264 codec by the sender
|
||||||
//@thumbnail Video thumbnail; pass null to skip thumbnail uploading
|
//@thumbnail Video thumbnail; pass null to skip thumbnail uploading
|
||||||
//@added_sticker_file_ids File identifiers of the stickers added to the video, if applicable
|
//@added_sticker_file_ids File identifiers of the stickers added to the video, if applicable
|
||||||
//@duration Duration of the video, in seconds
|
//@duration Duration of the video, in seconds
|
||||||
//@width Video width
|
//@width Video width
|
||||||
//@height Video height
|
//@height Video height
|
||||||
//@supports_streaming True, if the video is supposed to be streamed
|
//@supports_streaming True, if the video is expected to be streamed
|
||||||
//@caption Video caption; pass null to use an empty caption; 0-getOption("message_caption_length_max") characters
|
//@caption Video caption; pass null to use an empty caption; 0-getOption("message_caption_length_max") characters
|
||||||
//@show_caption_above_media True, if the caption must be shown above the video; otherwise, the caption must be shown below the video; not supported in secret chats
|
//@show_caption_above_media True, if the caption must be shown above the video; otherwise, the caption must be shown below the video; not supported in secret chats
|
||||||
//@self_destruct_type Video self-destruct type; pass null if none; private chats only
|
//@self_destruct_type Video self-destruct type; pass null if none; private chats only
|
||||||
|
|
@ -4354,7 +4417,7 @@ inputStoryAreas areas:vector<inputStoryArea> = InputStoryAreas;
|
||||||
//@is_animation True, if the video has no sound
|
//@is_animation True, if the video has no sound
|
||||||
//@minithumbnail Video minithumbnail; may be null
|
//@minithumbnail Video minithumbnail; may be null
|
||||||
//@thumbnail Video thumbnail in JPEG or MPEG4 format; may be null
|
//@thumbnail Video thumbnail in JPEG or MPEG4 format; may be null
|
||||||
//@preload_prefix_size Size of file prefix, which is supposed to be preloaded, in bytes
|
//@preload_prefix_size Size of file prefix, which is expected to be preloaded, in bytes
|
||||||
//@cover_frame_timestamp Timestamp of the frame used as video thumbnail
|
//@cover_frame_timestamp Timestamp of the frame used as video thumbnail
|
||||||
//@video File containing the video
|
//@video File containing the video
|
||||||
storyVideo duration:double width:int32 height:int32 has_stickers:Bool is_animation:Bool minithumbnail:minithumbnail thumbnail:thumbnail preload_prefix_size:int32 cover_frame_timestamp:double video:file = StoryVideo;
|
storyVideo duration:double width:int32 height:int32 has_stickers:Bool is_animation:Bool minithumbnail:minithumbnail thumbnail:thumbnail preload_prefix_size:int32 cover_frame_timestamp:double video:file = StoryVideo;
|
||||||
|
|
@ -4365,7 +4428,7 @@ storyVideo duration:double width:int32 height:int32 has_stickers:Bool is_animati
|
||||||
//@description A photo story @photo The photo
|
//@description A photo story @photo The photo
|
||||||
storyContentPhoto photo:photo = StoryContent;
|
storyContentPhoto photo:photo = StoryContent;
|
||||||
|
|
||||||
//@description A video story @video The video in MPEG4 format @alternative_video Alternative version of the video in MPEG4 format, encoded by x264 codec; may be null
|
//@description A video story @video The video in MPEG4 format @alternative_video Alternative version of the video in MPEG4 format, encoded with H.264 codec; may be null
|
||||||
storyContentVideo video:storyVideo alternative_video:storyVideo = StoryContent;
|
storyContentVideo video:storyVideo alternative_video:storyVideo = StoryContent;
|
||||||
|
|
||||||
//@description A story content that is not supported in the current TDLib version
|
//@description A story content that is not supported in the current TDLib version
|
||||||
|
|
@ -4380,7 +4443,7 @@ storyContentUnsupported = StoryContent;
|
||||||
inputStoryContentPhoto photo:InputFile added_sticker_file_ids:vector<int32> = InputStoryContent;
|
inputStoryContentPhoto photo:InputFile added_sticker_file_ids:vector<int32> = InputStoryContent;
|
||||||
|
|
||||||
//@description A video story
|
//@description A video story
|
||||||
//@video Video to be sent. The video size must be 720x1280. The video must be streamable and stored in MPEG4 format, after encoding with x265 codec and key frames added each second
|
//@video Video to be sent. The video size must be 720x1280. The video must be streamable and stored in MPEG4 format, after encoding with H.265 codec and key frames added each second
|
||||||
//@added_sticker_file_ids File identifiers of the stickers added to the video, if applicable
|
//@added_sticker_file_ids File identifiers of the stickers added to the video, if applicable
|
||||||
//@duration Precise duration of the video, in seconds; 0-60
|
//@duration Precise duration of the video, in seconds; 0-60
|
||||||
//@cover_frame_timestamp Timestamp of the frame, which will be used as video thumbnail
|
//@cover_frame_timestamp Timestamp of the frame, which will be used as video thumbnail
|
||||||
|
|
@ -4780,7 +4843,7 @@ groupCallRecentSpeaker participant_id:MessageSender is_speaking:Bool = GroupCall
|
||||||
//@description Describes a group call
|
//@description Describes a group call
|
||||||
//@id Group call identifier
|
//@id Group call identifier
|
||||||
//@title Group call title
|
//@title Group call title
|
||||||
//@scheduled_start_date Point in time (Unix timestamp) when the group call is supposed to be started by an administrator; 0 if it is already active or was ended
|
//@scheduled_start_date Point in time (Unix timestamp) when the group call is expected to be started by an administrator; 0 if it is already active or was ended
|
||||||
//@enabled_start_notification True, if the group call is scheduled and the current user will receive a notification when the group call starts
|
//@enabled_start_notification True, if the group call is scheduled and the current user will receive a notification when the group call starts
|
||||||
//@is_active True, if the call is active
|
//@is_active True, if the call is active
|
||||||
//@is_rtmp_stream True, if the chat is an RTMP stream instead of an ordinary video chat
|
//@is_rtmp_stream True, if the chat is an RTMP stream instead of an ordinary video chat
|
||||||
|
|
@ -6137,6 +6200,9 @@ pushMessageContentPremiumGiftCode month_count:int32 = PushMessageContent;
|
||||||
//@is_pinned True, if the message is a pinned message with the specified content
|
//@is_pinned True, if the message is a pinned message with the specified content
|
||||||
pushMessageContentGiveaway winner_count:int32 prize:GiveawayPrize is_pinned:Bool = PushMessageContent;
|
pushMessageContentGiveaway winner_count:int32 prize:GiveawayPrize is_pinned:Bool = PushMessageContent;
|
||||||
|
|
||||||
|
//@description A message with a gift @star_count Number of Telegram Stars that sender paid for the gift
|
||||||
|
pushMessageContentGift star_count:int53 = PushMessageContent;
|
||||||
|
|
||||||
//@description A screenshot of a message in the chat has been taken
|
//@description A screenshot of a message in the chat has been taken
|
||||||
pushMessageContentScreenshotTaken = PushMessageContent;
|
pushMessageContentScreenshotTaken = PushMessageContent;
|
||||||
|
|
||||||
|
|
@ -6567,6 +6633,33 @@ reportReasonPersonalDetails = ReportReason;
|
||||||
reportReasonCustom = ReportReason;
|
reportReasonCustom = ReportReason;
|
||||||
|
|
||||||
|
|
||||||
|
//@class ReportChatResult @description Describes result of chat report
|
||||||
|
|
||||||
|
//@description The chat was reported successfully
|
||||||
|
reportChatResultOk = ReportChatResult;
|
||||||
|
|
||||||
|
//@description The user must choose an option to report the chat and repeat request with the chosen option @title Title for the option choice @options List of available options
|
||||||
|
reportChatResultOptionRequired title:string options:vector<reportOption> = ReportChatResult;
|
||||||
|
|
||||||
|
//@description The user must add additional text details to the report @option_id Option identifier for the next reportChat request @is_optional True, if the user can skip text adding
|
||||||
|
reportChatResultTextRequired option_id:bytes is_optional:Bool = ReportChatResult;
|
||||||
|
|
||||||
|
//@description The user must choose messages to report and repeat the reportChat request with the chosen messages
|
||||||
|
reportChatResultMessagesRequired = ReportChatResult;
|
||||||
|
|
||||||
|
|
||||||
|
//@class ReportStoryResult @description Describes result of story report
|
||||||
|
|
||||||
|
//@description The story was reported successfully
|
||||||
|
reportStoryResultOk = ReportStoryResult;
|
||||||
|
|
||||||
|
//@description The user must choose an option to report the story and repeat request with the chosen option @title Title for the option choice @options List of available options
|
||||||
|
reportStoryResultOptionRequired title:string options:vector<reportOption> = ReportStoryResult;
|
||||||
|
|
||||||
|
//@description The user must add additional text details to the report @option_id Option identifier for the next reportStory request @is_optional True, if the user can skip text adding
|
||||||
|
reportStoryResultTextRequired option_id:bytes is_optional:Bool = ReportStoryResult;
|
||||||
|
|
||||||
|
|
||||||
//@class TargetChat @description Describes the target chat to be opened
|
//@class TargetChat @description Describes the target chat to be opened
|
||||||
|
|
||||||
//@description The currently opened chat needs to be kept
|
//@description The currently opened chat needs to be kept
|
||||||
|
|
@ -6606,7 +6699,7 @@ internalLinkTypeAuthenticationCode code:string = InternalLinkType;
|
||||||
//@background_name Name of the background
|
//@background_name Name of the background
|
||||||
internalLinkTypeBackground background_name:string = InternalLinkType;
|
internalLinkTypeBackground background_name:string = InternalLinkType;
|
||||||
|
|
||||||
//@description The link is a link to a Telegram bot, which is supposed to be added to a channel chat as an administrator. Call searchPublicChat with the given bot username and check that the user is a bot,
|
//@description The link is a link to a Telegram bot, which is expected to be added to a channel chat as an administrator. Call searchPublicChat with the given bot username and check that the user is a bot,
|
||||||
//-ask the current user to select a channel chat to add the bot to as an administrator. Then, call getChatMember to receive the current bot rights in the chat and if the bot already is an administrator,
|
//-ask the current user to select a channel chat to add the bot to as an administrator. Then, call getChatMember to receive the current bot rights in the chat and if the bot already is an administrator,
|
||||||
//-check that the current user can edit its administrator rights and combine received rights with the requested administrator rights. Then, show confirmation box to the user, and call setChatMemberStatus with the chosen chat and confirmed rights
|
//-check that the current user can edit its administrator rights and combine received rights with the requested administrator rights. Then, show confirmation box to the user, and call setChatMemberStatus with the chosen chat and confirmed rights
|
||||||
//@bot_username Username of the bot
|
//@bot_username Username of the bot
|
||||||
|
|
@ -6620,7 +6713,7 @@ internalLinkTypeBotAddToChannel bot_username:string administrator_rights:chatAdm
|
||||||
//@autostart True, if sendBotStartMessage must be called automatically without showing the START button
|
//@autostart True, if sendBotStartMessage must be called automatically without showing the START button
|
||||||
internalLinkTypeBotStart bot_username:string start_parameter:string autostart:Bool = InternalLinkType;
|
internalLinkTypeBotStart bot_username:string start_parameter:string autostart:Bool = InternalLinkType;
|
||||||
|
|
||||||
//@description The link is a link to a Telegram bot, which is supposed to be added to a group chat. Call searchPublicChat with the given bot username, check that the user is a bot and can be added to groups,
|
//@description The link is a link to a Telegram bot, which is expected to be added to a group chat. Call searchPublicChat with the given bot username, check that the user is a bot and can be added to groups,
|
||||||
//-ask the current user to select a basic group or a supergroup chat to add the bot to, taking into account that bots can be added to a public supergroup only by administrators of the supergroup.
|
//-ask the current user to select a basic group or a supergroup chat to add the bot to, taking into account that bots can be added to a public supergroup only by administrators of the supergroup.
|
||||||
//-If administrator rights are provided by the link, call getChatMember to receive the current bot rights in the chat and if the bot already is an administrator,
|
//-If administrator rights are provided by the link, call getChatMember to receive the current bot rights in the chat and if the bot already is an administrator,
|
||||||
//-check that the current user can edit its administrator rights, combine received rights with the requested administrator rights, show confirmation box to the user,
|
//-check that the current user can edit its administrator rights, combine received rights with the requested administrator rights, show confirmation box to the user,
|
||||||
|
|
@ -6996,9 +7089,9 @@ networkStatistics since_date:int32 entries:vector<NetworkStatisticsEntry> = Netw
|
||||||
autoDownloadSettings is_auto_download_enabled:Bool max_photo_file_size:int32 max_video_file_size:int53 max_other_file_size:int53 video_upload_bitrate:int32 preload_large_videos:Bool preload_next_audio:Bool preload_stories:Bool use_less_data_for_calls:Bool = AutoDownloadSettings;
|
autoDownloadSettings is_auto_download_enabled:Bool max_photo_file_size:int32 max_video_file_size:int53 max_other_file_size:int53 video_upload_bitrate:int32 preload_large_videos:Bool preload_next_audio:Bool preload_stories:Bool use_less_data_for_calls:Bool = AutoDownloadSettings;
|
||||||
|
|
||||||
//@description Contains auto-download settings presets for the current user
|
//@description Contains auto-download settings presets for the current user
|
||||||
//@low Preset with lowest settings; supposed to be used by default when roaming
|
//@low Preset with lowest settings; expected to be used by default when roaming
|
||||||
//@medium Preset with medium settings; supposed to be used by default when using mobile data
|
//@medium Preset with medium settings; expected to be used by default when using mobile data
|
||||||
//@high Preset with highest settings; supposed to be used by default when connected on Wi-Fi
|
//@high Preset with highest settings; expected to be used by default when connected on Wi-Fi
|
||||||
autoDownloadSettingsPresets low:autoDownloadSettings medium:autoDownloadSettings high:autoDownloadSettings = AutoDownloadSettingsPresets;
|
autoDownloadSettingsPresets low:autoDownloadSettings medium:autoDownloadSettings high:autoDownloadSettings = AutoDownloadSettingsPresets;
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -7047,7 +7140,7 @@ connectionStateConnectingToProxy = ConnectionState;
|
||||||
//@description Establishing a connection to the Telegram servers
|
//@description Establishing a connection to the Telegram servers
|
||||||
connectionStateConnecting = ConnectionState;
|
connectionStateConnecting = ConnectionState;
|
||||||
|
|
||||||
//@description Downloading data supposed to be received while the application was offline
|
//@description Downloading data expected to be received while the application was offline
|
||||||
connectionStateUpdating = ConnectionState;
|
connectionStateUpdating = ConnectionState;
|
||||||
|
|
||||||
//@description There is a working connection to the Telegram servers
|
//@description There is a working connection to the Telegram servers
|
||||||
|
|
@ -7508,7 +7601,7 @@ updateMessageUnreadReactions chat_id:int53 message_id:int53 unread_reactions:vec
|
||||||
//@fact_check The new fact-check
|
//@fact_check The new fact-check
|
||||||
updateMessageFactCheck chat_id:int53 message_id:int53 fact_check:factCheck = Update;
|
updateMessageFactCheck chat_id:int53 message_id:int53 fact_check:factCheck = Update;
|
||||||
|
|
||||||
//@description A message with a live location was viewed. When the update is received, the application is supposed to update the live location
|
//@description A message with a live location was viewed. When the update is received, the application is expected to update the live location
|
||||||
//@chat_id Identifier of the chat with the live location message
|
//@chat_id Identifier of the chat with the live location message
|
||||||
//@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;
|
||||||
|
|
@ -7740,11 +7833,13 @@ updateServiceNotification type:string content:MessageContent = Update;
|
||||||
//@description Information about a file was updated @file New data about the file
|
//@description Information about a file was updated @file New data about the file
|
||||||
updateFile file:file = Update;
|
updateFile file:file = Update;
|
||||||
|
|
||||||
//@description The file generation process needs to be started by the application
|
//@description The file generation process needs to be started by the application. Use setFileGenerationProgress and finishFileGeneration to generate the file
|
||||||
//@generation_id Unique identifier for the generation process
|
//@generation_id Unique identifier for the generation process
|
||||||
//@original_path The path to a file from which a new file is generated; may be empty
|
//@original_path The original path specified by the application in inputFileGenerated
|
||||||
//@destination_path The path to a file that must be created and where the new file is generated
|
//@destination_path The path to a file that must be created and where the new file must be generated by the application.
|
||||||
//@conversion String specifying the conversion applied to the original file. If conversion is "#url#" than original_path contains an HTTP/HTTPS URL of a file, which must be downloaded by the application
|
//-If the application has no access to the path, it can use writeGeneratedFilePart to generate the file
|
||||||
|
//@conversion If the conversion is "#url#" than original_path contains an HTTP/HTTPS URL of a file that must be downloaded by the application.
|
||||||
|
//-Otherwise, this is the conversion specified by the application in inputFileGenerated
|
||||||
updateFileGenerationStart generation_id:int64 original_path:string destination_path:string conversion:string = Update;
|
updateFileGenerationStart generation_id:int64 original_path:string destination_path:string conversion:string = Update;
|
||||||
|
|
||||||
//@description File generation is no longer needed @generation_id Unique identifier for the generation process
|
//@description File generation is no longer needed @generation_id Unique identifier for the generation process
|
||||||
|
|
@ -8342,20 +8437,25 @@ getSecretChat secret_chat_id:int32 = SecretChat;
|
||||||
//@description Returns information about a chat by its identifier; this is an offline request if the current user is not a bot @chat_id Chat identifier
|
//@description Returns information about a chat by its identifier; this is an offline request if the current user is not a bot @chat_id Chat identifier
|
||||||
getChat chat_id:int53 = Chat;
|
getChat chat_id:int53 = Chat;
|
||||||
|
|
||||||
//@description Returns information about a message @chat_id Identifier of the chat the message belongs to @message_id Identifier of the message to get
|
//@description Returns information about a message. Returns a 404 error if the message doesn't exist
|
||||||
|
//@chat_id Identifier of the chat the message belongs to
|
||||||
|
//@message_id Identifier of the message to get
|
||||||
getMessage chat_id:int53 message_id:int53 = Message;
|
getMessage chat_id:int53 message_id:int53 = Message;
|
||||||
|
|
||||||
//@description Returns information about a message, if it is available without sending network request. This is an offline request @chat_id Identifier of the chat the message belongs to @message_id Identifier of the message to get
|
//@description Returns information about a message, if it is available without sending network request. Returns a 404 error if message isn't available locally. This is an offline request
|
||||||
|
//@chat_id Identifier of the chat the message belongs to
|
||||||
|
//@message_id Identifier of the message to get
|
||||||
getMessageLocally chat_id:int53 message_id:int53 = Message;
|
getMessageLocally chat_id:int53 message_id:int53 = Message;
|
||||||
|
|
||||||
//@description Returns information about a non-bundled message that is replied by a given message. Also, returns the pinned message, the game message, the invoice message,
|
//@description Returns information about a non-bundled message that is replied by a given message. Also, returns the pinned message, the game message, the invoice message,
|
||||||
//-the message with a previously set same background, the giveaway message, and the topic creation message for messages of the types
|
//-the message with a previously set same background, the giveaway message, and the topic creation message for messages of the types
|
||||||
//-messagePinMessage, messageGameScore, messagePaymentSuccessful, messageChatSetBackground, messageGiveawayCompleted and topic messages without non-bundled replied message respectively
|
//-messagePinMessage, messageGameScore, messagePaymentSuccessful, messageChatSetBackground, messageGiveawayCompleted and topic messages without non-bundled replied message respectively.
|
||||||
|
//-Returns a 404 error if the message doesn't exist
|
||||||
//@chat_id Identifier of the chat the message belongs to
|
//@chat_id Identifier of the chat the message belongs to
|
||||||
//@message_id Identifier of the reply message
|
//@message_id Identifier of the reply message
|
||||||
getRepliedMessage chat_id:int53 message_id:int53 = Message;
|
getRepliedMessage chat_id:int53 message_id:int53 = Message;
|
||||||
|
|
||||||
//@description Returns information about a newest pinned message in the chat @chat_id Identifier of the chat the message belongs to
|
//@description Returns information about a newest pinned message in the chat. Returns a 404 error if the message doesn't exist @chat_id Identifier of the chat the message belongs to
|
||||||
getChatPinnedMessage chat_id:int53 = Message;
|
getChatPinnedMessage chat_id:int53 = Message;
|
||||||
|
|
||||||
//@description Returns information about a message with the callback button that originated a callback query; for bots only @chat_id Identifier of the chat the message belongs to @message_id Message identifier @callback_query_id Identifier of the callback query
|
//@description Returns information about a message with the callback button that originated a callback query; for bots only @chat_id Identifier of the chat the message belongs to @message_id Message identifier @callback_query_id Identifier of the callback query
|
||||||
|
|
@ -8415,9 +8515,7 @@ 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 list of users nearby will be updated for 60 seconds after the request by the updates updateUsersNearby.
|
//@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
|
||||||
//-The request must be sent again every 25 seconds with adjusted location to not miss new chats
|
|
||||||
//@location Current user location
|
|
||||||
searchChatsNearby location:location = ChatsNearby;
|
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
|
||||||
|
|
@ -8650,7 +8748,9 @@ deleteAllCallMessages revoke:Bool = Ok;
|
||||||
//@description Returns information about the recent locations of chat members that were sent to the chat. Returns up to 1 location message per user @chat_id Chat identifier @limit The maximum number of messages to be returned
|
//@description Returns information about the recent locations of chat members that were sent to the chat. Returns up to 1 location message per user @chat_id Chat identifier @limit The maximum number of messages to be returned
|
||||||
searchChatRecentLocationMessages chat_id:int53 limit:int32 = Messages;
|
searchChatRecentLocationMessages chat_id:int53 limit:int32 = Messages;
|
||||||
|
|
||||||
//@description Returns the last message sent in a chat no later than the specified date @chat_id Chat identifier @date Point in time (Unix timestamp) relative to which to search for messages
|
//@description Returns the last message sent in a chat no later than the specified date. Returns a 404 error if such message doesn't exist
|
||||||
|
//@chat_id Chat identifier
|
||||||
|
//@date Point in time (Unix timestamp) relative to which to search for messages
|
||||||
getChatMessageByDate chat_id:int53 date:int32 = Message;
|
getChatMessageByDate chat_id:int53 date:int32 = Message;
|
||||||
|
|
||||||
//@description Returns sparse positions of messages of the specified type in the chat to be used for shared media scroll implementation. Returns the results in reverse chronological order (i.e., in order of decreasing message_id).
|
//@description Returns sparse positions of messages of the specified type in the chat to be used for shared media scroll implementation. Returns the results in reverse chronological order (i.e., in order of decreasing message_id).
|
||||||
|
|
@ -8690,10 +8790,12 @@ 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 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 photo, or a mention 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
|
||||||
//@chat_id Chat identifier of the sponsored message
|
//@chat_id Chat identifier of the sponsored message
|
||||||
//@message_id Identifier of the sponsored message
|
//@message_id Identifier of the sponsored message
|
||||||
clickChatSponsoredMessage chat_id:int53 message_id:int53 = Ok;
|
//@is_media_click Pass true if the media was clicked in the sponsored message
|
||||||
|
//@from_fullscreen Pass true if the user expanded the video from the sponsored message fullscreen before the click
|
||||||
|
clickChatSponsoredMessage chat_id:int53 message_id:int53 is_media_click:Bool from_fullscreen:Bool = Ok;
|
||||||
|
|
||||||
//@description Reports a sponsored message to Telegram moderators
|
//@description Reports a sponsored message to Telegram moderators
|
||||||
//@chat_id Chat identifier of the sponsored message
|
//@chat_id Chat identifier of the sponsored message
|
||||||
|
|
@ -8880,7 +8982,7 @@ editMessageMedia chat_id:int53 message_id:int53 reply_markup:ReplyMarkup input_m
|
||||||
//@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_be_edited 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
|
||||||
//@caption New message content caption; 0-getOption("message_caption_length_max") characters; pass null to remove caption
|
//@caption New message content caption; 0-getOption("message_caption_length_max") characters; pass null to remove caption
|
||||||
//@show_caption_above_media Pass true to show the caption above the media; otherwise, the caption will be shown below the media. Can be true only for animation, photo, and video messages
|
//@show_caption_above_media Pass true to show the caption above the media; otherwise, the caption will be shown below the media. May be true only for animation, photo, and video messages
|
||||||
editMessageCaption chat_id:int53 message_id:int53 reply_markup:ReplyMarkup caption:formattedText show_caption_above_media:Bool = Message;
|
editMessageCaption chat_id:int53 message_id:int53 reply_markup:ReplyMarkup caption:formattedText show_caption_above_media:Bool = Message;
|
||||||
|
|
||||||
//@description Edits the message reply markup; for bots only. Returns the edited message after the edit is completed on the server side
|
//@description Edits the message reply markup; for bots only. Returns the edited message after the edit is completed on the server side
|
||||||
|
|
@ -8915,7 +9017,7 @@ editInlineMessageMedia inline_message_id:string reply_markup:ReplyMarkup input_m
|
||||||
//@inline_message_id Inline message identifier
|
//@inline_message_id Inline message identifier
|
||||||
//@reply_markup The new message reply markup; pass null if none
|
//@reply_markup The new message reply markup; pass null if none
|
||||||
//@caption New message content caption; pass null to remove caption; 0-getOption("message_caption_length_max") characters
|
//@caption New message content caption; pass null to remove caption; 0-getOption("message_caption_length_max") characters
|
||||||
//@show_caption_above_media Pass true to show the caption above the media; otherwise, the caption will be shown below the media. Can be true only for animation, photo, and video messages
|
//@show_caption_above_media Pass true to show the caption above the media; otherwise, the caption will be shown below the media. May be true only for animation, photo, and video messages
|
||||||
editInlineMessageCaption inline_message_id:string reply_markup:ReplyMarkup caption:formattedText show_caption_above_media:Bool = Ok;
|
editInlineMessageCaption inline_message_id:string reply_markup:ReplyMarkup caption:formattedText show_caption_above_media:Bool = Ok;
|
||||||
|
|
||||||
//@description Edits the reply markup of an inline message sent via a bot; for bots only
|
//@description Edits the reply markup of an inline message sent via a bot; for bots only
|
||||||
|
|
@ -8992,7 +9094,7 @@ editBusinessMessageMedia business_connection_id:string chat_id:int53 message_id:
|
||||||
//@message_id Identifier of the message
|
//@message_id Identifier of the message
|
||||||
//@reply_markup The new message reply markup; pass null if none
|
//@reply_markup The new message reply markup; pass null if none
|
||||||
//@caption New message content caption; pass null to remove caption; 0-getOption("message_caption_length_max") characters
|
//@caption New message content caption; pass null to remove caption; 0-getOption("message_caption_length_max") characters
|
||||||
//@show_caption_above_media Pass true to show the caption above the media; otherwise, the caption will be shown below the media. Can be true only for animation, photo, and video messages
|
//@show_caption_above_media Pass true to show the caption above the media; otherwise, the caption will be shown below the media. May be true only for animation, photo, and video messages
|
||||||
editBusinessMessageCaption business_connection_id:string chat_id:int53 message_id:int53 reply_markup:ReplyMarkup caption:formattedText show_caption_above_media:Bool = BusinessMessage;
|
editBusinessMessageCaption business_connection_id:string chat_id:int53 message_id:int53 reply_markup:ReplyMarkup caption:formattedText show_caption_above_media:Bool = BusinessMessage;
|
||||||
|
|
||||||
//@description Edits the reply markup of a message sent on behalf of a business account; for bots only
|
//@description Edits the reply markup of a message sent on behalf of a business account; for bots only
|
||||||
|
|
@ -9251,7 +9353,7 @@ getFileMimeType file_name:string = Text;
|
||||||
//@description Returns the extension of a file, guessed by its MIME type. Returns an empty string on failure. Can be called synchronously @mime_type The MIME type of the file
|
//@description Returns the extension of a file, guessed by its MIME type. Returns an empty string on failure. Can be called synchronously @mime_type The MIME type of the file
|
||||||
getFileExtension mime_type:string = Text;
|
getFileExtension mime_type:string = Text;
|
||||||
|
|
||||||
//@description Removes potentially dangerous characters from the name of a file. The encoding of the file name is supposed to be UTF-8. Returns an empty string on failure. Can be called synchronously @file_name File name or path to the file
|
//@description Removes potentially dangerous characters from the name of a file. Returns an empty string on failure. Can be called synchronously @file_name File name or path to the file
|
||||||
cleanFileName file_name:string = Text;
|
cleanFileName file_name:string = Text;
|
||||||
|
|
||||||
//@description Returns a string stored in the local database from the specified localization target and language pack by its key. Returns a 404 error if the string is not found. Can be called synchronously
|
//@description Returns a string stored in the local database from the specified localization target and language pack by its key. Returns a 404 error if the string is not found. Can be called synchronously
|
||||||
|
|
@ -10010,9 +10112,9 @@ getChatStoryInteractions story_sender_chat_id:int53 story_id:int32 reaction_type
|
||||||
//@description Reports a story to the Telegram moderators
|
//@description Reports a story to the Telegram moderators
|
||||||
//@story_sender_chat_id The identifier of the sender of the story to report
|
//@story_sender_chat_id The identifier of the sender of the story to report
|
||||||
//@story_id The identifier of the story to report
|
//@story_id The identifier of the story to report
|
||||||
//@reason The reason for reporting the story
|
//@option_id Option identifier chosen by the user; leave empty for the initial request
|
||||||
//@text Additional report details; 0-1024 characters
|
//@text Additional report details; 0-1024 characters; leave empty for the initial request
|
||||||
reportStory story_sender_chat_id:int53 story_id:int32 reason:ReportReason text:string = Ok;
|
reportStory story_sender_chat_id:int53 story_id:int32 option_id:bytes text:string = ReportStoryResult;
|
||||||
|
|
||||||
//@description Activates stealth mode for stories, which hides all views of stories from the current user in the last "story_stealth_mode_past_period" seconds
|
//@description Activates stealth mode for stories, which hides all views of stories from the current user in the last "story_stealth_mode_past_period" seconds
|
||||||
//-and for the next "story_stealth_mode_future_period" seconds; for Telegram Premium users only
|
//-and for the next "story_stealth_mode_future_period" seconds; for Telegram Premium users only
|
||||||
|
|
@ -10113,7 +10215,7 @@ getFileDownloadedPrefixSize file_id:int32 offset:int53 = FileDownloadedPrefixSiz
|
||||||
//@description Stops the downloading of a file. If a file has already been downloaded, does nothing @file_id Identifier of a file to stop downloading @only_if_pending Pass true to stop downloading only if it hasn't been started, i.e. request hasn't been sent to server
|
//@description Stops the downloading of a file. If a file has already been downloaded, does nothing @file_id Identifier of a file to stop downloading @only_if_pending Pass true to stop downloading only if it hasn't been started, i.e. request hasn't been sent to server
|
||||||
cancelDownloadFile file_id:int32 only_if_pending:Bool = Ok;
|
cancelDownloadFile file_id:int32 only_if_pending:Bool = Ok;
|
||||||
|
|
||||||
//@description Returns suggested name for saving a file in a given directory @file_id Identifier of the file @directory Directory in which the file is supposed to be saved
|
//@description Returns suggested name for saving a file in a given directory @file_id Identifier of the file @directory Directory in which the file is expected to be saved
|
||||||
getSuggestedFileName file_id:int32 directory:string = Text;
|
getSuggestedFileName file_id:int32 directory:string = Text;
|
||||||
|
|
||||||
//@description Preliminary uploads a file to the cloud before sending it in a message, which can be useful for uploading of being recorded voice and video notes.
|
//@description Preliminary uploads a file to the cloud before sending it in a message, which can be useful for uploading of being recorded voice and video notes.
|
||||||
|
|
@ -10124,7 +10226,7 @@ getSuggestedFileName file_id:int32 directory:string = Text;
|
||||||
//@priority Priority of the upload (1-32). The higher the priority, the earlier the file will be uploaded. If the priorities of two files are equal, then the first one for which preliminaryUploadFile was called will be uploaded first
|
//@priority Priority of the upload (1-32). The higher the priority, the earlier the file will be uploaded. If the priorities of two files are equal, then the first one for which preliminaryUploadFile was called will be uploaded first
|
||||||
preliminaryUploadFile file:InputFile file_type:FileType priority:int32 = File;
|
preliminaryUploadFile file:InputFile file_type:FileType priority:int32 = File;
|
||||||
|
|
||||||
//@description Stops the preliminary uploading of a file. Supported only for files uploaded by using preliminaryUploadFile. For other files the behavior is undefined @file_id Identifier of the file to stop uploading
|
//@description Stops the preliminary uploading of a file. Supported only for files uploaded by using preliminaryUploadFile @file_id Identifier of the file to stop uploading
|
||||||
cancelPreliminaryUploadFile file_id:int32 = Ok;
|
cancelPreliminaryUploadFile file_id:int32 = Ok;
|
||||||
|
|
||||||
//@description Writes a part of a generated file. This method is intended to be used only if the application has no direct access to TDLib's file system, because it is usually slower than a direct write to the destination file
|
//@description Writes a part of a generated file. This method is intended to be used only if the application has no direct access to TDLib's file system, because it is usually slower than a direct write to the destination file
|
||||||
|
|
@ -10346,7 +10448,7 @@ setVideoChatDefaultParticipant chat_id:int53 default_participant_id:MessageSende
|
||||||
//@description Creates a video chat (a group call bound to a chat). Available only for basic groups, supergroups and channels; requires can_manage_video_chats administrator right
|
//@description Creates a video chat (a group call bound to a chat). Available only for basic groups, supergroups and channels; requires can_manage_video_chats administrator right
|
||||||
//@chat_id Identifier of a chat in which the video chat will be created
|
//@chat_id Identifier of a chat in which the video chat will be created
|
||||||
//@title Group call title; if empty, chat title will be used
|
//@title Group call title; if empty, chat title will be used
|
||||||
//@start_date Point in time (Unix timestamp) when the group call is supposed to be started by an administrator; 0 to start the video chat immediately. The date must be at least 10 seconds and at most 8 days in the future
|
//@start_date Point in time (Unix timestamp) when the group call is expected to be started by an administrator; 0 to start the video chat immediately. The date must be at least 10 seconds and at most 8 days in the future
|
||||||
//@is_rtmp_stream Pass true to create an RTMP stream instead of an ordinary video chat; requires owner privileges
|
//@is_rtmp_stream Pass true to create an RTMP stream instead of an ordinary video chat; requires owner privileges
|
||||||
createVideoChat chat_id:int53 title:string start_date:int32 is_rtmp_stream:Bool = GroupCallId;
|
createVideoChat chat_id:int53 title:string start_date:int32 is_rtmp_stream:Bool = GroupCallId;
|
||||||
|
|
||||||
|
|
@ -11078,7 +11180,7 @@ toggleSupergroupIsBroadcastGroup supergroup_id:int53 = Ok;
|
||||||
|
|
||||||
//@description Reports messages in a supergroup as spam; requires administrator rights in the supergroup
|
//@description Reports messages in a supergroup as spam; requires administrator rights in the supergroup
|
||||||
//@supergroup_id Supergroup identifier
|
//@supergroup_id Supergroup identifier
|
||||||
//@message_ids Identifiers of messages to report. Use messageProperties.can_be_reported to check whether the message can be reported
|
//@message_ids Identifiers of messages to report. Use messageProperties.can_report_supergroup_spam to check whether the message can be reported
|
||||||
reportSupergroupSpam supergroup_id:int53 message_ids:vector<int53> = Ok;
|
reportSupergroupSpam supergroup_id:int53 message_ids:vector<int53> = Ok;
|
||||||
|
|
||||||
//@description Reports a false deletion of a message by aggressive anti-spam checks; requires administrator rights in the supergroup. Can be called only for messages from chatEventMessageDeleted with can_report_anti_spam_false_positive == true
|
//@description Reports a false deletion of a message by aggressive anti-spam checks; requires administrator rights in the supergroup. Can be called only for messages from chatEventMessageDeleted with can_report_anti_spam_false_positive == true
|
||||||
|
|
@ -11145,10 +11247,38 @@ deleteSavedOrderInfo = Ok;
|
||||||
deleteSavedCredentials = Ok;
|
deleteSavedCredentials = Ok;
|
||||||
|
|
||||||
|
|
||||||
|
//@description Returns gifts that can be sent to other users
|
||||||
|
getAvailableGifts = Gifts;
|
||||||
|
|
||||||
|
//@description Send a gift to another user
|
||||||
|
//@gift_id Identifier of the gift to send
|
||||||
|
//@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
|
||||||
|
//@is_private Pass true to show the current user as sender and gift text only to the gift receiver; otherwise, everyone will be able to see them
|
||||||
|
sendGift gift_id:int64 user_id:int53 text:formattedText is_private:Bool = Ok;
|
||||||
|
|
||||||
|
//@description Sells a gift received by the current user for Telegram Stars
|
||||||
|
//@sender_user_id Identifier of the user that sent the gift
|
||||||
|
//@message_id Identifier of the message with the gift in the chat with the user
|
||||||
|
sellGift sender_user_id:int53 message_id:int53 = Ok;
|
||||||
|
|
||||||
|
//@description Toggles whether a gift is shown on the current user's profile page
|
||||||
|
//@sender_user_id Identifier of the user that sent the gift
|
||||||
|
//@message_id Identifier of the message with the gift in the chat with the user
|
||||||
|
//@is_saved Pass true to display the gift on the user's profile page; pass false to remove it from the profile page
|
||||||
|
toggleGiftIsSaved sender_user_id:int53 message_id:int53 is_saved:Bool = Ok;
|
||||||
|
|
||||||
|
//@description Returns gifts saved to profile by the given user
|
||||||
|
//@user_id Identifier of the user
|
||||||
|
//@offset Offset of the first entry to return as received from the previous request; use empty string to get the first chunk of results
|
||||||
|
//@limit The maximum number of gifts to be returned; must be positive and can't be greater than 100. For optimal performance, the number of returned objects is chosen by TDLib and can be smaller than the specified limit
|
||||||
|
getUserGifts user_id:int53 offset:string limit:int32 = UserGifts;
|
||||||
|
|
||||||
|
|
||||||
//@description Creates a link for the given invoice; for bots only @invoice Information about the invoice of the type inputMessageInvoice
|
//@description Creates a link for the given invoice; for bots only @invoice Information about the invoice of the type inputMessageInvoice
|
||||||
createInvoiceLink invoice:InputMessageContent = HttpUrl;
|
createInvoiceLink invoice:InputMessageContent = HttpUrl;
|
||||||
|
|
||||||
//@description Refunds a previously done payment in Telegram Stars
|
//@description Refunds a previously done payment in Telegram Stars; for bots only
|
||||||
//@user_id Identifier of the user that did the payment
|
//@user_id Identifier of the user that did the payment
|
||||||
//@telegram_payment_charge_id Telegram payment identifier
|
//@telegram_payment_charge_id Telegram payment identifier
|
||||||
refundStarPayment user_id:int53 telegram_payment_charge_id:string = Ok;
|
refundStarPayment user_id:int53 telegram_payment_charge_id:string = Ok;
|
||||||
|
|
@ -11294,10 +11424,10 @@ removeChatActionBar chat_id:int53 = Ok;
|
||||||
|
|
||||||
//@description Reports a chat to the Telegram moderators. A chat can be reported only from the chat action bar, or if chat.can_be_reported
|
//@description Reports a chat to the Telegram moderators. A chat can be reported only from the chat action bar, or if chat.can_be_reported
|
||||||
//@chat_id Chat identifier
|
//@chat_id Chat identifier
|
||||||
//@message_ids Identifiers of reported messages; may be empty to report the whole chat. Use messageProperties.can_be_reported to check whether the message can be reported
|
//@option_id Option identifier chosen by the user; leave empty for the initial request
|
||||||
//@reason The reason for reporting the chat
|
//@message_ids Identifiers of reported messages. Use messageProperties.can_report_chat to check whether the message can be reported
|
||||||
//@text Additional report details; 0-1024 characters
|
//@text Additional report details if asked by the server; 0-1024 characters; leave empty for the initial request
|
||||||
reportChat chat_id:int53 message_ids:vector<int53> reason:ReportReason text:string = Ok;
|
reportChat chat_id:int53 option_id:bytes message_ids:vector<int53> text:string = ReportChatResult;
|
||||||
|
|
||||||
//@description Reports a chat photo to the Telegram moderators. A chat photo can be reported only if chat.can_be_reported
|
//@description Reports a chat photo to the Telegram moderators. A chat photo can be reported only if chat.can_be_reported
|
||||||
//@chat_id Chat identifier
|
//@chat_id Chat identifier
|
||||||
|
|
@ -11578,6 +11708,9 @@ getPremiumFeatures source:PremiumSource = PremiumFeatures;
|
||||||
//@description Returns examples of premium stickers for demonstration purposes
|
//@description Returns examples of premium stickers for demonstration purposes
|
||||||
getPremiumStickerExamples = Stickers;
|
getPremiumStickerExamples = Stickers;
|
||||||
|
|
||||||
|
//@description Returns the sticker to be used as representation of the Telegram Premium subscription @month_count Number of months the Telegram Premium subscription will be active
|
||||||
|
getPremiumInfoSticker month_count:int32 = Sticker;
|
||||||
|
|
||||||
//@description Informs TDLib that the user viewed detailed information about a Premium feature on the Premium features screen @feature The viewed premium feature
|
//@description Informs TDLib that the user viewed detailed information about a Premium feature on the Premium features screen @feature The viewed premium feature
|
||||||
viewPremiumFeature feature:PremiumFeature = Ok;
|
viewPremiumFeature feature:PremiumFeature = Ok;
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue