Update to TDLib 1.8.12
This commit is contained in:
parent
993b734553
commit
47887c89e1
|
@ -1440,7 +1440,7 @@ type GetMessageViewersRequest struct {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Returns viewers of a recent outgoing message in a basic group or a supergroup chat. For video notes and voice notes only users, opened content of the message, are returned. The method can be called if message.can_get_viewers == true
|
// Returns viewers of a recent outgoing message in a basic group or a supergroup chat. For video notes and voice notes only users, opened content of the message, are returned. The method can be called if message.can_get_viewers == true
|
||||||
func (client *Client) GetMessageViewers(req *GetMessageViewersRequest) (*Users, error) {
|
func (client *Client) GetMessageViewers(req *GetMessageViewersRequest) (*MessageViewers, error) {
|
||||||
result, err := client.Send(Request{
|
result, err := client.Send(Request{
|
||||||
meta: meta{
|
meta: meta{
|
||||||
Type: "getMessageViewers",
|
Type: "getMessageViewers",
|
||||||
|
@ -1458,7 +1458,7 @@ func (client *Client) GetMessageViewers(req *GetMessageViewersRequest) (*Users,
|
||||||
return nil, buildResponseError(result.Data)
|
return nil, buildResponseError(result.Data)
|
||||||
}
|
}
|
||||||
|
|
||||||
return UnmarshalUsers(result.Data)
|
return UnmarshalMessageViewers(result.Data)
|
||||||
}
|
}
|
||||||
|
|
||||||
type GetFileRequest struct {
|
type GetFileRequest struct {
|
||||||
|
@ -2842,7 +2842,7 @@ func (client *Client) GetMessageLinkInfo(req *GetMessageLinkInfoRequest) (*Messa
|
||||||
type TranslateTextRequest struct {
|
type TranslateTextRequest struct {
|
||||||
// Text to translate
|
// Text to translate
|
||||||
Text *FormattedText `json:"text"`
|
Text *FormattedText `json:"text"`
|
||||||
// ISO language code of the language to which the message is translated. Must be one of "af", "sq", "am", "ar", "hy", "az", "eu", "be", "bn", "bs", "bg", "ca", "ceb", "zh-CN", "zh", "zh-Hans", "zh-TW", "zh-Hant", "co", "hr", "cs", "da", "nl", "en", "eo", "et", "fi", "fr", "fy", "gl", "ka", "de", "el", "gu", "ht", "ha", "haw", "he", "iw", "hi", "hmn", "hu", "is", "ig", "id", "in", "ga", "it", "ja", "jv", "kn", "kk", "km", "rw", "ko", "ku", "ky", "lo", "la", "lv", "lt", "lb", "mk", "mg", "ms", "ml", "mt", "mi", "mr", "mn", "my", "ne", "no", "ny", "or", "ps", "fa", "pl", "pt", "pa", "ro", "ru", "sm", "gd", "sr", "st", "sn", "sd", "si", "sk", "sl", "so", "es", "su", "sw", "sv", "tl", "tg", "ta", "tt", "te", "th", "tr", "tk", "uk", "ur", "ug", "uz", "vi", "cy", "xh", "yi", "ji", "yo", "zu"
|
// Language code of the language to which the message is translated. Must be one of "af", "sq", "am", "ar", "hy", "az", "eu", "be", "bn", "bs", "bg", "ca", "ceb", "zh-CN", "zh", "zh-Hans", "zh-TW", "zh-Hant", "co", "hr", "cs", "da", "nl", "en", "eo", "et", "fi", "fr", "fy", "gl", "ka", "de", "el", "gu", "ht", "ha", "haw", "he", "iw", "hi", "hmn", "hu", "is", "ig", "id", "in", "ga", "it", "ja", "jv", "kn", "kk", "km", "rw", "ko", "ku", "ky", "lo", "la", "lv", "lt", "lb", "mk", "mg", "ms", "ml", "mt", "mi", "mr", "mn", "my", "ne", "no", "ny", "or", "ps", "fa", "pl", "pt", "pa", "ro", "ru", "sm", "gd", "sr", "st", "sn", "sd", "si", "sk", "sl", "so", "es", "su", "sw", "sv", "tl", "tg", "ta", "tt", "te", "th", "tr", "tk", "uk", "ur", "ug", "uz", "vi", "cy", "xh", "yi", "ji", "yo", "zu"
|
||||||
ToLanguageCode string `json:"to_language_code"`
|
ToLanguageCode string `json:"to_language_code"`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2873,7 +2873,7 @@ type TranslateMessageTextRequest struct {
|
||||||
ChatId int64 `json:"chat_id"`
|
ChatId int64 `json:"chat_id"`
|
||||||
// Identifier of the message
|
// Identifier of the message
|
||||||
MessageId int64 `json:"message_id"`
|
MessageId int64 `json:"message_id"`
|
||||||
// ISO language code of the language to which the message is translated. Must be one of "af", "sq", "am", "ar", "hy", "az", "eu", "be", "bn", "bs", "bg", "ca", "ceb", "zh-CN", "zh", "zh-Hans", "zh-TW", "zh-Hant", "co", "hr", "cs", "da", "nl", "en", "eo", "et", "fi", "fr", "fy", "gl", "ka", "de", "el", "gu", "ht", "ha", "haw", "he", "iw", "hi", "hmn", "hu", "is", "ig", "id", "in", "ga", "it", "ja", "jv", "kn", "kk", "km", "rw", "ko", "ku", "ky", "lo", "la", "lv", "lt", "lb", "mk", "mg", "ms", "ml", "mt", "mi", "mr", "mn", "my", "ne", "no", "ny", "or", "ps", "fa", "pl", "pt", "pa", "ro", "ru", "sm", "gd", "sr", "st", "sn", "sd", "si", "sk", "sl", "so", "es", "su", "sw", "sv", "tl", "tg", "ta", "tt", "te", "th", "tr", "tk", "uk", "ur", "ug", "uz", "vi", "cy", "xh", "yi", "ji", "yo", "zu"
|
// Language code of the language to which the message is translated. Must be one of "af", "sq", "am", "ar", "hy", "az", "eu", "be", "bn", "bs", "bg", "ca", "ceb", "zh-CN", "zh", "zh-Hans", "zh-TW", "zh-Hant", "co", "hr", "cs", "da", "nl", "en", "eo", "et", "fi", "fr", "fy", "gl", "ka", "de", "el", "gu", "ht", "ha", "haw", "he", "iw", "hi", "hmn", "hu", "is", "ig", "id", "in", "ga", "it", "ja", "jv", "kn", "kk", "km", "rw", "ko", "ku", "ky", "lo", "la", "lv", "lt", "lb", "mk", "mg", "ms", "ml", "mt", "mi", "mr", "mn", "my", "ne", "no", "ny", "or", "ps", "fa", "pl", "pt", "pa", "ro", "ru", "sm", "gd", "sr", "st", "sn", "sd", "si", "sk", "sl", "so", "es", "su", "sw", "sv", "tl", "tg", "ta", "tt", "te", "th", "tr", "tk", "uk", "ur", "ug", "uz", "vi", "cy", "xh", "yi", "ji", "yo", "zu"
|
||||||
ToLanguageCode string `json:"to_language_code"`
|
ToLanguageCode string `json:"to_language_code"`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -5104,16 +5104,14 @@ type AnswerInlineQueryRequest struct {
|
||||||
InlineQueryId JsonInt64 `json:"inline_query_id"`
|
InlineQueryId JsonInt64 `json:"inline_query_id"`
|
||||||
// Pass true if results may be cached and returned only for the user that sent the query. By default, results may be returned to any user who sends the same query
|
// Pass true if results may be cached and returned only for the user that sent the query. By default, results may be returned to any user who sends the same query
|
||||||
IsPersonal bool `json:"is_personal"`
|
IsPersonal bool `json:"is_personal"`
|
||||||
|
// Button to be shown above inline query results; pass null if none
|
||||||
|
Button *InlineQueryResultsButton `json:"button"`
|
||||||
// The results of the query
|
// The results of the query
|
||||||
Results []InputInlineQueryResult `json:"results"`
|
Results []InputInlineQueryResult `json:"results"`
|
||||||
// Allowed time to cache the results of the query, in seconds
|
// Allowed time to cache the results of the query, in seconds
|
||||||
CacheTime int32 `json:"cache_time"`
|
CacheTime int32 `json:"cache_time"`
|
||||||
// Offset for the next inline query; pass an empty string if there are no more results
|
// Offset for the next inline query; pass an empty string if there are no more results
|
||||||
NextOffset string `json:"next_offset"`
|
NextOffset string `json:"next_offset"`
|
||||||
// If non-empty, this text must be shown on the button that opens a private chat with the bot and sends a start message to the bot with the parameter switch_pm_parameter
|
|
||||||
SwitchPmText string `json:"switch_pm_text"`
|
|
||||||
// The parameter for the bot start message
|
|
||||||
SwitchPmParameter string `json:"switch_pm_parameter"`
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Sets the result of an inline query; for bots only
|
// Sets the result of an inline query; for bots only
|
||||||
|
@ -5125,11 +5123,10 @@ func (client *Client) AnswerInlineQuery(req *AnswerInlineQueryRequest) (*Ok, err
|
||||||
Data: map[string]interface{}{
|
Data: map[string]interface{}{
|
||||||
"inline_query_id": req.InlineQueryId,
|
"inline_query_id": req.InlineQueryId,
|
||||||
"is_personal": req.IsPersonal,
|
"is_personal": req.IsPersonal,
|
||||||
|
"button": req.Button,
|
||||||
"results": req.Results,
|
"results": req.Results,
|
||||||
"cache_time": req.CacheTime,
|
"cache_time": req.CacheTime,
|
||||||
"next_offset": req.NextOffset,
|
"next_offset": req.NextOffset,
|
||||||
"switch_pm_text": req.SwitchPmText,
|
|
||||||
"switch_pm_parameter": req.SwitchPmParameter,
|
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
@ -5143,10 +5140,83 @@ func (client *Client) AnswerInlineQuery(req *AnswerInlineQueryRequest) (*Ok, err
|
||||||
return UnmarshalOk(result.Data)
|
return UnmarshalOk(result.Data)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
type SearchWebAppRequest struct {
|
||||||
|
// Identifier of the target bot
|
||||||
|
BotUserId int64 `json:"bot_user_id"`
|
||||||
|
// Short name of the Web App
|
||||||
|
WebAppShortName string `json:"web_app_short_name"`
|
||||||
|
}
|
||||||
|
|
||||||
|
// Returns information about a Web App by its short name. Returns a 404 error if the Web App is not found
|
||||||
|
func (client *Client) SearchWebApp(req *SearchWebAppRequest) (*FoundWebApp, error) {
|
||||||
|
result, err := client.Send(Request{
|
||||||
|
meta: meta{
|
||||||
|
Type: "searchWebApp",
|
||||||
|
},
|
||||||
|
Data: map[string]interface{}{
|
||||||
|
"bot_user_id": req.BotUserId,
|
||||||
|
"web_app_short_name": req.WebAppShortName,
|
||||||
|
},
|
||||||
|
})
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
if result.Type == "error" {
|
||||||
|
return nil, buildResponseError(result.Data)
|
||||||
|
}
|
||||||
|
|
||||||
|
return UnmarshalFoundWebApp(result.Data)
|
||||||
|
}
|
||||||
|
|
||||||
|
type GetWebAppLinkUrlRequest struct {
|
||||||
|
// Identifier of the chat in which the link was clicked; pass 0 if none
|
||||||
|
ChatId int64 `json:"chat_id"`
|
||||||
|
// Identifier of the target bot
|
||||||
|
BotUserId int64 `json:"bot_user_id"`
|
||||||
|
// Short name of the Web App
|
||||||
|
WebAppShortName string `json:"web_app_short_name"`
|
||||||
|
// Start parameter from internalLinkTypeWebApp
|
||||||
|
StartParameter string `json:"start_parameter"`
|
||||||
|
// Preferred Web App theme; pass null to use the default theme
|
||||||
|
Theme *ThemeParameters `json:"theme"`
|
||||||
|
// Short name of the application; 0-64 English letters, digits, and underscores
|
||||||
|
ApplicationName string `json:"application_name"`
|
||||||
|
// Pass true if the current user allowed the bot to send them messages
|
||||||
|
AllowWriteAccess bool `json:"allow_write_access"`
|
||||||
|
}
|
||||||
|
|
||||||
|
// Returns an HTTPS URL of a Web App to open after a link of the type internalLinkTypeWebApp is clicked
|
||||||
|
func (client *Client) GetWebAppLinkUrl(req *GetWebAppLinkUrlRequest) (*HttpUrl, error) {
|
||||||
|
result, err := client.Send(Request{
|
||||||
|
meta: meta{
|
||||||
|
Type: "getWebAppLinkUrl",
|
||||||
|
},
|
||||||
|
Data: map[string]interface{}{
|
||||||
|
"chat_id": req.ChatId,
|
||||||
|
"bot_user_id": req.BotUserId,
|
||||||
|
"web_app_short_name": req.WebAppShortName,
|
||||||
|
"start_parameter": req.StartParameter,
|
||||||
|
"theme": req.Theme,
|
||||||
|
"application_name": req.ApplicationName,
|
||||||
|
"allow_write_access": req.AllowWriteAccess,
|
||||||
|
},
|
||||||
|
})
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
if result.Type == "error" {
|
||||||
|
return nil, buildResponseError(result.Data)
|
||||||
|
}
|
||||||
|
|
||||||
|
return UnmarshalHttpUrl(result.Data)
|
||||||
|
}
|
||||||
|
|
||||||
type GetWebAppUrlRequest struct {
|
type GetWebAppUrlRequest struct {
|
||||||
// Identifier of the target bot
|
// Identifier of the target bot
|
||||||
BotUserId int64 `json:"bot_user_id"`
|
BotUserId int64 `json:"bot_user_id"`
|
||||||
// The URL from the keyboardButtonTypeWebApp button
|
// The URL from the keyboardButtonTypeWebApp or inlineQueryResultsButtonTypeWebApp button
|
||||||
Url string `json:"url"`
|
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"`
|
Theme *ThemeParameters `json:"theme"`
|
||||||
|
@ -5154,7 +5224,7 @@ type GetWebAppUrlRequest struct {
|
||||||
ApplicationName string `json:"application_name"`
|
ApplicationName string `json:"application_name"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// 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 or inlineQueryResultsButtonTypeWebApp button is pressed
|
||||||
func (client *Client) GetWebAppUrl(req *GetWebAppUrlRequest) (*HttpUrl, error) {
|
func (client *Client) GetWebAppUrl(req *GetWebAppUrlRequest) (*HttpUrl, error) {
|
||||||
result, err := client.Send(Request{
|
result, err := client.Send(Request{
|
||||||
meta: meta{
|
meta: meta{
|
||||||
|
@ -5696,11 +5766,11 @@ func (client *Client) CloseChat(req *CloseChatRequest) (*Ok, error) {
|
||||||
type ViewMessagesRequest struct {
|
type ViewMessagesRequest struct {
|
||||||
// Chat identifier
|
// Chat identifier
|
||||||
ChatId int64 `json:"chat_id"`
|
ChatId int64 `json:"chat_id"`
|
||||||
// If not 0, a message thread identifier in which the messages are being viewed
|
|
||||||
MessageThreadId int64 `json:"message_thread_id"`
|
|
||||||
// The identifiers of the messages being viewed
|
// The identifiers of the messages being viewed
|
||||||
MessageIds []int64 `json:"message_ids"`
|
MessageIds []int64 `json:"message_ids"`
|
||||||
// Pass true to mark as read the specified messages even the chat is closed
|
// Source of the message view
|
||||||
|
Source MessageSource `json:"source"`
|
||||||
|
// Pass true to mark as read the specified messages even the chat is closed; pass null to guess the source based on chat open state
|
||||||
ForceRead bool `json:"force_read"`
|
ForceRead bool `json:"force_read"`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -5712,8 +5782,8 @@ func (client *Client) ViewMessages(req *ViewMessagesRequest) (*Ok, error) {
|
||||||
},
|
},
|
||||||
Data: map[string]interface{}{
|
Data: map[string]interface{}{
|
||||||
"chat_id": req.ChatId,
|
"chat_id": req.ChatId,
|
||||||
"message_thread_id": req.MessageThreadId,
|
|
||||||
"message_ids": req.MessageIds,
|
"message_ids": req.MessageIds,
|
||||||
|
"source": req.Source,
|
||||||
"force_read": req.ForceRead,
|
"force_read": req.ForceRead,
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
@ -5786,6 +5856,35 @@ func (client *Client) ClickAnimatedEmojiMessage(req *ClickAnimatedEmojiMessageRe
|
||||||
return UnmarshalSticker(result.Data)
|
return UnmarshalSticker(result.Data)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
type GetInternalLinkRequest struct {
|
||||||
|
// Expected type of the link
|
||||||
|
Type InternalLinkType `json:"type"`
|
||||||
|
// Pass true to create an HTTPS link (only available for some link types); pass false to create a tg: link
|
||||||
|
IsHttp bool `json:"is_http"`
|
||||||
|
}
|
||||||
|
|
||||||
|
// Returns an HTTPS or a tg: link with the given type. Can be called before authorization
|
||||||
|
func (client *Client) GetInternalLink(req *GetInternalLinkRequest) (*HttpUrl, error) {
|
||||||
|
result, err := client.Send(Request{
|
||||||
|
meta: meta{
|
||||||
|
Type: "getInternalLink",
|
||||||
|
},
|
||||||
|
Data: map[string]interface{}{
|
||||||
|
"type": req.Type,
|
||||||
|
"is_http": req.IsHttp,
|
||||||
|
},
|
||||||
|
})
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
if result.Type == "error" {
|
||||||
|
return nil, buildResponseError(result.Data)
|
||||||
|
}
|
||||||
|
|
||||||
|
return UnmarshalHttpUrl(result.Data)
|
||||||
|
}
|
||||||
|
|
||||||
type GetInternalLinkTypeRequest struct {
|
type GetInternalLinkTypeRequest struct {
|
||||||
// The link
|
// The link
|
||||||
Link string `json:"link"`
|
Link string `json:"link"`
|
||||||
|
@ -5822,15 +5921,15 @@ func (client *Client) GetInternalLinkType(req *GetInternalLinkTypeRequest) (Inte
|
||||||
case TypeInternalLinkTypeBackground:
|
case TypeInternalLinkTypeBackground:
|
||||||
return UnmarshalInternalLinkTypeBackground(result.Data)
|
return UnmarshalInternalLinkTypeBackground(result.Data)
|
||||||
|
|
||||||
|
case TypeInternalLinkTypeBotAddToChannel:
|
||||||
|
return UnmarshalInternalLinkTypeBotAddToChannel(result.Data)
|
||||||
|
|
||||||
case TypeInternalLinkTypeBotStart:
|
case TypeInternalLinkTypeBotStart:
|
||||||
return UnmarshalInternalLinkTypeBotStart(result.Data)
|
return UnmarshalInternalLinkTypeBotStart(result.Data)
|
||||||
|
|
||||||
case TypeInternalLinkTypeBotStartInGroup:
|
case TypeInternalLinkTypeBotStartInGroup:
|
||||||
return UnmarshalInternalLinkTypeBotStartInGroup(result.Data)
|
return UnmarshalInternalLinkTypeBotStartInGroup(result.Data)
|
||||||
|
|
||||||
case TypeInternalLinkTypeBotAddToChannel:
|
|
||||||
return UnmarshalInternalLinkTypeBotAddToChannel(result.Data)
|
|
||||||
|
|
||||||
case TypeInternalLinkTypeChangePhoneNumber:
|
case TypeInternalLinkTypeChangePhoneNumber:
|
||||||
return UnmarshalInternalLinkTypeChangePhoneNumber(result.Data)
|
return UnmarshalInternalLinkTypeChangePhoneNumber(result.Data)
|
||||||
|
|
||||||
|
@ -5918,6 +6017,9 @@ func (client *Client) GetInternalLinkType(req *GetInternalLinkTypeRequest) (Inte
|
||||||
case TypeInternalLinkTypeVideoChat:
|
case TypeInternalLinkTypeVideoChat:
|
||||||
return UnmarshalInternalLinkTypeVideoChat(result.Data)
|
return UnmarshalInternalLinkTypeVideoChat(result.Data)
|
||||||
|
|
||||||
|
case TypeInternalLinkTypeWebApp:
|
||||||
|
return UnmarshalInternalLinkTypeWebApp(result.Data)
|
||||||
|
|
||||||
default:
|
default:
|
||||||
return nil, errors.New("invalid type")
|
return nil, errors.New("invalid type")
|
||||||
}
|
}
|
||||||
|
@ -6211,7 +6313,7 @@ func (client *Client) CreateSecretChat(req *CreateSecretChatRequest) (*Chat, err
|
||||||
}
|
}
|
||||||
|
|
||||||
type CreateNewBasicGroupChatRequest struct {
|
type CreateNewBasicGroupChatRequest struct {
|
||||||
// Identifiers of users to be added to the basic group
|
// Identifiers of users to be added to the basic group; may be empty to create a basic group without other members
|
||||||
UserIds []int64 `json:"user_ids"`
|
UserIds []int64 `json:"user_ids"`
|
||||||
// Title of the new basic group; 1-128 characters
|
// Title of the new basic group; 1-128 characters
|
||||||
Title string `json:"title"`
|
Title string `json:"title"`
|
||||||
|
@ -12134,6 +12236,116 @@ func (client *Client) SetDefaultChannelAdministratorRights(req *SetDefaultChanne
|
||||||
return UnmarshalOk(result.Data)
|
return UnmarshalOk(result.Data)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
type SetBotInfoDescriptionRequest struct {
|
||||||
|
// A two-letter ISO 639-1 language code. If empty, the description will be shown to all users, for which language there are no dedicated description
|
||||||
|
LanguageCode string `json:"language_code"`
|
||||||
|
// New bot's description on the specified language
|
||||||
|
Description string `json:"description"`
|
||||||
|
}
|
||||||
|
|
||||||
|
// Sets the text shown in the chat with the bot if the chat is empty; bots only
|
||||||
|
func (client *Client) SetBotInfoDescription(req *SetBotInfoDescriptionRequest) (*Ok, error) {
|
||||||
|
result, err := client.Send(Request{
|
||||||
|
meta: meta{
|
||||||
|
Type: "setBotInfoDescription",
|
||||||
|
},
|
||||||
|
Data: map[string]interface{}{
|
||||||
|
"language_code": req.LanguageCode,
|
||||||
|
"description": req.Description,
|
||||||
|
},
|
||||||
|
})
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
if result.Type == "error" {
|
||||||
|
return nil, buildResponseError(result.Data)
|
||||||
|
}
|
||||||
|
|
||||||
|
return UnmarshalOk(result.Data)
|
||||||
|
}
|
||||||
|
|
||||||
|
type GetBotInfoDescriptionRequest struct {
|
||||||
|
// A two-letter ISO 639-1 language code or an empty string
|
||||||
|
LanguageCode string `json:"language_code"`
|
||||||
|
}
|
||||||
|
|
||||||
|
// Returns the text shown in the chat with the bot if the chat is empty in the given language; bots only
|
||||||
|
func (client *Client) GetBotInfoDescription(req *GetBotInfoDescriptionRequest) (*Text, error) {
|
||||||
|
result, err := client.Send(Request{
|
||||||
|
meta: meta{
|
||||||
|
Type: "getBotInfoDescription",
|
||||||
|
},
|
||||||
|
Data: map[string]interface{}{
|
||||||
|
"language_code": req.LanguageCode,
|
||||||
|
},
|
||||||
|
})
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
if result.Type == "error" {
|
||||||
|
return nil, buildResponseError(result.Data)
|
||||||
|
}
|
||||||
|
|
||||||
|
return UnmarshalText(result.Data)
|
||||||
|
}
|
||||||
|
|
||||||
|
type SetBotInfoShortDescriptionRequest struct {
|
||||||
|
// A two-letter ISO 639-1 language code. If empty, the short description will be shown to all users, for which language there are no dedicated description
|
||||||
|
LanguageCode string `json:"language_code"`
|
||||||
|
// New bot's short description on the specified language
|
||||||
|
ShortDescription string `json:"short_description"`
|
||||||
|
}
|
||||||
|
|
||||||
|
// Sets the text shown on the bot's profile page and sent together with the link when users share the bot; bots only
|
||||||
|
func (client *Client) SetBotInfoShortDescription(req *SetBotInfoShortDescriptionRequest) (*Ok, error) {
|
||||||
|
result, err := client.Send(Request{
|
||||||
|
meta: meta{
|
||||||
|
Type: "setBotInfoShortDescription",
|
||||||
|
},
|
||||||
|
Data: map[string]interface{}{
|
||||||
|
"language_code": req.LanguageCode,
|
||||||
|
"short_description": req.ShortDescription,
|
||||||
|
},
|
||||||
|
})
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
if result.Type == "error" {
|
||||||
|
return nil, buildResponseError(result.Data)
|
||||||
|
}
|
||||||
|
|
||||||
|
return UnmarshalOk(result.Data)
|
||||||
|
}
|
||||||
|
|
||||||
|
type GetBotInfoShortDescriptionRequest struct {
|
||||||
|
// A two-letter ISO 639-1 language code or an empty string
|
||||||
|
LanguageCode string `json:"language_code"`
|
||||||
|
}
|
||||||
|
|
||||||
|
// Returns the text shown on the bot's profile page and sent together with the link when users share the bot in the given language; bots only
|
||||||
|
func (client *Client) GetBotInfoShortDescription(req *GetBotInfoShortDescriptionRequest) (*Text, error) {
|
||||||
|
result, err := client.Send(Request{
|
||||||
|
meta: meta{
|
||||||
|
Type: "getBotInfoShortDescription",
|
||||||
|
},
|
||||||
|
Data: map[string]interface{}{
|
||||||
|
"language_code": req.LanguageCode,
|
||||||
|
},
|
||||||
|
})
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
if result.Type == "error" {
|
||||||
|
return nil, buildResponseError(result.Data)
|
||||||
|
}
|
||||||
|
|
||||||
|
return UnmarshalText(result.Data)
|
||||||
|
}
|
||||||
|
|
||||||
// Returns all active sessions of the current user
|
// Returns all active sessions of the current user
|
||||||
func (client *Client) GetActiveSessions() (*Sessions, error) {
|
func (client *Client) GetActiveSessions() (*Sessions, error) {
|
||||||
result, err := client.Send(Request{
|
result, err := client.Send(Request{
|
||||||
|
@ -13379,7 +13591,7 @@ func (client *Client) SynchronizeLanguagePack(req *SynchronizeLanguagePackReques
|
||||||
}
|
}
|
||||||
|
|
||||||
type AddCustomServerLanguagePackRequest struct {
|
type AddCustomServerLanguagePackRequest struct {
|
||||||
// Identifier of a language pack to be added; may be different from a name that is used in an "https://t.me/setlanguage/" link
|
// Identifier of a language pack to be added
|
||||||
LanguagePackId string `json:"language_pack_id"`
|
LanguagePackId string `json:"language_pack_id"`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -14404,7 +14616,7 @@ type SetAutosaveSettingsRequest struct {
|
||||||
Settings *ScopeAutosaveSettings `json:"settings"`
|
Settings *ScopeAutosaveSettings `json:"settings"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// Sets autosave settings for the given scope
|
// Sets autosave settings for the given scope. The method is guaranteed to work only after at least one call to getAutosaveSettings
|
||||||
func (client *Client) SetAutosaveSettings(req *SetAutosaveSettingsRequest) (*Ok, error) {
|
func (client *Client) SetAutosaveSettings(req *SetAutosaveSettingsRequest) (*Ok, error) {
|
||||||
result, err := client.Send(Request{
|
result, err := client.Send(Request{
|
||||||
meta: meta{
|
meta: meta{
|
||||||
|
@ -14426,7 +14638,7 @@ func (client *Client) SetAutosaveSettings(req *SetAutosaveSettingsRequest) (*Ok,
|
||||||
return UnmarshalOk(result.Data)
|
return UnmarshalOk(result.Data)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Clears the list of all autosave settings exceptions
|
// Clears the list of all autosave settings exceptions. The method is guaranteed to work only after at least one call to getAutosaveSettings
|
||||||
func (client *Client) ClearAutosaveSettingsExceptions() (*Ok, error) {
|
func (client *Client) ClearAutosaveSettingsExceptions() (*Ok, error) {
|
||||||
result, err := client.Send(Request{
|
result, err := client.Send(Request{
|
||||||
meta: meta{
|
meta: meta{
|
||||||
|
@ -15067,8 +15279,10 @@ func (client *Client) SetBotUpdatesStatus(req *SetBotUpdatesStatusRequest) (*Ok,
|
||||||
type UploadStickerFileRequest struct {
|
type UploadStickerFileRequest struct {
|
||||||
// Sticker file owner; ignored for regular users
|
// Sticker file owner; ignored for regular users
|
||||||
UserId int64 `json:"user_id"`
|
UserId int64 `json:"user_id"`
|
||||||
// Sticker file to upload
|
// Sticker format
|
||||||
Sticker *InputSticker `json:"sticker"`
|
StickerFormat StickerFormat `json:"sticker_format"`
|
||||||
|
// File file to upload; must fit in a 512x512 square. For WEBP stickers the file must be in WEBP or PNG format, which will be converted to WEBP server-side. See https://core.telegram.org/animated_stickers#technical-requirements for technical requirements
|
||||||
|
Sticker InputFile `json:"sticker"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// Uploads a file with a sticker; returns the uploaded file
|
// Uploads a file with a sticker; returns the uploaded file
|
||||||
|
@ -15079,6 +15293,7 @@ func (client *Client) UploadStickerFile(req *UploadStickerFileRequest) (*File, e
|
||||||
},
|
},
|
||||||
Data: map[string]interface{}{
|
Data: map[string]interface{}{
|
||||||
"user_id": req.UserId,
|
"user_id": req.UserId,
|
||||||
|
"sticker_format": req.StickerFormat,
|
||||||
"sticker": req.Sticker,
|
"sticker": req.Sticker,
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
@ -15164,8 +15379,12 @@ type CreateNewStickerSetRequest struct {
|
||||||
Title string `json:"title"`
|
Title string `json:"title"`
|
||||||
// Sticker set name. Can contain only English letters, digits and underscores. Must end with *"_by_<bot username>"* (*<bot_username>* is case insensitive) for bots; 1-64 characters
|
// Sticker set name. Can contain only English letters, digits and underscores. Must end with *"_by_<bot username>"* (*<bot_username>* is case insensitive) for bots; 1-64 characters
|
||||||
Name string `json:"name"`
|
Name string `json:"name"`
|
||||||
|
// Format of the stickers in the set
|
||||||
|
StickerFormat StickerFormat `json:"sticker_format"`
|
||||||
// Type of the stickers in the set
|
// Type of the stickers in the set
|
||||||
StickerType StickerType `json:"sticker_type"`
|
StickerType StickerType `json:"sticker_type"`
|
||||||
|
// Pass true if stickers in the sticker set must be repainted; for custom emoji sticker sets only
|
||||||
|
NeedsRepainting bool `json:"needs_repainting"`
|
||||||
// List of stickers to be added to the set; must be non-empty. All stickers must have the same format. For TGS stickers, uploadStickerFile must be used before the sticker is shown
|
// List of stickers to be added to the set; must be non-empty. All stickers must have the same format. For TGS stickers, uploadStickerFile must be used before the sticker is shown
|
||||||
Stickers []*InputSticker `json:"stickers"`
|
Stickers []*InputSticker `json:"stickers"`
|
||||||
// Source of the sticker set; may be empty if unknown
|
// Source of the sticker set; may be empty if unknown
|
||||||
|
@ -15182,7 +15401,9 @@ func (client *Client) CreateNewStickerSet(req *CreateNewStickerSetRequest) (*Sti
|
||||||
"user_id": req.UserId,
|
"user_id": req.UserId,
|
||||||
"title": req.Title,
|
"title": req.Title,
|
||||||
"name": req.Name,
|
"name": req.Name,
|
||||||
|
"sticker_format": req.StickerFormat,
|
||||||
"sticker_type": req.StickerType,
|
"sticker_type": req.StickerType,
|
||||||
|
"needs_repainting": req.NeedsRepainting,
|
||||||
"stickers": req.Stickers,
|
"stickers": req.Stickers,
|
||||||
"source": req.Source,
|
"source": req.Source,
|
||||||
},
|
},
|
||||||
|
@ -15207,8 +15428,8 @@ type AddStickerToSetRequest struct {
|
||||||
Sticker *InputSticker `json:"sticker"`
|
Sticker *InputSticker `json:"sticker"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// Adds a new sticker to a set; for bots only. Returns the sticker set
|
// Adds a new sticker to a set; for bots only
|
||||||
func (client *Client) AddStickerToSet(req *AddStickerToSetRequest) (*StickerSet, error) {
|
func (client *Client) AddStickerToSet(req *AddStickerToSetRequest) (*Ok, error) {
|
||||||
result, err := client.Send(Request{
|
result, err := client.Send(Request{
|
||||||
meta: meta{
|
meta: meta{
|
||||||
Type: "addStickerToSet",
|
Type: "addStickerToSet",
|
||||||
|
@ -15227,7 +15448,7 @@ func (client *Client) AddStickerToSet(req *AddStickerToSetRequest) (*StickerSet,
|
||||||
return nil, buildResponseError(result.Data)
|
return nil, buildResponseError(result.Data)
|
||||||
}
|
}
|
||||||
|
|
||||||
return UnmarshalStickerSet(result.Data)
|
return UnmarshalOk(result.Data)
|
||||||
}
|
}
|
||||||
|
|
||||||
type SetStickerSetThumbnailRequest struct {
|
type SetStickerSetThumbnailRequest struct {
|
||||||
|
@ -15239,8 +15460,8 @@ type SetStickerSetThumbnailRequest struct {
|
||||||
Thumbnail InputFile `json:"thumbnail"`
|
Thumbnail InputFile `json:"thumbnail"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// Sets a sticker set thumbnail; for bots only. Returns the sticker set
|
// Sets a sticker set thumbnail; for bots only
|
||||||
func (client *Client) SetStickerSetThumbnail(req *SetStickerSetThumbnailRequest) (*StickerSet, error) {
|
func (client *Client) SetStickerSetThumbnail(req *SetStickerSetThumbnailRequest) (*Ok, error) {
|
||||||
result, err := client.Send(Request{
|
result, err := client.Send(Request{
|
||||||
meta: meta{
|
meta: meta{
|
||||||
Type: "setStickerSetThumbnail",
|
Type: "setStickerSetThumbnail",
|
||||||
|
@ -15259,7 +15480,91 @@ func (client *Client) SetStickerSetThumbnail(req *SetStickerSetThumbnailRequest)
|
||||||
return nil, buildResponseError(result.Data)
|
return nil, buildResponseError(result.Data)
|
||||||
}
|
}
|
||||||
|
|
||||||
return UnmarshalStickerSet(result.Data)
|
return UnmarshalOk(result.Data)
|
||||||
|
}
|
||||||
|
|
||||||
|
type SetCustomEmojiStickerSetThumbnailRequest struct {
|
||||||
|
// Sticker set name
|
||||||
|
Name string `json:"name"`
|
||||||
|
// Identifier of the custom emoji from the sticker set, which will be set as sticker set thumbnail; pass 0 to remove the sticker set thumbnail
|
||||||
|
CustomEmojiId JsonInt64 `json:"custom_emoji_id"`
|
||||||
|
}
|
||||||
|
|
||||||
|
// Sets a custom emoji sticker set thumbnail; for bots only
|
||||||
|
func (client *Client) SetCustomEmojiStickerSetThumbnail(req *SetCustomEmojiStickerSetThumbnailRequest) (*Ok, error) {
|
||||||
|
result, err := client.Send(Request{
|
||||||
|
meta: meta{
|
||||||
|
Type: "setCustomEmojiStickerSetThumbnail",
|
||||||
|
},
|
||||||
|
Data: map[string]interface{}{
|
||||||
|
"name": req.Name,
|
||||||
|
"custom_emoji_id": req.CustomEmojiId,
|
||||||
|
},
|
||||||
|
})
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
if result.Type == "error" {
|
||||||
|
return nil, buildResponseError(result.Data)
|
||||||
|
}
|
||||||
|
|
||||||
|
return UnmarshalOk(result.Data)
|
||||||
|
}
|
||||||
|
|
||||||
|
type SetStickerSetTitleRequest struct {
|
||||||
|
// Sticker set name
|
||||||
|
Name string `json:"name"`
|
||||||
|
// New sticker set title
|
||||||
|
Title string `json:"title"`
|
||||||
|
}
|
||||||
|
|
||||||
|
// Sets a sticker set title; for bots only
|
||||||
|
func (client *Client) SetStickerSetTitle(req *SetStickerSetTitleRequest) (*Ok, error) {
|
||||||
|
result, err := client.Send(Request{
|
||||||
|
meta: meta{
|
||||||
|
Type: "setStickerSetTitle",
|
||||||
|
},
|
||||||
|
Data: map[string]interface{}{
|
||||||
|
"name": req.Name,
|
||||||
|
"title": req.Title,
|
||||||
|
},
|
||||||
|
})
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
if result.Type == "error" {
|
||||||
|
return nil, buildResponseError(result.Data)
|
||||||
|
}
|
||||||
|
|
||||||
|
return UnmarshalOk(result.Data)
|
||||||
|
}
|
||||||
|
|
||||||
|
type DeleteStickerSetRequest struct {
|
||||||
|
// Sticker set name
|
||||||
|
Name string `json:"name"`
|
||||||
|
}
|
||||||
|
|
||||||
|
// Deleted a sticker set; for bots only
|
||||||
|
func (client *Client) DeleteStickerSet(req *DeleteStickerSetRequest) (*Ok, error) {
|
||||||
|
result, err := client.Send(Request{
|
||||||
|
meta: meta{
|
||||||
|
Type: "deleteStickerSet",
|
||||||
|
},
|
||||||
|
Data: map[string]interface{}{
|
||||||
|
"name": req.Name,
|
||||||
|
},
|
||||||
|
})
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
if result.Type == "error" {
|
||||||
|
return nil, buildResponseError(result.Data)
|
||||||
|
}
|
||||||
|
|
||||||
|
return UnmarshalOk(result.Data)
|
||||||
}
|
}
|
||||||
|
|
||||||
type SetStickerPositionInSetRequest struct {
|
type SetStickerPositionInSetRequest struct {
|
||||||
|
@ -15317,6 +15622,93 @@ func (client *Client) RemoveStickerFromSet(req *RemoveStickerFromSetRequest) (*O
|
||||||
return UnmarshalOk(result.Data)
|
return UnmarshalOk(result.Data)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
type SetStickerEmojisRequest struct {
|
||||||
|
// Sticker
|
||||||
|
Sticker InputFile `json:"sticker"`
|
||||||
|
// New string with 1-20 emoji corresponding to the sticker
|
||||||
|
Emojis string `json:"emojis"`
|
||||||
|
}
|
||||||
|
|
||||||
|
// Changes the list of emoji corresponding to a sticker; for bots only. The sticker must belong to a regular or custom emoji sticker set created by the bot
|
||||||
|
func (client *Client) SetStickerEmojis(req *SetStickerEmojisRequest) (*Ok, error) {
|
||||||
|
result, err := client.Send(Request{
|
||||||
|
meta: meta{
|
||||||
|
Type: "setStickerEmojis",
|
||||||
|
},
|
||||||
|
Data: map[string]interface{}{
|
||||||
|
"sticker": req.Sticker,
|
||||||
|
"emojis": req.Emojis,
|
||||||
|
},
|
||||||
|
})
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
if result.Type == "error" {
|
||||||
|
return nil, buildResponseError(result.Data)
|
||||||
|
}
|
||||||
|
|
||||||
|
return UnmarshalOk(result.Data)
|
||||||
|
}
|
||||||
|
|
||||||
|
type SetStickerKeywordsRequest struct {
|
||||||
|
// Sticker
|
||||||
|
Sticker InputFile `json:"sticker"`
|
||||||
|
// List of up to 20 keywords with total length up to 64 characters, which can be used to find the sticker
|
||||||
|
Keywords []string `json:"keywords"`
|
||||||
|
}
|
||||||
|
|
||||||
|
// Changes the list of keywords of a sticker; for bots only. The sticker must belong to a regular or custom emoji sticker set created by the bot
|
||||||
|
func (client *Client) SetStickerKeywords(req *SetStickerKeywordsRequest) (*Ok, error) {
|
||||||
|
result, err := client.Send(Request{
|
||||||
|
meta: meta{
|
||||||
|
Type: "setStickerKeywords",
|
||||||
|
},
|
||||||
|
Data: map[string]interface{}{
|
||||||
|
"sticker": req.Sticker,
|
||||||
|
"keywords": req.Keywords,
|
||||||
|
},
|
||||||
|
})
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
if result.Type == "error" {
|
||||||
|
return nil, buildResponseError(result.Data)
|
||||||
|
}
|
||||||
|
|
||||||
|
return UnmarshalOk(result.Data)
|
||||||
|
}
|
||||||
|
|
||||||
|
type SetStickerMaskPositionRequest struct {
|
||||||
|
// Sticker
|
||||||
|
Sticker InputFile `json:"sticker"`
|
||||||
|
// Position where the mask is placed; pass null to remove mask position
|
||||||
|
MaskPosition *MaskPosition `json:"mask_position"`
|
||||||
|
}
|
||||||
|
|
||||||
|
// Changes the mask position of a mask sticker; for bots only. The sticker must belong to a mask sticker set created by the bot
|
||||||
|
func (client *Client) SetStickerMaskPosition(req *SetStickerMaskPositionRequest) (*Ok, error) {
|
||||||
|
result, err := client.Send(Request{
|
||||||
|
meta: meta{
|
||||||
|
Type: "setStickerMaskPosition",
|
||||||
|
},
|
||||||
|
Data: map[string]interface{}{
|
||||||
|
"sticker": req.Sticker,
|
||||||
|
"mask_position": req.MaskPosition,
|
||||||
|
},
|
||||||
|
})
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
if result.Type == "error" {
|
||||||
|
return nil, buildResponseError(result.Data)
|
||||||
|
}
|
||||||
|
|
||||||
|
return UnmarshalOk(result.Data)
|
||||||
|
}
|
||||||
|
|
||||||
type GetMapThumbnailFileRequest struct {
|
type GetMapThumbnailFileRequest struct {
|
||||||
// Location of the map center
|
// Location of the map center
|
||||||
Location *Location `json:"location"`
|
Location *Location `json:"location"`
|
||||||
|
@ -15792,25 +16184,6 @@ func (client *Client) GetPhoneNumberInfoSync(req *GetPhoneNumberInfoSyncRequest)
|
||||||
return GetPhoneNumberInfoSync(req)
|
return GetPhoneNumberInfoSync(req)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Returns the link for downloading official Telegram application to be used when the current user invites friends to Telegram
|
|
||||||
func (client *Client) GetApplicationDownloadLink() (*HttpUrl, error) {
|
|
||||||
result, err := client.Send(Request{
|
|
||||||
meta: meta{
|
|
||||||
Type: "getApplicationDownloadLink",
|
|
||||||
},
|
|
||||||
Data: map[string]interface{}{},
|
|
||||||
})
|
|
||||||
if err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
|
|
||||||
if result.Type == "error" {
|
|
||||||
return nil, buildResponseError(result.Data)
|
|
||||||
}
|
|
||||||
|
|
||||||
return UnmarshalHttpUrl(result.Data)
|
|
||||||
}
|
|
||||||
|
|
||||||
type GetDeepLinkInfoRequest struct {
|
type GetDeepLinkInfoRequest struct {
|
||||||
// The link
|
// The link
|
||||||
Link string `json:"link"`
|
Link string `json:"link"`
|
||||||
|
@ -15877,6 +16250,32 @@ func (client *Client) GetApplicationConfig() (JsonValue, error) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
type AddApplicationChangelogRequest struct {
|
||||||
|
// The previous application version
|
||||||
|
PreviousApplicationVersion string `json:"previous_application_version"`
|
||||||
|
}
|
||||||
|
|
||||||
|
// Adds server-provided application changelog as messages to the chat 777000 (Telegram); for official applications only
|
||||||
|
func (client *Client) AddApplicationChangelog(req *AddApplicationChangelogRequest) (*Ok, error) {
|
||||||
|
result, err := client.Send(Request{
|
||||||
|
meta: meta{
|
||||||
|
Type: "addApplicationChangelog",
|
||||||
|
},
|
||||||
|
Data: map[string]interface{}{
|
||||||
|
"previous_application_version": req.PreviousApplicationVersion,
|
||||||
|
},
|
||||||
|
})
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
if result.Type == "error" {
|
||||||
|
return nil, buildResponseError(result.Data)
|
||||||
|
}
|
||||||
|
|
||||||
|
return UnmarshalOk(result.Data)
|
||||||
|
}
|
||||||
|
|
||||||
type SaveApplicationLogEventRequest struct {
|
type SaveApplicationLogEventRequest struct {
|
||||||
// Event type
|
// Event type
|
||||||
Type string `json:"type"`
|
Type string `json:"type"`
|
||||||
|
@ -15909,6 +16308,25 @@ func (client *Client) SaveApplicationLogEvent(req *SaveApplicationLogEventReques
|
||||||
return UnmarshalOk(result.Data)
|
return UnmarshalOk(result.Data)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Returns the link for downloading official Telegram application to be used when the current user invites friends to Telegram
|
||||||
|
func (client *Client) GetApplicationDownloadLink() (*HttpUrl, error) {
|
||||||
|
result, err := client.Send(Request{
|
||||||
|
meta: meta{
|
||||||
|
Type: "getApplicationDownloadLink",
|
||||||
|
},
|
||||||
|
Data: map[string]interface{}{},
|
||||||
|
})
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
if result.Type == "error" {
|
||||||
|
return nil, buildResponseError(result.Data)
|
||||||
|
}
|
||||||
|
|
||||||
|
return UnmarshalHttpUrl(result.Data)
|
||||||
|
}
|
||||||
|
|
||||||
type AddProxyRequest struct {
|
type AddProxyRequest struct {
|
||||||
// Proxy server IP address
|
// Proxy server IP address
|
||||||
Server string `json:"server"`
|
Server string `json:"server"`
|
||||||
|
@ -17008,6 +17426,9 @@ func (client *Client) TestUseUpdate() (Update, error) {
|
||||||
case TypeUpdateSuggestedActions:
|
case TypeUpdateSuggestedActions:
|
||||||
return UnmarshalUpdateSuggestedActions(result.Data)
|
return UnmarshalUpdateSuggestedActions(result.Data)
|
||||||
|
|
||||||
|
case TypeUpdateAddChatMembersPrivacyForbidden:
|
||||||
|
return UnmarshalUpdateAddChatMembersPrivacyForbidden(result.Data)
|
||||||
|
|
||||||
case TypeUpdateAutosaveSettings:
|
case TypeUpdateAutosaveSettings:
|
||||||
return UnmarshalUpdateAutosaveSettings(result.Data)
|
return UnmarshalUpdateAutosaveSettings(result.Data)
|
||||||
|
|
||||||
|
|
667
client/type.go
667
client/type.go
File diff suppressed because it is too large
Load diff
|
@ -877,6 +877,61 @@ func UnmarshalListOfMessageSendingState(dataList []json.RawMessage) ([]MessageSe
|
||||||
return list, nil
|
return list, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func UnmarshalMessageSource(data json.RawMessage) (MessageSource, error) {
|
||||||
|
var meta meta
|
||||||
|
|
||||||
|
err := json.Unmarshal(data, &meta)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
switch meta.Type {
|
||||||
|
case TypeMessageSourceChatHistory:
|
||||||
|
return UnmarshalMessageSourceChatHistory(data)
|
||||||
|
|
||||||
|
case TypeMessageSourceMessageThreadHistory:
|
||||||
|
return UnmarshalMessageSourceMessageThreadHistory(data)
|
||||||
|
|
||||||
|
case TypeMessageSourceForumTopicHistory:
|
||||||
|
return UnmarshalMessageSourceForumTopicHistory(data)
|
||||||
|
|
||||||
|
case TypeMessageSourceHistoryPreview:
|
||||||
|
return UnmarshalMessageSourceHistoryPreview(data)
|
||||||
|
|
||||||
|
case TypeMessageSourceChatList:
|
||||||
|
return UnmarshalMessageSourceChatList(data)
|
||||||
|
|
||||||
|
case TypeMessageSourceSearch:
|
||||||
|
return UnmarshalMessageSourceSearch(data)
|
||||||
|
|
||||||
|
case TypeMessageSourceChatEventLog:
|
||||||
|
return UnmarshalMessageSourceChatEventLog(data)
|
||||||
|
|
||||||
|
case TypeMessageSourceNotification:
|
||||||
|
return UnmarshalMessageSourceNotification(data)
|
||||||
|
|
||||||
|
case TypeMessageSourceOther:
|
||||||
|
return UnmarshalMessageSourceOther(data)
|
||||||
|
|
||||||
|
default:
|
||||||
|
return nil, fmt.Errorf("Error unmarshaling. Unknown type: " + meta.Type)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func UnmarshalListOfMessageSource(dataList []json.RawMessage) ([]MessageSource, error) {
|
||||||
|
list := []MessageSource{}
|
||||||
|
|
||||||
|
for _, data := range dataList {
|
||||||
|
entity, err := UnmarshalMessageSource(data)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
list = append(list, entity)
|
||||||
|
}
|
||||||
|
|
||||||
|
return list, nil
|
||||||
|
}
|
||||||
|
|
||||||
func UnmarshalNotificationSettingsScope(data json.RawMessage) (NotificationSettingsScope, error) {
|
func UnmarshalNotificationSettingsScope(data json.RawMessage) (NotificationSettingsScope, error) {
|
||||||
var meta meta
|
var meta meta
|
||||||
|
|
||||||
|
@ -3142,6 +3197,40 @@ func UnmarshalListOfInlineQueryResult(dataList []json.RawMessage) ([]InlineQuery
|
||||||
return list, nil
|
return list, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func UnmarshalInlineQueryResultsButtonType(data json.RawMessage) (InlineQueryResultsButtonType, error) {
|
||||||
|
var meta meta
|
||||||
|
|
||||||
|
err := json.Unmarshal(data, &meta)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
switch meta.Type {
|
||||||
|
case TypeInlineQueryResultsButtonTypeStartBot:
|
||||||
|
return UnmarshalInlineQueryResultsButtonTypeStartBot(data)
|
||||||
|
|
||||||
|
case TypeInlineQueryResultsButtonTypeWebApp:
|
||||||
|
return UnmarshalInlineQueryResultsButtonTypeWebApp(data)
|
||||||
|
|
||||||
|
default:
|
||||||
|
return nil, fmt.Errorf("Error unmarshaling. Unknown type: " + meta.Type)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func UnmarshalListOfInlineQueryResultsButtonType(dataList []json.RawMessage) ([]InlineQueryResultsButtonType, error) {
|
||||||
|
list := []InlineQueryResultsButtonType{}
|
||||||
|
|
||||||
|
for _, data := range dataList {
|
||||||
|
entity, err := UnmarshalInlineQueryResultsButtonType(data)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
list = append(list, entity)
|
||||||
|
}
|
||||||
|
|
||||||
|
return list, nil
|
||||||
|
}
|
||||||
|
|
||||||
func UnmarshalCallbackQueryPayload(data json.RawMessage) (CallbackQueryPayload, error) {
|
func UnmarshalCallbackQueryPayload(data json.RawMessage) (CallbackQueryPayload, error) {
|
||||||
var meta meta
|
var meta meta
|
||||||
|
|
||||||
|
@ -4536,15 +4625,15 @@ func UnmarshalInternalLinkType(data json.RawMessage) (InternalLinkType, error) {
|
||||||
case TypeInternalLinkTypeBackground:
|
case TypeInternalLinkTypeBackground:
|
||||||
return UnmarshalInternalLinkTypeBackground(data)
|
return UnmarshalInternalLinkTypeBackground(data)
|
||||||
|
|
||||||
|
case TypeInternalLinkTypeBotAddToChannel:
|
||||||
|
return UnmarshalInternalLinkTypeBotAddToChannel(data)
|
||||||
|
|
||||||
case TypeInternalLinkTypeBotStart:
|
case TypeInternalLinkTypeBotStart:
|
||||||
return UnmarshalInternalLinkTypeBotStart(data)
|
return UnmarshalInternalLinkTypeBotStart(data)
|
||||||
|
|
||||||
case TypeInternalLinkTypeBotStartInGroup:
|
case TypeInternalLinkTypeBotStartInGroup:
|
||||||
return UnmarshalInternalLinkTypeBotStartInGroup(data)
|
return UnmarshalInternalLinkTypeBotStartInGroup(data)
|
||||||
|
|
||||||
case TypeInternalLinkTypeBotAddToChannel:
|
|
||||||
return UnmarshalInternalLinkTypeBotAddToChannel(data)
|
|
||||||
|
|
||||||
case TypeInternalLinkTypeChangePhoneNumber:
|
case TypeInternalLinkTypeChangePhoneNumber:
|
||||||
return UnmarshalInternalLinkTypeChangePhoneNumber(data)
|
return UnmarshalInternalLinkTypeChangePhoneNumber(data)
|
||||||
|
|
||||||
|
@ -4632,6 +4721,9 @@ func UnmarshalInternalLinkType(data json.RawMessage) (InternalLinkType, error) {
|
||||||
case TypeInternalLinkTypeVideoChat:
|
case TypeInternalLinkTypeVideoChat:
|
||||||
return UnmarshalInternalLinkTypeVideoChat(data)
|
return UnmarshalInternalLinkTypeVideoChat(data)
|
||||||
|
|
||||||
|
case TypeInternalLinkTypeWebApp:
|
||||||
|
return UnmarshalInternalLinkTypeWebApp(data)
|
||||||
|
|
||||||
default:
|
default:
|
||||||
return nil, fmt.Errorf("Error unmarshaling. Unknown type: " + meta.Type)
|
return nil, fmt.Errorf("Error unmarshaling. Unknown type: " + meta.Type)
|
||||||
}
|
}
|
||||||
|
@ -5547,6 +5639,9 @@ func UnmarshalUpdate(data json.RawMessage) (Update, error) {
|
||||||
case TypeUpdateSuggestedActions:
|
case TypeUpdateSuggestedActions:
|
||||||
return UnmarshalUpdateSuggestedActions(data)
|
return UnmarshalUpdateSuggestedActions(data)
|
||||||
|
|
||||||
|
case TypeUpdateAddChatMembersPrivacyForbidden:
|
||||||
|
return UnmarshalUpdateAddChatMembersPrivacyForbidden(data)
|
||||||
|
|
||||||
case TypeUpdateAutosaveSettings:
|
case TypeUpdateAutosaveSettings:
|
||||||
return UnmarshalUpdateAutosaveSettings(data)
|
return UnmarshalUpdateAutosaveSettings(data)
|
||||||
|
|
||||||
|
@ -6298,6 +6393,14 @@ func UnmarshalGame(data json.RawMessage) (*Game, error) {
|
||||||
return &resp, err
|
return &resp, err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func UnmarshalWebApp(data json.RawMessage) (*WebApp, error) {
|
||||||
|
var resp WebApp
|
||||||
|
|
||||||
|
err := json.Unmarshal(data, &resp)
|
||||||
|
|
||||||
|
return &resp, err
|
||||||
|
}
|
||||||
|
|
||||||
func UnmarshalPoll(data json.RawMessage) (*Poll, error) {
|
func UnmarshalPoll(data json.RawMessage) (*Poll, error) {
|
||||||
var resp Poll
|
var resp Poll
|
||||||
|
|
||||||
|
@ -6938,6 +7041,22 @@ func UnmarshalChatMessageSenders(data json.RawMessage) (*ChatMessageSenders, err
|
||||||
return &resp, err
|
return &resp, err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func UnmarshalMessageViewer(data json.RawMessage) (*MessageViewer, error) {
|
||||||
|
var resp MessageViewer
|
||||||
|
|
||||||
|
err := json.Unmarshal(data, &resp)
|
||||||
|
|
||||||
|
return &resp, err
|
||||||
|
}
|
||||||
|
|
||||||
|
func UnmarshalMessageViewers(data json.RawMessage) (*MessageViewers, error) {
|
||||||
|
var resp MessageViewers
|
||||||
|
|
||||||
|
err := json.Unmarshal(data, &resp)
|
||||||
|
|
||||||
|
return &resp, err
|
||||||
|
}
|
||||||
|
|
||||||
func UnmarshalMessageForwardOriginUser(data json.RawMessage) (*MessageForwardOriginUser, error) {
|
func UnmarshalMessageForwardOriginUser(data json.RawMessage) (*MessageForwardOriginUser, error) {
|
||||||
var resp MessageForwardOriginUser
|
var resp MessageForwardOriginUser
|
||||||
|
|
||||||
|
@ -7114,6 +7233,78 @@ func UnmarshalMessageCalendar(data json.RawMessage) (*MessageCalendar, error) {
|
||||||
return &resp, err
|
return &resp, err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func UnmarshalMessageSourceChatHistory(data json.RawMessage) (*MessageSourceChatHistory, error) {
|
||||||
|
var resp MessageSourceChatHistory
|
||||||
|
|
||||||
|
err := json.Unmarshal(data, &resp)
|
||||||
|
|
||||||
|
return &resp, err
|
||||||
|
}
|
||||||
|
|
||||||
|
func UnmarshalMessageSourceMessageThreadHistory(data json.RawMessage) (*MessageSourceMessageThreadHistory, error) {
|
||||||
|
var resp MessageSourceMessageThreadHistory
|
||||||
|
|
||||||
|
err := json.Unmarshal(data, &resp)
|
||||||
|
|
||||||
|
return &resp, err
|
||||||
|
}
|
||||||
|
|
||||||
|
func UnmarshalMessageSourceForumTopicHistory(data json.RawMessage) (*MessageSourceForumTopicHistory, error) {
|
||||||
|
var resp MessageSourceForumTopicHistory
|
||||||
|
|
||||||
|
err := json.Unmarshal(data, &resp)
|
||||||
|
|
||||||
|
return &resp, err
|
||||||
|
}
|
||||||
|
|
||||||
|
func UnmarshalMessageSourceHistoryPreview(data json.RawMessage) (*MessageSourceHistoryPreview, error) {
|
||||||
|
var resp MessageSourceHistoryPreview
|
||||||
|
|
||||||
|
err := json.Unmarshal(data, &resp)
|
||||||
|
|
||||||
|
return &resp, err
|
||||||
|
}
|
||||||
|
|
||||||
|
func UnmarshalMessageSourceChatList(data json.RawMessage) (*MessageSourceChatList, error) {
|
||||||
|
var resp MessageSourceChatList
|
||||||
|
|
||||||
|
err := json.Unmarshal(data, &resp)
|
||||||
|
|
||||||
|
return &resp, err
|
||||||
|
}
|
||||||
|
|
||||||
|
func UnmarshalMessageSourceSearch(data json.RawMessage) (*MessageSourceSearch, error) {
|
||||||
|
var resp MessageSourceSearch
|
||||||
|
|
||||||
|
err := json.Unmarshal(data, &resp)
|
||||||
|
|
||||||
|
return &resp, err
|
||||||
|
}
|
||||||
|
|
||||||
|
func UnmarshalMessageSourceChatEventLog(data json.RawMessage) (*MessageSourceChatEventLog, error) {
|
||||||
|
var resp MessageSourceChatEventLog
|
||||||
|
|
||||||
|
err := json.Unmarshal(data, &resp)
|
||||||
|
|
||||||
|
return &resp, err
|
||||||
|
}
|
||||||
|
|
||||||
|
func UnmarshalMessageSourceNotification(data json.RawMessage) (*MessageSourceNotification, error) {
|
||||||
|
var resp MessageSourceNotification
|
||||||
|
|
||||||
|
err := json.Unmarshal(data, &resp)
|
||||||
|
|
||||||
|
return &resp, err
|
||||||
|
}
|
||||||
|
|
||||||
|
func UnmarshalMessageSourceOther(data json.RawMessage) (*MessageSourceOther, error) {
|
||||||
|
var resp MessageSourceOther
|
||||||
|
|
||||||
|
err := json.Unmarshal(data, &resp)
|
||||||
|
|
||||||
|
return &resp, err
|
||||||
|
}
|
||||||
|
|
||||||
func UnmarshalSponsoredMessage(data json.RawMessage) (*SponsoredMessage, error) {
|
func UnmarshalSponsoredMessage(data json.RawMessage) (*SponsoredMessage, error) {
|
||||||
var resp SponsoredMessage
|
var resp SponsoredMessage
|
||||||
|
|
||||||
|
@ -7642,6 +7833,14 @@ func UnmarshalLoginUrlInfoRequestConfirmation(data json.RawMessage) (*LoginUrlIn
|
||||||
return &resp, err
|
return &resp, err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func UnmarshalFoundWebApp(data json.RawMessage) (*FoundWebApp, error) {
|
||||||
|
var resp FoundWebApp
|
||||||
|
|
||||||
|
err := json.Unmarshal(data, &resp)
|
||||||
|
|
||||||
|
return &resp, err
|
||||||
|
}
|
||||||
|
|
||||||
func UnmarshalWebAppInfo(data json.RawMessage) (*WebAppInfo, error) {
|
func UnmarshalWebAppInfo(data json.RawMessage) (*WebAppInfo, error) {
|
||||||
var resp WebAppInfo
|
var resp WebAppInfo
|
||||||
|
|
||||||
|
@ -10842,6 +11041,30 @@ func UnmarshalInlineQueryResultVoiceNote(data json.RawMessage) (*InlineQueryResu
|
||||||
return &resp, err
|
return &resp, err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func UnmarshalInlineQueryResultsButtonTypeStartBot(data json.RawMessage) (*InlineQueryResultsButtonTypeStartBot, error) {
|
||||||
|
var resp InlineQueryResultsButtonTypeStartBot
|
||||||
|
|
||||||
|
err := json.Unmarshal(data, &resp)
|
||||||
|
|
||||||
|
return &resp, err
|
||||||
|
}
|
||||||
|
|
||||||
|
func UnmarshalInlineQueryResultsButtonTypeWebApp(data json.RawMessage) (*InlineQueryResultsButtonTypeWebApp, error) {
|
||||||
|
var resp InlineQueryResultsButtonTypeWebApp
|
||||||
|
|
||||||
|
err := json.Unmarshal(data, &resp)
|
||||||
|
|
||||||
|
return &resp, err
|
||||||
|
}
|
||||||
|
|
||||||
|
func UnmarshalInlineQueryResultsButton(data json.RawMessage) (*InlineQueryResultsButton, error) {
|
||||||
|
var resp InlineQueryResultsButton
|
||||||
|
|
||||||
|
err := json.Unmarshal(data, &resp)
|
||||||
|
|
||||||
|
return &resp, err
|
||||||
|
}
|
||||||
|
|
||||||
func UnmarshalInlineQueryResults(data json.RawMessage) (*InlineQueryResults, error) {
|
func UnmarshalInlineQueryResults(data json.RawMessage) (*InlineQueryResults, error) {
|
||||||
var resp InlineQueryResults
|
var resp InlineQueryResults
|
||||||
|
|
||||||
|
@ -12866,6 +13089,14 @@ func UnmarshalInternalLinkTypeBackground(data json.RawMessage) (*InternalLinkTyp
|
||||||
return &resp, err
|
return &resp, err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func UnmarshalInternalLinkTypeBotAddToChannel(data json.RawMessage) (*InternalLinkTypeBotAddToChannel, error) {
|
||||||
|
var resp InternalLinkTypeBotAddToChannel
|
||||||
|
|
||||||
|
err := json.Unmarshal(data, &resp)
|
||||||
|
|
||||||
|
return &resp, err
|
||||||
|
}
|
||||||
|
|
||||||
func UnmarshalInternalLinkTypeBotStart(data json.RawMessage) (*InternalLinkTypeBotStart, error) {
|
func UnmarshalInternalLinkTypeBotStart(data json.RawMessage) (*InternalLinkTypeBotStart, error) {
|
||||||
var resp InternalLinkTypeBotStart
|
var resp InternalLinkTypeBotStart
|
||||||
|
|
||||||
|
@ -12882,14 +13113,6 @@ func UnmarshalInternalLinkTypeBotStartInGroup(data json.RawMessage) (*InternalLi
|
||||||
return &resp, err
|
return &resp, err
|
||||||
}
|
}
|
||||||
|
|
||||||
func UnmarshalInternalLinkTypeBotAddToChannel(data json.RawMessage) (*InternalLinkTypeBotAddToChannel, error) {
|
|
||||||
var resp InternalLinkTypeBotAddToChannel
|
|
||||||
|
|
||||||
err := json.Unmarshal(data, &resp)
|
|
||||||
|
|
||||||
return &resp, err
|
|
||||||
}
|
|
||||||
|
|
||||||
func UnmarshalInternalLinkTypeChangePhoneNumber(data json.RawMessage) (*InternalLinkTypeChangePhoneNumber, error) {
|
func UnmarshalInternalLinkTypeChangePhoneNumber(data json.RawMessage) (*InternalLinkTypeChangePhoneNumber, error) {
|
||||||
var resp InternalLinkTypeChangePhoneNumber
|
var resp InternalLinkTypeChangePhoneNumber
|
||||||
|
|
||||||
|
@ -13122,6 +13345,14 @@ func UnmarshalInternalLinkTypeVideoChat(data json.RawMessage) (*InternalLinkType
|
||||||
return &resp, err
|
return &resp, err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func UnmarshalInternalLinkTypeWebApp(data json.RawMessage) (*InternalLinkTypeWebApp, error) {
|
||||||
|
var resp InternalLinkTypeWebApp
|
||||||
|
|
||||||
|
err := json.Unmarshal(data, &resp)
|
||||||
|
|
||||||
|
return &resp, err
|
||||||
|
}
|
||||||
|
|
||||||
func UnmarshalMessageLink(data json.RawMessage) (*MessageLink, error) {
|
func UnmarshalMessageLink(data json.RawMessage) (*MessageLink, error) {
|
||||||
var resp MessageLink
|
var resp MessageLink
|
||||||
|
|
||||||
|
@ -14698,6 +14929,14 @@ func UnmarshalUpdateSuggestedActions(data json.RawMessage) (*UpdateSuggestedActi
|
||||||
return &resp, err
|
return &resp, err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func UnmarshalUpdateAddChatMembersPrivacyForbidden(data json.RawMessage) (*UpdateAddChatMembersPrivacyForbidden, error) {
|
||||||
|
var resp UpdateAddChatMembersPrivacyForbidden
|
||||||
|
|
||||||
|
err := json.Unmarshal(data, &resp)
|
||||||
|
|
||||||
|
return &resp, err
|
||||||
|
}
|
||||||
|
|
||||||
func UnmarshalUpdateAutosaveSettings(data json.RawMessage) (*UpdateAutosaveSettings, error) {
|
func UnmarshalUpdateAutosaveSettings(data json.RawMessage) (*UpdateAutosaveSettings, error) {
|
||||||
var resp UpdateAutosaveSettings
|
var resp UpdateAutosaveSettings
|
||||||
|
|
||||||
|
@ -15169,6 +15408,9 @@ func UnmarshalType(data json.RawMessage) (Type, error) {
|
||||||
case TypeGame:
|
case TypeGame:
|
||||||
return UnmarshalGame(data)
|
return UnmarshalGame(data)
|
||||||
|
|
||||||
|
case TypeWebApp:
|
||||||
|
return UnmarshalWebApp(data)
|
||||||
|
|
||||||
case TypePoll:
|
case TypePoll:
|
||||||
return UnmarshalPoll(data)
|
return UnmarshalPoll(data)
|
||||||
|
|
||||||
|
@ -15409,6 +15651,12 @@ func UnmarshalType(data json.RawMessage) (Type, error) {
|
||||||
case TypeChatMessageSenders:
|
case TypeChatMessageSenders:
|
||||||
return UnmarshalChatMessageSenders(data)
|
return UnmarshalChatMessageSenders(data)
|
||||||
|
|
||||||
|
case TypeMessageViewer:
|
||||||
|
return UnmarshalMessageViewer(data)
|
||||||
|
|
||||||
|
case TypeMessageViewers:
|
||||||
|
return UnmarshalMessageViewers(data)
|
||||||
|
|
||||||
case TypeMessageForwardOriginUser:
|
case TypeMessageForwardOriginUser:
|
||||||
return UnmarshalMessageForwardOriginUser(data)
|
return UnmarshalMessageForwardOriginUser(data)
|
||||||
|
|
||||||
|
@ -15475,6 +15723,33 @@ func UnmarshalType(data json.RawMessage) (Type, error) {
|
||||||
case TypeMessageCalendar:
|
case TypeMessageCalendar:
|
||||||
return UnmarshalMessageCalendar(data)
|
return UnmarshalMessageCalendar(data)
|
||||||
|
|
||||||
|
case TypeMessageSourceChatHistory:
|
||||||
|
return UnmarshalMessageSourceChatHistory(data)
|
||||||
|
|
||||||
|
case TypeMessageSourceMessageThreadHistory:
|
||||||
|
return UnmarshalMessageSourceMessageThreadHistory(data)
|
||||||
|
|
||||||
|
case TypeMessageSourceForumTopicHistory:
|
||||||
|
return UnmarshalMessageSourceForumTopicHistory(data)
|
||||||
|
|
||||||
|
case TypeMessageSourceHistoryPreview:
|
||||||
|
return UnmarshalMessageSourceHistoryPreview(data)
|
||||||
|
|
||||||
|
case TypeMessageSourceChatList:
|
||||||
|
return UnmarshalMessageSourceChatList(data)
|
||||||
|
|
||||||
|
case TypeMessageSourceSearch:
|
||||||
|
return UnmarshalMessageSourceSearch(data)
|
||||||
|
|
||||||
|
case TypeMessageSourceChatEventLog:
|
||||||
|
return UnmarshalMessageSourceChatEventLog(data)
|
||||||
|
|
||||||
|
case TypeMessageSourceNotification:
|
||||||
|
return UnmarshalMessageSourceNotification(data)
|
||||||
|
|
||||||
|
case TypeMessageSourceOther:
|
||||||
|
return UnmarshalMessageSourceOther(data)
|
||||||
|
|
||||||
case TypeSponsoredMessage:
|
case TypeSponsoredMessage:
|
||||||
return UnmarshalSponsoredMessage(data)
|
return UnmarshalSponsoredMessage(data)
|
||||||
|
|
||||||
|
@ -15673,6 +15948,9 @@ func UnmarshalType(data json.RawMessage) (Type, error) {
|
||||||
case TypeLoginUrlInfoRequestConfirmation:
|
case TypeLoginUrlInfoRequestConfirmation:
|
||||||
return UnmarshalLoginUrlInfoRequestConfirmation(data)
|
return UnmarshalLoginUrlInfoRequestConfirmation(data)
|
||||||
|
|
||||||
|
case TypeFoundWebApp:
|
||||||
|
return UnmarshalFoundWebApp(data)
|
||||||
|
|
||||||
case TypeWebAppInfo:
|
case TypeWebAppInfo:
|
||||||
return UnmarshalWebAppInfo(data)
|
return UnmarshalWebAppInfo(data)
|
||||||
|
|
||||||
|
@ -16873,6 +17151,15 @@ func UnmarshalType(data json.RawMessage) (Type, error) {
|
||||||
case TypeInlineQueryResultVoiceNote:
|
case TypeInlineQueryResultVoiceNote:
|
||||||
return UnmarshalInlineQueryResultVoiceNote(data)
|
return UnmarshalInlineQueryResultVoiceNote(data)
|
||||||
|
|
||||||
|
case TypeInlineQueryResultsButtonTypeStartBot:
|
||||||
|
return UnmarshalInlineQueryResultsButtonTypeStartBot(data)
|
||||||
|
|
||||||
|
case TypeInlineQueryResultsButtonTypeWebApp:
|
||||||
|
return UnmarshalInlineQueryResultsButtonTypeWebApp(data)
|
||||||
|
|
||||||
|
case TypeInlineQueryResultsButton:
|
||||||
|
return UnmarshalInlineQueryResultsButton(data)
|
||||||
|
|
||||||
case TypeInlineQueryResults:
|
case TypeInlineQueryResults:
|
||||||
return UnmarshalInlineQueryResults(data)
|
return UnmarshalInlineQueryResults(data)
|
||||||
|
|
||||||
|
@ -17632,15 +17919,15 @@ func UnmarshalType(data json.RawMessage) (Type, error) {
|
||||||
case TypeInternalLinkTypeBackground:
|
case TypeInternalLinkTypeBackground:
|
||||||
return UnmarshalInternalLinkTypeBackground(data)
|
return UnmarshalInternalLinkTypeBackground(data)
|
||||||
|
|
||||||
|
case TypeInternalLinkTypeBotAddToChannel:
|
||||||
|
return UnmarshalInternalLinkTypeBotAddToChannel(data)
|
||||||
|
|
||||||
case TypeInternalLinkTypeBotStart:
|
case TypeInternalLinkTypeBotStart:
|
||||||
return UnmarshalInternalLinkTypeBotStart(data)
|
return UnmarshalInternalLinkTypeBotStart(data)
|
||||||
|
|
||||||
case TypeInternalLinkTypeBotStartInGroup:
|
case TypeInternalLinkTypeBotStartInGroup:
|
||||||
return UnmarshalInternalLinkTypeBotStartInGroup(data)
|
return UnmarshalInternalLinkTypeBotStartInGroup(data)
|
||||||
|
|
||||||
case TypeInternalLinkTypeBotAddToChannel:
|
|
||||||
return UnmarshalInternalLinkTypeBotAddToChannel(data)
|
|
||||||
|
|
||||||
case TypeInternalLinkTypeChangePhoneNumber:
|
case TypeInternalLinkTypeChangePhoneNumber:
|
||||||
return UnmarshalInternalLinkTypeChangePhoneNumber(data)
|
return UnmarshalInternalLinkTypeChangePhoneNumber(data)
|
||||||
|
|
||||||
|
@ -17728,6 +18015,9 @@ func UnmarshalType(data json.RawMessage) (Type, error) {
|
||||||
case TypeInternalLinkTypeVideoChat:
|
case TypeInternalLinkTypeVideoChat:
|
||||||
return UnmarshalInternalLinkTypeVideoChat(data)
|
return UnmarshalInternalLinkTypeVideoChat(data)
|
||||||
|
|
||||||
|
case TypeInternalLinkTypeWebApp:
|
||||||
|
return UnmarshalInternalLinkTypeWebApp(data)
|
||||||
|
|
||||||
case TypeMessageLink:
|
case TypeMessageLink:
|
||||||
return UnmarshalMessageLink(data)
|
return UnmarshalMessageLink(data)
|
||||||
|
|
||||||
|
@ -18319,6 +18609,9 @@ func UnmarshalType(data json.RawMessage) (Type, error) {
|
||||||
case TypeUpdateSuggestedActions:
|
case TypeUpdateSuggestedActions:
|
||||||
return UnmarshalUpdateSuggestedActions(data)
|
return UnmarshalUpdateSuggestedActions(data)
|
||||||
|
|
||||||
|
case TypeUpdateAddChatMembersPrivacyForbidden:
|
||||||
|
return UnmarshalUpdateAddChatMembersPrivacyForbidden(data)
|
||||||
|
|
||||||
case TypeUpdateAutosaveSettings:
|
case TypeUpdateAutosaveSettings:
|
||||||
return UnmarshalUpdateAutosaveSettings(data)
|
return UnmarshalUpdateAutosaveSettings(data)
|
||||||
|
|
||||||
|
|
281
data/td_api.tl
281
data/td_api.tl
|
@ -135,8 +135,9 @@ authorizationStateWaitRegistration terms_of_service:termsOfService = Authorizati
|
||||||
//-Call checkAuthenticationPassword to provide the password, or requestAuthenticationPasswordRecovery to recover the password, or deleteAccount to delete the account after a week
|
//-Call checkAuthenticationPassword to provide the password, or requestAuthenticationPasswordRecovery to recover the password, or deleteAccount to delete the account after a week
|
||||||
//@password_hint Hint for the password; may be empty
|
//@password_hint Hint for the password; may be empty
|
||||||
//@has_recovery_email_address True, if a recovery email address has been set up
|
//@has_recovery_email_address True, if a recovery email address has been set up
|
||||||
|
//@has_passport_data True, if some Telegram Passport elements were saved
|
||||||
//@recovery_email_address_pattern Pattern of the email address to which the recovery email was sent; empty until a recovery email has been sent
|
//@recovery_email_address_pattern Pattern of the email address to which the recovery email was sent; empty until a recovery email has been sent
|
||||||
authorizationStateWaitPassword password_hint:string has_recovery_email_address:Bool recovery_email_address_pattern:string = AuthorizationState;
|
authorizationStateWaitPassword password_hint:string has_recovery_email_address:Bool has_passport_data:Bool recovery_email_address_pattern:string = AuthorizationState;
|
||||||
|
|
||||||
//@description The user has been successfully authorized. TDLib is now ready to answer general requests
|
//@description The user has been successfully authorized. TDLib is now ready to answer general requests
|
||||||
authorizationStateReady = AuthorizationState;
|
authorizationStateReady = AuthorizationState;
|
||||||
|
@ -322,8 +323,7 @@ stickerFullTypeMask mask_position:maskPosition = StickerFullType;
|
||||||
|
|
||||||
//@description The sticker is a custom emoji to be used inside message text and caption. Currently, only Telegram Premium users can use custom emoji
|
//@description The sticker is a custom emoji to be used inside message text and caption. Currently, only Telegram Premium users can use custom emoji
|
||||||
//@custom_emoji_id Identifier of the custom emoji
|
//@custom_emoji_id Identifier of the custom emoji
|
||||||
//@needs_repainting True, if the sticker must be repainted to a text color in messages, the color of the Telegram Premium badge in emoji status, or another appropriate color in other places.
|
//@needs_repainting True, if the sticker must be repainted to a text color in messages, the color of the Telegram Premium badge in emoji status, white color on chat photos, or another appropriate color in other places
|
||||||
//-The sticker must not be repainted on chat photos
|
|
||||||
stickerFullTypeCustomEmoji custom_emoji_id:int64 needs_repainting:Bool = StickerFullType;
|
stickerFullTypeCustomEmoji custom_emoji_id:int64 needs_repainting:Bool = StickerFullType;
|
||||||
|
|
||||||
|
|
||||||
|
@ -464,9 +464,9 @@ location latitude:double longitude:double horizontal_accuracy:double = Location;
|
||||||
//@type Type of the venue in the provider database; as defined by the sender
|
//@type Type of the venue in the provider database; as defined by the sender
|
||||||
venue location:location title:string address:string provider:string id:string type:string = Venue;
|
venue location:location title:string address:string provider:string id:string type:string = Venue;
|
||||||
|
|
||||||
//@description Describes a game
|
//@description Describes a game. Use getInternalLink with internalLinkTypeGame to share the game
|
||||||
//@id Unique game identifier
|
//@id Unique game identifier
|
||||||
//@short_name Game short name. To share a game use the URL https://t.me/{bot_username}?game={game_short_name}
|
//@short_name Game short name
|
||||||
//@title Game title
|
//@title Game title
|
||||||
//@text Game text, usually containing scoreboards for a game
|
//@text Game text, usually containing scoreboards for a game
|
||||||
//@param_description Game description
|
//@param_description Game description
|
||||||
|
@ -474,6 +474,14 @@ venue location:location title:string address:string provider:string id:string ty
|
||||||
//@animation Game animation; may be null
|
//@animation Game animation; may be null
|
||||||
game id:int64 short_name:string title:string text:formattedText description:string photo:photo animation:animation = Game;
|
game id:int64 short_name:string title:string text:formattedText description:string photo:photo animation:animation = Game;
|
||||||
|
|
||||||
|
//@description Describes a Web App. Use getInternalLink with internalLinkTypeWebApp to share the Web App
|
||||||
|
//@short_name Web App short name
|
||||||
|
//@title Web App title
|
||||||
|
//@param_description Web App description
|
||||||
|
//@photo Web App photo
|
||||||
|
//@animation Web App animation; may be null
|
||||||
|
webApp short_name:string title:string description:string photo:photo animation:animation = WebApp;
|
||||||
|
|
||||||
//@description Describes a poll
|
//@description Describes a poll
|
||||||
//@id Unique poll identifier
|
//@id Unique poll identifier
|
||||||
//@question Poll question; 1-300 characters
|
//@question Poll question; 1-300 characters
|
||||||
|
@ -597,7 +605,7 @@ inputChatPhotoSticker sticker:chatPhotoSticker = InputChatPhoto;
|
||||||
|
|
||||||
|
|
||||||
//@description Describes actions that a user is allowed to take in a chat
|
//@description Describes actions that a user is allowed to take in a chat
|
||||||
//@can_send_messages True, if the user can send text messages, contacts, invoices, locations, and venues
|
//@can_send_basic_messages True, if the user can send text messages, contacts, invoices, locations, and venues
|
||||||
//@can_send_audios True, if the user can send music files
|
//@can_send_audios True, if the user can send music files
|
||||||
//@can_send_documents True, if the user can send documents
|
//@can_send_documents True, if the user can send documents
|
||||||
//@can_send_photos True, if the user can send audio photos
|
//@can_send_photos True, if the user can send audio photos
|
||||||
|
@ -614,7 +622,7 @@ inputChatPhotoSticker sticker:chatPhotoSticker = InputChatPhoto;
|
||||||
//@can_invite_users True, if the user can invite new users to the chat
|
//@can_invite_users True, if the user can invite new users to the chat
|
||||||
//@can_pin_messages True, if the user can pin messages
|
//@can_pin_messages True, if the user can pin messages
|
||||||
//@can_manage_topics True, if the user can manage topics
|
//@can_manage_topics True, if the user can manage topics
|
||||||
chatPermissions can_send_messages:Bool can_send_audios:Bool can_send_documents:Bool can_send_photos:Bool can_send_videos:Bool can_send_video_notes:Bool can_send_voice_notes:Bool can_send_polls:Bool can_send_stickers:Bool can_send_animations:Bool can_send_games:Bool can_use_inline_bots:Bool can_add_web_page_previews:Bool can_change_info:Bool can_invite_users:Bool can_pin_messages:Bool can_manage_topics:Bool = ChatPermissions;
|
chatPermissions can_send_basic_messages:Bool can_send_audios:Bool can_send_documents:Bool can_send_photos:Bool can_send_videos:Bool can_send_video_notes:Bool can_send_voice_notes:Bool can_send_polls:Bool can_send_stickers:Bool can_send_animations:Bool can_send_games:Bool can_use_inline_bots:Bool can_add_web_page_previews:Bool can_change_info:Bool can_invite_users:Bool can_pin_messages:Bool can_manage_topics:Bool = ChatPermissions;
|
||||||
|
|
||||||
//@description Describes rights of the administrator
|
//@description Describes rights of the administrator
|
||||||
//@can_manage_chat True, if the administrator can get chat event log, get chat statistics, get message statistics in channels, get channel members, see anonymous administrators in supergroups and ignore slow mode. Implied by any other privilege; applicable to supergroups and channels only
|
//@can_manage_chat True, if the administrator can get chat event log, get chat statistics, get message statistics in channels, get channel members, see anonymous administrators in supergroups and ignore slow mode. Implied by any other privilege; applicable to supergroups and channels only
|
||||||
|
@ -689,7 +697,7 @@ user id:int53 access_hash:int64 first_name:string last_name:string usernames:use
|
||||||
|
|
||||||
|
|
||||||
//@description Contains information about a bot
|
//@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
|
//@short_description 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
|
//@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
|
//@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
|
//@animation Animation shown in the chat with the bot if the chat is empty; may be null
|
||||||
|
@ -697,7 +705,7 @@ user id:int53 access_hash:int64 first_name:string last_name:string usernames:use
|
||||||
//@commands List of the bot commands
|
//@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_group_administrator_rights Default administrator rights for adding the bot to basic group and supergroup chats; may be null
|
||||||
//@default_channel_administrator_rights Default administrator rights for adding the bot to channels; may be null
|
//@default_channel_administrator_rights Default administrator rights for adding the bot to channels; may be null
|
||||||
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;
|
botInfo short_description: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
|
//@description Contains full information about a user
|
||||||
//@personal_photo User profile photo set by the current user for the contact; may be null. If null and user.profile_photo is null, then the photo is empty; otherwise, it is unknown.
|
//@personal_photo User profile photo set by the current user for the contact; may be null. If null and user.profile_photo is null, then the photo is empty; otherwise, it is unknown.
|
||||||
|
@ -1000,6 +1008,13 @@ chatMessageSender sender:MessageSender needs_premium:Bool = ChatMessageSender;
|
||||||
chatMessageSenders senders:vector<chatMessageSender> = ChatMessageSenders;
|
chatMessageSenders senders:vector<chatMessageSender> = ChatMessageSenders;
|
||||||
|
|
||||||
|
|
||||||
|
//@description Represents a viewer of a message @user_id User identifier of the viewer @view_date Approximate point in time (Unix timestamp) when the message was viewed
|
||||||
|
messageViewer user_id:int53 view_date:int32 = MessageViewer;
|
||||||
|
|
||||||
|
//@description Represents a list of message viewers @viewers List of message viewers
|
||||||
|
messageViewers viewers:vector<messageViewer> = MessageViewers;
|
||||||
|
|
||||||
|
|
||||||
//@class MessageForwardOrigin @description Contains information about the origin of a forwarded message
|
//@class MessageForwardOrigin @description Contains information about the origin of a forwarded message
|
||||||
|
|
||||||
//@description The message was originally sent by a known user @sender_user_id Identifier of the user that originally sent the message
|
//@description The message was originally sent by a known user @sender_user_id Identifier of the user that originally sent the message
|
||||||
|
@ -1071,8 +1086,8 @@ unreadReaction type:ReactionType sender_id:MessageSender is_big:Bool = UnreadRea
|
||||||
|
|
||||||
//@class MessageSendingState @description Contains information about the sending state of the message
|
//@class MessageSendingState @description Contains information about the sending state of the message
|
||||||
|
|
||||||
//@description The message is being sent now, but has not yet been delivered to the server
|
//@description The message is being sent now, but has not yet been delivered to the server @sending_id Non-persistent message sending identifier, specified by the application
|
||||||
messageSendingStatePending = MessageSendingState;
|
messageSendingStatePending sending_id:int32 = MessageSendingState;
|
||||||
|
|
||||||
//@description The message failed to be sent
|
//@description The message failed to be sent
|
||||||
//@error_code An error code; 0 if unknown
|
//@error_code An error code; 0 if unknown
|
||||||
|
@ -1147,6 +1162,36 @@ messageCalendarDay total_count:int32 message:message = MessageCalendarDay;
|
||||||
messageCalendar total_count:int32 days:vector<messageCalendarDay> = MessageCalendar;
|
messageCalendar total_count:int32 days:vector<messageCalendarDay> = MessageCalendar;
|
||||||
|
|
||||||
|
|
||||||
|
//@class MessageSource @description Describes source of a message
|
||||||
|
|
||||||
|
//@description The message is from a chat history
|
||||||
|
messageSourceChatHistory = MessageSource;
|
||||||
|
|
||||||
|
//@description The message is from a message thread history
|
||||||
|
messageSourceMessageThreadHistory = MessageSource;
|
||||||
|
|
||||||
|
//@description The message is from a forum topic history
|
||||||
|
messageSourceForumTopicHistory = MessageSource;
|
||||||
|
|
||||||
|
//@description The message is from chat, message thread or forum topic history preview
|
||||||
|
messageSourceHistoryPreview = MessageSource;
|
||||||
|
|
||||||
|
//@description The message is from a chat list or a forum topic list
|
||||||
|
messageSourceChatList = MessageSource;
|
||||||
|
|
||||||
|
//@description The message is from search results, including file downloads, local file list, outgoing document messages, calendar
|
||||||
|
messageSourceSearch = MessageSource;
|
||||||
|
|
||||||
|
//@description The message is from a chat event log
|
||||||
|
messageSourceChatEventLog = MessageSource;
|
||||||
|
|
||||||
|
//@description The message is from a notification
|
||||||
|
messageSourceNotification = MessageSource;
|
||||||
|
|
||||||
|
//@description The message is from some other source
|
||||||
|
messageSourceOther = MessageSource;
|
||||||
|
|
||||||
|
|
||||||
//@description Describes a sponsored message
|
//@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
|
//@message_id Message identifier; unique for the chat to which the sponsored message belongs among both ordinary and sponsored messages
|
||||||
//@is_recommended True, if the message needs to be labeled as "recommended" instead of "sponsored"
|
//@is_recommended True, if the message needs to be labeled as "recommended" instead of "sponsored"
|
||||||
|
@ -1155,7 +1200,9 @@ messageCalendar total_count:int32 days:vector<messageCalendarDay> = MessageCalen
|
||||||
//@show_chat_photo True, if the sponsor's chat photo must be shown
|
//@show_chat_photo True, if the sponsor's chat photo must be shown
|
||||||
//@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
|
//@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
|
//@content Content of the message. Currently, can be only of the type messageText
|
||||||
sponsoredMessage message_id:int53 is_recommended:Bool sponsor_chat_id:int53 sponsor_chat_info:chatInviteLinkInfo show_chat_photo:Bool link:InternalLinkType content:MessageContent = SponsoredMessage;
|
//@sponsor_info If non-empty, information about the sponsor to be shown along with the message
|
||||||
|
//@additional_info If non-empty, additional information about the sponsored message to be shown along with the message
|
||||||
|
sponsoredMessage message_id:int53 is_recommended:Bool sponsor_chat_id:int53 sponsor_chat_info:chatInviteLinkInfo show_chat_photo:Bool link:InternalLinkType content:MessageContent sponsor_info:string additional_info:string = SponsoredMessage;
|
||||||
|
|
||||||
//@description Contains a list of sponsored messages @messages List of sponsored messages @messages_between The minimum number of messages between shown sponsored messages, or 0 if only one sponsored message must be shown after all ordinary messages
|
//@description Contains a list of sponsored messages @messages List of sponsored messages @messages_between The minimum number of messages between shown sponsored messages, or 0 if only one sponsored message must be shown after all ordinary messages
|
||||||
sponsoredMessages messages:vector<sponsoredMessage> messages_between:int32 = SponsoredMessages;
|
sponsoredMessages messages:vector<sponsoredMessage> messages_between:int32 = SponsoredMessages;
|
||||||
|
@ -1508,17 +1555,23 @@ replyMarkupInlineKeyboard rows:vector<vector<inlineKeyboardButton>> = ReplyMarku
|
||||||
|
|
||||||
//@class LoginUrlInfo @description Contains information about an inline button of type inlineKeyboardButtonTypeLoginUrl
|
//@class LoginUrlInfo @description Contains information about an inline button of type inlineKeyboardButtonTypeLoginUrl
|
||||||
|
|
||||||
//@description An HTTP URL needs to be open @url The URL to open @skip_confirm True, if there is no need to show an ordinary open URL confirm
|
//@description An HTTP URL needs to be open @url The URL to open @skip_confirmation True, if there is no need to show an ordinary open URL confirmation
|
||||||
loginUrlInfoOpen url:string skip_confirm:Bool = LoginUrlInfo;
|
loginUrlInfoOpen url:string skip_confirmation:Bool = LoginUrlInfo;
|
||||||
|
|
||||||
//@description An authorization confirmation dialog needs to be shown to the user
|
//@description An authorization confirmation dialog needs to be shown to the user
|
||||||
//@url An HTTP URL to be opened
|
//@url An HTTP URL to be opened
|
||||||
//@domain A domain of the URL
|
//@domain A domain of the URL
|
||||||
//@bot_user_id User identifier of a bot linked with the website
|
//@bot_user_id User identifier of a bot linked with the website
|
||||||
//@request_write_access True, if the user needs to be requested to give the permission to the bot to send them messages
|
//@request_write_access True, if the user must be asked for the permission to the bot to send them messages
|
||||||
loginUrlInfoRequestConfirmation url:string domain:string bot_user_id:int53 request_write_access:Bool = LoginUrlInfo;
|
loginUrlInfoRequestConfirmation url:string domain:string bot_user_id:int53 request_write_access:Bool = LoginUrlInfo;
|
||||||
|
|
||||||
|
|
||||||
|
//@description Contains information about a Web App found by its short name
|
||||||
|
//@web_app The Web App
|
||||||
|
//@request_write_access True, if the user must be asked for the permission to the bot to send them messages
|
||||||
|
//@skip_confirmation True, if there is no need to show an ordinary open URL confirmation before opening the Web App. The field must be ignored and confirmation must be shown anyway if the Web App link was hidden
|
||||||
|
foundWebApp web_app:webApp request_write_access:Bool skip_confirmation:Bool = FoundWebApp;
|
||||||
|
|
||||||
//@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;
|
webAppInfo launch_id:int64 url:string = WebAppInfo;
|
||||||
|
|
||||||
|
@ -2396,13 +2449,13 @@ messageGame game:game = MessageContent;
|
||||||
//@description A message with a poll @poll The poll description
|
//@description A message with a poll @poll The poll description
|
||||||
messagePoll poll:poll = MessageContent;
|
messagePoll poll:poll = MessageContent;
|
||||||
|
|
||||||
//@description A message with an invoice from a bot
|
//@description A message with an invoice from a bot. Use getInternalLink with internalLinkTypeBotStart to share the invoice
|
||||||
//@title Product title
|
//@title Product title
|
||||||
//@param_description Product description
|
//@param_description Product description
|
||||||
//@photo Product photo; may be null
|
//@photo Product photo; may be null
|
||||||
//@currency Currency for the product price
|
//@currency Currency for the product price
|
||||||
//@total_amount Product total price in the smallest units of the currency
|
//@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}
|
//@start_parameter Unique invoice bot start_parameter to be passed to getInternalLink
|
||||||
//@is_test True, if the invoice is a test invoice
|
//@is_test True, if the invoice is a test invoice
|
||||||
//@need_shipping_address True, if the shipping address must be specified
|
//@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
|
//@receipt_message_id The identifier of the message with the receipt, after the product has been purchased
|
||||||
|
@ -2534,8 +2587,8 @@ messageChatShared chat_id:int53 button_id:int32 = 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
|
//@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;
|
messageWebsiteConnected domain_name:string = MessageContent;
|
||||||
|
|
||||||
//@description The user allowed the bot to send messages
|
//@description The user allowed the bot to send messages @web_app Information about the Web App, which requested the access; may be null if none or the Web App was opened from the attachment menu
|
||||||
messageBotWriteAccessAllowed = MessageContent;
|
messageBotWriteAccessAllowed web_app:webApp = 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;
|
messageWebAppDataSent button_text:string = MessageContent;
|
||||||
|
@ -2641,7 +2694,8 @@ messageSchedulingStateSendWhenOnline = MessageSchedulingState;
|
||||||
//@protect_content Pass true if the content of the message must be protected from forwarding and saving; for bots only
|
//@protect_content Pass true if the content of the message must be protected from forwarding and saving; for bots only
|
||||||
//@update_order_of_installed_sticker_sets Pass true if the user explicitly chosen a sticker or a custom emoji from an installed sticker set; applicable only to sendMessage and sendMessageAlbum
|
//@update_order_of_installed_sticker_sets Pass true if the user explicitly chosen a sticker or a custom emoji from an installed sticker set; applicable only to sendMessage and sendMessageAlbum
|
||||||
//@scheduling_state Message scheduling state; pass null to send message immediately. Messages sent to a secret chat, live location messages and self-destructing messages can't be scheduled
|
//@scheduling_state Message scheduling state; pass null to send message immediately. Messages sent to a secret chat, live location messages and self-destructing messages can't be scheduled
|
||||||
messageSendOptions disable_notification:Bool from_background:Bool protect_content:Bool update_order_of_installed_sticker_sets:Bool scheduling_state:MessageSchedulingState = MessageSendOptions;
|
//@sending_id Non-persistent identifier, which will be returned back in messageSendingStatePending object and can be used to match sent messages and corresponding updateNewMessage updates
|
||||||
|
messageSendOptions disable_notification:Bool from_background:Bool protect_content:Bool update_order_of_installed_sticker_sets:Bool scheduling_state:MessageSchedulingState sending_id:int32 = MessageSendOptions;
|
||||||
|
|
||||||
//@description Options to be used when a message content is copied without reference to the original sender. Service messages and messageInvoice can't be copied
|
//@description Options to be used when a message content is copied without reference to the original sender. Service messages and messageInvoice can't be copied
|
||||||
//@send_copy True, if content of the message needs to be copied without reference to the original sender. Always true if the message is forwarded to a secret chat or is local
|
//@send_copy True, if content of the message needs to be copied without reference to the original sender. Always true if the message is forwarded to a secret chat or is local
|
||||||
|
@ -2953,9 +3007,9 @@ trendingStickerSets total_count:int32 sets:vector<stickerSetInfo> is_premium:Boo
|
||||||
|
|
||||||
//@description Contains a list of similar emoji to search for in getStickers and searchStickers
|
//@description Contains a list of similar emoji to search for in getStickers and searchStickers
|
||||||
//@name Name of the category
|
//@name Name of the category
|
||||||
//@icon_custom_emoji_id Unique identifier of the custom emoji, which represents icon of the category
|
//@icon Custom emoji sticker, which represents icon of the category
|
||||||
//@emojis List of emojis in the category
|
//@emojis List of emojis in the category
|
||||||
emojiCategory name:string icon_custom_emoji_id:int64 emojis:vector<string> = EmojiCategory;
|
emojiCategory name:string icon:sticker emojis:vector<string> = EmojiCategory;
|
||||||
|
|
||||||
//@description Represents a list of emoji categories @categories List of categories
|
//@description Represents a list of emoji categories @categories List of categories
|
||||||
emojiCategories categories:vector<emojiCategory> = EmojiCategories;
|
emojiCategories categories:vector<emojiCategory> = EmojiCategories;
|
||||||
|
@ -3201,8 +3255,8 @@ firebaseAuthenticationSettingsIos device_token:string is_app_sandbox:Bool = Fire
|
||||||
phoneNumberAuthenticationSettings allow_flash_call:Bool allow_missed_call:Bool is_current_phone_number:Bool allow_sms_retriever_api:Bool firebase_authentication_settings:FirebaseAuthenticationSettings authentication_tokens:vector<string> = PhoneNumberAuthenticationSettings;
|
phoneNumberAuthenticationSettings allow_flash_call:Bool allow_missed_call:Bool is_current_phone_number:Bool allow_sms_retriever_api:Bool firebase_authentication_settings:FirebaseAuthenticationSettings authentication_tokens:vector<string> = PhoneNumberAuthenticationSettings;
|
||||||
|
|
||||||
|
|
||||||
//@description Represents a reaction applied to a message @type Type of the reaction @sender_id Identifier of the chat member, applied the reaction
|
//@description Represents a reaction applied to a message @type Type of the reaction @sender_id Identifier of the chat member, applied the reaction @date Point in time (Unix timestamp) when the reaction was added
|
||||||
addedReaction type:ReactionType sender_id:MessageSender = AddedReaction;
|
addedReaction type:ReactionType sender_id:MessageSender date:int32 = AddedReaction;
|
||||||
|
|
||||||
//@description Represents a list of reactions added to a message @total_count The total number of found reactions @reactions The list of added reactions @next_offset The offset for the next request. If empty, there are no more results
|
//@description Represents a list of reactions added to a message @total_count The total number of found reactions @reactions The list of added reactions @next_offset The offset for the next request. If empty, there are no more results
|
||||||
addedReactions total_count:int32 reactions:vector<addedReaction> next_offset:string = AddedReactions;
|
addedReactions total_count:int32 reactions:vector<addedReaction> next_offset:string = AddedReactions;
|
||||||
|
@ -3278,7 +3332,7 @@ attachmentMenuBotColor light_color:int32 dark_color:int32 = AttachmentMenuBotCol
|
||||||
//@supports_group_chats True, if the bot supports opening from attachment menu in basic group and supergroup chats
|
//@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_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
|
//@supports_settings True, if the bot supports "settings_button_pressed" event
|
||||||
//@request_write_access True, if the user needs to be requested to give the permission to the bot to send them messages
|
//@request_write_access True, if the user must be asked for the permission to the bot to send them messages
|
||||||
//@name Name for the bot in attachment menu
|
//@name Name for the bot in attachment menu
|
||||||
//@name_color Color to highlight selected name of the bot if appropriate; may be null
|
//@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
|
//@default_icon Default attachment menu icon for the bot in SVG format; may be null
|
||||||
|
@ -3517,13 +3571,25 @@ inlineQueryResultVideo id:string video:video title:string description:string = I
|
||||||
inlineQueryResultVoiceNote id:string voice_note:voiceNote title:string = InlineQueryResult;
|
inlineQueryResultVoiceNote id:string voice_note:voiceNote title:string = InlineQueryResult;
|
||||||
|
|
||||||
|
|
||||||
|
//@class InlineQueryResultsButtonType @description Represents a type of a button in results of inline query
|
||||||
|
|
||||||
|
//@description Describes the button that opens a private chat with the bot and sends a start message to the bot with the given parameter @parameter The parameter for the bot start message
|
||||||
|
inlineQueryResultsButtonTypeStartBot parameter:string = InlineQueryResultsButtonType;
|
||||||
|
|
||||||
|
//@description Describes the button that opens a Web App by calling getWebAppUrl @url An HTTP URL to pass to getWebAppUrl
|
||||||
|
inlineQueryResultsButtonTypeWebApp url:string = InlineQueryResultsButtonType;
|
||||||
|
|
||||||
|
|
||||||
|
//@description Represents a button to be shown above inline query results @text The text of the button @type Type of the button
|
||||||
|
inlineQueryResultsButton text:string type:InlineQueryResultsButtonType = InlineQueryResultsButton;
|
||||||
|
|
||||||
|
|
||||||
//@description Represents the results of the inline query. Use sendInlineQueryResultMessage to send the result of the query
|
//@description Represents the results of the inline query. Use sendInlineQueryResultMessage to send the result of the query
|
||||||
//@inline_query_id Unique identifier of the inline query
|
//@inline_query_id Unique identifier of the inline query
|
||||||
//@next_offset The offset for the next request. If empty, there are no more results
|
//@button Button to be shown above inline query results; may be null
|
||||||
//@results Results of the query
|
//@results Results of the query
|
||||||
//@switch_pm_text If non-empty, this text must be shown on the button, which opens a private chat with the bot and sends the bot a start message with the switch_pm_parameter
|
//@next_offset The offset for the next request. If empty, there are no more results
|
||||||
//@switch_pm_parameter Parameter for the bot start message
|
inlineQueryResults inline_query_id:int64 button:inlineQueryResultsButton results:vector<InlineQueryResult> next_offset:string = InlineQueryResults;
|
||||||
inlineQueryResults inline_query_id:int64 next_offset:string results:vector<InlineQueryResult> switch_pm_text:string switch_pm_parameter:string = InlineQueryResults;
|
|
||||||
|
|
||||||
|
|
||||||
//@class CallbackQueryPayload @description Represents a payload of a callback query
|
//@class CallbackQueryPayload @description Represents a payload of a callback query
|
||||||
|
@ -4529,6 +4595,13 @@ internalLinkTypeAuthenticationCode code:string = InternalLinkType;
|
||||||
//@description The link is a link to a background. Call searchBackground with the given background name to process the link @background_name Name of the background
|
//@description The link is a link to a background. Call searchBackground with the given background name to process the link @background_name Name of the background
|
||||||
internalLinkTypeBackground background_name:string = InternalLinkType;
|
internalLinkTypeBackground background_name:string = InternalLinkType;
|
||||||
|
|
||||||
|
//@description The link is a link to a Telegram bot, which is supposed to be added to a channel chat as an administrator. Call searchPublicChat with the given bot username and check that the user is a bot,
|
||||||
|
//-ask the current user to select a channel chat to add the bot to as an administrator. Then, call getChatMember to receive the current bot rights in the chat and if the bot already is an administrator,
|
||||||
|
//-check that the current user can edit its administrator rights and combine received rights with the requested administrator rights. Then, show confirmation box to the user, and call setChatMemberStatus with the chosen chat and confirmed rights
|
||||||
|
//@bot_username Username of the bot
|
||||||
|
//@administrator_rights Expected administrator rights for the bot
|
||||||
|
internalLinkTypeBotAddToChannel bot_username:string administrator_rights:chatAdministratorRights = InternalLinkType;
|
||||||
|
|
||||||
//@description The link is a link to a chat with a Telegram bot. Call searchPublicChat with the given bot username, check that the user is a bot, show START button in the chat with the bot,
|
//@description The link is a link to a chat with a Telegram bot. Call searchPublicChat with the given bot username, check that the user is a bot, show START button in the chat with the bot,
|
||||||
//-and then call sendBotStartMessage with the given start parameter after the button is pressed
|
//-and then call sendBotStartMessage with the given start parameter after the button is pressed
|
||||||
//@bot_username Username of the bot
|
//@bot_username Username of the bot
|
||||||
|
@ -4547,13 +4620,6 @@ internalLinkTypeBotStart bot_username:string start_parameter:string autostart:Bo
|
||||||
//@administrator_rights Expected administrator rights for the bot; may be null
|
//@administrator_rights Expected administrator rights for the bot; may be null
|
||||||
internalLinkTypeBotStartInGroup bot_username:string start_parameter:string administrator_rights:chatAdministratorRights = InternalLinkType;
|
internalLinkTypeBotStartInGroup bot_username:string start_parameter:string administrator_rights:chatAdministratorRights = InternalLinkType;
|
||||||
|
|
||||||
//@description The link is a link to a Telegram bot, which is supposed to be added to a channel chat as an administrator. Call searchPublicChat with the given bot username and check that the user is a bot,
|
|
||||||
//-ask the current user to select a channel chat to add the bot to as an administrator. Then, call getChatMember to receive the current bot rights in the chat and if the bot already is an administrator,
|
|
||||||
//-check that the current user can edit its administrator rights and combine received rights with the requested administrator rights. Then, show confirmation box to the user, and call setChatMemberStatus with the chosen chat and confirmed rights
|
|
||||||
//@bot_username Username of the bot
|
|
||||||
//@administrator_rights Expected administrator rights for the bot
|
|
||||||
internalLinkTypeBotAddToChannel bot_username:string administrator_rights:chatAdministratorRights = InternalLinkType;
|
|
||||||
|
|
||||||
//@description The link is a link to the change phone number section of the app
|
//@description The link is a link to the change phone number section of the app
|
||||||
internalLinkTypeChangePhoneNumber = InternalLinkType;
|
internalLinkTypeChangePhoneNumber = InternalLinkType;
|
||||||
|
|
||||||
|
@ -4608,7 +4674,7 @@ internalLinkTypePassportDataRequest bot_user_id:int53 scope:string public_key:st
|
||||||
//@phone_number Phone number value from the link
|
//@phone_number Phone number value from the link
|
||||||
internalLinkTypePhoneNumberConfirmation hash:string phone_number:string = InternalLinkType;
|
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
|
//@description The link is a link to the Premium features screen of the application 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;
|
internalLinkTypePremiumFeatures referrer:string = InternalLinkType;
|
||||||
|
|
||||||
//@description The link is a link to the privacy and security section of the app settings
|
//@description The link is a link to the privacy and security section of the app settings
|
||||||
|
@ -4662,6 +4728,13 @@ internalLinkTypeUserToken token:string = InternalLinkType;
|
||||||
//@is_live_stream True, if the video chat is expected to be a live stream in a channel or a broadcast group
|
//@is_live_stream True, if the video chat is expected to be a live stream in a channel or a broadcast group
|
||||||
internalLinkTypeVideoChat chat_username:string invite_hash:string is_live_stream:Bool = InternalLinkType;
|
internalLinkTypeVideoChat chat_username:string invite_hash:string is_live_stream:Bool = InternalLinkType;
|
||||||
|
|
||||||
|
//@description The link is a link to a Web App. Call searchPublicChat with the given bot username, check that the user is a bot, then call searchWebApp with the received bot and the given web_app_short_name.
|
||||||
|
//-Process received foundWebApp by showing a confirmation dialog if needed, then calling getWebAppLinkUrl and opening the returned URL
|
||||||
|
//@bot_username Username of the bot that owns the Web App
|
||||||
|
//@web_app_short_name Short name of the Web App
|
||||||
|
//@start_parameter Start parameter to be passed to getWebAppLinkUrl
|
||||||
|
internalLinkTypeWebApp bot_username:string web_app_short_name:string start_parameter:string = InternalLinkType;
|
||||||
|
|
||||||
|
|
||||||
//@description Contains an HTTPS link to a message in a supergroup or channel, or a forum topic @link The link @is_public True, if the link will work for non-members of the chat
|
//@description Contains an HTTPS link to a message in a supergroup or channel, or a forum topic @link The link @is_public True, if the link will work for non-members of the chat
|
||||||
messageLink link:string is_public:Bool = MessageLink;
|
messageLink link:string is_public:Bool = MessageLink;
|
||||||
|
@ -5000,12 +5073,12 @@ proxies proxies:vector<proxy> = Proxies;
|
||||||
|
|
||||||
|
|
||||||
//@description A sticker to be added to a sticker set
|
//@description A sticker to be added to a sticker set
|
||||||
//@sticker File with the sticker; must fit in a 512x512 square. For WEBP stickers and masks the file must be in PNG format, which will be converted to WEBP server-side.
|
//@sticker File with the sticker; must fit in a 512x512 square. For WEBP stickers the file must be in WEBP or PNG format, which will be converted to WEBP server-side.
|
||||||
//-Otherwise, the file must be local or uploaded within a week. See https://core.telegram.org/animated_stickers#technical-requirements for technical requirements
|
//-See https://core.telegram.org/animated_stickers#technical-requirements for technical requirements
|
||||||
//@emojis Emojis corresponding to the sticker
|
//@emojis String with 1-20 emoji corresponding to the sticker
|
||||||
//@format Sticker format
|
|
||||||
//@mask_position Position where the mask is placed; pass null if not specified
|
//@mask_position Position where the mask is placed; pass null if not specified
|
||||||
inputSticker sticker:InputFile emojis:string format:StickerFormat mask_position:maskPosition = InputSticker;
|
//@keywords List of up to 20 keywords with total length up to 64 characters, which can be used to find the sticker
|
||||||
|
inputSticker sticker:InputFile emojis:string mask_position:maskPosition keywords:vector<string> = InputSticker;
|
||||||
|
|
||||||
|
|
||||||
//@description Represents a date range @start_date Point in time (Unix timestamp) at which the date range begins @end_date Point in time (Unix timestamp) at which the date range ends
|
//@description Represents a date range @start_date Point in time (Unix timestamp) at which the date range begins @end_date Point in time (Unix timestamp) at which the date range ends
|
||||||
|
@ -5493,6 +5566,9 @@ updateAnimationSearchParameters provider:string emojis:vector<string> = Update;
|
||||||
//@description The list of suggested to the user actions has changed @added_actions Added suggested actions @removed_actions Removed suggested actions
|
//@description The list of suggested to the user actions has changed @added_actions Added suggested actions @removed_actions Removed suggested actions
|
||||||
updateSuggestedActions added_actions:vector<SuggestedAction> removed_actions:vector<SuggestedAction> = Update;
|
updateSuggestedActions added_actions:vector<SuggestedAction> removed_actions:vector<SuggestedAction> = Update;
|
||||||
|
|
||||||
|
//@description Adding users to a chat has failed because of their privacy settings. An invite link can be shared with the users if appropriate @chat_id Chat identifier @user_ids Identifiers of users, which weren't added because of their privacy settings
|
||||||
|
updateAddChatMembersPrivacyForbidden chat_id:int53 user_ids:vector<int53> = Update;
|
||||||
|
|
||||||
//@description Autosave settings for some type of chats were updated @scope Type of chats for which autosave settings were updated @settings The new autosave settings; may be null if the settings are reset to default
|
//@description Autosave settings for some type of chats were updated @scope Type of chats for which autosave settings were updated @settings The new autosave settings; may be null if the settings are reset to default
|
||||||
updateAutosaveSettings scope:AutosaveSettingsScope settings:scopeAutosaveSettings = Update;
|
updateAutosaveSettings scope:AutosaveSettingsScope settings:scopeAutosaveSettings = Update;
|
||||||
|
|
||||||
|
@ -5836,7 +5912,7 @@ getMessageThread chat_id:int53 message_id:int53 = MessageThreadInfo;
|
||||||
//@description Returns viewers of a recent outgoing message in a basic group or a supergroup chat. For video notes and voice notes only users, opened content of the message, are returned. The method can be called if message.can_get_viewers == true
|
//@description Returns viewers of a recent outgoing message in a basic group or a supergroup chat. For video notes and voice notes only users, opened content of the message, are returned. The method can be called if message.can_get_viewers == true
|
||||||
//@chat_id Chat identifier
|
//@chat_id Chat identifier
|
||||||
//@message_id Identifier of the message
|
//@message_id Identifier of the message
|
||||||
getMessageViewers chat_id:int53 message_id:int53 = Users;
|
getMessageViewers chat_id:int53 message_id:int53 = MessageViewers;
|
||||||
|
|
||||||
//@description Returns information about a file; this is an offline request @file_id Identifier of the file to get
|
//@description Returns information about a file; this is an offline request @file_id Identifier of the file to get
|
||||||
getFile file_id:int32 = File;
|
getFile file_id:int32 = File;
|
||||||
|
@ -6075,7 +6151,7 @@ getMessageLinkInfo url:string = MessageLinkInfo;
|
||||||
|
|
||||||
//@description Translates a text to the given language. If the current user is a Telegram Premium user, then text formatting is preserved
|
//@description Translates a text to the given language. If the current user is a Telegram Premium user, then text formatting is preserved
|
||||||
//@text Text to translate
|
//@text Text to translate
|
||||||
//@to_language_code ISO language code of the language to which the message is translated. Must be one of
|
//@to_language_code Language code of the language to which the message is translated. Must be one of
|
||||||
//-"af", "sq", "am", "ar", "hy", "az", "eu", "be", "bn", "bs", "bg", "ca", "ceb", "zh-CN", "zh", "zh-Hans", "zh-TW", "zh-Hant", "co", "hr", "cs", "da", "nl", "en", "eo", "et",
|
//-"af", "sq", "am", "ar", "hy", "az", "eu", "be", "bn", "bs", "bg", "ca", "ceb", "zh-CN", "zh", "zh-Hans", "zh-TW", "zh-Hant", "co", "hr", "cs", "da", "nl", "en", "eo", "et",
|
||||||
//-"fi", "fr", "fy", "gl", "ka", "de", "el", "gu", "ht", "ha", "haw", "he", "iw", "hi", "hmn", "hu", "is", "ig", "id", "in", "ga", "it", "ja", "jv", "kn", "kk", "km", "rw", "ko",
|
//-"fi", "fr", "fy", "gl", "ka", "de", "el", "gu", "ht", "ha", "haw", "he", "iw", "hi", "hmn", "hu", "is", "ig", "id", "in", "ga", "it", "ja", "jv", "kn", "kk", "km", "rw", "ko",
|
||||||
//-"ku", "ky", "lo", "la", "lv", "lt", "lb", "mk", "mg", "ms", "ml", "mt", "mi", "mr", "mn", "my", "ne", "no", "ny", "or", "ps", "fa", "pl", "pt", "pa", "ro", "ru", "sm", "gd", "sr",
|
//-"ku", "ky", "lo", "la", "lv", "lt", "lb", "mk", "mg", "ms", "ml", "mt", "mi", "mr", "mn", "my", "ne", "no", "ny", "or", "ps", "fa", "pl", "pt", "pa", "ro", "ru", "sm", "gd", "sr",
|
||||||
|
@ -6085,7 +6161,7 @@ translateText text:formattedText to_language_code:string = FormattedText;
|
||||||
//@description Extracts text or caption of the given message and translates it to the given language. If the current user is a Telegram Premium user, then text formatting is preserved
|
//@description Extracts text or caption of the given message and translates it to the given language. If the current user is a Telegram Premium user, then text formatting is preserved
|
||||||
//@chat_id Identifier of the chat to which the message belongs
|
//@chat_id Identifier of the chat to which the message belongs
|
||||||
//@message_id Identifier of the message
|
//@message_id Identifier of the message
|
||||||
//@to_language_code ISO language code of the language to which the message is translated. Must be one of
|
//@to_language_code Language code of the language to which the message is translated. Must be one of
|
||||||
//-"af", "sq", "am", "ar", "hy", "az", "eu", "be", "bn", "bs", "bg", "ca", "ceb", "zh-CN", "zh", "zh-Hans", "zh-TW", "zh-Hant", "co", "hr", "cs", "da", "nl", "en", "eo", "et",
|
//-"af", "sq", "am", "ar", "hy", "az", "eu", "be", "bn", "bs", "bg", "ca", "ceb", "zh-CN", "zh", "zh-Hans", "zh-TW", "zh-Hant", "co", "hr", "cs", "da", "nl", "en", "eo", "et",
|
||||||
//-"fi", "fr", "fy", "gl", "ka", "de", "el", "gu", "ht", "ha", "haw", "he", "iw", "hi", "hmn", "hu", "is", "ig", "id", "in", "ga", "it", "ja", "jv", "kn", "kk", "km", "rw", "ko",
|
//-"fi", "fr", "fy", "gl", "ka", "de", "el", "gu", "ht", "ha", "haw", "he", "iw", "hi", "hmn", "hu", "is", "ig", "id", "in", "ga", "it", "ja", "jv", "kn", "kk", "km", "rw", "ko",
|
||||||
//-"ku", "ky", "lo", "la", "lv", "lt", "lb", "mk", "mg", "ms", "ml", "mt", "mi", "mr", "mn", "my", "ne", "no", "ny", "or", "ps", "fa", "pl", "pt", "pa", "ro", "ru", "sm", "gd", "sr",
|
//-"ku", "ky", "lo", "la", "lv", "lt", "lb", "mk", "mg", "ms", "ml", "mt", "mi", "mr", "mn", "my", "ne", "no", "ny", "or", "ps", "fa", "pl", "pt", "pa", "ro", "ru", "sm", "gd", "sr",
|
||||||
|
@ -6472,17 +6548,31 @@ getInlineQueryResults bot_user_id:int53 chat_id:int53 user_location:location que
|
||||||
//@description Sets the result of an inline query; for bots only
|
//@description Sets the result of an inline query; for bots only
|
||||||
//@inline_query_id Identifier of the inline query
|
//@inline_query_id Identifier of the inline query
|
||||||
//@is_personal Pass true if results may be cached and returned only for the user that sent the query. By default, results may be returned to any user who sends the same query
|
//@is_personal Pass true if results may be cached and returned only for the user that sent the query. By default, results may be returned to any user who sends the same query
|
||||||
|
//@button Button to be shown above inline query results; pass null if none
|
||||||
//@results The results of the query
|
//@results The results of the query
|
||||||
//@cache_time Allowed time to cache the results of the query, in seconds
|
//@cache_time Allowed time to cache the results of the query, in seconds
|
||||||
//@next_offset Offset for the next inline query; pass an empty string if there are no more results
|
//@next_offset Offset for the next inline query; pass an empty string if there are no more results
|
||||||
//@switch_pm_text If non-empty, this text must be shown on the button that opens a private chat with the bot and sends a start message to the bot with the parameter switch_pm_parameter
|
answerInlineQuery inline_query_id:int64 is_personal:Bool button:inlineQueryResultsButton results:vector<InputInlineQueryResult> cache_time:int32 next_offset:string = Ok;
|
||||||
//@switch_pm_parameter The parameter for the bot start message
|
|
||||||
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 information about a Web App by its short name. Returns a 404 error if the Web App is not found
|
||||||
//@bot_user_id Identifier of the target bot
|
//@bot_user_id Identifier of the target bot
|
||||||
//@url The URL from the keyboardButtonTypeWebApp button
|
//@web_app_short_name Short name of the Web App
|
||||||
|
searchWebApp bot_user_id:int53 web_app_short_name:string = FoundWebApp;
|
||||||
|
|
||||||
|
//@description Returns an HTTPS URL of a Web App to open after a link of the type internalLinkTypeWebApp is clicked
|
||||||
|
//@chat_id Identifier of the chat in which the link was clicked; pass 0 if none
|
||||||
|
//@bot_user_id Identifier of the target bot
|
||||||
|
//@web_app_short_name Short name of the Web App
|
||||||
|
//@start_parameter Start parameter from internalLinkTypeWebApp
|
||||||
|
//@theme Preferred Web App theme; pass null to use the default theme
|
||||||
|
//@application_name Short name of the application; 0-64 English letters, digits, and underscores
|
||||||
|
//@allow_write_access Pass true if the current user allowed the bot to send them messages
|
||||||
|
getWebAppLinkUrl chat_id:int53 bot_user_id:int53 web_app_short_name:string start_parameter:string theme:themeParameters application_name:string allow_write_access:Bool = HttpUrl;
|
||||||
|
|
||||||
|
//@description Returns an HTTPS URL of a Web App to open after keyboardButtonTypeWebApp or inlineQueryResultsButtonTypeWebApp button is pressed
|
||||||
|
//@bot_user_id Identifier of the target bot
|
||||||
|
//@url The URL from the keyboardButtonTypeWebApp or inlineQueryResultsButtonTypeWebApp 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
|
||||||
//@application_name Short name of the application; 0-64 English letters, digits, and underscores
|
//@application_name Short name of the application; 0-64 English letters, digits, and underscores
|
||||||
getWebAppUrl bot_user_id:int53 url:string theme:themeParameters application_name:string = HttpUrl;
|
getWebAppUrl bot_user_id:int53 url:string theme:themeParameters application_name:string = HttpUrl;
|
||||||
|
@ -6578,10 +6668,10 @@ closeChat chat_id:int53 = Ok;
|
||||||
//@description Informs TDLib that messages are being viewed by the user. Sponsored messages must be marked as viewed only when the entire text of the message is shown on the screen (excluding the button).
|
//@description Informs TDLib that messages are being viewed by the user. Sponsored messages must be marked as viewed only when the entire text of the message is shown on the screen (excluding the button).
|
||||||
//-Many useful activities depend on whether the messages are currently being viewed or not (e.g., marking messages as read, incrementing a view counter, updating a view counter, removing deleted messages in supergroups and channels)
|
//-Many useful activities depend on whether the messages are currently being viewed or not (e.g., marking messages as read, incrementing a view counter, updating a view counter, removing deleted messages in supergroups and channels)
|
||||||
//@chat_id Chat identifier
|
//@chat_id Chat identifier
|
||||||
//@message_thread_id If not 0, a message thread identifier in which the messages are being viewed
|
|
||||||
//@message_ids The identifiers of the messages being viewed
|
//@message_ids The identifiers of the messages being viewed
|
||||||
//@force_read Pass true to mark as read the specified messages even the chat is closed
|
//@source Source of the message view
|
||||||
viewMessages chat_id:int53 message_thread_id:int53 message_ids:vector<int53> force_read:Bool = Ok;
|
//@force_read Pass true to mark as read the specified messages even the chat is closed; pass null to guess the source based on chat open state
|
||||||
|
viewMessages chat_id:int53 message_ids:vector<int53> source:MessageSource force_read:Bool = Ok;
|
||||||
|
|
||||||
//@description Informs TDLib that the message content has been opened (e.g., the user has opened a photo, video, document, location or venue, or has listened to an audio file or voice note message).
|
//@description Informs TDLib that the message content has been opened (e.g., the user has opened a photo, video, document, location or venue, or has listened to an audio file or voice note message).
|
||||||
//-An updateMessageContentOpened update will be generated if something has changed
|
//-An updateMessageContentOpened update will be generated if something has changed
|
||||||
|
@ -6592,6 +6682,9 @@ openMessageContent chat_id:int53 message_id:int53 = Ok;
|
||||||
//@description Informs TDLib that a message with an animated emoji was clicked by the user. Returns a big animated sticker to be played or a 404 error if usual animation needs to be played @chat_id Chat identifier of the message @message_id Identifier of the clicked message
|
//@description Informs TDLib that a message with an animated emoji was clicked by the user. Returns a big animated sticker to be played or a 404 error if usual animation needs to be played @chat_id Chat identifier of the message @message_id Identifier of the clicked message
|
||||||
clickAnimatedEmojiMessage chat_id:int53 message_id:int53 = Sticker;
|
clickAnimatedEmojiMessage chat_id:int53 message_id:int53 = Sticker;
|
||||||
|
|
||||||
|
//@description Returns an HTTPS or a tg: link with the given type. Can be called before authorization @type Expected type of the link @is_http Pass true to create an HTTPS link (only available for some link types); pass false to create a tg: link
|
||||||
|
getInternalLink type:InternalLinkType is_http:Bool = HttpUrl;
|
||||||
|
|
||||||
//@description Returns information about the type of an internal link. Returns a 404 error if the link is not internal. Can be called before authorization @link The link
|
//@description Returns information about the type of an internal link. Returns a 404 error if the link is not internal. Can be called before authorization @link The link
|
||||||
getInternalLinkType link:string = InternalLinkType;
|
getInternalLinkType link:string = InternalLinkType;
|
||||||
|
|
||||||
|
@ -6630,7 +6723,7 @@ createSupergroupChat supergroup_id:int53 force:Bool = Chat;
|
||||||
createSecretChat secret_chat_id:int32 = Chat;
|
createSecretChat secret_chat_id:int32 = Chat;
|
||||||
|
|
||||||
//@description Creates a new basic group and sends a corresponding messageBasicGroupChatCreate. Returns the newly created chat
|
//@description Creates a new basic group and sends a corresponding messageBasicGroupChatCreate. Returns the newly created chat
|
||||||
//@user_ids Identifiers of users to be added to the basic group
|
//@user_ids Identifiers of users to be added to the basic group; may be empty to create a basic group without other members
|
||||||
//@title Title of the new basic group; 1-128 characters
|
//@title Title of the new basic group; 1-128 characters
|
||||||
//@message_auto_delete_time Message auto-delete time value, in seconds; must be from 0 up to 365 * 86400 and be divisible by 86400. If 0, then messages aren't deleted automatically
|
//@message_auto_delete_time Message auto-delete time value, in seconds; must be from 0 up to 365 * 86400 and be divisible by 86400. If 0, then messages aren't deleted automatically
|
||||||
createNewBasicGroupChat user_ids:vector<int53> title:string message_auto_delete_time:int32 = Chat;
|
createNewBasicGroupChat user_ids:vector<int53> title:string message_auto_delete_time:int32 = Chat;
|
||||||
|
@ -7518,6 +7611,25 @@ setDefaultGroupAdministratorRights default_group_administrator_rights:chatAdmini
|
||||||
setDefaultChannelAdministratorRights default_channel_administrator_rights:chatAdministratorRights = Ok;
|
setDefaultChannelAdministratorRights default_channel_administrator_rights:chatAdministratorRights = Ok;
|
||||||
|
|
||||||
|
|
||||||
|
//@description Sets the text shown in the chat with the bot if the chat is empty; bots only
|
||||||
|
//@language_code A two-letter ISO 639-1 language code. If empty, the description will be shown to all users, for which language there are no dedicated description
|
||||||
|
//@param_description New bot's description on the specified language
|
||||||
|
setBotInfoDescription language_code:string description:string = Ok;
|
||||||
|
|
||||||
|
//@description Returns the text shown in the chat with the bot if the chat is empty in the given language; bots only
|
||||||
|
//@language_code A two-letter ISO 639-1 language code or an empty string
|
||||||
|
getBotInfoDescription language_code:string = Text;
|
||||||
|
|
||||||
|
//@description Sets the text shown on the bot's profile page and sent together with the link when users share the bot; bots only
|
||||||
|
//@language_code A two-letter ISO 639-1 language code. If empty, the short description will be shown to all users, for which language there are no dedicated description
|
||||||
|
//@short_description New bot's short description on the specified language
|
||||||
|
setBotInfoShortDescription language_code:string short_description:string = Ok;
|
||||||
|
|
||||||
|
//@description Returns the text shown on the bot's profile page and sent together with the link when users share the bot in the given language; bots only
|
||||||
|
//@language_code A two-letter ISO 639-1 language code or an empty string
|
||||||
|
getBotInfoShortDescription language_code:string = Text;
|
||||||
|
|
||||||
|
|
||||||
//@description Returns all active sessions of the current user
|
//@description Returns all active sessions of the current user
|
||||||
getActiveSessions = Sessions;
|
getActiveSessions = Sessions;
|
||||||
|
|
||||||
|
@ -7703,7 +7815,7 @@ getLanguagePackStrings language_pack_id:string keys:vector<string> = LanguagePac
|
||||||
//@description Fetches the latest versions of all strings from a language pack in the current localization target from the server. This method doesn't need to be called explicitly for the current used/base language packs. Can be called before authorization @language_pack_id Language pack identifier
|
//@description Fetches the latest versions of all strings from a language pack in the current localization target from the server. This method doesn't need to be called explicitly for the current used/base language packs. Can be called before authorization @language_pack_id Language pack identifier
|
||||||
synchronizeLanguagePack language_pack_id:string = Ok;
|
synchronizeLanguagePack language_pack_id:string = Ok;
|
||||||
|
|
||||||
//@description Adds a custom server language pack to the list of installed language packs in current localization target. Can be called before authorization @language_pack_id Identifier of a language pack to be added; may be different from a name that is used in an "https://t.me/setlanguage/" link
|
//@description Adds a custom server language pack to the list of installed language packs in current localization target. Can be called before authorization @language_pack_id Identifier of a language pack to be added
|
||||||
addCustomServerLanguagePack language_pack_id:string = Ok;
|
addCustomServerLanguagePack language_pack_id:string = Ok;
|
||||||
|
|
||||||
//@description Adds or changes a custom local language pack to the current localization target
|
//@description Adds or changes a custom local language pack to the current localization target
|
||||||
|
@ -7855,10 +7967,10 @@ setAutoDownloadSettings settings:autoDownloadSettings type:NetworkType = Ok;
|
||||||
//@description Returns autosave settings for the current user
|
//@description Returns autosave settings for the current user
|
||||||
getAutosaveSettings = AutosaveSettings;
|
getAutosaveSettings = AutosaveSettings;
|
||||||
|
|
||||||
//@description Sets autosave settings for the given scope @scope Autosave settings scope @settings New autosave settings for the scope; pass null to set autosave settings to default
|
//@description Sets autosave settings for the given scope. The method is guaranteed to work only after at least one call to getAutosaveSettings @scope Autosave settings scope @settings New autosave settings for the scope; pass null to set autosave settings to default
|
||||||
setAutosaveSettings scope:AutosaveSettingsScope settings:scopeAutosaveSettings = Ok;
|
setAutosaveSettings scope:AutosaveSettingsScope settings:scopeAutosaveSettings = Ok;
|
||||||
|
|
||||||
//@description Clears the list of all autosave settings exceptions
|
//@description Clears the list of all autosave settings exceptions. The method is guaranteed to work only after at least one call to getAutosaveSettings
|
||||||
clearAutosaveSettingsExceptions = Ok;
|
clearAutosaveSettingsExceptions = Ok;
|
||||||
|
|
||||||
|
|
||||||
|
@ -7945,8 +8057,12 @@ checkPhoneNumberConfirmationCode code:string = Ok;
|
||||||
setBotUpdatesStatus pending_update_count:int32 error_message:string = Ok;
|
setBotUpdatesStatus pending_update_count:int32 error_message:string = Ok;
|
||||||
|
|
||||||
|
|
||||||
//@description Uploads a file with a sticker; returns the uploaded file @user_id Sticker file owner; ignored for regular users @sticker Sticker file to upload
|
//@description Uploads a file with a sticker; returns the uploaded file
|
||||||
uploadStickerFile user_id:int53 sticker:inputSticker = File;
|
//@user_id Sticker file owner; ignored for regular users
|
||||||
|
//@sticker_format Sticker format
|
||||||
|
//@sticker File file to upload; must fit in a 512x512 square. For WEBP stickers the file must be in WEBP or PNG format, which will be converted to WEBP server-side.
|
||||||
|
//-See https://core.telegram.org/animated_stickers#technical-requirements for technical requirements
|
||||||
|
uploadStickerFile user_id:int53 sticker_format:StickerFormat sticker:InputFile = File;
|
||||||
|
|
||||||
//@description Returns a suggested name for a new sticker set with a given title @title Sticker set title; 1-64 characters
|
//@description Returns a suggested name for a new sticker set with a given title @title Sticker set title; 1-64 characters
|
||||||
getSuggestedStickerSetName title:string = Text;
|
getSuggestedStickerSetName title:string = Text;
|
||||||
|
@ -7958,22 +8074,36 @@ checkStickerSetName name:string = CheckStickerSetNameResult;
|
||||||
//@user_id Sticker set owner; ignored for regular users
|
//@user_id Sticker set owner; ignored for regular users
|
||||||
//@title Sticker set title; 1-64 characters
|
//@title Sticker set title; 1-64 characters
|
||||||
//@name Sticker set name. Can contain only English letters, digits and underscores. Must end with *"_by_<bot username>"* (*<bot_username>* is case insensitive) for bots; 1-64 characters
|
//@name Sticker set name. Can contain only English letters, digits and underscores. Must end with *"_by_<bot username>"* (*<bot_username>* is case insensitive) for bots; 1-64 characters
|
||||||
|
//@sticker_format Format of the stickers in the set
|
||||||
//@sticker_type Type of the stickers in the set
|
//@sticker_type Type of the stickers in the set
|
||||||
|
//@needs_repainting Pass true if stickers in the sticker set must be repainted; for custom emoji sticker sets only
|
||||||
//@stickers List of stickers to be added to the set; must be non-empty. All stickers must have the same format. For TGS stickers, uploadStickerFile must be used before the sticker is shown
|
//@stickers List of stickers to be added to the set; must be non-empty. All stickers must have the same format. For TGS stickers, uploadStickerFile must be used before the sticker is shown
|
||||||
//@source Source of the sticker set; may be empty if unknown
|
//@source Source of the sticker set; may be empty if unknown
|
||||||
createNewStickerSet user_id:int53 title:string name:string sticker_type:StickerType stickers:vector<inputSticker> source:string = StickerSet;
|
createNewStickerSet user_id:int53 title:string name:string sticker_format:StickerFormat sticker_type:StickerType needs_repainting:Bool stickers:vector<inputSticker> source:string = StickerSet;
|
||||||
|
|
||||||
//@description Adds a new sticker to a set; for bots only. Returns the sticker set
|
|
||||||
|
//@description Adds a new sticker to a set; for bots only
|
||||||
//@user_id Sticker set owner
|
//@user_id Sticker set owner
|
||||||
//@name Sticker set name
|
//@name Sticker set name
|
||||||
//@sticker Sticker to add to the set
|
//@sticker Sticker to add to the set
|
||||||
addStickerToSet user_id:int53 name:string sticker:inputSticker = StickerSet;
|
addStickerToSet user_id:int53 name:string sticker:inputSticker = Ok;
|
||||||
|
|
||||||
//@description Sets a sticker set thumbnail; for bots only. Returns the sticker set
|
//@description Sets a sticker set thumbnail; for bots only
|
||||||
//@user_id Sticker set owner
|
//@user_id Sticker set owner
|
||||||
//@name Sticker set name
|
//@name Sticker set name
|
||||||
//@thumbnail Thumbnail to set in PNG, TGS, or WEBM format; pass null to remove the sticker set thumbnail. Thumbnail format must match the format of stickers in the set
|
//@thumbnail Thumbnail to set in PNG, TGS, or WEBM format; pass null to remove the sticker set thumbnail. Thumbnail format must match the format of stickers in the set
|
||||||
setStickerSetThumbnail user_id:int53 name:string thumbnail:InputFile = StickerSet;
|
setStickerSetThumbnail user_id:int53 name:string thumbnail:InputFile = Ok;
|
||||||
|
|
||||||
|
//@description Sets a custom emoji sticker set thumbnail; for bots only
|
||||||
|
//@name Sticker set name
|
||||||
|
//@custom_emoji_id Identifier of the custom emoji from the sticker set, which will be set as sticker set thumbnail; pass 0 to remove the sticker set thumbnail
|
||||||
|
setCustomEmojiStickerSetThumbnail name:string custom_emoji_id:int64 = Ok;
|
||||||
|
|
||||||
|
//@description Sets a sticker set title; for bots only @name Sticker set name @title New sticker set title
|
||||||
|
setStickerSetTitle name:string title:string = Ok;
|
||||||
|
|
||||||
|
//@description Deleted a sticker set; for bots only @name Sticker set name
|
||||||
|
deleteStickerSet name:string = Ok;
|
||||||
|
|
||||||
//@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
|
//@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
|
//@sticker Sticker
|
||||||
|
@ -7983,6 +8113,21 @@ 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
|
//@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
|
||||||
removeStickerFromSet sticker:InputFile = Ok;
|
removeStickerFromSet sticker:InputFile = Ok;
|
||||||
|
|
||||||
|
//@description Changes the list of emoji corresponding to a sticker; for bots only. The sticker must belong to a regular or custom emoji sticker set created by the bot
|
||||||
|
//@sticker Sticker
|
||||||
|
//@emojis New string with 1-20 emoji corresponding to the sticker
|
||||||
|
setStickerEmojis sticker:InputFile emojis:string = Ok;
|
||||||
|
|
||||||
|
//@description Changes the list of keywords of a sticker; for bots only. The sticker must belong to a regular or custom emoji sticker set created by the bot
|
||||||
|
//@sticker Sticker
|
||||||
|
//@keywords List of up to 20 keywords with total length up to 64 characters, which can be used to find the sticker
|
||||||
|
setStickerKeywords sticker:InputFile keywords:vector<string> = Ok;
|
||||||
|
|
||||||
|
//@description Changes the mask position of a mask sticker; for bots only. The sticker must belong to a mask sticker set created by the bot
|
||||||
|
//@sticker Sticker
|
||||||
|
//@mask_position Position where the mask is placed; pass null to remove mask position
|
||||||
|
setStickerMaskPosition sticker:InputFile mask_position:maskPosition = Ok;
|
||||||
|
|
||||||
|
|
||||||
//@description Returns information about a file with a map thumbnail in PNG format. Only map thumbnail files with size less than 1MB can be downloaded
|
//@description Returns information about a file with a map thumbnail in PNG format. Only map thumbnail files with size less than 1MB can be downloaded
|
||||||
//@location Location of the map center
|
//@location Location of the map center
|
||||||
|
@ -8055,8 +8200,6 @@ getPhoneNumberInfo phone_number_prefix:string = PhoneNumberInfo;
|
||||||
//@phone_number_prefix The phone number prefix
|
//@phone_number_prefix The phone number prefix
|
||||||
getPhoneNumberInfoSync language_code:string phone_number_prefix:string = PhoneNumberInfo;
|
getPhoneNumberInfoSync language_code:string phone_number_prefix:string = PhoneNumberInfo;
|
||||||
|
|
||||||
//@description Returns the link for downloading official Telegram application to be used when the current user invites friends to Telegram
|
|
||||||
getApplicationDownloadLink = HttpUrl;
|
|
||||||
|
|
||||||
//@description Returns information about a tg:// deep link. Use "tg://need_update_for_some_feature" or "tg:some_unsupported_feature" for testing. Returns a 404 error for unknown links. Can be called before authorization @link The link
|
//@description Returns information about a tg:// deep link. Use "tg://need_update_for_some_feature" or "tg:some_unsupported_feature" for testing. Returns a 404 error for unknown links. Can be called before authorization @link The link
|
||||||
getDeepLinkInfo link:string = DeepLinkInfo;
|
getDeepLinkInfo link:string = DeepLinkInfo;
|
||||||
|
@ -8065,9 +8208,15 @@ getDeepLinkInfo link:string = DeepLinkInfo;
|
||||||
//@description Returns application config, provided by the server. Can be called before authorization
|
//@description Returns application config, provided by the server. Can be called before authorization
|
||||||
getApplicationConfig = JsonValue;
|
getApplicationConfig = JsonValue;
|
||||||
|
|
||||||
|
//@description Adds server-provided application changelog as messages to the chat 777000 (Telegram); for official applications only @previous_application_version The previous application version
|
||||||
|
addApplicationChangelog previous_application_version:string = Ok;
|
||||||
|
|
||||||
//@description Saves application log event on the server. Can be called before authorization @type Event type @chat_id Optional chat identifier, associated with the event @data The log event data
|
//@description Saves application log event on the server. Can be called before authorization @type Event type @chat_id Optional chat identifier, associated with the event @data The log event data
|
||||||
saveApplicationLogEvent type:string chat_id:int53 data:JsonValue = Ok;
|
saveApplicationLogEvent type:string chat_id:int53 data:JsonValue = Ok;
|
||||||
|
|
||||||
|
//@description Returns the link for downloading official Telegram application to be used when the current user invites friends to Telegram
|
||||||
|
getApplicationDownloadLink = HttpUrl;
|
||||||
|
|
||||||
|
|
||||||
//@description Adds a proxy server for network requests. Can be called before authorization
|
//@description Adds a proxy server for network requests. Can be called before authorization
|
||||||
//@server Proxy server IP address
|
//@server Proxy server IP address
|
||||||
|
|
Loading…
Reference in a new issue