Update to TDLib 1.8.4
This commit is contained in:
parent
1011dc13ae
commit
bbfcb2f946
|
@ -1772,7 +1772,7 @@ type CheckCreatedPublicChatsLimitRequest struct {
|
|||
Type PublicChatType `json:"type"`
|
||||
}
|
||||
|
||||
// Checks whether the maximum number of owned public chats has been reached. Returns corresponding error if the limit was reached
|
||||
// Checks whether the maximum number of owned public chats has been reached. Returns corresponding error if the limit was reached. The limit can be increased with Telegram Premium
|
||||
func (client *Client) CheckCreatedPublicChatsLimit(req *CheckCreatedPublicChatsLimitRequest) (*Ok, error) {
|
||||
result, err := client.Send(Request{
|
||||
meta: meta{
|
||||
|
@ -1812,7 +1812,7 @@ func (client *Client) GetSuitableDiscussionChats() (*Chats, error) {
|
|||
return UnmarshalChats(result.Data)
|
||||
}
|
||||
|
||||
// Returns a list of recently inactive supergroups and channels. Can be used when user reaches limit on the number of joined supergroups and channels and receives CHANNELS_TOO_MUCH error
|
||||
// Returns a list of recently inactive supergroups and channels. Can be used when user reaches limit on the number of joined supergroups and channels and receives CHANNELS_TOO_MUCH error. Also, the limit can be increased with Telegram Premium
|
||||
func (client *Client) GetInactiveSupergroupChats() (*Chats, error) {
|
||||
result, err := client.Send(Request{
|
||||
meta: meta{
|
||||
|
@ -2668,6 +2668,67 @@ func (client *Client) TranslateText(req *TranslateTextRequest) (*Text, error) {
|
|||
return UnmarshalText(result.Data)
|
||||
}
|
||||
|
||||
type RecognizeSpeechRequest struct {
|
||||
// Identifier of the chat to which the message belongs
|
||||
ChatId int64 `json:"chat_id"`
|
||||
// Identifier of the message
|
||||
MessageId int64 `json:"message_id"`
|
||||
}
|
||||
|
||||
// Recognizes speech in a voice note message. The message must be successfully sent and must not be scheduled. May return an error with a message "MSG_VOICE_TOO_LONG" if the voice note is too long to be recognized
|
||||
func (client *Client) RecognizeSpeech(req *RecognizeSpeechRequest) (*Ok, error) {
|
||||
result, err := client.Send(Request{
|
||||
meta: meta{
|
||||
Type: "recognizeSpeech",
|
||||
},
|
||||
Data: map[string]interface{}{
|
||||
"chat_id": req.ChatId,
|
||||
"message_id": req.MessageId,
|
||||
},
|
||||
})
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
if result.Type == "error" {
|
||||
return nil, buildResponseError(result.Data)
|
||||
}
|
||||
|
||||
return UnmarshalOk(result.Data)
|
||||
}
|
||||
|
||||
type RateSpeechRecognitionRequest struct {
|
||||
// Identifier of the chat to which the message belongs
|
||||
ChatId int64 `json:"chat_id"`
|
||||
// Identifier of the message
|
||||
MessageId int64 `json:"message_id"`
|
||||
// Pass true if the speech recognition is good
|
||||
IsGood bool `json:"is_good"`
|
||||
}
|
||||
|
||||
// Rates recognized speech in a voice note message
|
||||
func (client *Client) RateSpeechRecognition(req *RateSpeechRecognitionRequest) (*Ok, error) {
|
||||
result, err := client.Send(Request{
|
||||
meta: meta{
|
||||
Type: "rateSpeechRecognition",
|
||||
},
|
||||
Data: map[string]interface{}{
|
||||
"chat_id": req.ChatId,
|
||||
"message_id": req.MessageId,
|
||||
"is_good": req.IsGood,
|
||||
},
|
||||
})
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
if result.Type == "error" {
|
||||
return nil, buildResponseError(result.Data)
|
||||
}
|
||||
|
||||
return UnmarshalOk(result.Data)
|
||||
}
|
||||
|
||||
type GetChatAvailableMessageSendersRequest struct {
|
||||
// Chat identifier
|
||||
ChatId int64 `json:"chat_id"`
|
||||
|
@ -3494,7 +3555,7 @@ type GetMessageAvailableReactionsRequest struct {
|
|||
MessageId int64 `json:"message_id"`
|
||||
}
|
||||
|
||||
// Returns reactions, which can be added to a message. The list can change after updateReactions, updateChatAvailableReactions for the chat, or updateMessageInteractionInfo for the message
|
||||
// Returns reactions, which can be added to a message. The list can change after updateReactions, updateChatAvailableReactions for the chat, or updateMessageInteractionInfo for the message. The method will return Premium reactions, even the current user has no Premium subscription
|
||||
func (client *Client) GetMessageAvailableReactions(req *GetMessageAvailableReactionsRequest) (*AvailableReactions, error) {
|
||||
result, err := client.Send(Request{
|
||||
meta: meta{
|
||||
|
@ -4266,11 +4327,11 @@ type GetWebAppUrlRequest struct {
|
|||
BotUserId int64 `json:"bot_user_id"`
|
||||
// The URL from the keyboardButtonTypeWebApp button
|
||||
Url string `json:"url"`
|
||||
// Preferred web app theme; pass null to use the default theme
|
||||
// Preferred Web App theme; pass null to use the default theme
|
||||
Theme *ThemeParameters `json:"theme"`
|
||||
}
|
||||
|
||||
// Returns an HTTPS URL of a web app to open after keyboardButtonTypeWebApp button is pressed
|
||||
// Returns an HTTPS URL of a Web App to open after keyboardButtonTypeWebApp button is pressed
|
||||
func (client *Client) GetWebAppUrl(req *GetWebAppUrlRequest) (*HttpUrl, error) {
|
||||
result, err := client.Send(Request{
|
||||
meta: meta{
|
||||
|
@ -4296,13 +4357,13 @@ func (client *Client) GetWebAppUrl(req *GetWebAppUrlRequest) (*HttpUrl, error) {
|
|||
type SendWebAppDataRequest struct {
|
||||
// Identifier of the target bot
|
||||
BotUserId int64 `json:"bot_user_id"`
|
||||
// Text of the keyboardButtonTypeWebApp button, which opened the web app
|
||||
// Text of the keyboardButtonTypeWebApp button, which opened the Web App
|
||||
ButtonText string `json:"button_text"`
|
||||
// Received data
|
||||
Data string `json:"data"`
|
||||
}
|
||||
|
||||
// Sends data received from a keyboardButtonTypeWebApp web app to a bot
|
||||
// Sends data received from a keyboardButtonTypeWebApp Web App to a bot
|
||||
func (client *Client) SendWebAppData(req *SendWebAppDataRequest) (*Ok, error) {
|
||||
result, err := client.Send(Request{
|
||||
meta: meta{
|
||||
|
@ -4326,19 +4387,19 @@ func (client *Client) SendWebAppData(req *SendWebAppDataRequest) (*Ok, error) {
|
|||
}
|
||||
|
||||
type OpenWebAppRequest struct {
|
||||
// Identifier of the chat in which the web app is opened. Web apps can be opened only in private chats for now
|
||||
// Identifier of the chat in which the Web App is opened
|
||||
ChatId int64 `json:"chat_id"`
|
||||
// Identifier of the bot, providing the web app
|
||||
// Identifier of the bot, providing the Web App
|
||||
BotUserId int64 `json:"bot_user_id"`
|
||||
// The URL from an inlineKeyboardButtonTypeWebApp button, a botMenuButton button, or an internalLinkTypeAttachmentMenuBot link, or an empty string otherwise
|
||||
Url string `json:"url"`
|
||||
// Preferred web app theme; pass null to use the default theme
|
||||
// Preferred Web App theme; pass null to use the default theme
|
||||
Theme *ThemeParameters `json:"theme"`
|
||||
// Identifier of the replied message for the message sent by the web app; 0 if none
|
||||
// Identifier of the replied message for the message sent by the Web App; 0 if none
|
||||
ReplyToMessageId int64 `json:"reply_to_message_id"`
|
||||
}
|
||||
|
||||
// Informs TDLib that a web app is being opened from attachment menu, a botMenuButton button, an internalLinkTypeAttachmentMenuBot link, or an inlineKeyboardButtonTypeWebApp button. For each bot, a confirmation alert about data sent to the bot must be shown once
|
||||
// Informs TDLib that a Web App is being opened from attachment menu, a botMenuButton button, an internalLinkTypeAttachmentMenuBot link, or an inlineKeyboardButtonTypeWebApp button. For each bot, a confirmation alert about data sent to the bot must be shown once
|
||||
func (client *Client) OpenWebApp(req *OpenWebAppRequest) (*WebAppInfo, error) {
|
||||
result, err := client.Send(Request{
|
||||
meta: meta{
|
||||
|
@ -4364,11 +4425,11 @@ func (client *Client) OpenWebApp(req *OpenWebAppRequest) (*WebAppInfo, error) {
|
|||
}
|
||||
|
||||
type CloseWebAppRequest struct {
|
||||
// Identifier of web app launch, received from openWebApp
|
||||
// Identifier of Web App launch, received from openWebApp
|
||||
WebAppLaunchId JsonInt64 `json:"web_app_launch_id"`
|
||||
}
|
||||
|
||||
// Informs TDLib that a previously opened web app was closed
|
||||
// Informs TDLib that a previously opened Web App was closed
|
||||
func (client *Client) CloseWebApp(req *CloseWebAppRequest) (*Ok, error) {
|
||||
result, err := client.Send(Request{
|
||||
meta: meta{
|
||||
|
@ -4390,13 +4451,13 @@ func (client *Client) CloseWebApp(req *CloseWebAppRequest) (*Ok, error) {
|
|||
}
|
||||
|
||||
type AnswerWebAppQueryRequest struct {
|
||||
// Identifier of the web app query
|
||||
// Identifier of the Web App query
|
||||
WebAppQueryId string `json:"web_app_query_id"`
|
||||
// The result of the query
|
||||
Result InputInlineQueryResult `json:"result"`
|
||||
}
|
||||
|
||||
// Sets the result of interaction with a web app and sends corresponding message on behalf of the user to the chat from which the query originated; for bots only
|
||||
// Sets the result of interaction with a Web App and sends corresponding message on behalf of the user to the chat from which the query originated; for bots only
|
||||
func (client *Client) AnswerWebAppQuery(req *AnswerWebAppQueryRequest) (*SentWebAppMessage, error) {
|
||||
result, err := client.Send(Request{
|
||||
meta: meta{
|
||||
|
@ -4952,6 +5013,9 @@ func (client *Client) GetInternalLinkType(req *GetInternalLinkTypeRequest) (Inte
|
|||
case TypeInternalLinkTypeGame:
|
||||
return UnmarshalInternalLinkTypeGame(result.Data)
|
||||
|
||||
case TypeInternalLinkTypeInvoice:
|
||||
return UnmarshalInternalLinkTypeInvoice(result.Data)
|
||||
|
||||
case TypeInternalLinkTypeLanguagePack:
|
||||
return UnmarshalInternalLinkTypeLanguagePack(result.Data)
|
||||
|
||||
|
@ -4970,6 +5034,9 @@ func (client *Client) GetInternalLinkType(req *GetInternalLinkTypeRequest) (Inte
|
|||
case TypeInternalLinkTypePhoneNumberConfirmation:
|
||||
return UnmarshalInternalLinkTypePhoneNumberConfirmation(result.Data)
|
||||
|
||||
case TypeInternalLinkTypePremiumFeatures:
|
||||
return UnmarshalInternalLinkTypePremiumFeatures(result.Data)
|
||||
|
||||
case TypeInternalLinkTypePrivacyAndSecuritySettings:
|
||||
return UnmarshalInternalLinkTypePrivacyAndSecuritySettings(result.Data)
|
||||
|
||||
|
@ -5445,7 +5512,7 @@ type CreateChatFilterRequest struct {
|
|||
Filter *ChatFilter `json:"filter"`
|
||||
}
|
||||
|
||||
// Creates new chat filter. Returns information about the created chat filter
|
||||
// Creates new chat filter. Returns information about the created chat filter. There can be up to GetOption("chat_filter_count_max") chat filters, but the limit can be increased with Telegram Premium
|
||||
func (client *Client) CreateChatFilter(req *CreateChatFilterRequest) (*ChatFilterInfo, error) {
|
||||
result, err := client.Send(Request{
|
||||
meta: meta{
|
||||
|
@ -5524,6 +5591,8 @@ func (client *Client) DeleteChatFilter(req *DeleteChatFilterRequest) (*Ok, error
|
|||
type ReorderChatFiltersRequest struct {
|
||||
// Identifiers of chat filters in the new correct order
|
||||
ChatFilterIds []int32 `json:"chat_filter_ids"`
|
||||
// Position of the main chat list among chat filters, 0-based. Can be non-zero only for Premium users
|
||||
MainChatListPosition int32 `json:"main_chat_list_position"`
|
||||
}
|
||||
|
||||
// Changes the order of chat filters
|
||||
|
@ -5534,6 +5603,7 @@ func (client *Client) ReorderChatFilters(req *ReorderChatFiltersRequest) (*Ok, e
|
|||
},
|
||||
Data: map[string]interface{}{
|
||||
"chat_filter_ids": req.ChatFilterIds,
|
||||
"main_chat_list_position": req.MainChatListPosition,
|
||||
},
|
||||
})
|
||||
if err != nil {
|
||||
|
@ -6159,7 +6229,7 @@ type JoinChatRequest struct {
|
|||
ChatId int64 `json:"chat_id"`
|
||||
}
|
||||
|
||||
// Adds the current user as a new member to a chat. Private and secret chats can't be joined using this method
|
||||
// Adds the current user as a new member to a chat. Private and secret chats can't be joined using this method. May return an error with a message "INVITE_REQUEST_SENT" if only a join request was created
|
||||
func (client *Client) JoinChat(req *JoinChatRequest) (*Ok, error) {
|
||||
result, err := client.Send(Request{
|
||||
meta: meta{
|
||||
|
@ -6725,7 +6795,7 @@ type ToggleChatIsPinnedRequest struct {
|
|||
IsPinned bool `json:"is_pinned"`
|
||||
}
|
||||
|
||||
// Changes the pinned state of a chat. There can be up to GetOption("pinned_chat_count_max")/GetOption("pinned_archived_chat_count_max") pinned non-secret chats and the same number of secret chats in the main/archive chat list
|
||||
// Changes the pinned state of a chat. There can be up to GetOption("pinned_chat_count_max")/GetOption("pinned_archived_chat_count_max") pinned non-secret chats and the same number of secret chats in the main/archive chat list. The limit can be increased with Telegram Premium
|
||||
func (client *Client) ToggleChatIsPinned(req *ToggleChatIsPinnedRequest) (*Ok, error) {
|
||||
result, err := client.Send(Request{
|
||||
meta: meta{
|
||||
|
@ -6838,9 +6908,9 @@ type DownloadFileRequest struct {
|
|||
// Priority of the download (1-32). The higher the priority, the earlier the file will be downloaded. If the priorities of two files are equal, then the last one for which downloadFile/addFileToDownloads was called will be downloaded first
|
||||
Priority int32 `json:"priority"`
|
||||
// The starting position from which the file needs to be downloaded
|
||||
Offset int32 `json:"offset"`
|
||||
Offset int64 `json:"offset"`
|
||||
// Number of bytes which need to be downloaded starting from the "offset" position before the download will automatically be canceled; use 0 to download without a limit
|
||||
Limit int32 `json:"limit"`
|
||||
Limit int64 `json:"limit"`
|
||||
// Pass true to return response only after the file download has succeeded, has failed, has been canceled, or a new downloadFile request with different offset/limit parameters was sent; pass false to return file state immediately, just after the download has been started
|
||||
Synchronous bool `json:"synchronous"`
|
||||
}
|
||||
|
@ -6874,11 +6944,11 @@ type GetFileDownloadedPrefixSizeRequest struct {
|
|||
// Identifier of the file
|
||||
FileId int32 `json:"file_id"`
|
||||
// Offset from which downloaded prefix size needs to be calculated
|
||||
Offset int32 `json:"offset"`
|
||||
Offset int64 `json:"offset"`
|
||||
}
|
||||
|
||||
// Returns file downloaded prefix size from a given offset, in bytes
|
||||
func (client *Client) GetFileDownloadedPrefixSize(req *GetFileDownloadedPrefixSizeRequest) (*Count, error) {
|
||||
func (client *Client) GetFileDownloadedPrefixSize(req *GetFileDownloadedPrefixSizeRequest) (*FileDownloadedPrefixSize, error) {
|
||||
result, err := client.Send(Request{
|
||||
meta: meta{
|
||||
Type: "getFileDownloadedPrefixSize",
|
||||
|
@ -6896,7 +6966,7 @@ func (client *Client) GetFileDownloadedPrefixSize(req *GetFileDownloadedPrefixSi
|
|||
return nil, buildResponseError(result.Data)
|
||||
}
|
||||
|
||||
return UnmarshalCount(result.Data)
|
||||
return UnmarshalFileDownloadedPrefixSize(result.Data)
|
||||
}
|
||||
|
||||
type CancelDownloadFileRequest struct {
|
||||
|
@ -7019,7 +7089,7 @@ type WriteGeneratedFilePartRequest struct {
|
|||
// The identifier of the generation process
|
||||
GenerationId JsonInt64 `json:"generation_id"`
|
||||
// The offset from which to write the data to the file
|
||||
Offset int32 `json:"offset"`
|
||||
Offset int64 `json:"offset"`
|
||||
// The data to write
|
||||
Data []byte `json:"data"`
|
||||
}
|
||||
|
@ -7051,9 +7121,9 @@ type SetFileGenerationProgressRequest struct {
|
|||
// The identifier of the generation process
|
||||
GenerationId JsonInt64 `json:"generation_id"`
|
||||
// Expected size of the generated file, in bytes; 0 if unknown
|
||||
ExpectedSize int32 `json:"expected_size"`
|
||||
ExpectedSize int64 `json:"expected_size"`
|
||||
// The number of bytes already generated
|
||||
LocalPrefixSize int32 `json:"local_prefix_size"`
|
||||
LocalPrefixSize int64 `json:"local_prefix_size"`
|
||||
}
|
||||
|
||||
// Informs TDLib on a file generation progress
|
||||
|
@ -7112,9 +7182,9 @@ type ReadFilePartRequest struct {
|
|||
// Identifier of the file. The file must be located in the TDLib file cache
|
||||
FileId int32 `json:"file_id"`
|
||||
// The offset from which to read the file
|
||||
Offset int32 `json:"offset"`
|
||||
Offset int64 `json:"offset"`
|
||||
// Number of bytes to read. An error will be returned if there are not enough bytes available in the file from the specified position. Pass 0 to read all available data from the specified position
|
||||
Count int32 `json:"count"`
|
||||
Count int64 `json:"count"`
|
||||
}
|
||||
|
||||
// Reads a part of a file from the TDLib file cache and returns read bytes. 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 read from the file
|
||||
|
@ -7360,7 +7430,7 @@ type GetMessageFileTypeRequest struct {
|
|||
MessageFileHead string `json:"message_file_head"`
|
||||
}
|
||||
|
||||
// Returns information about a file with messages exported from another app
|
||||
// Returns information about a file with messages exported from another application
|
||||
func (client *Client) GetMessageFileType(req *GetMessageFileTypeRequest) (MessageFileType, error) {
|
||||
result, err := client.Send(Request{
|
||||
meta: meta{
|
||||
|
@ -7805,7 +7875,7 @@ type JoinChatByInviteLinkRequest struct {
|
|||
InviteLink string `json:"invite_link"`
|
||||
}
|
||||
|
||||
// Uses an invite link to add the current user to the chat if possible
|
||||
// Uses an invite link to add the current user to the chat if possible. May return an error with a message "INVITE_REQUEST_SENT" if only a join request was created
|
||||
func (client *Client) JoinChatByInviteLink(req *JoinChatByInviteLinkRequest) (*Chat, error) {
|
||||
result, err := client.Send(Request{
|
||||
meta: meta{
|
||||
|
@ -9531,7 +9601,7 @@ type GetTrendingStickerSetsRequest struct {
|
|||
}
|
||||
|
||||
// Returns a list of trending sticker sets. For optimal performance, the number of returned sticker sets is chosen by TDLib
|
||||
func (client *Client) GetTrendingStickerSets(req *GetTrendingStickerSetsRequest) (*StickerSets, error) {
|
||||
func (client *Client) GetTrendingStickerSets(req *GetTrendingStickerSetsRequest) (*TrendingStickerSets, error) {
|
||||
result, err := client.Send(Request{
|
||||
meta: meta{
|
||||
Type: "getTrendingStickerSets",
|
||||
|
@ -9549,7 +9619,7 @@ func (client *Client) GetTrendingStickerSets(req *GetTrendingStickerSetsRequest)
|
|||
return nil, buildResponseError(result.Data)
|
||||
}
|
||||
|
||||
return UnmarshalStickerSets(result.Data)
|
||||
return UnmarshalTrendingStickerSets(result.Data)
|
||||
}
|
||||
|
||||
type GetAttachedStickerSetsRequest struct {
|
||||
|
@ -10040,6 +10110,25 @@ func (client *Client) GetAnimatedEmoji(req *GetAnimatedEmojiRequest) (*AnimatedE
|
|||
return UnmarshalAnimatedEmoji(result.Data)
|
||||
}
|
||||
|
||||
// Returns all emojis, which has a corresponding animated emoji
|
||||
func (client *Client) GetAllAnimatedEmojis() (*Emojis, error) {
|
||||
result, err := client.Send(Request{
|
||||
meta: meta{
|
||||
Type: "getAllAnimatedEmojis",
|
||||
},
|
||||
Data: map[string]interface{}{},
|
||||
})
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
if result.Type == "error" {
|
||||
return nil, buildResponseError(result.Data)
|
||||
}
|
||||
|
||||
return UnmarshalEmojis(result.Data)
|
||||
}
|
||||
|
||||
type GetEmojiSuggestionsUrlRequest struct {
|
||||
// Language code for which the emoji replacements will be suggested
|
||||
LanguageCode string `json:"language_code"`
|
||||
|
@ -10348,7 +10437,7 @@ func (client *Client) SetName(req *SetNameRequest) (*Ok, error) {
|
|||
}
|
||||
|
||||
type SetBioRequest struct {
|
||||
// The new value of the user bio; 0-70 characters without line feeds
|
||||
// The new value of the user bio; 0-GetOption("bio_length_max") characters without line feeds
|
||||
Bio string `json:"bio"`
|
||||
}
|
||||
|
||||
|
@ -10995,6 +11084,64 @@ func (client *Client) ToggleSupergroupSignMessages(req *ToggleSupergroupSignMess
|
|||
return UnmarshalOk(result.Data)
|
||||
}
|
||||
|
||||
type ToggleSupergroupJoinToSendMessagesRequest struct {
|
||||
// Identifier of the supergroup
|
||||
SupergroupId int64 `json:"supergroup_id"`
|
||||
// New value of join_to_send_messages
|
||||
JoinToSendMessages bool `json:"join_to_send_messages"`
|
||||
}
|
||||
|
||||
// Toggles whether joining is mandatory to send messages to a discussion supergroup; requires can_restrict_members administrator right
|
||||
func (client *Client) ToggleSupergroupJoinToSendMessages(req *ToggleSupergroupJoinToSendMessagesRequest) (*Ok, error) {
|
||||
result, err := client.Send(Request{
|
||||
meta: meta{
|
||||
Type: "toggleSupergroupJoinToSendMessages",
|
||||
},
|
||||
Data: map[string]interface{}{
|
||||
"supergroup_id": req.SupergroupId,
|
||||
"join_to_send_messages": req.JoinToSendMessages,
|
||||
},
|
||||
})
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
if result.Type == "error" {
|
||||
return nil, buildResponseError(result.Data)
|
||||
}
|
||||
|
||||
return UnmarshalOk(result.Data)
|
||||
}
|
||||
|
||||
type ToggleSupergroupJoinByRequestRequest struct {
|
||||
// Identifier of the channel
|
||||
SupergroupId int64 `json:"supergroup_id"`
|
||||
// New value of join_by_request
|
||||
JoinByRequest bool `json:"join_by_request"`
|
||||
}
|
||||
|
||||
// Toggles whether all users directly joining the supergroup need to be approved by supergroup administrators; requires can_restrict_members administrator right
|
||||
func (client *Client) ToggleSupergroupJoinByRequest(req *ToggleSupergroupJoinByRequestRequest) (*Ok, error) {
|
||||
result, err := client.Send(Request{
|
||||
meta: meta{
|
||||
Type: "toggleSupergroupJoinByRequest",
|
||||
},
|
||||
Data: map[string]interface{}{
|
||||
"supergroup_id": req.SupergroupId,
|
||||
"join_by_request": req.JoinByRequest,
|
||||
},
|
||||
})
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
if result.Type == "error" {
|
||||
return nil, buildResponseError(result.Data)
|
||||
}
|
||||
|
||||
return UnmarshalOk(result.Data)
|
||||
}
|
||||
|
||||
type ToggleSupergroupIsAllHistoryAvailableRequest struct {
|
||||
// The identifier of the supergroup
|
||||
SupergroupId int64 `json:"supergroup_id"`
|
||||
|
@ -11182,10 +11329,8 @@ func (client *Client) GetChatEventLog(req *GetChatEventLogRequest) (*ChatEvents,
|
|||
}
|
||||
|
||||
type GetPaymentFormRequest struct {
|
||||
// Chat identifier of the Invoice message
|
||||
ChatId int64 `json:"chat_id"`
|
||||
// Message identifier
|
||||
MessageId int64 `json:"message_id"`
|
||||
// The invoice
|
||||
InputInvoice InputInvoice `json:"input_invoice"`
|
||||
// Preferred payment form theme; pass null to use the default theme
|
||||
Theme *ThemeParameters `json:"theme"`
|
||||
}
|
||||
|
@ -11197,8 +11342,7 @@ func (client *Client) GetPaymentForm(req *GetPaymentFormRequest) (*PaymentForm,
|
|||
Type: "getPaymentForm",
|
||||
},
|
||||
Data: map[string]interface{}{
|
||||
"chat_id": req.ChatId,
|
||||
"message_id": req.MessageId,
|
||||
"input_invoice": req.InputInvoice,
|
||||
"theme": req.Theme,
|
||||
},
|
||||
})
|
||||
|
@ -11214,10 +11358,8 @@ func (client *Client) GetPaymentForm(req *GetPaymentFormRequest) (*PaymentForm,
|
|||
}
|
||||
|
||||
type ValidateOrderInfoRequest struct {
|
||||
// Chat identifier of the Invoice message
|
||||
ChatId int64 `json:"chat_id"`
|
||||
// Message identifier
|
||||
MessageId int64 `json:"message_id"`
|
||||
// The invoice
|
||||
InputInvoice InputInvoice `json:"input_invoice"`
|
||||
// The order information, provided by the user; pass null if empty
|
||||
OrderInfo *OrderInfo `json:"order_info"`
|
||||
// Pass true to save the order information
|
||||
|
@ -11231,8 +11373,7 @@ func (client *Client) ValidateOrderInfo(req *ValidateOrderInfoRequest) (*Validat
|
|||
Type: "validateOrderInfo",
|
||||
},
|
||||
Data: map[string]interface{}{
|
||||
"chat_id": req.ChatId,
|
||||
"message_id": req.MessageId,
|
||||
"input_invoice": req.InputInvoice,
|
||||
"order_info": req.OrderInfo,
|
||||
"allow_save": req.AllowSave,
|
||||
},
|
||||
|
@ -11249,10 +11390,8 @@ func (client *Client) ValidateOrderInfo(req *ValidateOrderInfoRequest) (*Validat
|
|||
}
|
||||
|
||||
type SendPaymentFormRequest struct {
|
||||
// Chat identifier of the Invoice message
|
||||
ChatId int64 `json:"chat_id"`
|
||||
// Message identifier
|
||||
MessageId int64 `json:"message_id"`
|
||||
// The invoice
|
||||
InputInvoice InputInvoice `json:"input_invoice"`
|
||||
// Payment form identifier returned by getPaymentForm
|
||||
PaymentFormId JsonInt64 `json:"payment_form_id"`
|
||||
// Identifier returned by validateOrderInfo, or an empty string
|
||||
|
@ -11272,8 +11411,7 @@ func (client *Client) SendPaymentForm(req *SendPaymentFormRequest) (*PaymentResu
|
|||
Type: "sendPaymentForm",
|
||||
},
|
||||
Data: map[string]interface{}{
|
||||
"chat_id": req.ChatId,
|
||||
"message_id": req.MessageId,
|
||||
"input_invoice": req.InputInvoice,
|
||||
"payment_form_id": req.PaymentFormId,
|
||||
"order_info_id": req.OrderInfoId,
|
||||
"shipping_option_id": req.ShippingOptionId,
|
||||
|
@ -11378,6 +11516,32 @@ func (client *Client) DeleteSavedCredentials() (*Ok, error) {
|
|||
return UnmarshalOk(result.Data)
|
||||
}
|
||||
|
||||
type CreateInvoiceLinkRequest struct {
|
||||
// Information about the invoice of the type inputMessageInvoice
|
||||
Invoice InputMessageContent `json:"invoice"`
|
||||
}
|
||||
|
||||
// Creates a link for the given invoice; for bots only
|
||||
func (client *Client) CreateInvoiceLink(req *CreateInvoiceLinkRequest) (*HttpUrl, error) {
|
||||
result, err := client.Send(Request{
|
||||
meta: meta{
|
||||
Type: "createInvoiceLink",
|
||||
},
|
||||
Data: map[string]interface{}{
|
||||
"invoice": req.Invoice,
|
||||
},
|
||||
})
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
if result.Type == "error" {
|
||||
return nil, buildResponseError(result.Data)
|
||||
}
|
||||
|
||||
return UnmarshalHttpUrl(result.Data)
|
||||
}
|
||||
|
||||
// Returns a user that can be contacted to get support
|
||||
func (client *Client) GetSupportUser() (*User, error) {
|
||||
result, err := client.Send(Request{
|
||||
|
@ -13392,7 +13556,7 @@ func (client *Client) SetStickerSetThumbnail(req *SetStickerSetThumbnailRequest)
|
|||
type SetStickerPositionInSetRequest struct {
|
||||
// Sticker
|
||||
Sticker InputFile `json:"sticker"`
|
||||
// New position of the sticker in the set, zero-based
|
||||
// New position of the sticker in the set, 0-based
|
||||
Position int32 `json:"position"`
|
||||
}
|
||||
|
||||
|
@ -13485,6 +13649,141 @@ func (client *Client) GetMapThumbnailFile(req *GetMapThumbnailFileRequest) (*Fil
|
|||
return UnmarshalFile(result.Data)
|
||||
}
|
||||
|
||||
type GetPremiumLimitRequest struct {
|
||||
// Type of the limit
|
||||
LimitType PremiumLimitType `json:"limit_type"`
|
||||
}
|
||||
|
||||
// Returns information about a limit, increased for Premium users. Returns a 404 error if the limit is unknown
|
||||
func (client *Client) GetPremiumLimit(req *GetPremiumLimitRequest) (*PremiumLimit, error) {
|
||||
result, err := client.Send(Request{
|
||||
meta: meta{
|
||||
Type: "getPremiumLimit",
|
||||
},
|
||||
Data: map[string]interface{}{
|
||||
"limit_type": req.LimitType,
|
||||
},
|
||||
})
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
if result.Type == "error" {
|
||||
return nil, buildResponseError(result.Data)
|
||||
}
|
||||
|
||||
return UnmarshalPremiumLimit(result.Data)
|
||||
}
|
||||
|
||||
type GetPremiumFeaturesRequest struct {
|
||||
// Source of the request; pass null if the method is called from some non-standard source
|
||||
Source PremiumSource `json:"source"`
|
||||
}
|
||||
|
||||
// Returns information about features, available to Premium users
|
||||
func (client *Client) GetPremiumFeatures(req *GetPremiumFeaturesRequest) (*PremiumFeatures, error) {
|
||||
result, err := client.Send(Request{
|
||||
meta: meta{
|
||||
Type: "getPremiumFeatures",
|
||||
},
|
||||
Data: map[string]interface{}{
|
||||
"source": req.Source,
|
||||
},
|
||||
})
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
if result.Type == "error" {
|
||||
return nil, buildResponseError(result.Data)
|
||||
}
|
||||
|
||||
return UnmarshalPremiumFeatures(result.Data)
|
||||
}
|
||||
|
||||
// Returns examples of premium stickers for demonstration purposes
|
||||
func (client *Client) GetPremiumStickers() (*Stickers, error) {
|
||||
result, err := client.Send(Request{
|
||||
meta: meta{
|
||||
Type: "getPremiumStickers",
|
||||
},
|
||||
Data: map[string]interface{}{},
|
||||
})
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
if result.Type == "error" {
|
||||
return nil, buildResponseError(result.Data)
|
||||
}
|
||||
|
||||
return UnmarshalStickers(result.Data)
|
||||
}
|
||||
|
||||
type ViewPremiumFeatureRequest struct {
|
||||
// The viewed premium feature
|
||||
Feature PremiumFeature `json:"feature"`
|
||||
}
|
||||
|
||||
// Informs TDLib that the user viewed detailed information about a Premium feature on the Premium features screen
|
||||
func (client *Client) ViewPremiumFeature(req *ViewPremiumFeatureRequest) (*Ok, error) {
|
||||
result, err := client.Send(Request{
|
||||
meta: meta{
|
||||
Type: "viewPremiumFeature",
|
||||
},
|
||||
Data: map[string]interface{}{
|
||||
"feature": req.Feature,
|
||||
},
|
||||
})
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
if result.Type == "error" {
|
||||
return nil, buildResponseError(result.Data)
|
||||
}
|
||||
|
||||
return UnmarshalOk(result.Data)
|
||||
}
|
||||
|
||||
// Informs TDLib that the user clicked Premium subscription button on the Premium features screen
|
||||
func (client *Client) ClickPremiumSubscriptionButton() (*Ok, error) {
|
||||
result, err := client.Send(Request{
|
||||
meta: meta{
|
||||
Type: "clickPremiumSubscriptionButton",
|
||||
},
|
||||
Data: map[string]interface{}{},
|
||||
})
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
if result.Type == "error" {
|
||||
return nil, buildResponseError(result.Data)
|
||||
}
|
||||
|
||||
return UnmarshalOk(result.Data)
|
||||
}
|
||||
|
||||
// Returns state of Telegram Premium subscription and promotion videos for Premium features
|
||||
func (client *Client) GetPremiumState() (*PremiumState, error) {
|
||||
result, err := client.Send(Request{
|
||||
meta: meta{
|
||||
Type: "getPremiumState",
|
||||
},
|
||||
Data: map[string]interface{}{},
|
||||
})
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
if result.Type == "error" {
|
||||
return nil, buildResponseError(result.Data)
|
||||
}
|
||||
|
||||
return UnmarshalPremiumState(result.Data)
|
||||
}
|
||||
|
||||
type AcceptTermsOfServiceRequest struct {
|
||||
// Terms of service identifier
|
||||
TermsOfServiceId string `json:"terms_of_service_id"`
|
||||
|
|
1526
client/type.go
1526
client/type.go
File diff suppressed because it is too large
Load diff
|
@ -1397,6 +1397,77 @@ func UnmarshalListOfInputCredentials(dataList []json.RawMessage) ([]InputCredent
|
|||
return list, nil
|
||||
}
|
||||
|
||||
func UnmarshalPaymentProvider(data json.RawMessage) (PaymentProvider, error) {
|
||||
var meta meta
|
||||
|
||||
err := json.Unmarshal(data, &meta)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
switch meta.Type {
|
||||
case TypePaymentProviderSmartGlocal:
|
||||
return UnmarshalPaymentProviderSmartGlocal(data)
|
||||
|
||||
case TypePaymentProviderStripe:
|
||||
return UnmarshalPaymentProviderStripe(data)
|
||||
|
||||
case TypePaymentProviderOther:
|
||||
return UnmarshalPaymentProviderOther(data)
|
||||
|
||||
default:
|
||||
return nil, fmt.Errorf("Error unmarshaling. Unknown type: " + meta.Type)
|
||||
}
|
||||
}
|
||||
|
||||
func UnmarshalListOfPaymentProvider(dataList []json.RawMessage) ([]PaymentProvider, error) {
|
||||
list := []PaymentProvider{}
|
||||
|
||||
for _, data := range dataList {
|
||||
entity, err := UnmarshalPaymentProvider(data)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
list = append(list, entity)
|
||||
}
|
||||
|
||||
return list, nil
|
||||
}
|
||||
|
||||
func UnmarshalInputInvoice(data json.RawMessage) (InputInvoice, error) {
|
||||
var meta meta
|
||||
|
||||
err := json.Unmarshal(data, &meta)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
switch meta.Type {
|
||||
case TypeInputInvoiceMessage:
|
||||
return UnmarshalInputInvoiceMessage(data)
|
||||
|
||||
case TypeInputInvoiceName:
|
||||
return UnmarshalInputInvoiceName(data)
|
||||
|
||||
default:
|
||||
return nil, fmt.Errorf("Error unmarshaling. Unknown type: " + meta.Type)
|
||||
}
|
||||
}
|
||||
|
||||
func UnmarshalListOfInputInvoice(dataList []json.RawMessage) ([]InputInvoice, error) {
|
||||
list := []InputInvoice{}
|
||||
|
||||
for _, data := range dataList {
|
||||
entity, err := UnmarshalInputInvoice(data)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
list = append(list, entity)
|
||||
}
|
||||
|
||||
return list, nil
|
||||
}
|
||||
|
||||
func UnmarshalPassportElementType(data json.RawMessage) (PassportElementType, error) {
|
||||
var meta meta
|
||||
|
||||
|
@ -2869,6 +2940,165 @@ func UnmarshalListOfLanguagePackStringValue(dataList []json.RawMessage) ([]Langu
|
|||
return list, nil
|
||||
}
|
||||
|
||||
func UnmarshalPremiumLimitType(data json.RawMessage) (PremiumLimitType, error) {
|
||||
var meta meta
|
||||
|
||||
err := json.Unmarshal(data, &meta)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
switch meta.Type {
|
||||
case TypePremiumLimitTypeSupergroupCount:
|
||||
return UnmarshalPremiumLimitTypeSupergroupCount(data)
|
||||
|
||||
case TypePremiumLimitTypePinnedChatCount:
|
||||
return UnmarshalPremiumLimitTypePinnedChatCount(data)
|
||||
|
||||
case TypePremiumLimitTypeCreatedPublicChatCount:
|
||||
return UnmarshalPremiumLimitTypeCreatedPublicChatCount(data)
|
||||
|
||||
case TypePremiumLimitTypeSavedAnimationCount:
|
||||
return UnmarshalPremiumLimitTypeSavedAnimationCount(data)
|
||||
|
||||
case TypePremiumLimitTypeFavoriteStickerCount:
|
||||
return UnmarshalPremiumLimitTypeFavoriteStickerCount(data)
|
||||
|
||||
case TypePremiumLimitTypeChatFilterCount:
|
||||
return UnmarshalPremiumLimitTypeChatFilterCount(data)
|
||||
|
||||
case TypePremiumLimitTypeChatFilterChosenChatCount:
|
||||
return UnmarshalPremiumLimitTypeChatFilterChosenChatCount(data)
|
||||
|
||||
case TypePremiumLimitTypePinnedArchivedChatCount:
|
||||
return UnmarshalPremiumLimitTypePinnedArchivedChatCount(data)
|
||||
|
||||
case TypePremiumLimitTypeCaptionLength:
|
||||
return UnmarshalPremiumLimitTypeCaptionLength(data)
|
||||
|
||||
case TypePremiumLimitTypeBioLength:
|
||||
return UnmarshalPremiumLimitTypeBioLength(data)
|
||||
|
||||
default:
|
||||
return nil, fmt.Errorf("Error unmarshaling. Unknown type: " + meta.Type)
|
||||
}
|
||||
}
|
||||
|
||||
func UnmarshalListOfPremiumLimitType(dataList []json.RawMessage) ([]PremiumLimitType, error) {
|
||||
list := []PremiumLimitType{}
|
||||
|
||||
for _, data := range dataList {
|
||||
entity, err := UnmarshalPremiumLimitType(data)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
list = append(list, entity)
|
||||
}
|
||||
|
||||
return list, nil
|
||||
}
|
||||
|
||||
func UnmarshalPremiumFeature(data json.RawMessage) (PremiumFeature, error) {
|
||||
var meta meta
|
||||
|
||||
err := json.Unmarshal(data, &meta)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
switch meta.Type {
|
||||
case TypePremiumFeatureIncreasedLimits:
|
||||
return UnmarshalPremiumFeatureIncreasedLimits(data)
|
||||
|
||||
case TypePremiumFeatureIncreasedUploadFileSize:
|
||||
return UnmarshalPremiumFeatureIncreasedUploadFileSize(data)
|
||||
|
||||
case TypePremiumFeatureImprovedDownloadSpeed:
|
||||
return UnmarshalPremiumFeatureImprovedDownloadSpeed(data)
|
||||
|
||||
case TypePremiumFeatureVoiceRecognition:
|
||||
return UnmarshalPremiumFeatureVoiceRecognition(data)
|
||||
|
||||
case TypePremiumFeatureDisabledAds:
|
||||
return UnmarshalPremiumFeatureDisabledAds(data)
|
||||
|
||||
case TypePremiumFeatureUniqueReactions:
|
||||
return UnmarshalPremiumFeatureUniqueReactions(data)
|
||||
|
||||
case TypePremiumFeatureUniqueStickers:
|
||||
return UnmarshalPremiumFeatureUniqueStickers(data)
|
||||
|
||||
case TypePremiumFeatureAdvancedChatManagement:
|
||||
return UnmarshalPremiumFeatureAdvancedChatManagement(data)
|
||||
|
||||
case TypePremiumFeatureProfileBadge:
|
||||
return UnmarshalPremiumFeatureProfileBadge(data)
|
||||
|
||||
case TypePremiumFeatureAnimatedProfilePhoto:
|
||||
return UnmarshalPremiumFeatureAnimatedProfilePhoto(data)
|
||||
|
||||
case TypePremiumFeatureAppIcons:
|
||||
return UnmarshalPremiumFeatureAppIcons(data)
|
||||
|
||||
default:
|
||||
return nil, fmt.Errorf("Error unmarshaling. Unknown type: " + meta.Type)
|
||||
}
|
||||
}
|
||||
|
||||
func UnmarshalListOfPremiumFeature(dataList []json.RawMessage) ([]PremiumFeature, error) {
|
||||
list := []PremiumFeature{}
|
||||
|
||||
for _, data := range dataList {
|
||||
entity, err := UnmarshalPremiumFeature(data)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
list = append(list, entity)
|
||||
}
|
||||
|
||||
return list, nil
|
||||
}
|
||||
|
||||
func UnmarshalPremiumSource(data json.RawMessage) (PremiumSource, error) {
|
||||
var meta meta
|
||||
|
||||
err := json.Unmarshal(data, &meta)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
switch meta.Type {
|
||||
case TypePremiumSourceLimitExceeded:
|
||||
return UnmarshalPremiumSourceLimitExceeded(data)
|
||||
|
||||
case TypePremiumSourceFeature:
|
||||
return UnmarshalPremiumSourceFeature(data)
|
||||
|
||||
case TypePremiumSourceLink:
|
||||
return UnmarshalPremiumSourceLink(data)
|
||||
|
||||
case TypePremiumSourceSettings:
|
||||
return UnmarshalPremiumSourceSettings(data)
|
||||
|
||||
default:
|
||||
return nil, fmt.Errorf("Error unmarshaling. Unknown type: " + meta.Type)
|
||||
}
|
||||
}
|
||||
|
||||
func UnmarshalListOfPremiumSource(dataList []json.RawMessage) ([]PremiumSource, error) {
|
||||
list := []PremiumSource{}
|
||||
|
||||
for _, data := range dataList {
|
||||
entity, err := UnmarshalPremiumSource(data)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
list = append(list, entity)
|
||||
}
|
||||
|
||||
return list, nil
|
||||
}
|
||||
|
||||
func UnmarshalDeviceToken(data json.RawMessage) (DeviceToken, error) {
|
||||
var meta meta
|
||||
|
||||
|
@ -3319,6 +3549,9 @@ func UnmarshalPushMessageContent(data json.RawMessage) (PushMessageContent, erro
|
|||
case TypePushMessageContentChatJoinByRequest:
|
||||
return UnmarshalPushMessageContentChatJoinByRequest(data)
|
||||
|
||||
case TypePushMessageContentRecurringPayment:
|
||||
return UnmarshalPushMessageContentRecurringPayment(data)
|
||||
|
||||
case TypePushMessageContentMessageForwards:
|
||||
return UnmarshalPushMessageContentMessageForwards(data)
|
||||
|
||||
|
@ -3751,6 +3984,43 @@ func UnmarshalListOfChatReportReason(dataList []json.RawMessage) ([]ChatReportRe
|
|||
return list, nil
|
||||
}
|
||||
|
||||
func UnmarshalTargetChat(data json.RawMessage) (TargetChat, error) {
|
||||
var meta meta
|
||||
|
||||
err := json.Unmarshal(data, &meta)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
switch meta.Type {
|
||||
case TypeTargetChatCurrent:
|
||||
return UnmarshalTargetChatCurrent(data)
|
||||
|
||||
case TypeTargetChatChosen:
|
||||
return UnmarshalTargetChatChosen(data)
|
||||
|
||||
case TypeTargetChatInternalLink:
|
||||
return UnmarshalTargetChatInternalLink(data)
|
||||
|
||||
default:
|
||||
return nil, fmt.Errorf("Error unmarshaling. Unknown type: " + meta.Type)
|
||||
}
|
||||
}
|
||||
|
||||
func UnmarshalListOfTargetChat(dataList []json.RawMessage) ([]TargetChat, error) {
|
||||
list := []TargetChat{}
|
||||
|
||||
for _, data := range dataList {
|
||||
entity, err := UnmarshalTargetChat(data)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
list = append(list, entity)
|
||||
}
|
||||
|
||||
return list, nil
|
||||
}
|
||||
|
||||
func UnmarshalInternalLinkType(data json.RawMessage) (InternalLinkType, error) {
|
||||
var meta meta
|
||||
|
||||
|
@ -3793,6 +4063,9 @@ func UnmarshalInternalLinkType(data json.RawMessage) (InternalLinkType, error) {
|
|||
case TypeInternalLinkTypeGame:
|
||||
return UnmarshalInternalLinkTypeGame(data)
|
||||
|
||||
case TypeInternalLinkTypeInvoice:
|
||||
return UnmarshalInternalLinkTypeInvoice(data)
|
||||
|
||||
case TypeInternalLinkTypeLanguagePack:
|
||||
return UnmarshalInternalLinkTypeLanguagePack(data)
|
||||
|
||||
|
@ -3811,6 +4084,9 @@ func UnmarshalInternalLinkType(data json.RawMessage) (InternalLinkType, error) {
|
|||
case TypeInternalLinkTypePhoneNumberConfirmation:
|
||||
return UnmarshalInternalLinkTypePhoneNumberConfirmation(data)
|
||||
|
||||
case TypeInternalLinkTypePremiumFeatures:
|
||||
return UnmarshalInternalLinkTypePremiumFeatures(data)
|
||||
|
||||
case TypeInternalLinkTypePrivacyAndSecuritySettings:
|
||||
return UnmarshalInternalLinkTypePrivacyAndSecuritySettings(data)
|
||||
|
||||
|
@ -7167,8 +7443,24 @@ func UnmarshalInputCredentialsGooglePay(data json.RawMessage) (*InputCredentials
|
|||
return &resp, err
|
||||
}
|
||||
|
||||
func UnmarshalPaymentsProviderStripe(data json.RawMessage) (*PaymentsProviderStripe, error) {
|
||||
var resp PaymentsProviderStripe
|
||||
func UnmarshalPaymentProviderSmartGlocal(data json.RawMessage) (*PaymentProviderSmartGlocal, error) {
|
||||
var resp PaymentProviderSmartGlocal
|
||||
|
||||
err := json.Unmarshal(data, &resp)
|
||||
|
||||
return &resp, err
|
||||
}
|
||||
|
||||
func UnmarshalPaymentProviderStripe(data json.RawMessage) (*PaymentProviderStripe, error) {
|
||||
var resp PaymentProviderStripe
|
||||
|
||||
err := json.Unmarshal(data, &resp)
|
||||
|
||||
return &resp, err
|
||||
}
|
||||
|
||||
func UnmarshalPaymentProviderOther(data json.RawMessage) (*PaymentProviderOther, error) {
|
||||
var resp PaymentProviderOther
|
||||
|
||||
err := json.Unmarshal(data, &resp)
|
||||
|
||||
|
@ -7207,6 +7499,22 @@ func UnmarshalPaymentReceipt(data json.RawMessage) (*PaymentReceipt, error) {
|
|||
return &resp, err
|
||||
}
|
||||
|
||||
func UnmarshalInputInvoiceMessage(data json.RawMessage) (*InputInvoiceMessage, error) {
|
||||
var resp InputInvoiceMessage
|
||||
|
||||
err := json.Unmarshal(data, &resp)
|
||||
|
||||
return &resp, err
|
||||
}
|
||||
|
||||
func UnmarshalInputInvoiceName(data json.RawMessage) (*InputInvoiceName, error) {
|
||||
var resp InputInvoiceName
|
||||
|
||||
err := json.Unmarshal(data, &resp)
|
||||
|
||||
return &resp, err
|
||||
}
|
||||
|
||||
func UnmarshalDatedFile(data json.RawMessage) (*DatedFile, error) {
|
||||
var resp DatedFile
|
||||
|
||||
|
@ -8871,6 +9179,14 @@ func UnmarshalStickerSets(data json.RawMessage) (*StickerSets, error) {
|
|||
return &resp, err
|
||||
}
|
||||
|
||||
func UnmarshalTrendingStickerSets(data json.RawMessage) (*TrendingStickerSets, error) {
|
||||
var resp TrendingStickerSets
|
||||
|
||||
err := json.Unmarshal(data, &resp)
|
||||
|
||||
return &resp, err
|
||||
}
|
||||
|
||||
func UnmarshalCallDiscardReasonEmpty(data json.RawMessage) (*CallDiscardReasonEmpty, error) {
|
||||
var resp CallDiscardReasonEmpty
|
||||
|
||||
|
@ -9199,6 +9515,14 @@ func UnmarshalAddedReactions(data json.RawMessage) (*AddedReactions, error) {
|
|||
return &resp, err
|
||||
}
|
||||
|
||||
func UnmarshalAvailableReaction(data json.RawMessage) (*AvailableReaction, error) {
|
||||
var resp AvailableReaction
|
||||
|
||||
err := json.Unmarshal(data, &resp)
|
||||
|
||||
return &resp, err
|
||||
}
|
||||
|
||||
func UnmarshalAvailableReactions(data json.RawMessage) (*AvailableReactions, error) {
|
||||
var resp AvailableReactions
|
||||
|
||||
|
@ -9895,6 +10219,238 @@ func UnmarshalLocalizationTargetInfo(data json.RawMessage) (*LocalizationTargetI
|
|||
return &resp, err
|
||||
}
|
||||
|
||||
func UnmarshalPremiumLimitTypeSupergroupCount(data json.RawMessage) (*PremiumLimitTypeSupergroupCount, error) {
|
||||
var resp PremiumLimitTypeSupergroupCount
|
||||
|
||||
err := json.Unmarshal(data, &resp)
|
||||
|
||||
return &resp, err
|
||||
}
|
||||
|
||||
func UnmarshalPremiumLimitTypePinnedChatCount(data json.RawMessage) (*PremiumLimitTypePinnedChatCount, error) {
|
||||
var resp PremiumLimitTypePinnedChatCount
|
||||
|
||||
err := json.Unmarshal(data, &resp)
|
||||
|
||||
return &resp, err
|
||||
}
|
||||
|
||||
func UnmarshalPremiumLimitTypeCreatedPublicChatCount(data json.RawMessage) (*PremiumLimitTypeCreatedPublicChatCount, error) {
|
||||
var resp PremiumLimitTypeCreatedPublicChatCount
|
||||
|
||||
err := json.Unmarshal(data, &resp)
|
||||
|
||||
return &resp, err
|
||||
}
|
||||
|
||||
func UnmarshalPremiumLimitTypeSavedAnimationCount(data json.RawMessage) (*PremiumLimitTypeSavedAnimationCount, error) {
|
||||
var resp PremiumLimitTypeSavedAnimationCount
|
||||
|
||||
err := json.Unmarshal(data, &resp)
|
||||
|
||||
return &resp, err
|
||||
}
|
||||
|
||||
func UnmarshalPremiumLimitTypeFavoriteStickerCount(data json.RawMessage) (*PremiumLimitTypeFavoriteStickerCount, error) {
|
||||
var resp PremiumLimitTypeFavoriteStickerCount
|
||||
|
||||
err := json.Unmarshal(data, &resp)
|
||||
|
||||
return &resp, err
|
||||
}
|
||||
|
||||
func UnmarshalPremiumLimitTypeChatFilterCount(data json.RawMessage) (*PremiumLimitTypeChatFilterCount, error) {
|
||||
var resp PremiumLimitTypeChatFilterCount
|
||||
|
||||
err := json.Unmarshal(data, &resp)
|
||||
|
||||
return &resp, err
|
||||
}
|
||||
|
||||
func UnmarshalPremiumLimitTypeChatFilterChosenChatCount(data json.RawMessage) (*PremiumLimitTypeChatFilterChosenChatCount, error) {
|
||||
var resp PremiumLimitTypeChatFilterChosenChatCount
|
||||
|
||||
err := json.Unmarshal(data, &resp)
|
||||
|
||||
return &resp, err
|
||||
}
|
||||
|
||||
func UnmarshalPremiumLimitTypePinnedArchivedChatCount(data json.RawMessage) (*PremiumLimitTypePinnedArchivedChatCount, error) {
|
||||
var resp PremiumLimitTypePinnedArchivedChatCount
|
||||
|
||||
err := json.Unmarshal(data, &resp)
|
||||
|
||||
return &resp, err
|
||||
}
|
||||
|
||||
func UnmarshalPremiumLimitTypeCaptionLength(data json.RawMessage) (*PremiumLimitTypeCaptionLength, error) {
|
||||
var resp PremiumLimitTypeCaptionLength
|
||||
|
||||
err := json.Unmarshal(data, &resp)
|
||||
|
||||
return &resp, err
|
||||
}
|
||||
|
||||
func UnmarshalPremiumLimitTypeBioLength(data json.RawMessage) (*PremiumLimitTypeBioLength, error) {
|
||||
var resp PremiumLimitTypeBioLength
|
||||
|
||||
err := json.Unmarshal(data, &resp)
|
||||
|
||||
return &resp, err
|
||||
}
|
||||
|
||||
func UnmarshalPremiumFeatureIncreasedLimits(data json.RawMessage) (*PremiumFeatureIncreasedLimits, error) {
|
||||
var resp PremiumFeatureIncreasedLimits
|
||||
|
||||
err := json.Unmarshal(data, &resp)
|
||||
|
||||
return &resp, err
|
||||
}
|
||||
|
||||
func UnmarshalPremiumFeatureIncreasedUploadFileSize(data json.RawMessage) (*PremiumFeatureIncreasedUploadFileSize, error) {
|
||||
var resp PremiumFeatureIncreasedUploadFileSize
|
||||
|
||||
err := json.Unmarshal(data, &resp)
|
||||
|
||||
return &resp, err
|
||||
}
|
||||
|
||||
func UnmarshalPremiumFeatureImprovedDownloadSpeed(data json.RawMessage) (*PremiumFeatureImprovedDownloadSpeed, error) {
|
||||
var resp PremiumFeatureImprovedDownloadSpeed
|
||||
|
||||
err := json.Unmarshal(data, &resp)
|
||||
|
||||
return &resp, err
|
||||
}
|
||||
|
||||
func UnmarshalPremiumFeatureVoiceRecognition(data json.RawMessage) (*PremiumFeatureVoiceRecognition, error) {
|
||||
var resp PremiumFeatureVoiceRecognition
|
||||
|
||||
err := json.Unmarshal(data, &resp)
|
||||
|
||||
return &resp, err
|
||||
}
|
||||
|
||||
func UnmarshalPremiumFeatureDisabledAds(data json.RawMessage) (*PremiumFeatureDisabledAds, error) {
|
||||
var resp PremiumFeatureDisabledAds
|
||||
|
||||
err := json.Unmarshal(data, &resp)
|
||||
|
||||
return &resp, err
|
||||
}
|
||||
|
||||
func UnmarshalPremiumFeatureUniqueReactions(data json.RawMessage) (*PremiumFeatureUniqueReactions, error) {
|
||||
var resp PremiumFeatureUniqueReactions
|
||||
|
||||
err := json.Unmarshal(data, &resp)
|
||||
|
||||
return &resp, err
|
||||
}
|
||||
|
||||
func UnmarshalPremiumFeatureUniqueStickers(data json.RawMessage) (*PremiumFeatureUniqueStickers, error) {
|
||||
var resp PremiumFeatureUniqueStickers
|
||||
|
||||
err := json.Unmarshal(data, &resp)
|
||||
|
||||
return &resp, err
|
||||
}
|
||||
|
||||
func UnmarshalPremiumFeatureAdvancedChatManagement(data json.RawMessage) (*PremiumFeatureAdvancedChatManagement, error) {
|
||||
var resp PremiumFeatureAdvancedChatManagement
|
||||
|
||||
err := json.Unmarshal(data, &resp)
|
||||
|
||||
return &resp, err
|
||||
}
|
||||
|
||||
func UnmarshalPremiumFeatureProfileBadge(data json.RawMessage) (*PremiumFeatureProfileBadge, error) {
|
||||
var resp PremiumFeatureProfileBadge
|
||||
|
||||
err := json.Unmarshal(data, &resp)
|
||||
|
||||
return &resp, err
|
||||
}
|
||||
|
||||
func UnmarshalPremiumFeatureAnimatedProfilePhoto(data json.RawMessage) (*PremiumFeatureAnimatedProfilePhoto, error) {
|
||||
var resp PremiumFeatureAnimatedProfilePhoto
|
||||
|
||||
err := json.Unmarshal(data, &resp)
|
||||
|
||||
return &resp, err
|
||||
}
|
||||
|
||||
func UnmarshalPremiumFeatureAppIcons(data json.RawMessage) (*PremiumFeatureAppIcons, error) {
|
||||
var resp PremiumFeatureAppIcons
|
||||
|
||||
err := json.Unmarshal(data, &resp)
|
||||
|
||||
return &resp, err
|
||||
}
|
||||
|
||||
func UnmarshalPremiumLimit(data json.RawMessage) (*PremiumLimit, error) {
|
||||
var resp PremiumLimit
|
||||
|
||||
err := json.Unmarshal(data, &resp)
|
||||
|
||||
return &resp, err
|
||||
}
|
||||
|
||||
func UnmarshalPremiumFeatures(data json.RawMessage) (*PremiumFeatures, error) {
|
||||
var resp PremiumFeatures
|
||||
|
||||
err := json.Unmarshal(data, &resp)
|
||||
|
||||
return &resp, err
|
||||
}
|
||||
|
||||
func UnmarshalPremiumSourceLimitExceeded(data json.RawMessage) (*PremiumSourceLimitExceeded, error) {
|
||||
var resp PremiumSourceLimitExceeded
|
||||
|
||||
err := json.Unmarshal(data, &resp)
|
||||
|
||||
return &resp, err
|
||||
}
|
||||
|
||||
func UnmarshalPremiumSourceFeature(data json.RawMessage) (*PremiumSourceFeature, error) {
|
||||
var resp PremiumSourceFeature
|
||||
|
||||
err := json.Unmarshal(data, &resp)
|
||||
|
||||
return &resp, err
|
||||
}
|
||||
|
||||
func UnmarshalPremiumSourceLink(data json.RawMessage) (*PremiumSourceLink, error) {
|
||||
var resp PremiumSourceLink
|
||||
|
||||
err := json.Unmarshal(data, &resp)
|
||||
|
||||
return &resp, err
|
||||
}
|
||||
|
||||
func UnmarshalPremiumSourceSettings(data json.RawMessage) (*PremiumSourceSettings, error) {
|
||||
var resp PremiumSourceSettings
|
||||
|
||||
err := json.Unmarshal(data, &resp)
|
||||
|
||||
return &resp, err
|
||||
}
|
||||
|
||||
func UnmarshalPremiumFeaturePromotionAnimation(data json.RawMessage) (*PremiumFeaturePromotionAnimation, error) {
|
||||
var resp PremiumFeaturePromotionAnimation
|
||||
|
||||
err := json.Unmarshal(data, &resp)
|
||||
|
||||
return &resp, err
|
||||
}
|
||||
|
||||
func UnmarshalPremiumState(data json.RawMessage) (*PremiumState, error) {
|
||||
var resp PremiumState
|
||||
|
||||
err := json.Unmarshal(data, &resp)
|
||||
|
||||
return &resp, err
|
||||
}
|
||||
|
||||
func UnmarshalDeviceTokenFirebaseCloudMessaging(data json.RawMessage) (*DeviceTokenFirebaseCloudMessaging, error) {
|
||||
var resp DeviceTokenFirebaseCloudMessaging
|
||||
|
||||
|
@ -10447,6 +11003,14 @@ func UnmarshalPushMessageContentChatJoinByRequest(data json.RawMessage) (*PushMe
|
|||
return &resp, err
|
||||
}
|
||||
|
||||
func UnmarshalPushMessageContentRecurringPayment(data json.RawMessage) (*PushMessageContentRecurringPayment, error) {
|
||||
var resp PushMessageContentRecurringPayment
|
||||
|
||||
err := json.Unmarshal(data, &resp)
|
||||
|
||||
return &resp, err
|
||||
}
|
||||
|
||||
func UnmarshalPushMessageContentMessageForwards(data json.RawMessage) (*PushMessageContentMessageForwards, error) {
|
||||
var resp PushMessageContentMessageForwards
|
||||
|
||||
|
@ -11039,6 +11603,30 @@ func UnmarshalChatReportReasonCustom(data json.RawMessage) (*ChatReportReasonCus
|
|||
return &resp, err
|
||||
}
|
||||
|
||||
func UnmarshalTargetChatCurrent(data json.RawMessage) (*TargetChatCurrent, error) {
|
||||
var resp TargetChatCurrent
|
||||
|
||||
err := json.Unmarshal(data, &resp)
|
||||
|
||||
return &resp, err
|
||||
}
|
||||
|
||||
func UnmarshalTargetChatChosen(data json.RawMessage) (*TargetChatChosen, error) {
|
||||
var resp TargetChatChosen
|
||||
|
||||
err := json.Unmarshal(data, &resp)
|
||||
|
||||
return &resp, err
|
||||
}
|
||||
|
||||
func UnmarshalTargetChatInternalLink(data json.RawMessage) (*TargetChatInternalLink, error) {
|
||||
var resp TargetChatInternalLink
|
||||
|
||||
err := json.Unmarshal(data, &resp)
|
||||
|
||||
return &resp, err
|
||||
}
|
||||
|
||||
func UnmarshalInternalLinkTypeActiveSessions(data json.RawMessage) (*InternalLinkTypeActiveSessions, error) {
|
||||
var resp InternalLinkTypeActiveSessions
|
||||
|
||||
|
@ -11127,6 +11715,14 @@ func UnmarshalInternalLinkTypeGame(data json.RawMessage) (*InternalLinkTypeGame,
|
|||
return &resp, err
|
||||
}
|
||||
|
||||
func UnmarshalInternalLinkTypeInvoice(data json.RawMessage) (*InternalLinkTypeInvoice, error) {
|
||||
var resp InternalLinkTypeInvoice
|
||||
|
||||
err := json.Unmarshal(data, &resp)
|
||||
|
||||
return &resp, err
|
||||
}
|
||||
|
||||
func UnmarshalInternalLinkTypeLanguagePack(data json.RawMessage) (*InternalLinkTypeLanguagePack, error) {
|
||||
var resp InternalLinkTypeLanguagePack
|
||||
|
||||
|
@ -11175,6 +11771,14 @@ func UnmarshalInternalLinkTypePhoneNumberConfirmation(data json.RawMessage) (*In
|
|||
return &resp, err
|
||||
}
|
||||
|
||||
func UnmarshalInternalLinkTypePremiumFeatures(data json.RawMessage) (*InternalLinkTypePremiumFeatures, error) {
|
||||
var resp InternalLinkTypePremiumFeatures
|
||||
|
||||
err := json.Unmarshal(data, &resp)
|
||||
|
||||
return &resp, err
|
||||
}
|
||||
|
||||
func UnmarshalInternalLinkTypePrivacyAndSecuritySettings(data json.RawMessage) (*InternalLinkTypePrivacyAndSecuritySettings, error) {
|
||||
var resp InternalLinkTypePrivacyAndSecuritySettings
|
||||
|
||||
|
@ -11767,6 +12371,14 @@ func UnmarshalSeconds(data json.RawMessage) (*Seconds, error) {
|
|||
return &resp, err
|
||||
}
|
||||
|
||||
func UnmarshalFileDownloadedPrefixSize(data json.RawMessage) (*FileDownloadedPrefixSize, error) {
|
||||
var resp FileDownloadedPrefixSize
|
||||
|
||||
err := json.Unmarshal(data, &resp)
|
||||
|
||||
return &resp, err
|
||||
}
|
||||
|
||||
func UnmarshalDeepLinkInfo(data json.RawMessage) (*DeepLinkInfo, error) {
|
||||
var resp DeepLinkInfo
|
||||
|
||||
|
@ -13840,8 +14452,14 @@ func UnmarshalType(data json.RawMessage) (Type, error) {
|
|||
case TypeInputCredentialsGooglePay:
|
||||
return UnmarshalInputCredentialsGooglePay(data)
|
||||
|
||||
case TypePaymentsProviderStripe:
|
||||
return UnmarshalPaymentsProviderStripe(data)
|
||||
case TypePaymentProviderSmartGlocal:
|
||||
return UnmarshalPaymentProviderSmartGlocal(data)
|
||||
|
||||
case TypePaymentProviderStripe:
|
||||
return UnmarshalPaymentProviderStripe(data)
|
||||
|
||||
case TypePaymentProviderOther:
|
||||
return UnmarshalPaymentProviderOther(data)
|
||||
|
||||
case TypePaymentForm:
|
||||
return UnmarshalPaymentForm(data)
|
||||
|
@ -13855,6 +14473,12 @@ func UnmarshalType(data json.RawMessage) (Type, error) {
|
|||
case TypePaymentReceipt:
|
||||
return UnmarshalPaymentReceipt(data)
|
||||
|
||||
case TypeInputInvoiceMessage:
|
||||
return UnmarshalInputInvoiceMessage(data)
|
||||
|
||||
case TypeInputInvoiceName:
|
||||
return UnmarshalInputInvoiceName(data)
|
||||
|
||||
case TypeDatedFile:
|
||||
return UnmarshalDatedFile(data)
|
||||
|
||||
|
@ -14479,6 +15103,9 @@ func UnmarshalType(data json.RawMessage) (Type, error) {
|
|||
case TypeStickerSets:
|
||||
return UnmarshalStickerSets(data)
|
||||
|
||||
case TypeTrendingStickerSets:
|
||||
return UnmarshalTrendingStickerSets(data)
|
||||
|
||||
case TypeCallDiscardReasonEmpty:
|
||||
return UnmarshalCallDiscardReasonEmpty(data)
|
||||
|
||||
|
@ -14602,6 +15229,9 @@ func UnmarshalType(data json.RawMessage) (Type, error) {
|
|||
case TypeAddedReactions:
|
||||
return UnmarshalAddedReactions(data)
|
||||
|
||||
case TypeAvailableReaction:
|
||||
return UnmarshalAvailableReaction(data)
|
||||
|
||||
case TypeAvailableReactions:
|
||||
return UnmarshalAvailableReactions(data)
|
||||
|
||||
|
@ -14863,6 +15493,93 @@ func UnmarshalType(data json.RawMessage) (Type, error) {
|
|||
case TypeLocalizationTargetInfo:
|
||||
return UnmarshalLocalizationTargetInfo(data)
|
||||
|
||||
case TypePremiumLimitTypeSupergroupCount:
|
||||
return UnmarshalPremiumLimitTypeSupergroupCount(data)
|
||||
|
||||
case TypePremiumLimitTypePinnedChatCount:
|
||||
return UnmarshalPremiumLimitTypePinnedChatCount(data)
|
||||
|
||||
case TypePremiumLimitTypeCreatedPublicChatCount:
|
||||
return UnmarshalPremiumLimitTypeCreatedPublicChatCount(data)
|
||||
|
||||
case TypePremiumLimitTypeSavedAnimationCount:
|
||||
return UnmarshalPremiumLimitTypeSavedAnimationCount(data)
|
||||
|
||||
case TypePremiumLimitTypeFavoriteStickerCount:
|
||||
return UnmarshalPremiumLimitTypeFavoriteStickerCount(data)
|
||||
|
||||
case TypePremiumLimitTypeChatFilterCount:
|
||||
return UnmarshalPremiumLimitTypeChatFilterCount(data)
|
||||
|
||||
case TypePremiumLimitTypeChatFilterChosenChatCount:
|
||||
return UnmarshalPremiumLimitTypeChatFilterChosenChatCount(data)
|
||||
|
||||
case TypePremiumLimitTypePinnedArchivedChatCount:
|
||||
return UnmarshalPremiumLimitTypePinnedArchivedChatCount(data)
|
||||
|
||||
case TypePremiumLimitTypeCaptionLength:
|
||||
return UnmarshalPremiumLimitTypeCaptionLength(data)
|
||||
|
||||
case TypePremiumLimitTypeBioLength:
|
||||
return UnmarshalPremiumLimitTypeBioLength(data)
|
||||
|
||||
case TypePremiumFeatureIncreasedLimits:
|
||||
return UnmarshalPremiumFeatureIncreasedLimits(data)
|
||||
|
||||
case TypePremiumFeatureIncreasedUploadFileSize:
|
||||
return UnmarshalPremiumFeatureIncreasedUploadFileSize(data)
|
||||
|
||||
case TypePremiumFeatureImprovedDownloadSpeed:
|
||||
return UnmarshalPremiumFeatureImprovedDownloadSpeed(data)
|
||||
|
||||
case TypePremiumFeatureVoiceRecognition:
|
||||
return UnmarshalPremiumFeatureVoiceRecognition(data)
|
||||
|
||||
case TypePremiumFeatureDisabledAds:
|
||||
return UnmarshalPremiumFeatureDisabledAds(data)
|
||||
|
||||
case TypePremiumFeatureUniqueReactions:
|
||||
return UnmarshalPremiumFeatureUniqueReactions(data)
|
||||
|
||||
case TypePremiumFeatureUniqueStickers:
|
||||
return UnmarshalPremiumFeatureUniqueStickers(data)
|
||||
|
||||
case TypePremiumFeatureAdvancedChatManagement:
|
||||
return UnmarshalPremiumFeatureAdvancedChatManagement(data)
|
||||
|
||||
case TypePremiumFeatureProfileBadge:
|
||||
return UnmarshalPremiumFeatureProfileBadge(data)
|
||||
|
||||
case TypePremiumFeatureAnimatedProfilePhoto:
|
||||
return UnmarshalPremiumFeatureAnimatedProfilePhoto(data)
|
||||
|
||||
case TypePremiumFeatureAppIcons:
|
||||
return UnmarshalPremiumFeatureAppIcons(data)
|
||||
|
||||
case TypePremiumLimit:
|
||||
return UnmarshalPremiumLimit(data)
|
||||
|
||||
case TypePremiumFeatures:
|
||||
return UnmarshalPremiumFeatures(data)
|
||||
|
||||
case TypePremiumSourceLimitExceeded:
|
||||
return UnmarshalPremiumSourceLimitExceeded(data)
|
||||
|
||||
case TypePremiumSourceFeature:
|
||||
return UnmarshalPremiumSourceFeature(data)
|
||||
|
||||
case TypePremiumSourceLink:
|
||||
return UnmarshalPremiumSourceLink(data)
|
||||
|
||||
case TypePremiumSourceSettings:
|
||||
return UnmarshalPremiumSourceSettings(data)
|
||||
|
||||
case TypePremiumFeaturePromotionAnimation:
|
||||
return UnmarshalPremiumFeaturePromotionAnimation(data)
|
||||
|
||||
case TypePremiumState:
|
||||
return UnmarshalPremiumState(data)
|
||||
|
||||
case TypeDeviceTokenFirebaseCloudMessaging:
|
||||
return UnmarshalDeviceTokenFirebaseCloudMessaging(data)
|
||||
|
||||
|
@ -15070,6 +15787,9 @@ func UnmarshalType(data json.RawMessage) (Type, error) {
|
|||
case TypePushMessageContentChatJoinByRequest:
|
||||
return UnmarshalPushMessageContentChatJoinByRequest(data)
|
||||
|
||||
case TypePushMessageContentRecurringPayment:
|
||||
return UnmarshalPushMessageContentRecurringPayment(data)
|
||||
|
||||
case TypePushMessageContentMessageForwards:
|
||||
return UnmarshalPushMessageContentMessageForwards(data)
|
||||
|
||||
|
@ -15292,6 +16012,15 @@ func UnmarshalType(data json.RawMessage) (Type, error) {
|
|||
case TypeChatReportReasonCustom:
|
||||
return UnmarshalChatReportReasonCustom(data)
|
||||
|
||||
case TypeTargetChatCurrent:
|
||||
return UnmarshalTargetChatCurrent(data)
|
||||
|
||||
case TypeTargetChatChosen:
|
||||
return UnmarshalTargetChatChosen(data)
|
||||
|
||||
case TypeTargetChatInternalLink:
|
||||
return UnmarshalTargetChatInternalLink(data)
|
||||
|
||||
case TypeInternalLinkTypeActiveSessions:
|
||||
return UnmarshalInternalLinkTypeActiveSessions(data)
|
||||
|
||||
|
@ -15325,6 +16054,9 @@ func UnmarshalType(data json.RawMessage) (Type, error) {
|
|||
case TypeInternalLinkTypeGame:
|
||||
return UnmarshalInternalLinkTypeGame(data)
|
||||
|
||||
case TypeInternalLinkTypeInvoice:
|
||||
return UnmarshalInternalLinkTypeInvoice(data)
|
||||
|
||||
case TypeInternalLinkTypeLanguagePack:
|
||||
return UnmarshalInternalLinkTypeLanguagePack(data)
|
||||
|
||||
|
@ -15343,6 +16075,9 @@ func UnmarshalType(data json.RawMessage) (Type, error) {
|
|||
case TypeInternalLinkTypePhoneNumberConfirmation:
|
||||
return UnmarshalInternalLinkTypePhoneNumberConfirmation(data)
|
||||
|
||||
case TypeInternalLinkTypePremiumFeatures:
|
||||
return UnmarshalInternalLinkTypePremiumFeatures(data)
|
||||
|
||||
case TypeInternalLinkTypePrivacyAndSecuritySettings:
|
||||
return UnmarshalInternalLinkTypePrivacyAndSecuritySettings(data)
|
||||
|
||||
|
@ -15565,6 +16300,9 @@ func UnmarshalType(data json.RawMessage) (Type, error) {
|
|||
case TypeSeconds:
|
||||
return UnmarshalSeconds(data)
|
||||
|
||||
case TypeFileDownloadedPrefixSize:
|
||||
return UnmarshalFileDownloadedPrefixSize(data)
|
||||
|
||||
case TypeDeepLinkInfo:
|
||||
return UnmarshalDeepLinkInfo(data)
|
||||
|
||||
|
|
435
data/td_api.tl
435
data/td_api.tl
|
@ -142,7 +142,7 @@ temporaryPasswordState has_password:Bool valid_for:int32 = TemporaryPasswordStat
|
|||
//@download_offset Download will be started from this offset. downloaded_prefix_size is calculated from this offset
|
||||
//@downloaded_prefix_size If is_downloading_completed is false, then only some prefix of the file starting from download_offset is ready to be read. downloaded_prefix_size is the size of that prefix in bytes
|
||||
//@downloaded_size Total downloaded file size, in bytes. Can be used only for calculating download progress. The actual file size may be bigger, and some parts of it may contain garbage
|
||||
localFile path:string can_be_downloaded:Bool can_be_deleted:Bool is_downloading_active:Bool is_downloading_completed:Bool download_offset:int32 downloaded_prefix_size:int32 downloaded_size:int32 = LocalFile;
|
||||
localFile path:string can_be_downloaded:Bool can_be_deleted:Bool is_downloading_active:Bool is_downloading_completed:Bool download_offset:int53 downloaded_prefix_size:int53 downloaded_size:int53 = LocalFile;
|
||||
|
||||
//@description Represents a remote file
|
||||
//@id Remote file identifier; may be empty. Can be used by the current user across application restarts or even from other devices. Uniquely identifies a file, but a file can have a lot of different valid identifiers.
|
||||
|
@ -152,7 +152,7 @@ localFile path:string can_be_downloaded:Bool can_be_deleted:Bool is_downloading_
|
|||
//@is_uploading_active True, if the file is currently being uploaded (or a remote copy is being generated by some other means)
|
||||
//@is_uploading_completed True, if a remote copy is fully available
|
||||
//@uploaded_size Size of the remote available part of the file, in bytes; 0 if unknown
|
||||
remoteFile id:string unique_id:string is_uploading_active:Bool is_uploading_completed:Bool uploaded_size:int32 = RemoteFile;
|
||||
remoteFile id:string unique_id:string is_uploading_active:Bool is_uploading_completed:Bool uploaded_size:int53 = RemoteFile;
|
||||
|
||||
//@description Represents a file
|
||||
//@id Unique file identifier
|
||||
|
@ -161,7 +161,7 @@ remoteFile id:string unique_id:string is_uploading_active:Bool is_uploading_comp
|
|||
//@expected_size Approximate file size in bytes in case the exact file size is unknown. Can be used to show download/upload progress
|
||||
//@local Information about the local copy of the file
|
||||
//@remote Information about the remote copy of the file
|
||||
file id:int32 dc_id:int32 size:int32 expected_size:int32 local:localFile remote:remoteFile = File;
|
||||
file id:int32 dc_id:int32 size:int53 expected_size:int53 local:localFile remote:remoteFile = File;
|
||||
|
||||
|
||||
//@class InputFile @description Points to a file
|
||||
|
@ -180,7 +180,7 @@ inputFileLocal path:string = InputFile;
|
|||
//@description A file generated by the application @original_path Local path to a file from which the file is generated; may be empty if there is no such 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
|
||||
//@expected_size Expected size of the generated file, in bytes; 0 if unknown
|
||||
inputFileGenerated original_path:string conversion:string expected_size:int32 = InputFile;
|
||||
inputFileGenerated original_path:string conversion:string expected_size:int53 = InputFile;
|
||||
|
||||
|
||||
//@description Describes an image in JPEG format @type Image type (see https://core.telegram.org/constructor/photoSize)
|
||||
|
@ -297,8 +297,8 @@ photo has_stickers:Bool minithumbnail:minithumbnail sizes:vector<photoSize> = Ph
|
|||
|
||||
//@description Describes a sticker @set_id The identifier of the sticker set to which the sticker belongs; 0 if none @width Sticker width; as defined by the sender @height Sticker height; as defined by the sender
|
||||
//@emoji Emoji corresponding to the sticker @type Sticker type @outline Sticker's outline represented as a list of closed vector paths; may be empty. The coordinate system origin is in the upper-left corner
|
||||
//@thumbnail Sticker thumbnail in WEBP or JPEG format; may be null @sticker File containing the sticker
|
||||
sticker set_id:int64 width:int32 height:int32 emoji:string type:StickerType outline:vector<closedVectorPath> thumbnail:thumbnail sticker:file = Sticker;
|
||||
//@thumbnail Sticker thumbnail in WEBP or JPEG format; may be null @premium_animation Premium animation of the sticker; may be null. If present, only Premium users can send the sticker @sticker File containing the sticker
|
||||
sticker set_id:int64 width:int32 height:int32 emoji:string type:StickerType outline:vector<closedVectorPath> thumbnail:thumbnail premium_animation:file sticker:file = Sticker;
|
||||
|
||||
//@description Describes a video file @duration Duration of the video, in seconds; as defined by the sender @width Video width; as defined by the sender @height Video height; 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
|
||||
|
@ -312,9 +312,11 @@ video duration:int32 width:int32 height:int32 file_name:string mime_type:string
|
|||
//@thumbnail Video thumbnail in JPEG format; as defined by the sender; may be null @video File containing the video
|
||||
videoNote duration:int32 length:int32 minithumbnail:minithumbnail thumbnail:thumbnail video:file = VideoNote;
|
||||
|
||||
//@description Describes a voice note. The voice note must be encoded with the Opus codec, and stored inside an OGG container. Voice notes can have only a single audio channel @duration Duration of the voice note, in seconds; as defined by the sender
|
||||
//@waveform A waveform representation of the voice note in 5-bit format @mime_type MIME type of the file; as defined by the sender @voice File containing the voice note
|
||||
voiceNote duration:int32 waveform:bytes mime_type:string voice:file = VoiceNote;
|
||||
//@description Describes a voice note. The voice note must be encoded with the Opus codec, and stored inside an OGG container. Voice notes can have only a single audio channel
|
||||
//@duration Duration of the voice note, in seconds; as defined by the sender @waveform A waveform representation of the voice note in 5-bit format
|
||||
//@mime_type MIME type of the file; as defined by the sender @is_recognized True, if speech recognition is completed; Premium users only
|
||||
//@recognized_text Recognized text of the voice note; Premium users only. Call recognizeSpeech to get recognized text of the voice note @voice File containing the voice note
|
||||
voiceNote duration:int32 waveform:bytes mime_type:string is_recognized:Bool recognized_text:string voice:file = VoiceNote;
|
||||
|
||||
//@description Describes an animated representation of an emoji
|
||||
//@sticker Animated sticker for the emoji
|
||||
|
@ -406,8 +408,9 @@ animatedChatPhoto length:int32 file:file main_frame_timestamp:double = AnimatedC
|
|||
//@added_date Point in time (Unix timestamp) when the photo has been added
|
||||
//@minithumbnail Photo minithumbnail; may be null
|
||||
//@sizes Available variants of the photo in JPEG format, in different size
|
||||
//@animation Animated variant of the photo in MPEG4 format; may be null
|
||||
chatPhoto id:int64 added_date:int32 minithumbnail:minithumbnail sizes:vector<photoSize> animation:animatedChatPhoto = ChatPhoto;
|
||||
//@animation A big (640x640) animated variant of the photo in MPEG4 format; may be null
|
||||
//@small_animation A small (160x160) animated variant of the photo in MPEG4 format; may be null even the big animation is available
|
||||
chatPhoto id:int64 added_date:int32 minithumbnail:minithumbnail sizes:vector<photoSize> animation:animatedChatPhoto small_animation:animatedChatPhoto = ChatPhoto;
|
||||
|
||||
//@description Contains a list of chat or user profile photos @total_count Total number of photos @photos List of photos
|
||||
chatPhotos total_count:int32 photos:vector<chatPhoto> = ChatPhotos;
|
||||
|
@ -468,6 +471,7 @@ chatAdministratorRights can_manage_chat:Bool can_change_info:Bool can_post_messa
|
|||
//@is_contact The user is a contact of the current user
|
||||
//@is_mutual_contact The user is a contact of the current user and the current user is a contact of the user
|
||||
//@is_verified True, if the user is verified
|
||||
//@is_premium True, if the user is a Telegram Premium user
|
||||
//@is_support True, if the user is Telegram support account
|
||||
//@restriction_reason If non-empty, it contains a human-readable description of the reason why access to this user must be restricted
|
||||
//@is_scam True, if many users reported this user as a scam
|
||||
|
@ -475,16 +479,20 @@ chatAdministratorRights can_manage_chat:Bool can_change_info:Bool can_post_messa
|
|||
//@have_access If false, the user is inaccessible, and the only information known about the user is inside this class. Identifier of the user can't be passed to any method except GetUser
|
||||
//@type Type of the user
|
||||
//@language_code IETF language tag of the user's language; only available to bots
|
||||
user id:int53 access_hash:int64 first_name:string last_name:string username:string phone_number:string status:UserStatus profile_photo:profilePhoto is_contact:Bool is_mutual_contact:Bool is_verified:Bool is_support:Bool restriction_reason:string is_scam:Bool is_fake:Bool have_access:Bool type:UserType language_code:string = User;
|
||||
//@added_to_attachment_menu True, if the user added the current bot to attachment menu; only available to bots
|
||||
user id:int53 access_hash:int64 first_name:string last_name:string username:string phone_number:string status:UserStatus profile_photo:profilePhoto is_contact:Bool is_mutual_contact:Bool is_verified:Bool is_premium:Bool is_support:Bool restriction_reason:string is_scam:Bool is_fake:Bool have_access:Bool type:UserType language_code:string added_to_attachment_menu:Bool = User;
|
||||
|
||||
//@description Contains information about a bot
|
||||
//@share_text The text that is shown on the bot's profile page and is sent together with the link when users share the bot
|
||||
//@param_description The text shown in the chat with the bot if the chat is empty
|
||||
//@photo Photo shown in the chat with the bot if the chat is empty; may be null
|
||||
//@animation Animation shown in the chat with the bot if the chat is empty; may be null
|
||||
//@menu_button Information about a button to show instead of the bot commands menu button; may be null if ordinary bot commands menu must be shown
|
||||
//@commands List of the bot commands
|
||||
//@default_group_administrator_rights Default administrator rights for adding the bot to basic group and supergroup chats; may be null
|
||||
//@default_channel_administrator_rights Default administrator rights for adding the bot to channels; may be null
|
||||
botInfo share_text:string description:string menu_button:botMenuButton commands:vector<botCommand> default_group_administrator_rights:chatAdministratorRights default_channel_administrator_rights:chatAdministratorRights = BotInfo;
|
||||
botInfo share_text:string description:string photo:photo animation:animation menu_button:botMenuButton commands:vector<botCommand> default_group_administrator_rights:chatAdministratorRights default_channel_administrator_rights:chatAdministratorRights = BotInfo;
|
||||
|
||||
|
||||
//@description Contains full information about a user
|
||||
//@photo User profile photo; may be null
|
||||
|
@ -494,10 +502,10 @@ botInfo share_text:string description:string menu_button:botMenuButton commands:
|
|||
//@has_private_calls True, if the user can't be called due to their privacy settings
|
||||
//@has_private_forwards True, if the user can't be linked in forwarded messages due to their privacy settings
|
||||
//@need_phone_number_privacy_exception True, if the current user needs to explicitly allow to share their phone number with the user when the method addContact is used
|
||||
//@bio A short user bio
|
||||
//@bio A short user bio; may be null for bots
|
||||
//@group_in_common_count Number of group chats where both the other user and the current user are a member; 0 for the current user
|
||||
//@bot_info For bots, information about the bot; may be null
|
||||
userFullInfo photo:chatPhoto is_blocked:Bool can_be_called:Bool supports_video_calls:Bool has_private_calls:Bool has_private_forwards:Bool need_phone_number_privacy_exception:Bool bio:string group_in_common_count:int32 bot_info:botInfo = UserFullInfo;
|
||||
userFullInfo photo:chatPhoto is_blocked:Bool can_be_called:Bool supports_video_calls:Bool has_private_calls:Bool has_private_forwards:Bool need_phone_number_privacy_exception:Bool bio:formattedText group_in_common_count:int32 bot_info:botInfo = UserFullInfo;
|
||||
|
||||
//@description Represents a list of users @total_count Approximate total number of users found @user_ids A list of user identifiers
|
||||
users total_count:int32 user_ids:vector<int53> = Users;
|
||||
|
@ -688,6 +696,8 @@ basicGroupFullInfo photo:chatPhoto description:string creator_user_id:int53 memb
|
|||
//@has_linked_chat True, if the channel has a discussion group, or the supergroup is the designated discussion group for a channel
|
||||
//@has_location True, if the supergroup is connected to a location, i.e. the supergroup is a location-based supergroup
|
||||
//@sign_messages True, if messages sent to the channel need to contain information about the sender. This field is only applicable to channels
|
||||
//@join_to_send_messages True, if users need to join the supergroup before they can send messages. Always true for channels and non-discussion supergroups
|
||||
//@join_by_request True, if all users directly joining the supergroup need to be approved by supergroup administrators. Always false for channels and supergroups without username, location, or a linked chat
|
||||
//@is_slow_mode_enabled True, if the slow mode is enabled in the supergroup
|
||||
//@is_channel True, if the supergroup is a channel
|
||||
//@is_broadcast_group True, if the supergroup is a broadcast group, i.e. only administrators can send messages and there is no limit on the number of members
|
||||
|
@ -695,7 +705,7 @@ basicGroupFullInfo photo:chatPhoto description:string creator_user_id:int53 memb
|
|||
//@restriction_reason If non-empty, contains a human-readable description of the reason why access to this supergroup or channel must be restricted
|
||||
//@is_scam True, if many users reported this supergroup or channel as a scam
|
||||
//@is_fake True, if many users reported this supergroup or channel as a fake account
|
||||
supergroup id:int53 access_hash:int64 username:string date:int32 status:ChatMemberStatus member_count:int32 has_linked_chat:Bool has_location:Bool sign_messages:Bool is_slow_mode_enabled:Bool is_channel:Bool is_broadcast_group:Bool is_verified:Bool restriction_reason:string is_scam:Bool is_fake:Bool = Supergroup;
|
||||
supergroup id:int53 access_hash:int64 username:string date:int32 status:ChatMemberStatus member_count:int32 has_linked_chat:Bool has_location:Bool sign_messages:Bool join_to_send_messages:Bool join_by_request:Bool is_slow_mode_enabled:Bool is_channel:Bool is_broadcast_group:Bool is_verified:Bool restriction_reason:string is_scam:Bool is_fake:Bool = Supergroup;
|
||||
|
||||
//@description Contains full information about a supergroup or channel
|
||||
//@photo Chat photo; may be null
|
||||
|
@ -741,7 +751,7 @@ secretChatStateClosed = SecretChatState;
|
|||
//@is_outbound True, if the chat was created by the current user; otherwise false
|
||||
//@key_hash Hash of the currently used key for comparison with the hash of the chat partner's key. This is a string of 36 little-endian bytes, which must be split into groups of 2 bits, each denoting a pixel of one of 4 colors FFFFFF, D5E6F3, 2D5775, and 2F99C9.
|
||||
//-The pixels must be used to make a 12x12 square image filled from left to right, top to bottom. Alternatively, the first 32 bytes of the hash can be converted to the hexadecimal format and printed as 32 2-digit hex numbers
|
||||
//@layer Secret chat layer; determines features supported by the chat partner's application. Nested text entities and underline and strikethrough entities are supported if the layer >= 101
|
||||
//@layer Secret chat layer; determines features supported by the chat partner's application. Nested text entities and underline and strikethrough entities are supported if the layer >= 101, files bigger than 2000MB are supported if the layer >= 143
|
||||
secretChat id:int32 user_id:int53 state:SecretChatState is_outbound:Bool key_hash:bytes layer:int32 = SecretChat;
|
||||
|
||||
|
||||
|
@ -890,11 +900,12 @@ messageCalendar total_count:int32 days:vector<messageCalendarDay> = MessageCalen
|
|||
|
||||
//@description Describes a sponsored message
|
||||
//@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"
|
||||
//@sponsor_chat_id Sponsor chat identifier; 0 if the sponsor chat is accessible through an invite link
|
||||
//@sponsor_chat_info Information about the sponsor chat; may be null unless sponsor_chat_id == 0
|
||||
//@link An internal link to be opened when the sponsored message is clicked; may be null if the sponsor chat needs to be opened instead
|
||||
//@content Content of the message. Currently, can be only of the type messageText
|
||||
sponsoredMessage message_id:int53 sponsor_chat_id:int53 sponsor_chat_info:chatInviteLinkInfo link:InternalLinkType content:MessageContent = SponsoredMessage;
|
||||
sponsoredMessage message_id:int53 is_recommended:Bool sponsor_chat_id:int53 sponsor_chat_info:chatInviteLinkInfo link:InternalLinkType content:MessageContent = SponsoredMessage;
|
||||
|
||||
|
||||
//@description Describes a file added to file download list
|
||||
|
@ -973,9 +984,9 @@ chatTypeSecret secret_chat_id:int32 user_id:int53 = ChatType;
|
|||
//@title The title of the filter; 1-12 characters without line feeds
|
||||
//@icon_name The chosen icon name for short filter representation. If non-empty, must be one of "All", "Unread", "Unmuted", "Bots", "Channels", "Groups", "Private", "Custom", "Setup", "Cat", "Crown", "Favorite", "Flower", "Game", "Home", "Love", "Mask", "Party", "Sport", "Study", "Trade", "Travel", "Work".
|
||||
//-If empty, use getChatFilterDefaultIconName to get default icon name for the filter
|
||||
//@pinned_chat_ids The chat identifiers of pinned chats in the filtered chat list
|
||||
//@included_chat_ids The chat identifiers of always included chats in the filtered chat list
|
||||
//@excluded_chat_ids The chat identifiers of always excluded chats in the filtered chat list
|
||||
//@pinned_chat_ids The chat identifiers of pinned chats in the filtered chat list. There can be up to GetOption("chat_filter_chosen_chat_count_max") pinned and always included non-secret chats and the same number of secret chats, but the limit can be increased with Telegram Premium
|
||||
//@included_chat_ids The chat identifiers of always included chats in the filtered chat list. There can be up to GetOption("chat_filter_chosen_chat_count_max") pinned and always included non-secret chats and the same number of secret chats, but the limit can be increased with Telegram Premium
|
||||
//@excluded_chat_ids The chat identifiers of always excluded chats in the filtered chat list. There can be up to GetOption("chat_filter_chosen_chat_count_max") always excluded non-secret chats and the same number of secret chats, but the limit can be increased with Telegram Premium
|
||||
//@exclude_muted True, if muted chats need to be excluded
|
||||
//@exclude_read True, if read chats need to be excluded
|
||||
//@exclude_archived True, if archived chats need to be excluded
|
||||
|
@ -1136,7 +1147,7 @@ keyboardButtonTypeRequestLocation = KeyboardButtonType;
|
|||
//@description A button that allows the user to create and send a poll when pressed; available only in private chats @force_regular If true, only regular polls must be allowed to create @force_quiz If true, only polls in quiz mode must be allowed to create
|
||||
keyboardButtonTypeRequestPoll force_regular:Bool force_quiz:Bool = KeyboardButtonType;
|
||||
|
||||
//@description A button that opens a web app by calling getWebAppUrl @url An HTTP URL to pass to getWebAppUrl
|
||||
//@description A button that opens a Web App by calling getWebAppUrl @url An HTTP URL to pass to getWebAppUrl
|
||||
keyboardButtonTypeWebApp url:string = KeyboardButtonType;
|
||||
|
||||
|
||||
|
@ -1152,7 +1163,7 @@ inlineKeyboardButtonTypeUrl url:string = InlineKeyboardButtonType;
|
|||
//@description A button that opens a specified URL and automatically authorize the current user by calling getLoginUrlInfo @url An HTTP URL to pass to getLoginUrlInfo @id Unique button identifier @forward_text If non-empty, new text of the button in forwarded messages
|
||||
inlineKeyboardButtonTypeLoginUrl url:string id:int53 forward_text:string = InlineKeyboardButtonType;
|
||||
|
||||
//@description A button that opens a web app by calling openWebApp @url An HTTP URL to pass to openWebApp
|
||||
//@description A button that opens a Web App by calling openWebApp @url An HTTP URL to pass to openWebApp
|
||||
inlineKeyboardButtonTypeWebApp url:string = InlineKeyboardButtonType;
|
||||
|
||||
//@description A button that sends a callback query to a bot @data Data to be sent to the bot via a callback query
|
||||
|
@ -1212,7 +1223,7 @@ loginUrlInfoOpen url:string skip_confirm:Bool = LoginUrlInfo;
|
|||
loginUrlInfoRequestConfirmation url:string domain:string bot_user_id:int53 request_write_access:Bool = LoginUrlInfo;
|
||||
|
||||
|
||||
//@description Contains information about a web app @launch_id Unique identifier for the web app launch @url A web app URL to open in a web view
|
||||
//@description Contains information about a Web App @launch_id Unique identifier for the Web App launch @url A Web App URL to open in a web view
|
||||
webAppInfo launch_id:int64 url:string = WebAppInfo;
|
||||
|
||||
|
||||
|
@ -1474,19 +1485,21 @@ bankCardInfo title:string actions:vector<bankCardActionOpenUrl> = BankCardInfo;
|
|||
address country_code:string state:string city:string street_line1:string street_line2:string postal_code:string = Address;
|
||||
|
||||
|
||||
//@description Contains parameters of the app theme @background_color A color of the background in the RGB24 format @text_color A color of text in the RGB24 format
|
||||
//@hint_color A color of hints in the RGB24 format @link_color A color of links in the RGB24 format @button_color A color of the buttons in the RGB24 format
|
||||
//@description Contains parameters of the application theme @background_color A color of the background in the RGB24 format @secondary_background_color A secondary color for the background in the RGB24 format
|
||||
//@text_color A color of text in the RGB24 format @hint_color A color of hints in the RGB24 format @link_color A color of links in the RGB24 format @button_color A color of the buttons in the RGB24 format
|
||||
//@button_text_color A color of text on the buttons in the RGB24 format
|
||||
themeParameters background_color:int32 text_color:int32 hint_color:int32 link_color:int32 button_color:int32 button_text_color:int32 = ThemeParameters;
|
||||
themeParameters background_color:int32 secondary_background_color:int32 text_color:int32 hint_color:int32 link_color:int32 button_color:int32 button_text_color:int32 = ThemeParameters;
|
||||
|
||||
|
||||
//@description Portion of the price of a product (e.g., "delivery cost", "tax amount") @label Label for this portion of the product price @amount Currency amount in the smallest units of the currency
|
||||
labeledPricePart label:string amount:int53 = LabeledPricePart;
|
||||
|
||||
//@description Product invoice @currency ISO 4217 currency code
|
||||
//@description Product invoice
|
||||
//@currency ISO 4217 currency code
|
||||
//@price_parts A list of objects used to calculate the total price of the product
|
||||
//@max_tip_amount The maximum allowed amount of tip in the smallest units of the currency
|
||||
//@suggested_tip_amounts Suggested amounts of tip in the smallest units of the currency
|
||||
//@recurring_payment_terms_of_service_url An HTTP URL with terms of service for recurring payments. If non-empty, the invoice payment will result in recurring payments and the user must accept the terms of service before allowed to pay
|
||||
//@is_test True, if the payment is a test payment
|
||||
//@need_name True, if the user's name is needed for payment
|
||||
//@need_phone_number True, if the user's phone number is needed for payment
|
||||
|
@ -1495,7 +1508,7 @@ labeledPricePart label:string amount:int53 = LabeledPricePart;
|
|||
//@send_phone_number_to_provider True, if the user's phone number will be sent to the provider
|
||||
//@send_email_address_to_provider True, if the user's email address will be sent to the provider
|
||||
//@is_flexible True, if the total price depends on the shipping method
|
||||
invoice currency:string price_parts:vector<labeledPricePart> max_tip_amount:int53 suggested_tip_amounts:vector<int53> is_test:Bool need_name:Bool need_phone_number:Bool need_email_address:Bool need_shipping_address:Bool send_phone_number_to_provider:Bool send_email_address_to_provider:Bool is_flexible:Bool = Invoice;
|
||||
invoice currency:string price_parts:vector<labeledPricePart> max_tip_amount:int53 suggested_tip_amounts:vector<int53> recurring_payment_terms_of_service_url:string is_test:Bool need_name:Bool need_phone_number:Bool need_email_address:Bool need_shipping_address:Bool send_phone_number_to_provider:Bool send_email_address_to_provider:Bool is_flexible:Bool = Invoice;
|
||||
|
||||
//@description Order information @name Name of the user @phone_number Phone number of the user @email_address Email address of the user @shipping_address Shipping address for this order; may be null
|
||||
orderInfo name:string phone_number:string email_address:string shipping_address:address = OrderInfo;
|
||||
|
@ -1506,6 +1519,7 @@ shippingOption id:string title:string price_parts:vector<labeledPricePart> = Shi
|
|||
//@description Contains information about saved card credentials @id Unique identifier of the saved credentials @title Title of the saved credentials
|
||||
savedCredentials id:string title:string = SavedCredentials;
|
||||
|
||||
|
||||
//@class InputCredentials @description Contains information about the payment method chosen by the user
|
||||
|
||||
//@description Applies if a user chooses some previously saved payment credentials. To use their previously saved credentials, the user must have a valid temporary password @saved_credentials_id Identifier of the saved credentials
|
||||
|
@ -1520,21 +1534,33 @@ inputCredentialsApplePay data:string = InputCredentials;
|
|||
//@description Applies if a user enters new credentials using Google Pay @data JSON-encoded data with the credential identifier
|
||||
inputCredentialsGooglePay data:string = InputCredentials;
|
||||
|
||||
|
||||
//@class PaymentProvider @description Contains information about a payment provider
|
||||
|
||||
//@description Smart Glocal payment provider @public_token Public payment token
|
||||
paymentProviderSmartGlocal public_token:string = PaymentProvider;
|
||||
|
||||
//@description Stripe payment provider @publishable_key Stripe API publishable key @need_country True, if the user country must be provided @need_postal_code True, if the user ZIP/postal code must be provided @need_cardholder_name True, if the cardholder name must be provided
|
||||
paymentsProviderStripe publishable_key:string need_country:Bool need_postal_code:Bool need_cardholder_name:Bool = PaymentsProviderStripe;
|
||||
paymentProviderStripe publishable_key:string need_country:Bool need_postal_code:Bool need_cardholder_name:Bool = PaymentProvider;
|
||||
|
||||
//@description Some other payment provider, for which a web payment form must be shown @url Payment form URL
|
||||
paymentProviderOther url:string = PaymentProvider;
|
||||
|
||||
|
||||
//@description Contains information about an invoice payment form
|
||||
//@id The payment form identifier
|
||||
//@invoice Full information of the invoice
|
||||
//@url Payment form URL
|
||||
//@invoice Full information about the invoice
|
||||
//@seller_bot_user_id User identifier of the seller bot
|
||||
//@payments_provider_user_id User identifier of the payment provider bot
|
||||
//@payments_provider Information about the payment provider, if available, to support it natively without the need for opening the URL; may be null
|
||||
//@payment_provider_user_id User identifier of the payment provider bot
|
||||
//@payment_provider Information about the payment provider
|
||||
//@saved_order_info Saved server-side order information; may be null
|
||||
//@saved_credentials Information about saved card credentials; may be null
|
||||
//@can_save_credentials True, if the user can choose to save credentials
|
||||
//@need_password True, if the user will be able to save credentials protected by a password they set up
|
||||
paymentForm id:int64 invoice:invoice url:string seller_bot_user_id:int53 payments_provider_user_id:int53 payments_provider:paymentsProviderStripe saved_order_info:orderInfo saved_credentials:savedCredentials can_save_credentials:Bool need_password:Bool = PaymentForm;
|
||||
//@product_title Product title
|
||||
//@product_description Product description
|
||||
//@product_photo Product photo; may be null
|
||||
paymentForm id:int64 invoice:invoice seller_bot_user_id:int53 payment_provider_user_id:int53 payment_provider:PaymentProvider saved_order_info:orderInfo saved_credentials:savedCredentials can_save_credentials:Bool need_password:Bool product_title:string product_description:formattedText product_photo:photo = PaymentForm;
|
||||
|
||||
//@description Contains a temporary identifier of validated order information, which is stored for one hour. Also contains the available shipping options @order_info_id Temporary identifier of the order information @shipping_options Available shipping options
|
||||
validatedOrderInfo order_info_id:string shipping_options:vector<shippingOption> = ValidatedOrderInfo;
|
||||
|
@ -1548,13 +1574,22 @@ paymentResult success:Bool verification_url:string = PaymentResult;
|
|||
//@photo Product photo; may be null
|
||||
//@date Point in time (Unix timestamp) when the payment was made
|
||||
//@seller_bot_user_id User identifier of the seller bot
|
||||
//@payments_provider_user_id User identifier of the payment provider bot
|
||||
//@payment_provider_user_id User identifier of the payment provider bot
|
||||
//@invoice Information about the invoice
|
||||
//@order_info Order information; may be null
|
||||
//@shipping_option Chosen shipping option; may be null
|
||||
//@credentials_title Title of the saved credentials chosen by the buyer
|
||||
//@tip_amount The amount of tip chosen by the buyer in the smallest units of the currency
|
||||
paymentReceipt title:string description:string photo:photo date:int32 seller_bot_user_id:int53 payments_provider_user_id:int53 invoice:invoice order_info:orderInfo shipping_option:shippingOption credentials_title:string tip_amount:int53 = PaymentReceipt;
|
||||
paymentReceipt title:string description:formattedText photo:photo date:int32 seller_bot_user_id:int53 payment_provider_user_id:int53 invoice:invoice order_info:orderInfo shipping_option:shippingOption credentials_title:string tip_amount:int53 = PaymentReceipt;
|
||||
|
||||
|
||||
//@class InputInvoice @description Describe an invoice to process
|
||||
|
||||
//@description An invoice from a message of the type messageInvoice @chat_id Chat identifier of the message @message_id Message identifier
|
||||
inputInvoiceMessage chat_id:int53 message_id:int53 = InputInvoice;
|
||||
|
||||
//@description An invoice from a link of the type internalLinkTypeInvoice @name Name of the invoice
|
||||
inputInvoiceName name:string = InputInvoice;
|
||||
|
||||
|
||||
//@description File with the date it was uploaded @file The file @date Point in time (Unix timestamp) when the file was uploaded
|
||||
|
@ -1827,8 +1862,8 @@ messagePhoto photo:photo caption:formattedText is_secret:Bool = MessageContent;
|
|||
//@description An expired photo message (self-destructed after TTL has elapsed)
|
||||
messageExpiredPhoto = MessageContent;
|
||||
|
||||
//@description A sticker message @sticker The sticker description
|
||||
messageSticker sticker:sticker = MessageContent;
|
||||
//@description A sticker message @sticker The sticker description @is_premium True, if premium animation of the sticker must be played
|
||||
messageSticker sticker:sticker is_premium:Bool = MessageContent;
|
||||
|
||||
//@description A video message @video The video description @caption Video caption @is_secret True, if the video thumbnail must be blurred and the video must be shown only while tapped
|
||||
messageVideo video:video caption:formattedText is_secret:Bool = MessageContent;
|
||||
|
@ -1874,7 +1909,7 @@ messagePoll poll:poll = MessageContent;
|
|||
//@description A message with an invoice from a bot @title Product title @param_description Product description @photo Product photo; may be null @currency Currency for the product price @total_amount Product total price in the smallest units of the currency
|
||||
//@start_parameter Unique invoice bot start_parameter. To share an invoice use the URL https://t.me/{bot_username}?start={start_parameter} @is_test True, if the invoice is a test invoice
|
||||
//@need_shipping_address True, if the shipping address must be specified @receipt_message_id The identifier of the message with the receipt, after the product has been purchased
|
||||
messageInvoice title:string description:string photo:photo currency:string total_amount:int53 start_parameter:string is_test:Bool need_shipping_address:Bool receipt_message_id:int53 = MessageContent;
|
||||
messageInvoice title:string description:formattedText photo:photo currency:string total_amount:int53 start_parameter:string is_test:Bool need_shipping_address:Bool receipt_message_id:int53 = MessageContent;
|
||||
|
||||
//@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;
|
||||
|
@ -1942,13 +1977,16 @@ messageCustomServiceAction text:string = MessageContent;
|
|||
//@description A new high score was achieved in a game @game_message_id Identifier of the message with the game, can be an identifier of a deleted message @game_id Identifier of the game; may be different from the games presented in the message with the game @score New score
|
||||
messageGameScore game_message_id:int53 game_id:int64 score:int32 = MessageContent;
|
||||
|
||||
//@description A payment has been completed @invoice_chat_id Identifier of the chat, containing the corresponding invoice message; 0 if unknown @invoice_message_id Identifier of the message with the corresponding invoice; can be an identifier of a deleted message @currency Currency for the price of the product @total_amount Total price for the product, in the smallest units of the currency
|
||||
messagePaymentSuccessful invoice_chat_id:int53 invoice_message_id:int53 currency:string total_amount:int53 = MessageContent;
|
||||
//@description A payment has been completed @invoice_chat_id Identifier of the chat, containing the corresponding invoice message; 0 if unknown @invoice_message_id Identifier of the message with the corresponding invoice; can be 0 or an identifier of a deleted message
|
||||
//@currency Currency for the price of the product @total_amount Total price for the product, in the smallest units of the currency
|
||||
//@is_recurring True, if this is a recurring payment @is_first_recurring True, if this is the first recurring payment @invoice_name Name of the invoice; may be empty if unknown
|
||||
messagePaymentSuccessful invoice_chat_id:int53 invoice_message_id:int53 currency:string total_amount:int53 is_recurring:Bool is_first_recurring:Bool invoice_name:string = MessageContent;
|
||||
|
||||
//@description A payment has been completed; for bots only @currency Currency for price of the product
|
||||
//@total_amount Total price for the product, in the smallest units of the currency @invoice_payload Invoice payload @shipping_option_id Identifier of the shipping option chosen by the user; may be empty if not applicable @order_info Information about the order; may be null
|
||||
//@description A payment has been completed; for bots only @currency Currency for price of the product @total_amount Total price for the product, in the smallest units of the currency
|
||||
//@is_recurring True, if this is a recurring payment @is_first_recurring True, if this is the first recurring payment
|
||||
//@invoice_payload Invoice payload @shipping_option_id Identifier of the shipping option chosen by the user; may be empty if not applicable @order_info Information about the order; may be null
|
||||
//@telegram_payment_charge_id Telegram payment identifier @provider_payment_charge_id Provider payment identifier
|
||||
messagePaymentSuccessfulBot currency:string total_amount:int53 invoice_payload:bytes shipping_option_id:string order_info:orderInfo telegram_payment_charge_id:string provider_payment_charge_id:string = MessageContent;
|
||||
messagePaymentSuccessfulBot currency:string total_amount:int53 is_recurring:Bool is_first_recurring:Bool invoice_payload:bytes shipping_option_id:string order_info:orderInfo telegram_payment_charge_id:string provider_payment_charge_id:string = MessageContent;
|
||||
|
||||
//@description A contact has registered with Telegram
|
||||
messageContactRegistered = MessageContent;
|
||||
|
@ -1956,10 +1994,10 @@ messageContactRegistered = MessageContent;
|
|||
//@description The current user has connected a website by logging in using Telegram Login Widget on it @domain_name Domain name of the connected website
|
||||
messageWebsiteConnected domain_name:string = MessageContent;
|
||||
|
||||
//@description Data from a web app has been sent to a bot @button_text Text of the keyboardButtonTypeWebApp button, which opened the web app
|
||||
//@description Data from a Web App has been sent to a bot @button_text Text of the keyboardButtonTypeWebApp button, which opened the Web App
|
||||
messageWebAppDataSent button_text:string = MessageContent;
|
||||
|
||||
//@description Data from a web app has been received; for bots only @button_text Text of the keyboardButtonTypeWebApp button, which opened the web app @data Received data
|
||||
//@description Data from a Web App has been received; for bots only @button_text Text of the keyboardButtonTypeWebApp button, which opened the Web App @data Received data
|
||||
messageWebAppDataReceived button_text:string data:string = MessageContent;
|
||||
|
||||
//@description Telegram Passport data has been sent to a bot @types List of Telegram Passport element types sent
|
||||
|
@ -2082,7 +2120,7 @@ inputMessageAudio audio:InputFile album_cover_thumbnail:inputThumbnail duration:
|
|||
//@description A document message (general file) @document Document to be sent @thumbnail Document thumbnail; pass null to skip thumbnail uploading @disable_content_type_detection If true, automatic file type detection will be disabled and the document will be always sent as file. Always true for files sent to secret chats @caption Document caption; pass null to use an empty caption; 0-GetOption("message_caption_length_max") characters
|
||||
inputMessageDocument document:InputFile thumbnail:inputThumbnail disable_content_type_detection:Bool caption:formattedText = InputMessageContent;
|
||||
|
||||
//@description A photo message @photo Photo to send @thumbnail Photo thumbnail to be sent; pass null to skip thumbnail uploading. The thumbnail is sent to the other party only in secret chats @added_sticker_file_ids File identifiers of the stickers added to the photo, if applicable @width Photo width @height Photo height @caption Photo caption; pass null to use an empty caption; 0-GetOption("message_caption_length_max") characters
|
||||
//@description A photo message @photo Photo to send. The photo must be at most 10 MB in size. The photo's width and height must not exceed 10000 in total. Width and height ratio must be at most 20 @thumbnail Photo thumbnail to be sent; pass null to skip thumbnail uploading. The thumbnail is sent to the other party only in secret chats @added_sticker_file_ids File identifiers of the stickers added to the photo, if applicable @width Photo width @height Photo height @caption Photo caption; pass null to use an empty caption; 0-GetOption("message_caption_length_max") characters
|
||||
//@ttl Photo TTL (Time To Live), in seconds (0-60). A non-zero TTL can be specified only in private chats
|
||||
inputMessagePhoto photo:InputFile thumbnail:inputThumbnail added_sticker_file_ids:vector<int32> width:int32 height:int32 caption:formattedText ttl:int32 = InputMessageContent;
|
||||
|
||||
|
@ -2284,6 +2322,9 @@ stickerSetInfo id:int64 title:string name:string thumbnail:thumbnail thumbnail_o
|
|||
//@description Represents a list of sticker sets @total_count Approximate total number of sticker sets found @sets List of sticker sets
|
||||
stickerSets total_count:int32 sets:vector<stickerSetInfo> = StickerSets;
|
||||
|
||||
//@description Represents a list of trending sticker sets @total_count Approximate total number of trending sticker sets @sets List of trending sticker sets @is_premium True, if the list contains sticker sets with premium stickers
|
||||
trendingStickerSets total_count:int32 sets:vector<stickerSetInfo> is_premium:Bool = TrendingStickerSets;
|
||||
|
||||
|
||||
//@class CallDiscardReason @description Describes the reason why a call was discarded
|
||||
|
||||
|
@ -2314,8 +2355,8 @@ callProtocol udp_p2p:Bool udp_reflector:Bool min_layer:int32 max_layer:int32 lib
|
|||
|
||||
//@class CallServerType @description Describes the type of a call server
|
||||
|
||||
//@description A Telegram call reflector @peer_tag A peer tag to be used with the reflector
|
||||
callServerTypeTelegramReflector peer_tag:bytes = CallServerType;
|
||||
//@description A Telegram call reflector @peer_tag A peer tag to be used with the reflector @is_tcp True, if the server uses TCP instead of UDP
|
||||
callServerTypeTelegramReflector peer_tag:bytes is_tcp:Bool = CallServerType;
|
||||
|
||||
//@description A WebRTC server @username Username to be used for authentication @password Authentication password @supports_turn True, if the server supports TURN @supports_stun True, if the server supports STUN
|
||||
callServerTypeWebrtc username:string password:string supports_turn:Bool supports_stun:Bool = CallServerType;
|
||||
|
@ -2483,14 +2524,18 @@ addedReaction reaction:string sender_id:MessageSender = AddedReaction;
|
|||
//@description Represents a list of reactions added to a message @total_count The total number of found reactions @reactions The list of added reactions @next_offset The offset for the next request. If empty, there are no more results
|
||||
addedReactions total_count:int32 reactions:vector<addedReaction> next_offset:string = AddedReactions;
|
||||
|
||||
//@description Represents an available reaction @reaction Text representation of the reaction @needs_premium True, if Telegram Premium is needed to send the reaction
|
||||
availableReaction reaction:string needs_premium:Bool = AvailableReaction;
|
||||
|
||||
//@description Represents a list of available reactions @reactions List of reactions
|
||||
availableReactions reactions:vector<string> = AvailableReactions;
|
||||
availableReactions reactions:vector<availableReaction> = AvailableReactions;
|
||||
|
||||
|
||||
//@description Contains stickers which must be used for reaction animation rendering
|
||||
//@reaction Text representation of the reaction
|
||||
//@title Reaction title
|
||||
//@is_active True, if the reaction can be added to new messages and enabled in chats
|
||||
//@is_premium True, if the reaction is available only for Premium users
|
||||
//@static_icon Static icon for the reaction
|
||||
//@appear_animation Appear animation for the reaction
|
||||
//@select_animation Select animation for the reaction
|
||||
|
@ -2498,7 +2543,7 @@ availableReactions reactions:vector<string> = AvailableReactions;
|
|||
//@effect_animation Effect animation for the reaction
|
||||
//@around_animation Around animation for the reaction; may be null
|
||||
//@center_animation Center animation for the reaction; may be null
|
||||
reaction reaction:string title:string is_active:Bool static_icon:sticker appear_animation:sticker select_animation:sticker activate_animation:sticker effect_animation:sticker around_animation:sticker center_animation:sticker = Reaction;
|
||||
reaction reaction:string title:string is_active:Bool is_premium:Bool static_icon:sticker appear_animation:sticker select_animation:sticker activate_animation:sticker effect_animation:sticker around_animation:sticker center_animation:sticker = Reaction;
|
||||
|
||||
|
||||
//@description Represents a list of animations @animations List of animations
|
||||
|
@ -2529,6 +2574,12 @@ attachmentMenuBotColor light_color:int32 dark_color:int32 = AttachmentMenuBotCol
|
|||
|
||||
//@description Represents a bot added to attachment menu
|
||||
//@bot_user_id User identifier of the bot added to attachment menu
|
||||
//@supports_self_chat True, if the bot supports opening from attachment menu in the chat with the bot
|
||||
//@supports_user_chats True, if the bot supports opening from attachment menu in private chats with ordinary users
|
||||
//@supports_bot_chats True, if the bot supports opening from attachment menu in private chats with other bots
|
||||
//@supports_group_chats True, if the bot supports opening from attachment menu in basic group and supergroup chats
|
||||
//@supports_channel_chats True, if the bot supports opening from attachment menu in channel chats
|
||||
//@supports_settings True, if the bot supports "settings_button_pressed" event
|
||||
//@name Name for the bot in attachment menu
|
||||
//@name_color Color to highlight selected name of the bot if appropriate; may be null
|
||||
//@default_icon Default attachment menu icon for the bot in SVG format; may be null
|
||||
|
@ -2537,7 +2588,8 @@ attachmentMenuBotColor light_color:int32 dark_color:int32 = AttachmentMenuBotCol
|
|||
//@android_icon Attachment menu icon for the bot in TGS format for the official Android app; may be null
|
||||
//@macos_icon Attachment menu icon for the bot in TGS format for the official native macOS app; may be null
|
||||
//@icon_color Color to highlight selected icon of the bot if appropriate; may be null
|
||||
attachmentMenuBot bot_user_id:int53 name:string name_color:attachmentMenuBotColor default_icon:file ios_static_icon:file ios_animated_icon:file android_icon:file macos_icon:file icon_color:attachmentMenuBotColor = AttachmentMenuBot;
|
||||
//@web_app_placeholder Default placeholder for opened Web Apps in SVG format; may be null
|
||||
attachmentMenuBot bot_user_id:int53 supports_self_chat:Bool supports_user_chats:Bool supports_bot_chats:Bool supports_group_chats:Bool supports_channel_chats:Bool supports_settings:Bool name:string name_color:attachmentMenuBotColor default_icon:file ios_static_icon:file ios_animated_icon:file android_icon:file macos_icon:file icon_color:attachmentMenuBotColor web_app_placeholder:file = AttachmentMenuBot;
|
||||
|
||||
//@description Information about the message sent by answerWebAppQuery @inline_message_id Identifier of the sent inline message, if known
|
||||
sentWebAppMessage inline_message_id:string = SentWebAppMessage;
|
||||
|
@ -2857,6 +2909,109 @@ languagePackInfo id:string base_language_pack_id:string name:string native_name:
|
|||
localizationTargetInfo language_packs:vector<languagePackInfo> = LocalizationTargetInfo;
|
||||
|
||||
|
||||
//@class PremiumLimitType @description Describes type of a limit, increased for Premium users
|
||||
|
||||
//@description The maximum number of joined supergroups and channels
|
||||
premiumLimitTypeSupergroupCount = PremiumLimitType;
|
||||
|
||||
//@description The maximum number of pinned chats in the main chat list
|
||||
premiumLimitTypePinnedChatCount = PremiumLimitType;
|
||||
|
||||
//@description The maximum number of created public chats
|
||||
premiumLimitTypeCreatedPublicChatCount = PremiumLimitType;
|
||||
|
||||
//@description The maximum number of saved animations
|
||||
premiumLimitTypeSavedAnimationCount = PremiumLimitType;
|
||||
|
||||
//@description The maximum number of favorite stickers
|
||||
premiumLimitTypeFavoriteStickerCount = PremiumLimitType;
|
||||
|
||||
//@description The maximum number of chat filters
|
||||
premiumLimitTypeChatFilterCount = PremiumLimitType;
|
||||
|
||||
//@description The maximum number of pinned and always included, or always excluded chats in a chat filter
|
||||
premiumLimitTypeChatFilterChosenChatCount = PremiumLimitType;
|
||||
|
||||
//@description The maximum number of pinned chats in the archive chat list
|
||||
premiumLimitTypePinnedArchivedChatCount = PremiumLimitType;
|
||||
|
||||
//@description The maximum length of sent media caption
|
||||
premiumLimitTypeCaptionLength = PremiumLimitType;
|
||||
|
||||
//@description The maximum length of the user's bio
|
||||
premiumLimitTypeBioLength = PremiumLimitType;
|
||||
|
||||
|
||||
//@class PremiumFeature @description Describes a feature available to Premium users
|
||||
|
||||
//@description Increased limits
|
||||
premiumFeatureIncreasedLimits = PremiumFeature;
|
||||
|
||||
//@description Increased maximum upload file size
|
||||
premiumFeatureIncreasedUploadFileSize = PremiumFeature;
|
||||
|
||||
//@description Improved download speed
|
||||
premiumFeatureImprovedDownloadSpeed = PremiumFeature;
|
||||
|
||||
//@description The ability to convert voice notes to text
|
||||
premiumFeatureVoiceRecognition = PremiumFeature;
|
||||
|
||||
//@description Disabled ads
|
||||
premiumFeatureDisabledAds = PremiumFeature;
|
||||
|
||||
//@description Allowed to use more reactions
|
||||
premiumFeatureUniqueReactions = PremiumFeature;
|
||||
|
||||
//@description Allowed to use premium stickers with unique effects
|
||||
premiumFeatureUniqueStickers = PremiumFeature;
|
||||
|
||||
//@description Ability to change position of the main chat list, archive and mute all new chats from non-contacts, and completely disable notifications about the user's contacts joined Telegram
|
||||
premiumFeatureAdvancedChatManagement = PremiumFeature;
|
||||
|
||||
//@description A badge in the user's profile
|
||||
premiumFeatureProfileBadge = PremiumFeature;
|
||||
|
||||
//@description Profile photo animation on message and chat screens
|
||||
premiumFeatureAnimatedProfilePhoto = PremiumFeature;
|
||||
|
||||
//@description Allowed to set a premium appllication icons
|
||||
premiumFeatureAppIcons = PremiumFeature;
|
||||
|
||||
|
||||
//@description Contains information about a limit, increased for Premium users @type The type of the limit @default_value Default value of the limit @premium_value Value of the limit for Premium users
|
||||
premiumLimit type:PremiumLimitType default_value:int32 premium_value:int32 = PremiumLimit;
|
||||
|
||||
//@description Contains information about features, available to Premium users @features The list of available features @limits The list of limits, increased for Premium users
|
||||
//@payment_link An internal link to be opened to pay for Telegram Premium if store payment isn't possible; may be null if direct payment isn't available. If the link has type internalLinkTypeBotStart, then sendBotStartMessage must be called automatically
|
||||
premiumFeatures features:vector<PremiumFeature> limits:vector<premiumLimit> payment_link:InternalLinkType = PremiumFeatures;
|
||||
|
||||
|
||||
//@class PremiumSource @description Describes a source from which the Premium features screen is opened
|
||||
|
||||
//@description A limit was exceeded @limit_type Type of the exceeded limit
|
||||
premiumSourceLimitExceeded limit_type:PremiumLimitType = PremiumSource;
|
||||
|
||||
//@description A user tried to use a Premium feature @feature The used feature
|
||||
premiumSourceFeature feature:PremiumFeature = PremiumSource;
|
||||
|
||||
//@description A user opened an internal link of the type internalLinkTypePremiumFeatures @referrer The referrer from the link
|
||||
premiumSourceLink referrer:string = PremiumSource;
|
||||
|
||||
//@description A user opened the Premium features screen from settings
|
||||
premiumSourceSettings = PremiumSource;
|
||||
|
||||
|
||||
//@description Describes a promotion animation for a Premium feature @feature Premium feature @animation Promotion animation for the feature
|
||||
premiumFeaturePromotionAnimation feature:PremiumFeature animation:animation = PremiumFeaturePromotionAnimation;
|
||||
|
||||
//@description Contains state of Telegram Premium subscription and promotion videos for Premium features
|
||||
//@state Text description of the state of the current Premium subscription; may be empty if the current user has no Telegram Premium subscription
|
||||
//@currency ISO 4217 currency code for Telegram Premium subscription payment
|
||||
//@monthly_amount Monthly subscription payment for Telegram Premium subscription, in the smallest units of the currency
|
||||
//@animations The list of available promotion animations for Premium features
|
||||
premiumState state:formattedText currency:string monthly_amount:int53 animations:vector<premiumFeaturePromotionAnimation> = PremiumState;
|
||||
|
||||
|
||||
//@class DeviceToken @description Represents a data needed to subscribe for push notifications through registerDevice method. To use specific push notification service, the correct application platform must be specified and a valid server authentication data must be uploaded at https://my.telegram.org
|
||||
|
||||
//@description A token for Firebase Cloud Messaging @token Device registration token; may be empty to deregister a device @encrypt True, if push notifications must be additionally encrypted
|
||||
|
@ -3123,6 +3278,9 @@ pushMessageContentChatJoinByLink = PushMessageContent;
|
|||
//@description A new member was accepted to the chat by an administrator
|
||||
pushMessageContentChatJoinByRequest = PushMessageContent;
|
||||
|
||||
//@description A new recurrent payment was made by the current user @amount The paid amount
|
||||
pushMessageContentRecurringPayment amount:string = PushMessageContent;
|
||||
|
||||
//@description A forwarded messages @total_count Number of forwarded messages
|
||||
pushMessageContentMessageForwards total_count:int32 = PushMessageContent;
|
||||
|
||||
|
@ -3133,8 +3291,8 @@ pushMessageContentMediaAlbum total_count:int32 has_photos:Bool has_videos:Bool h
|
|||
|
||||
//@class NotificationType @description Contains detailed information about a notification
|
||||
|
||||
//@description New message was received @message The message
|
||||
notificationTypeNewMessage message:message = NotificationType;
|
||||
//@description New message was received @message The message @show_preview True, if message content must be displayed in notifications
|
||||
notificationTypeNewMessage message:message show_preview:Bool = NotificationType;
|
||||
|
||||
//@description New secret chat was created
|
||||
notificationTypeNewSecretChat = NotificationType;
|
||||
|
@ -3409,17 +3567,33 @@ chatReportReasonPersonalDetails = ChatReportReason;
|
|||
chatReportReasonCustom = ChatReportReason;
|
||||
|
||||
|
||||
//@class InternalLinkType @description Describes an internal https://t.me or tg: link, which must be processed by the app in a special way
|
||||
//@class TargetChat @description Describes the target chat to be opened
|
||||
|
||||
//@description The link is a link to the active sessions section of the app. Use getActiveSessions to handle the link
|
||||
//@description The currently opened chat needs to be kept
|
||||
targetChatCurrent = TargetChat;
|
||||
|
||||
//@description The chat needs to be chosen by the user among chats of the specified types
|
||||
//@allow_user_chats True, if private chats with ordinary users are allowed
|
||||
//@allow_bot_chats True, if private chats with other bots are allowed
|
||||
//@allow_group_chats True, if basic group and supergroup chats are allowed
|
||||
//@allow_channel_chats True, if channel chats are allowed
|
||||
targetChatChosen allow_user_chats:Bool allow_bot_chats:Bool allow_group_chats:Bool allow_channel_chats:Bool = TargetChat;
|
||||
|
||||
//@description The chat needs to be open with the provided internal link @link An internal link pointing to the chat
|
||||
targetChatInternalLink link:InternalLinkType = TargetChat;
|
||||
|
||||
|
||||
//@class InternalLinkType @description Describes an internal https://t.me or tg: link, which must be processed by the application in a special way
|
||||
|
||||
//@description The link is a link to the active sessions section of the application. Use getActiveSessions to handle the link
|
||||
internalLinkTypeActiveSessions = InternalLinkType;
|
||||
|
||||
//@description The link is a link to an attachment menu bot to be opened in the specified chat. Process given chat_link to open corresponding chat.
|
||||
//@description The link is a link to an attachment menu bot to be opened in the specified or a chosen chat. Process given target_chat to open the chat.
|
||||
//-Then call searchPublicChat with the given bot username, check that the user is a bot and can be added to attachment menu. Then use getAttachmentMenuBot to receive information about the bot.
|
||||
//-If the bot isn't added to attachment menu, then user needs to confirm adding the bot to attachment menu. If user confirms adding, then use toggleBotIsAddedToAttachmentMenu to add it.
|
||||
//-If attachment menu bots can't be used in the current chat, show an error to the user. If the bot is added to attachment menu, then use openWebApp with the given URL
|
||||
//@chat_link An internal link pointing to a chat; may be null if the current chat needs to be kept @bot_username Username of the bot @url URL to be passed to openWebApp
|
||||
internalLinkTypeAttachmentMenuBot chat_link:InternalLinkType bot_username:string url:string = InternalLinkType;
|
||||
//-If the attachment menu bot can't be used in the opened chat, show an error to the user. If the bot is added to attachment menu and can be used in the chat, then use openWebApp with the given URL
|
||||
//@target_chat Target chat to be opened @bot_username Username of the bot @url URL to be passed to openWebApp
|
||||
internalLinkTypeAttachmentMenuBot target_chat:TargetChat bot_username:string url:string = InternalLinkType;
|
||||
|
||||
//@description The link contains an authentication code. Call checkAuthenticationCode with the code if the current authorization state is authorizationStateWaitCode @code The authentication code
|
||||
internalLinkTypeAuthenticationCode code:string = InternalLinkType;
|
||||
|
@ -3460,6 +3634,9 @@ internalLinkTypeFilterSettings = InternalLinkType;
|
|||
//@bot_username Username of the bot that owns the game @game_short_name Short name of the game
|
||||
internalLinkTypeGame bot_username:string game_short_name:string = InternalLinkType;
|
||||
|
||||
//@description The link is a link to an invoice. Call getPaymentForm with the given invoice name to process the link @invoice_name Name of the invoice
|
||||
internalLinkTypeInvoice invoice_name:string = InternalLinkType;
|
||||
|
||||
//@description The link is a link to a language pack. Call getLanguagePackInfo with the given language pack identifier to process the link @language_pack_id Language pack identifier
|
||||
internalLinkTypeLanguagePack language_pack_id:string = InternalLinkType;
|
||||
|
||||
|
@ -3473,7 +3650,7 @@ internalLinkTypeMessage url:string = InternalLinkType;
|
|||
//@text Message draft text @contains_link True, if the first line of the text contains a link. If true, the input field needs to be focused and the text after the link must be selected
|
||||
internalLinkTypeMessageDraft text:formattedText contains_link:Bool = InternalLinkType;
|
||||
|
||||
//@description The link contains a request of Telegram passport data. Call getPassportAuthorizationForm with the given parameters to process the link if the link was received from outside of the app, otherwise ignore it
|
||||
//@description The link contains a request of Telegram passport data. Call getPassportAuthorizationForm with the given parameters to process the link if the link was received from outside of the application, otherwise ignore it
|
||||
//@bot_user_id User identifier of the service's bot @scope Telegram Passport element types requested by the service @public_key Service's public key @nonce Unique request identifier provided by the service
|
||||
//@callback_url An HTTP URL to open once the request is finished or canceled with the parameter tg_passport=success or tg_passport=cancel respectively. If empty, then the link tgbot{bot_user_id}://passport/success or tgbot{bot_user_id}://passport/cancel needs to be opened instead
|
||||
internalLinkTypePassportDataRequest bot_user_id:int53 scope:string public_key:string nonce:string callback_url:string = InternalLinkType;
|
||||
|
@ -3482,6 +3659,9 @@ internalLinkTypePassportDataRequest bot_user_id:int53 scope:string public_key:st
|
|||
//@hash Hash value from the link @phone_number Phone number value from the link
|
||||
internalLinkTypePhoneNumberConfirmation hash:string phone_number:string = InternalLinkType;
|
||||
|
||||
//@description The link is a link to the Premium features screen of the applcation from which the user can subscribe to Telegram Premium. Call getPremiumFeatures with the given referrer to process the link @referrer Referrer specified in the link
|
||||
internalLinkTypePremiumFeatures referrer:string = InternalLinkType;
|
||||
|
||||
//@description The link is a link to the privacy and security settings section of the app
|
||||
internalLinkTypePrivacyAndSecuritySettings = InternalLinkType;
|
||||
|
||||
|
@ -3496,7 +3676,7 @@ internalLinkTypePublicChat chat_username:string = InternalLinkType;
|
|||
//-"This code can be used to allow someone to log in to your Telegram account. To confirm Telegram login, please go to Settings > Devices > Scan QR and scan the code" needs to be shown
|
||||
internalLinkTypeQrCodeAuthentication = InternalLinkType;
|
||||
|
||||
//@description The link is a link to app settings
|
||||
//@description The link is a link to application settings
|
||||
internalLinkTypeSettings = InternalLinkType;
|
||||
|
||||
//@description The link is a link to a sticker set. Call searchStickerSet with the given sticker set name to process the link and show the sticker set @sticker_set_name Name of the sticker set
|
||||
|
@ -3658,7 +3838,7 @@ networkStatistics since_date:int32 entries:vector<NetworkStatisticsEntry> = Netw
|
|||
//@preload_large_videos True, if the beginning of video files needs to be preloaded for instant playback
|
||||
//@preload_next_audio True, if the next audio track needs to be preloaded while the user is listening to an audio file
|
||||
//@use_less_data_for_calls True, if "use less data for calls" option needs to be enabled
|
||||
autoDownloadSettings is_auto_download_enabled:Bool max_photo_file_size:int32 max_video_file_size:int32 max_other_file_size:int32 video_upload_bitrate:int32 preload_large_videos:Bool preload_next_audio: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 use_less_data_for_calls:Bool = AutoDownloadSettings;
|
||||
|
||||
//@description Contains auto-download settings presets for the current user
|
||||
//@low Preset with lowest settings; supposed to be used by default when roaming
|
||||
|
@ -3760,6 +3940,9 @@ text text:string = Text;
|
|||
//@description Contains a value representing a number of seconds @seconds Number of seconds
|
||||
seconds seconds:double = Seconds;
|
||||
|
||||
//@description Contains size of downloaded prefix of a file @size The prefix size, in bytes
|
||||
fileDownloadedPrefixSize size:int53 = FileDownloadedPrefixSize;
|
||||
|
||||
|
||||
//@description Contains information about a tg: deep link @text Text to be shown to the user @need_update_application True, if the user must be asked to update the application
|
||||
deepLinkInfo text:formattedText need_update_application:Bool = DeepLinkInfo;
|
||||
|
@ -4047,8 +4230,8 @@ updateChatIsBlocked chat_id:int53 is_blocked:Bool = Update;
|
|||
//@description A chat was marked as unread or was read @chat_id Chat identifier @is_marked_as_unread New value of is_marked_as_unread
|
||||
updateChatIsMarkedAsUnread chat_id:int53 is_marked_as_unread:Bool = Update;
|
||||
|
||||
//@description The list of chat filters or a chat filter has changed @chat_filters The new list of chat filters
|
||||
updateChatFilters chat_filters:vector<chatFilterInfo> = Update;
|
||||
//@description The list of chat filters or a chat filter has changed @chat_filters The new list of chat filters @main_chat_list_position Position of the main chat list among chat filters, 0-based
|
||||
updateChatFilters chat_filters:vector<chatFilterInfo> main_chat_list_position:int32 = Update;
|
||||
|
||||
//@description The number of online group members has changed. This update with non-zero number of online group members is sent only for currently opened chats. There is no guarantee that it will be sent just after the number of online users has changed @chat_id Identifier of the chat @online_member_count New number of online members in the chat, or 0 if unknown
|
||||
updateChatOnlineMemberCount chat_id:int53 online_member_count:int32 = Update;
|
||||
|
@ -4182,7 +4365,7 @@ updateStickerSet sticker_set:stickerSet = Update;
|
|||
updateInstalledStickerSets is_masks:Bool sticker_set_ids:vector<int64> = Update;
|
||||
|
||||
//@description The list of trending sticker sets was updated or some of them were viewed @sticker_sets The prefix of the list of trending sticker sets with the newest trending sticker sets
|
||||
updateTrendingStickerSets sticker_sets:stickerSets = Update;
|
||||
updateTrendingStickerSets sticker_sets:trendingStickerSets = Update;
|
||||
|
||||
//@description The list of recently used stickers was updated @is_attached True, if the list of stickers attached to photo or video files was updated, otherwise the list of sent stickers is updated @sticker_ids The new list of file identifiers of recently used stickers
|
||||
updateRecentStickers is_attached:Bool sticker_ids:vector<int32> = Update;
|
||||
|
@ -4214,10 +4397,10 @@ updateTermsOfService terms_of_service_id:string terms_of_service:termsOfService
|
|||
//@description The list of users nearby has changed. The update is guaranteed to be sent only 60 seconds after a successful searchChatsNearby request @users_nearby The new list of users nearby
|
||||
updateUsersNearby users_nearby:vector<chatNearby> = Update;
|
||||
|
||||
//@description The list of bots added to attachment menu has changed @bots The new list of bots added to attachment menu. The bots must be shown in attachment menu only in private chats. The bots must not be shown on scheduled messages screen
|
||||
//@description The list of bots added to attachment menu has changed @bots The new list of bots added to attachment menu. The bots must not be shown on scheduled messages screen
|
||||
updateAttachmentMenuBots bots:vector<attachmentMenuBot> = Update;
|
||||
|
||||
//@description A message was sent by an opened web app, so the web app needs to be closed @web_app_launch_id Identifier of web app launch
|
||||
//@description A message was sent by an opened Web App, so the Web App needs to be closed @web_app_launch_id Identifier of Web App launch
|
||||
updateWebAppMessageSent web_app_launch_id:int64 = Update;
|
||||
|
||||
//@description The list of supported reactions has changed @reactions The new list of supported reactions
|
||||
|
@ -4544,13 +4727,13 @@ checkChatUsername chat_id:int53 username:string = CheckChatUsernameResult;
|
|||
//@description Returns a list of public chats of the specified type, owned by the user @type Type of the public chats to return
|
||||
getCreatedPublicChats type:PublicChatType = Chats;
|
||||
|
||||
//@description Checks whether the maximum number of owned public chats has been reached. Returns corresponding error if the limit was reached @type Type of the public chats, for which to check the limit
|
||||
//@description Checks whether the maximum number of owned public chats has been reached. Returns corresponding error if the limit was reached. The limit can be increased with Telegram Premium @type Type of the public chats, for which to check the limit
|
||||
checkCreatedPublicChatsLimit type:PublicChatType = Ok;
|
||||
|
||||
//@description Returns a list of basic group and supergroup chats, which can be used as a discussion group for a channel. Returned basic group chats must be first upgraded to supergroups before they can be set as a discussion group. To set a returned supergroup as a discussion group, access to its old messages must be enabled using toggleSupergroupIsAllHistoryAvailable first
|
||||
getSuitableDiscussionChats = Chats;
|
||||
|
||||
//@description Returns a list of recently inactive supergroups and channels. Can be used when user reaches limit on the number of joined supergroups and channels and receives CHANNELS_TOO_MUCH error
|
||||
//@description Returns a list of recently inactive supergroups and channels. Can be used when user reaches limit on the number of joined supergroups and channels and receives CHANNELS_TOO_MUCH error. Also, the limit can be increased with Telegram Premium
|
||||
getInactiveSupergroupChats = Chats;
|
||||
|
||||
|
||||
|
@ -4701,6 +4884,14 @@ getMessageLinkInfo url:string = MessageLinkInfo;
|
|||
//@to_language_code A two-letter ISO 639-1 language code of the language to which the message is translated
|
||||
translateText text:string from_language_code:string to_language_code:string = Text;
|
||||
|
||||
//@description Recognizes speech in a voice note message. The message must be successfully sent and must not be scheduled. May return an error with a message "MSG_VOICE_TOO_LONG" if the voice note is too long to be recognized
|
||||
//@chat_id Identifier of the chat to which the message belongs
|
||||
//@message_id Identifier of the message
|
||||
recognizeSpeech chat_id:int53 message_id:int53 = Ok;
|
||||
|
||||
//@description Rates recognized speech in a voice note message @chat_id Identifier of the chat to which the message belongs @message_id Identifier of the message @is_good Pass true if the speech recognition is good
|
||||
rateSpeechRecognition chat_id:int53 message_id:int53 is_good:Bool = Ok;
|
||||
|
||||
|
||||
//@description Returns list of message sender identifiers, which can be used to send messages in a chat @chat_id Chat identifier
|
||||
getChatAvailableMessageSenders chat_id:int53 = MessageSenders;
|
||||
|
@ -4852,7 +5043,7 @@ editInlineMessageReplyMarkup inline_message_id:string reply_markup:ReplyMarkup =
|
|||
editMessageSchedulingState chat_id:int53 message_id:int53 scheduling_state:MessageSchedulingState = Ok;
|
||||
|
||||
|
||||
//@description Returns reactions, which can be added to a message. The list can change after updateReactions, updateChatAvailableReactions for the chat, or updateMessageInteractionInfo for the message
|
||||
//@description Returns reactions, which can be added to a message. The list can change after updateReactions, updateChatAvailableReactions for the chat, or updateMessageInteractionInfo for the message. The method will return Premium reactions, even the current user has no Premium subscription
|
||||
//@chat_id Identifier of the chat to which the message belongs
|
||||
//@message_id Identifier of the message
|
||||
getMessageAvailableReactions chat_id:int53 message_id:int53 = AvailableReactions;
|
||||
|
@ -4964,30 +5155,30 @@ getInlineQueryResults bot_user_id:int53 chat_id:int53 user_location:location que
|
|||
answerInlineQuery inline_query_id:int64 is_personal:Bool results:vector<InputInlineQueryResult> cache_time:int32 next_offset:string switch_pm_text:string switch_pm_parameter:string = Ok;
|
||||
|
||||
|
||||
//@description Returns an HTTPS URL of a web app to open after keyboardButtonTypeWebApp button is pressed
|
||||
//@description Returns an HTTPS URL of a Web App to open after keyboardButtonTypeWebApp button is pressed
|
||||
//@bot_user_id Identifier of the target bot
|
||||
//@url The URL from the keyboardButtonTypeWebApp button
|
||||
//@theme Preferred web app theme; pass null to use the default theme
|
||||
//@theme Preferred Web App theme; pass null to use the default theme
|
||||
getWebAppUrl bot_user_id:int53 url:string theme:themeParameters = HttpUrl;
|
||||
|
||||
//@description Sends data received from a keyboardButtonTypeWebApp web app to a bot
|
||||
//@bot_user_id Identifier of the target bot @button_text Text of the keyboardButtonTypeWebApp button, which opened the web app @data Received data
|
||||
//@description Sends data received from a keyboardButtonTypeWebApp Web App to a bot
|
||||
//@bot_user_id Identifier of the target bot @button_text Text of the keyboardButtonTypeWebApp button, which opened the Web App @data Received data
|
||||
sendWebAppData bot_user_id:int53 button_text:string data:string = Ok;
|
||||
|
||||
//@description Informs TDLib that a web app is being opened from attachment menu, a botMenuButton button, an internalLinkTypeAttachmentMenuBot link, or an inlineKeyboardButtonTypeWebApp button.
|
||||
//@description Informs TDLib that a Web App is being opened from attachment menu, a botMenuButton button, an internalLinkTypeAttachmentMenuBot link, or an inlineKeyboardButtonTypeWebApp button.
|
||||
//-For each bot, a confirmation alert about data sent to the bot must be shown once
|
||||
//@chat_id Identifier of the chat in which the web app is opened. Web apps can be opened only in private chats for now
|
||||
//@bot_user_id Identifier of the bot, providing the web app
|
||||
//@chat_id Identifier of the chat in which the Web App is opened
|
||||
//@bot_user_id Identifier of the bot, providing the Web App
|
||||
//@url The URL from an inlineKeyboardButtonTypeWebApp button, a botMenuButton button, or an internalLinkTypeAttachmentMenuBot link, or an empty string otherwise
|
||||
//@theme Preferred web app theme; pass null to use the default theme
|
||||
//@reply_to_message_id Identifier of the replied message for the message sent by the web app; 0 if none
|
||||
//@theme Preferred Web App theme; pass null to use the default theme
|
||||
//@reply_to_message_id Identifier of the replied message for the message sent by the Web App; 0 if none
|
||||
openWebApp chat_id:int53 bot_user_id:int53 url:string theme:themeParameters reply_to_message_id:int53 = WebAppInfo;
|
||||
|
||||
//@description Informs TDLib that a previously opened web app was closed @web_app_launch_id Identifier of web app launch, received from openWebApp
|
||||
//@description Informs TDLib that a previously opened Web App was closed @web_app_launch_id Identifier of Web App launch, received from openWebApp
|
||||
closeWebApp web_app_launch_id:int64 = Ok;
|
||||
|
||||
//@description Sets the result of interaction with a web app and sends corresponding message on behalf of the user to the chat from which the query originated; for bots only
|
||||
//@web_app_query_id Identifier of the web app query
|
||||
//@description Sets the result of interaction with a Web App and sends corresponding message on behalf of the user to the chat from which the query originated; for bots only
|
||||
//@web_app_query_id Identifier of the Web App query
|
||||
//@result The result of the query
|
||||
answerWebAppQuery web_app_query_id:string result:InputInlineQueryResult = SentWebAppMessage;
|
||||
|
||||
|
@ -5109,7 +5300,7 @@ addChatToList chat_id:int53 chat_list:ChatList = Ok;
|
|||
//@description Returns information about a chat filter by its identifier @chat_filter_id Chat filter identifier
|
||||
getChatFilter chat_filter_id:int32 = ChatFilter;
|
||||
|
||||
//@description Creates new chat filter. Returns information about the created chat filter @filter Chat filter
|
||||
//@description Creates new chat filter. Returns information about the created chat filter. There can be up to GetOption("chat_filter_count_max") chat filters, but the limit can be increased with Telegram Premium @filter Chat filter
|
||||
createChatFilter filter:chatFilter = ChatFilterInfo;
|
||||
|
||||
//@description Edits existing chat filter. Returns information about the edited chat filter @chat_filter_id Chat filter identifier @filter The edited chat filter
|
||||
|
@ -5118,8 +5309,8 @@ editChatFilter chat_filter_id:int32 filter:chatFilter = ChatFilterInfo;
|
|||
//@description Deletes existing chat filter @chat_filter_id Chat filter identifier
|
||||
deleteChatFilter chat_filter_id:int32 = Ok;
|
||||
|
||||
//@description Changes the order of chat filters @chat_filter_ids Identifiers of chat filters in the new correct order
|
||||
reorderChatFilters chat_filter_ids:vector<int32> = Ok;
|
||||
//@description Changes the order of chat filters @chat_filter_ids Identifiers of chat filters in the new correct order @main_chat_list_position Position of the main chat list among chat filters, 0-based. Can be non-zero only for Premium users
|
||||
reorderChatFilters chat_filter_ids:vector<int32> main_chat_list_position:int32 = Ok;
|
||||
|
||||
//@description Returns recommended chat filters for the current user
|
||||
getRecommendedChatFilters = RecommendedChatFilters;
|
||||
|
@ -5198,7 +5389,7 @@ unpinChatMessage chat_id:int53 message_id:int53 = Ok;
|
|||
unpinAllChatMessages chat_id:int53 = Ok;
|
||||
|
||||
|
||||
//@description Adds the current user as a new member to a chat. Private and secret chats can't be joined using this method @chat_id Chat identifier
|
||||
//@description Adds the current user as a new member to a chat. Private and secret chats can't be joined using this method. May return an error with a message "INVITE_REQUEST_SENT" if only a join request was created @chat_id Chat identifier
|
||||
joinChat chat_id:int53 = Ok;
|
||||
|
||||
//@description Removes the current user from chat members. Private and secret chats can't be left using this method @chat_id Chat identifier
|
||||
|
@ -5276,7 +5467,7 @@ setScopeNotificationSettings scope:NotificationSettingsScope notification_settin
|
|||
resetAllNotificationSettings = Ok;
|
||||
|
||||
|
||||
//@description Changes the pinned state of a chat. There can be up to GetOption("pinned_chat_count_max")/GetOption("pinned_archived_chat_count_max") pinned non-secret chats and the same number of secret chats in the main/archive chat list
|
||||
//@description Changes the pinned state of a chat. There can be up to GetOption("pinned_chat_count_max")/GetOption("pinned_archived_chat_count_max") pinned non-secret chats and the same number of secret chats in the main/archive chat list. The limit can be increased with Telegram Premium
|
||||
//@chat_list Chat list in which to change the pinned state of the chat @chat_id Chat identifier @is_pinned Pass true to pin the chat; pass false to unpin it
|
||||
toggleChatIsPinned chat_list:ChatList chat_id:int53 is_pinned:Bool = Ok;
|
||||
|
||||
|
@ -5297,10 +5488,10 @@ toggleBotIsAddedToAttachmentMenu bot_user_id:int53 is_added:Bool = Ok;
|
|||
//@offset The starting position from which the file needs to be downloaded
|
||||
//@limit Number of bytes which need to be downloaded starting from the "offset" position before the download will automatically be canceled; use 0 to download without a limit
|
||||
//@synchronous Pass true to return response only after the file download has succeeded, has failed, has been canceled, or a new downloadFile request with different offset/limit parameters was sent; pass false to return file state immediately, just after the download has been started
|
||||
downloadFile file_id:int32 priority:int32 offset:int32 limit:int32 synchronous:Bool = File;
|
||||
downloadFile file_id:int32 priority:int32 offset:int53 limit:int53 synchronous:Bool = File;
|
||||
|
||||
//@description Returns file downloaded prefix size from a given offset, in bytes @file_id Identifier of the file @offset Offset from which downloaded prefix size needs to be calculated
|
||||
getFileDownloadedPrefixSize file_id:int32 offset:int32 = Count;
|
||||
getFileDownloadedPrefixSize file_id:int32 offset:int53 = FileDownloadedPrefixSize;
|
||||
|
||||
//@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;
|
||||
|
@ -5319,13 +5510,13 @@ cancelUploadFile 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
|
||||
//@generation_id The identifier of the generation process @offset The offset from which to write the data to the file @data The data to write
|
||||
writeGeneratedFilePart generation_id:int64 offset:int32 data:bytes = Ok;
|
||||
writeGeneratedFilePart generation_id:int64 offset:int53 data:bytes = Ok;
|
||||
|
||||
//@description Informs TDLib on a file generation progress
|
||||
//@generation_id The identifier of the generation process
|
||||
//@expected_size Expected size of the generated file, in bytes; 0 if unknown
|
||||
//@local_prefix_size The number of bytes already generated
|
||||
setFileGenerationProgress generation_id:int64 expected_size:int32 local_prefix_size:int32 = Ok;
|
||||
setFileGenerationProgress generation_id:int64 expected_size:int53 local_prefix_size:int53 = Ok;
|
||||
|
||||
//@description Finishes the file generation
|
||||
//@generation_id The identifier of the generation process
|
||||
|
@ -5336,7 +5527,7 @@ finishFileGeneration generation_id:int64 error:error = Ok;
|
|||
//@file_id Identifier of the file. The file must be located in the TDLib file cache
|
||||
//@offset The offset from which to read the file
|
||||
//@count Number of bytes to read. An error will be returned if there are not enough bytes available in the file from the specified position. Pass 0 to read all available data from the specified position
|
||||
readFilePart file_id:int32 offset:int32 count:int32 = FilePart;
|
||||
readFilePart file_id:int32 offset:int53 count:int53 = FilePart;
|
||||
|
||||
//@description Deletes a file from the TDLib file cache @file_id Identifier of the file to delete
|
||||
deleteFile file_id:int32 = Ok;
|
||||
|
@ -5375,7 +5566,7 @@ removeAllFilesFromDownloads only_active:Bool only_completed:Bool delete_from_cac
|
|||
searchFileDownloads query:string only_active:Bool only_completed:Bool offset:string limit:int32 = FoundFileDownloads;
|
||||
|
||||
|
||||
//@description Returns information about a file with messages exported from another app @message_file_head Beginning of the message file; up to 100 first lines
|
||||
//@description Returns information about a file with messages exported from another application @message_file_head Beginning of the message file; up to 100 first lines
|
||||
getMessageFileType message_file_head:string = MessageFileType;
|
||||
|
||||
//@description Returns a confirmation text to be shown to the user before starting message import
|
||||
|
@ -5447,7 +5638,7 @@ deleteAllRevokedChatInviteLinks chat_id:int53 creator_user_id:int53 = Ok;
|
|||
//@description Checks the validity of an invite link for a chat and returns information about the corresponding chat @invite_link Invite link to be checked
|
||||
checkChatInviteLink invite_link:string = ChatInviteLinkInfo;
|
||||
|
||||
//@description Uses an invite link to add the current user to the chat if possible @invite_link Invite link to use
|
||||
//@description Uses an invite link to add the current user to the chat if possible. May return an error with a message "INVITE_REQUEST_SENT" if only a join request was created @invite_link Invite link to use
|
||||
joinChatByInviteLink invite_link:string = Chat;
|
||||
|
||||
//@description Returns pending join requests in a chat
|
||||
|
@ -5680,7 +5871,7 @@ getArchivedStickerSets is_masks:Bool offset_sticker_set_id:int64 limit:int32 = S
|
|||
//@description Returns a list of trending sticker sets. For optimal performance, the number of returned sticker sets is chosen by TDLib
|
||||
//@offset The offset from which to return the sticker sets; must be non-negative
|
||||
//@limit The maximum number of sticker sets to be returned; up to 100. For optimal performance, the number of returned sticker sets is chosen by TDLib and can be smaller than the specified limit, even if the end of the list has not been reached
|
||||
getTrendingStickerSets offset:int32 limit:int32 = StickerSets;
|
||||
getTrendingStickerSets offset:int32 limit:int32 = TrendingStickerSets;
|
||||
|
||||
//@description Returns a list of sticker sets attached to a file. Currently, only photos and videos can have attached sticker sets @file_id File identifier
|
||||
getAttachedStickerSets file_id:int32 = StickerSets;
|
||||
|
@ -5738,6 +5929,9 @@ searchEmojis text:string exact_match:Bool input_language_codes:vector<string> =
|
|||
//@description Returns an animated emoji corresponding to a given emoji. Returns a 404 error if the emoji has no animated emoji @emoji The emoji
|
||||
getAnimatedEmoji emoji:string = AnimatedEmoji;
|
||||
|
||||
//@description Returns all emojis, which has a corresponding animated emoji
|
||||
getAllAnimatedEmojis = Emojis;
|
||||
|
||||
//@description Returns an HTTP URL which can be used to automatically log in to the translation platform and suggest new emoji replacements. The URL will be valid for 30 seconds after generation @language_code Language code for which the emoji replacements will be suggested
|
||||
getEmojiSuggestionsUrl language_code:string = HttpUrl;
|
||||
|
||||
|
@ -5780,7 +5974,7 @@ deleteProfilePhoto profile_photo_id:int64 = Ok;
|
|||
//@description Changes the first and last name of the current user @first_name The new value of the first name for the current user; 1-64 characters @last_name The new value of the optional last name for the current user; 0-64 characters
|
||||
setName first_name:string last_name:string = Ok;
|
||||
|
||||
//@description Changes the bio of the current user @bio The new value of the user bio; 0-70 characters without line feeds
|
||||
//@description Changes the bio of the current user @bio The new value of the user bio; 0-GetOption("bio_length_max") characters without line feeds
|
||||
setBio bio:string = Ok;
|
||||
|
||||
//@description Changes the username of the current user @username The new value of the username. Use an empty string to remove the username
|
||||
|
@ -5869,6 +6063,12 @@ setSupergroupStickerSet supergroup_id:int53 sticker_set_id:int64 = Ok;
|
|||
//@description Toggles whether sender signature is added to sent messages in a channel; requires can_change_info administrator right @supergroup_id Identifier of the channel @sign_messages New value of sign_messages
|
||||
toggleSupergroupSignMessages supergroup_id:int53 sign_messages:Bool = Ok;
|
||||
|
||||
//@description Toggles whether joining is mandatory to send messages to a discussion supergroup; requires can_restrict_members administrator right @supergroup_id Identifier of the supergroup @join_to_send_messages New value of join_to_send_messages
|
||||
toggleSupergroupJoinToSendMessages supergroup_id:int53 join_to_send_messages:Bool = Ok;
|
||||
|
||||
//@description Toggles whether all users directly joining the supergroup need to be approved by supergroup administrators; requires can_restrict_members administrator right @supergroup_id Identifier of the channel @join_by_request New value of join_by_request
|
||||
toggleSupergroupJoinByRequest supergroup_id:int53 join_by_request:Bool = Ok;
|
||||
|
||||
//@description Toggles whether the message history of a supergroup is available to new members; requires can_change_info administrator right @supergroup_id The identifier of the supergroup @is_all_history_available The new value of is_all_history_available
|
||||
toggleSupergroupIsAllHistoryAvailable supergroup_id:int53 is_all_history_available:Bool = Ok;
|
||||
|
||||
|
@ -5894,22 +6094,20 @@ getChatEventLog chat_id:int53 query:string from_event_id:int64 limit:int32 filte
|
|||
|
||||
|
||||
//@description Returns an invoice payment form. This method must be called when the user presses inlineKeyboardButtonBuy
|
||||
//@chat_id Chat identifier of the Invoice message
|
||||
//@message_id Message identifier
|
||||
//@input_invoice The invoice
|
||||
//@theme Preferred payment form theme; pass null to use the default theme
|
||||
getPaymentForm chat_id:int53 message_id:int53 theme:themeParameters = PaymentForm;
|
||||
getPaymentForm input_invoice:InputInvoice theme:themeParameters = PaymentForm;
|
||||
|
||||
//@description Validates the order information provided by a user and returns the available shipping options for a flexible invoice
|
||||
//@chat_id Chat identifier of the Invoice message
|
||||
//@message_id Message identifier
|
||||
//@input_invoice The invoice
|
||||
//@order_info The order information, provided by the user; pass null if empty
|
||||
//@allow_save Pass true to save the order information
|
||||
validateOrderInfo chat_id:int53 message_id:int53 order_info:orderInfo allow_save:Bool = ValidatedOrderInfo;
|
||||
validateOrderInfo input_invoice:InputInvoice order_info:orderInfo allow_save:Bool = ValidatedOrderInfo;
|
||||
|
||||
//@description Sends a filled-out payment form to the bot for final verification @chat_id Chat identifier of the Invoice message @message_id Message identifier
|
||||
//@description Sends a filled-out payment form to the bot for final verification @input_invoice The invoice
|
||||
//@payment_form_id Payment form identifier returned by getPaymentForm @order_info_id Identifier returned by validateOrderInfo, or an empty string @shipping_option_id Identifier of a chosen shipping option, if applicable
|
||||
//@credentials The credentials chosen by user for payment @tip_amount Chosen by the user amount of tip in the smallest units of the currency
|
||||
sendPaymentForm chat_id:int53 message_id:int53 payment_form_id:int64 order_info_id:string shipping_option_id:string credentials:InputCredentials tip_amount:int53 = PaymentResult;
|
||||
sendPaymentForm input_invoice:InputInvoice payment_form_id:int64 order_info_id:string shipping_option_id:string credentials:InputCredentials tip_amount:int53 = PaymentResult;
|
||||
|
||||
//@description Returns information about a successful payment @chat_id Chat identifier of the PaymentSuccessful message @message_id Message identifier
|
||||
getPaymentReceipt chat_id:int53 message_id:int53 = PaymentReceipt;
|
||||
|
@ -5924,6 +6122,10 @@ deleteSavedOrderInfo = Ok;
|
|||
deleteSavedCredentials = Ok;
|
||||
|
||||
|
||||
//@description Creates a link for the given invoice; for bots only @invoice Information about the invoice of the type inputMessageInvoice
|
||||
createInvoiceLink invoice:InputMessageContent = HttpUrl;
|
||||
|
||||
|
||||
//@description Returns a user that can be contacted to get support
|
||||
getSupportUser = User;
|
||||
|
||||
|
@ -6179,7 +6381,7 @@ addStickerToSet user_id:int53 name:string sticker:inputSticker = StickerSet;
|
|||
setStickerSetThumbnail user_id:int53 name:string thumbnail:InputFile = StickerSet;
|
||||
|
||||
//@description Changes the position of a sticker in the set to which it belongs; for bots only. The sticker set must have been created by the bot
|
||||
//@sticker Sticker @position New position of the sticker in the set, zero-based
|
||||
//@sticker Sticker @position New position of the sticker in the set, 0-based
|
||||
setStickerPositionInSet sticker:InputFile position:int32 = Ok;
|
||||
|
||||
//@description Removes a sticker from the set to which it belongs; for bots only. The sticker set must have been created by the bot @sticker Sticker
|
||||
|
@ -6190,6 +6392,25 @@ removeStickerFromSet sticker:InputFile = Ok;
|
|||
getMapThumbnailFile location:location zoom:int32 width:int32 height:int32 scale:int32 chat_id:int53 = File;
|
||||
|
||||
|
||||
//@description Returns information about a limit, increased for Premium users. Returns a 404 error if the limit is unknown @limit_type Type of the limit
|
||||
getPremiumLimit limit_type:PremiumLimitType = PremiumLimit;
|
||||
|
||||
//@description Returns information about features, available to Premium users @source Source of the request; pass null if the method is called from some non-standard source
|
||||
getPremiumFeatures source:PremiumSource = PremiumFeatures;
|
||||
|
||||
//@description Returns examples of premium stickers for demonstration purposes
|
||||
getPremiumStickers = Stickers;
|
||||
|
||||
//@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;
|
||||
|
||||
//@description Informs TDLib that the user clicked Premium subscription button on the Premium features screen
|
||||
clickPremiumSubscriptionButton = Ok;
|
||||
|
||||
//@description Returns state of Telegram Premium subscription and promotion videos for Premium features
|
||||
getPremiumState = PremiumState;
|
||||
|
||||
|
||||
//@description Accepts Telegram terms of services @terms_of_service_id Terms of service identifier
|
||||
acceptTermsOfService terms_of_service_id:string = Ok;
|
||||
|
||||
|
|
Loading…
Reference in a new issue