Update to TDLib 1.8.3
This commit is contained in:
parent
36a547a560
commit
94b077458b
|
@ -1976,7 +1976,7 @@ type DeleteChatRequest struct {
|
||||||
ChatId int64 `json:"chat_id"`
|
ChatId int64 `json:"chat_id"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// Deletes a chat along with all messages in the corresponding chat for all chat members; requires owner privileges. For group chats this will release the username and remove all members. Chats with more than 1000 members can't be deleted using this method
|
// Deletes a chat along with all messages in the corresponding chat for all chat members. For group chats this will release the username and remove all members. Use the field chat.can_be_deleted_for_all_users to find whether the method can be applied to the chat
|
||||||
func (client *Client) DeleteChat(req *DeleteChatRequest) (*Ok, error) {
|
func (client *Client) DeleteChat(req *DeleteChatRequest) (*Ok, error) {
|
||||||
result, err := client.Send(Request{
|
result, err := client.Send(Request{
|
||||||
meta: meta{
|
meta: meta{
|
||||||
|
@ -2728,7 +2728,7 @@ type SendMessageRequest struct {
|
||||||
ChatId int64 `json:"chat_id"`
|
ChatId int64 `json:"chat_id"`
|
||||||
// If not 0, a message thread identifier in which the message will be sent
|
// If not 0, a message thread identifier in which the message will be sent
|
||||||
MessageThreadId int64 `json:"message_thread_id"`
|
MessageThreadId int64 `json:"message_thread_id"`
|
||||||
// Identifier of the message to reply to or 0
|
// Identifier of the replied message; 0 if none
|
||||||
ReplyToMessageId int64 `json:"reply_to_message_id"`
|
ReplyToMessageId int64 `json:"reply_to_message_id"`
|
||||||
// Options to be used to send the message; pass null to use default options
|
// Options to be used to send the message; pass null to use default options
|
||||||
Options *MessageSendOptions `json:"options"`
|
Options *MessageSendOptions `json:"options"`
|
||||||
|
@ -2769,7 +2769,7 @@ type SendMessageAlbumRequest struct {
|
||||||
ChatId int64 `json:"chat_id"`
|
ChatId int64 `json:"chat_id"`
|
||||||
// If not 0, a message thread identifier in which the messages will be sent
|
// If not 0, a message thread identifier in which the messages will be sent
|
||||||
MessageThreadId int64 `json:"message_thread_id"`
|
MessageThreadId int64 `json:"message_thread_id"`
|
||||||
// Identifier of a message to reply to or 0
|
// Identifier of a replied message; 0 if none
|
||||||
ReplyToMessageId int64 `json:"reply_to_message_id"`
|
ReplyToMessageId int64 `json:"reply_to_message_id"`
|
||||||
// Options to be used to send the messages; pass null to use default options
|
// Options to be used to send the messages; pass null to use default options
|
||||||
Options *MessageSendOptions `json:"options"`
|
Options *MessageSendOptions `json:"options"`
|
||||||
|
@ -2842,7 +2842,7 @@ type SendInlineQueryResultMessageRequest struct {
|
||||||
ChatId int64 `json:"chat_id"`
|
ChatId int64 `json:"chat_id"`
|
||||||
// If not 0, a message thread identifier in which the message will be sent
|
// If not 0, a message thread identifier in which the message will be sent
|
||||||
MessageThreadId int64 `json:"message_thread_id"`
|
MessageThreadId int64 `json:"message_thread_id"`
|
||||||
// Identifier of a message to reply to or 0
|
// Identifier of a replied message; 0 if none
|
||||||
ReplyToMessageId int64 `json:"reply_to_message_id"`
|
ReplyToMessageId int64 `json:"reply_to_message_id"`
|
||||||
// Options to be used to send the message; pass null to use default options
|
// Options to be used to send the message; pass null to use default options
|
||||||
Options *MessageSendOptions `json:"options"`
|
Options *MessageSendOptions `json:"options"`
|
||||||
|
@ -2985,7 +2985,7 @@ type AddLocalMessageRequest struct {
|
||||||
ChatId int64 `json:"chat_id"`
|
ChatId int64 `json:"chat_id"`
|
||||||
// Identifier of the sender of the message
|
// Identifier of the sender of the message
|
||||||
SenderId MessageSender `json:"sender_id"`
|
SenderId MessageSender `json:"sender_id"`
|
||||||
// Identifier of the message to reply to or 0
|
// Identifier of the replied message; 0 if none
|
||||||
ReplyToMessageId int64 `json:"reply_to_message_id"`
|
ReplyToMessageId int64 `json:"reply_to_message_id"`
|
||||||
// Pass true to disable notification for the message
|
// Pass true to disable notification for the message
|
||||||
DisableNotification bool `json:"disable_notification"`
|
DisableNotification bool `json:"disable_notification"`
|
||||||
|
@ -3944,6 +3944,37 @@ func GetJsonString(req *GetJsonStringRequest) (*Text, error) {
|
||||||
func (client *Client) GetJsonString(req *GetJsonStringRequest) (*Text, error) {
|
func (client *Client) GetJsonString(req *GetJsonStringRequest) (*Text, error) {
|
||||||
return GetJsonString(req)}
|
return GetJsonString(req)}
|
||||||
|
|
||||||
|
type GetThemeParametersJsonStringRequest struct {
|
||||||
|
// Theme parameters to convert to JSON
|
||||||
|
Theme *ThemeParameters `json:"theme"`
|
||||||
|
}
|
||||||
|
|
||||||
|
// Converts a themeParameters object to corresponding JSON-serialized string. Can be called synchronously
|
||||||
|
func GetThemeParametersJsonString(req *GetThemeParametersJsonStringRequest) (*Text, error) {
|
||||||
|
result, err := Execute(Request{
|
||||||
|
meta: meta{
|
||||||
|
Type: "getThemeParametersJsonString",
|
||||||
|
},
|
||||||
|
Data: map[string]interface{}{
|
||||||
|
"theme": req.Theme,
|
||||||
|
},
|
||||||
|
})
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
if result.Type == "error" {
|
||||||
|
return nil, buildResponseError(result.Data)
|
||||||
|
}
|
||||||
|
|
||||||
|
return UnmarshalText(result.Data)
|
||||||
|
}
|
||||||
|
|
||||||
|
// deprecated
|
||||||
|
// Converts a themeParameters object to corresponding JSON-serialized string. Can be called synchronously
|
||||||
|
func (client *Client) GetThemeParametersJsonString(req *GetThemeParametersJsonStringRequest) (*Text, error) {
|
||||||
|
return GetThemeParametersJsonString(req)}
|
||||||
|
|
||||||
type SetPollAnswerRequest struct {
|
type SetPollAnswerRequest struct {
|
||||||
// Identifier of the chat to which the poll belongs
|
// Identifier of the chat to which the poll belongs
|
||||||
ChatId int64 `json:"chat_id"`
|
ChatId int64 `json:"chat_id"`
|
||||||
|
@ -4230,6 +4261,163 @@ func (client *Client) AnswerInlineQuery(req *AnswerInlineQueryRequest) (*Ok, err
|
||||||
return UnmarshalOk(result.Data)
|
return UnmarshalOk(result.Data)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
type GetWebAppUrlRequest struct {
|
||||||
|
// Identifier of the target bot
|
||||||
|
BotUserId int64 `json:"bot_user_id"`
|
||||||
|
// The URL from the keyboardButtonTypeWebApp button
|
||||||
|
Url string `json:"url"`
|
||||||
|
// Preferred web app theme; pass null to use the default theme
|
||||||
|
Theme *ThemeParameters `json:"theme"`
|
||||||
|
}
|
||||||
|
|
||||||
|
// Returns an HTTPS URL of a web app to open after keyboardButtonTypeWebApp button is pressed
|
||||||
|
func (client *Client) GetWebAppUrl(req *GetWebAppUrlRequest) (*HttpUrl, error) {
|
||||||
|
result, err := client.Send(Request{
|
||||||
|
meta: meta{
|
||||||
|
Type: "getWebAppUrl",
|
||||||
|
},
|
||||||
|
Data: map[string]interface{}{
|
||||||
|
"bot_user_id": req.BotUserId,
|
||||||
|
"url": req.Url,
|
||||||
|
"theme": req.Theme,
|
||||||
|
},
|
||||||
|
})
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
if result.Type == "error" {
|
||||||
|
return nil, buildResponseError(result.Data)
|
||||||
|
}
|
||||||
|
|
||||||
|
return UnmarshalHttpUrl(result.Data)
|
||||||
|
}
|
||||||
|
|
||||||
|
type SendWebAppDataRequest struct {
|
||||||
|
// Identifier of the target bot
|
||||||
|
BotUserId int64 `json:"bot_user_id"`
|
||||||
|
// Text of the keyboardButtonTypeWebApp button, which opened the web app
|
||||||
|
ButtonText string `json:"button_text"`
|
||||||
|
// Received data
|
||||||
|
Data string `json:"data"`
|
||||||
|
}
|
||||||
|
|
||||||
|
// Sends data received from a keyboardButtonTypeWebApp web app to a bot
|
||||||
|
func (client *Client) SendWebAppData(req *SendWebAppDataRequest) (*Ok, error) {
|
||||||
|
result, err := client.Send(Request{
|
||||||
|
meta: meta{
|
||||||
|
Type: "sendWebAppData",
|
||||||
|
},
|
||||||
|
Data: map[string]interface{}{
|
||||||
|
"bot_user_id": req.BotUserId,
|
||||||
|
"button_text": req.ButtonText,
|
||||||
|
"data": req.Data,
|
||||||
|
},
|
||||||
|
})
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
if result.Type == "error" {
|
||||||
|
return nil, buildResponseError(result.Data)
|
||||||
|
}
|
||||||
|
|
||||||
|
return UnmarshalOk(result.Data)
|
||||||
|
}
|
||||||
|
|
||||||
|
type OpenWebAppRequest struct {
|
||||||
|
// Identifier of the chat in which the web app is opened. Web apps can be opened only in private chats for now
|
||||||
|
ChatId int64 `json:"chat_id"`
|
||||||
|
// Identifier of the bot, providing the web app
|
||||||
|
BotUserId int64 `json:"bot_user_id"`
|
||||||
|
// The URL from an inlineKeyboardButtonTypeWebApp button, a botMenuButton button, or an internalLinkTypeAttachmentMenuBot link, or an empty string otherwise
|
||||||
|
Url string `json:"url"`
|
||||||
|
// Preferred web app theme; pass null to use the default theme
|
||||||
|
Theme *ThemeParameters `json:"theme"`
|
||||||
|
// Identifier of the replied message for the message sent by the web app; 0 if none
|
||||||
|
ReplyToMessageId int64 `json:"reply_to_message_id"`
|
||||||
|
}
|
||||||
|
|
||||||
|
// Informs TDLib that a web app is being opened from attachment menu, a botMenuButton button, an internalLinkTypeAttachmentMenuBot link, or an inlineKeyboardButtonTypeWebApp button. For each bot, a confirmation alert about data sent to the bot must be shown once
|
||||||
|
func (client *Client) OpenWebApp(req *OpenWebAppRequest) (*WebAppInfo, error) {
|
||||||
|
result, err := client.Send(Request{
|
||||||
|
meta: meta{
|
||||||
|
Type: "openWebApp",
|
||||||
|
},
|
||||||
|
Data: map[string]interface{}{
|
||||||
|
"chat_id": req.ChatId,
|
||||||
|
"bot_user_id": req.BotUserId,
|
||||||
|
"url": req.Url,
|
||||||
|
"theme": req.Theme,
|
||||||
|
"reply_to_message_id": req.ReplyToMessageId,
|
||||||
|
},
|
||||||
|
})
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
if result.Type == "error" {
|
||||||
|
return nil, buildResponseError(result.Data)
|
||||||
|
}
|
||||||
|
|
||||||
|
return UnmarshalWebAppInfo(result.Data)
|
||||||
|
}
|
||||||
|
|
||||||
|
type CloseWebAppRequest struct {
|
||||||
|
// Identifier of web app launch, received from openWebApp
|
||||||
|
WebAppLaunchId JsonInt64 `json:"web_app_launch_id"`
|
||||||
|
}
|
||||||
|
|
||||||
|
// Informs TDLib that a previously opened web app was closed
|
||||||
|
func (client *Client) CloseWebApp(req *CloseWebAppRequest) (*Ok, error) {
|
||||||
|
result, err := client.Send(Request{
|
||||||
|
meta: meta{
|
||||||
|
Type: "closeWebApp",
|
||||||
|
},
|
||||||
|
Data: map[string]interface{}{
|
||||||
|
"web_app_launch_id": req.WebAppLaunchId,
|
||||||
|
},
|
||||||
|
})
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
if result.Type == "error" {
|
||||||
|
return nil, buildResponseError(result.Data)
|
||||||
|
}
|
||||||
|
|
||||||
|
return UnmarshalOk(result.Data)
|
||||||
|
}
|
||||||
|
|
||||||
|
type AnswerWebAppQueryRequest struct {
|
||||||
|
// Identifier of the web app query
|
||||||
|
WebAppQueryId string `json:"web_app_query_id"`
|
||||||
|
// The result of the query
|
||||||
|
Result InputInlineQueryResult `json:"result"`
|
||||||
|
}
|
||||||
|
|
||||||
|
// Sets the result of interaction with a web app and sends corresponding message on behalf of the user to the chat from which the query originated; for bots only
|
||||||
|
func (client *Client) AnswerWebAppQuery(req *AnswerWebAppQueryRequest) (*SentWebAppMessage, error) {
|
||||||
|
result, err := client.Send(Request{
|
||||||
|
meta: meta{
|
||||||
|
Type: "answerWebAppQuery",
|
||||||
|
},
|
||||||
|
Data: map[string]interface{}{
|
||||||
|
"web_app_query_id": req.WebAppQueryId,
|
||||||
|
"result": req.Result,
|
||||||
|
},
|
||||||
|
})
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
if result.Type == "error" {
|
||||||
|
return nil, buildResponseError(result.Data)
|
||||||
|
}
|
||||||
|
|
||||||
|
return UnmarshalSentWebAppMessage(result.Data)
|
||||||
|
}
|
||||||
|
|
||||||
type GetCallbackQueryAnswerRequest struct {
|
type GetCallbackQueryAnswerRequest struct {
|
||||||
// Identifier of the chat with the message
|
// Identifier of the chat with the message
|
||||||
ChatId int64 `json:"chat_id"`
|
ChatId int64 `json:"chat_id"`
|
||||||
|
@ -4734,6 +4922,9 @@ func (client *Client) GetInternalLinkType(req *GetInternalLinkTypeRequest) (Inte
|
||||||
case TypeInternalLinkTypeActiveSessions:
|
case TypeInternalLinkTypeActiveSessions:
|
||||||
return UnmarshalInternalLinkTypeActiveSessions(result.Data)
|
return UnmarshalInternalLinkTypeActiveSessions(result.Data)
|
||||||
|
|
||||||
|
case TypeInternalLinkTypeAttachmentMenuBot:
|
||||||
|
return UnmarshalInternalLinkTypeAttachmentMenuBot(result.Data)
|
||||||
|
|
||||||
case TypeInternalLinkTypeAuthenticationCode:
|
case TypeInternalLinkTypeAuthenticationCode:
|
||||||
return UnmarshalInternalLinkTypeAuthenticationCode(result.Data)
|
return UnmarshalInternalLinkTypeAuthenticationCode(result.Data)
|
||||||
|
|
||||||
|
@ -4746,6 +4937,9 @@ func (client *Client) GetInternalLinkType(req *GetInternalLinkTypeRequest) (Inte
|
||||||
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)
|
||||||
|
|
||||||
|
@ -5464,11 +5658,11 @@ func (client *Client) SetChatPhoto(req *SetChatPhotoRequest) (*Ok, error) {
|
||||||
type SetChatMessageTtlRequest struct {
|
type SetChatMessageTtlRequest struct {
|
||||||
// Chat identifier
|
// Chat identifier
|
||||||
ChatId int64 `json:"chat_id"`
|
ChatId int64 `json:"chat_id"`
|
||||||
// New TTL value, in seconds; must be one of 0, 86400, 7 * 86400, or 31 * 86400 unless the chat is secret
|
// New TTL value, in seconds; unless the chat is secret, it must be from 0 up to 365 * 86400 and be divisible by 86400
|
||||||
Ttl int32 `json:"ttl"`
|
Ttl int32 `json:"ttl"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// Changes the message TTL in a chat. Requires can_delete_messages administrator right in basic groups, supergroups and channels Message TTL can't be changed in a chat with the current user (Saved Messages) and the chat 777000 (Telegram)
|
// Changes the message TTL in a chat. Requires can_delete_messages administrator right in basic groups, supergroups and channels Message TTL can't be changed in a chat with the current user (Saved Messages) and the chat 777000 (Telegram).
|
||||||
func (client *Client) SetChatMessageTtl(req *SetChatMessageTtlRequest) (*Ok, error) {
|
func (client *Client) SetChatMessageTtl(req *SetChatMessageTtlRequest) (*Ok, error) {
|
||||||
result, err := client.Send(Request{
|
result, err := client.Send(Request{
|
||||||
meta: meta{
|
meta: meta{
|
||||||
|
@ -6322,6 +6516,103 @@ func (client *Client) ClearAllDraftMessages(req *ClearAllDraftMessagesRequest) (
|
||||||
return UnmarshalOk(result.Data)
|
return UnmarshalOk(result.Data)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
type GetSavedNotificationSoundRequest struct {
|
||||||
|
// Identifier of the notification sound
|
||||||
|
NotificationSoundId JsonInt64 `json:"notification_sound_id"`
|
||||||
|
}
|
||||||
|
|
||||||
|
// Returns saved notification sound by its identifier. Returns a 404 error if there is no saved notification sound with the specified identifier
|
||||||
|
func (client *Client) GetSavedNotificationSound(req *GetSavedNotificationSoundRequest) (*NotificationSounds, error) {
|
||||||
|
result, err := client.Send(Request{
|
||||||
|
meta: meta{
|
||||||
|
Type: "getSavedNotificationSound",
|
||||||
|
},
|
||||||
|
Data: map[string]interface{}{
|
||||||
|
"notification_sound_id": req.NotificationSoundId,
|
||||||
|
},
|
||||||
|
})
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
if result.Type == "error" {
|
||||||
|
return nil, buildResponseError(result.Data)
|
||||||
|
}
|
||||||
|
|
||||||
|
return UnmarshalNotificationSounds(result.Data)
|
||||||
|
}
|
||||||
|
|
||||||
|
// Returns list of saved notification sounds. If a sound isn't in the list, then default sound needs to be used
|
||||||
|
func (client *Client) GetSavedNotificationSounds() (*NotificationSounds, error) {
|
||||||
|
result, err := client.Send(Request{
|
||||||
|
meta: meta{
|
||||||
|
Type: "getSavedNotificationSounds",
|
||||||
|
},
|
||||||
|
Data: map[string]interface{}{},
|
||||||
|
})
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
if result.Type == "error" {
|
||||||
|
return nil, buildResponseError(result.Data)
|
||||||
|
}
|
||||||
|
|
||||||
|
return UnmarshalNotificationSounds(result.Data)
|
||||||
|
}
|
||||||
|
|
||||||
|
type AddSavedNotificationSoundRequest struct {
|
||||||
|
// Notification sound file to add
|
||||||
|
Sound InputFile `json:"sound"`
|
||||||
|
}
|
||||||
|
|
||||||
|
// Adds a new notification sound to the list of saved notification sounds. The new notification sound is added to the top of the list. If it is already in the list, its position isn't changed
|
||||||
|
func (client *Client) AddSavedNotificationSound(req *AddSavedNotificationSoundRequest) (*NotificationSound, error) {
|
||||||
|
result, err := client.Send(Request{
|
||||||
|
meta: meta{
|
||||||
|
Type: "addSavedNotificationSound",
|
||||||
|
},
|
||||||
|
Data: map[string]interface{}{
|
||||||
|
"sound": req.Sound,
|
||||||
|
},
|
||||||
|
})
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
if result.Type == "error" {
|
||||||
|
return nil, buildResponseError(result.Data)
|
||||||
|
}
|
||||||
|
|
||||||
|
return UnmarshalNotificationSound(result.Data)
|
||||||
|
}
|
||||||
|
|
||||||
|
type RemoveSavedNotificationSoundRequest struct {
|
||||||
|
// Identifier of the notification sound
|
||||||
|
NotificationSoundId JsonInt64 `json:"notification_sound_id"`
|
||||||
|
}
|
||||||
|
|
||||||
|
// Removes a notification sound from the list of saved notification sounds
|
||||||
|
func (client *Client) RemoveSavedNotificationSound(req *RemoveSavedNotificationSoundRequest) (*Ok, error) {
|
||||||
|
result, err := client.Send(Request{
|
||||||
|
meta: meta{
|
||||||
|
Type: "removeSavedNotificationSound",
|
||||||
|
},
|
||||||
|
Data: map[string]interface{}{
|
||||||
|
"notification_sound_id": req.NotificationSoundId,
|
||||||
|
},
|
||||||
|
})
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
if result.Type == "error" {
|
||||||
|
return nil, buildResponseError(result.Data)
|
||||||
|
}
|
||||||
|
|
||||||
|
return UnmarshalOk(result.Data)
|
||||||
|
}
|
||||||
|
|
||||||
type GetChatNotificationSettingsExceptionsRequest struct {
|
type GetChatNotificationSettingsExceptionsRequest struct {
|
||||||
// If specified, only chats from the scope will be returned; pass null to return chats from all scopes
|
// If specified, only chats from the scope will be returned; pass null to return chats from all scopes
|
||||||
Scope NotificationSettingsScope `json:"scope"`
|
Scope NotificationSettingsScope `json:"scope"`
|
||||||
|
@ -6406,7 +6697,7 @@ func (client *Client) SetScopeNotificationSettings(req *SetScopeNotificationSett
|
||||||
return UnmarshalOk(result.Data)
|
return UnmarshalOk(result.Data)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Resets all notification settings to their default values. By default, all chats are unmuted, the sound is set to "default" and message previews are shown
|
// Resets all notification settings to their default values. By default, all chats are unmuted and message previews are shown
|
||||||
func (client *Client) ResetAllNotificationSettings() (*Ok, error) {
|
func (client *Client) ResetAllNotificationSettings() (*Ok, error) {
|
||||||
result, err := client.Send(Request{
|
result, err := client.Send(Request{
|
||||||
meta: meta{
|
meta: meta{
|
||||||
|
@ -6486,6 +6777,61 @@ func (client *Client) SetPinnedChats(req *SetPinnedChatsRequest) (*Ok, error) {
|
||||||
return UnmarshalOk(result.Data)
|
return UnmarshalOk(result.Data)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
type GetAttachmentMenuBotRequest struct {
|
||||||
|
// Bot's user identifier
|
||||||
|
BotUserId int64 `json:"bot_user_id"`
|
||||||
|
}
|
||||||
|
|
||||||
|
// Returns information about a bot that can be added to attachment menu
|
||||||
|
func (client *Client) GetAttachmentMenuBot(req *GetAttachmentMenuBotRequest) (*AttachmentMenuBot, error) {
|
||||||
|
result, err := client.Send(Request{
|
||||||
|
meta: meta{
|
||||||
|
Type: "getAttachmentMenuBot",
|
||||||
|
},
|
||||||
|
Data: map[string]interface{}{
|
||||||
|
"bot_user_id": req.BotUserId,
|
||||||
|
},
|
||||||
|
})
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
if result.Type == "error" {
|
||||||
|
return nil, buildResponseError(result.Data)
|
||||||
|
}
|
||||||
|
|
||||||
|
return UnmarshalAttachmentMenuBot(result.Data)
|
||||||
|
}
|
||||||
|
|
||||||
|
type ToggleBotIsAddedToAttachmentMenuRequest struct {
|
||||||
|
// Bot's user identifier
|
||||||
|
BotUserId int64 `json:"bot_user_id"`
|
||||||
|
// Pass true to add the bot to attachment menu; pass false to remove the bot from attachment menu
|
||||||
|
IsAdded bool `json:"is_added"`
|
||||||
|
}
|
||||||
|
|
||||||
|
// Adds or removes a bot to attachment menu. Bot can be added to attachment menu, only if userTypeBot.can_be_added_to_attachment_menu == true
|
||||||
|
func (client *Client) ToggleBotIsAddedToAttachmentMenu(req *ToggleBotIsAddedToAttachmentMenuRequest) (*Ok, error) {
|
||||||
|
result, err := client.Send(Request{
|
||||||
|
meta: meta{
|
||||||
|
Type: "toggleBotIsAddedToAttachmentMenu",
|
||||||
|
},
|
||||||
|
Data: map[string]interface{}{
|
||||||
|
"bot_user_id": req.BotUserId,
|
||||||
|
"is_added": req.IsAdded,
|
||||||
|
},
|
||||||
|
})
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
if result.Type == "error" {
|
||||||
|
return nil, buildResponseError(result.Data)
|
||||||
|
}
|
||||||
|
|
||||||
|
return UnmarshalOk(result.Data)
|
||||||
|
}
|
||||||
|
|
||||||
type DownloadFileRequest struct {
|
type DownloadFileRequest struct {
|
||||||
// Identifier of the file to download
|
// Identifier of the file to download
|
||||||
FileId int32 `json:"file_id"`
|
FileId int32 `json:"file_id"`
|
||||||
|
@ -7830,7 +8176,7 @@ func (client *Client) SetVideoChatDefaultParticipant(req *SetVideoChatDefaultPar
|
||||||
}
|
}
|
||||||
|
|
||||||
type CreateVideoChatRequest struct {
|
type CreateVideoChatRequest struct {
|
||||||
// Chat identifier, in which the video chat will be created
|
// Identifier of a chat in which the video chat will be created
|
||||||
ChatId int64 `json:"chat_id"`
|
ChatId int64 `json:"chat_id"`
|
||||||
// Group call title; if empty, chat title will be used
|
// Group call title; if empty, chat title will be used
|
||||||
Title string `json:"title"`
|
Title string `json:"title"`
|
||||||
|
@ -10214,6 +10560,113 @@ func (client *Client) GetCommands(req *GetCommandsRequest) (*BotCommands, error)
|
||||||
return UnmarshalBotCommands(result.Data)
|
return UnmarshalBotCommands(result.Data)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
type SetMenuButtonRequest struct {
|
||||||
|
// Identifier of the user or 0 to set menu button for all users
|
||||||
|
UserId int64 `json:"user_id"`
|
||||||
|
// New menu button
|
||||||
|
MenuButton *BotMenuButton `json:"menu_button"`
|
||||||
|
}
|
||||||
|
|
||||||
|
// Sets menu button for the given user or for all users; for bots only
|
||||||
|
func (client *Client) SetMenuButton(req *SetMenuButtonRequest) (*Ok, error) {
|
||||||
|
result, err := client.Send(Request{
|
||||||
|
meta: meta{
|
||||||
|
Type: "setMenuButton",
|
||||||
|
},
|
||||||
|
Data: map[string]interface{}{
|
||||||
|
"user_id": req.UserId,
|
||||||
|
"menu_button": req.MenuButton,
|
||||||
|
},
|
||||||
|
})
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
if result.Type == "error" {
|
||||||
|
return nil, buildResponseError(result.Data)
|
||||||
|
}
|
||||||
|
|
||||||
|
return UnmarshalOk(result.Data)
|
||||||
|
}
|
||||||
|
|
||||||
|
type GetMenuButtonRequest struct {
|
||||||
|
// Identifier of the user or 0 to get the default menu button
|
||||||
|
UserId int64 `json:"user_id"`
|
||||||
|
}
|
||||||
|
|
||||||
|
// Returns menu button set by the bot for the given user; for bots only
|
||||||
|
func (client *Client) GetMenuButton(req *GetMenuButtonRequest) (*BotMenuButton, error) {
|
||||||
|
result, err := client.Send(Request{
|
||||||
|
meta: meta{
|
||||||
|
Type: "getMenuButton",
|
||||||
|
},
|
||||||
|
Data: map[string]interface{}{
|
||||||
|
"user_id": req.UserId,
|
||||||
|
},
|
||||||
|
})
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
if result.Type == "error" {
|
||||||
|
return nil, buildResponseError(result.Data)
|
||||||
|
}
|
||||||
|
|
||||||
|
return UnmarshalBotMenuButton(result.Data)
|
||||||
|
}
|
||||||
|
|
||||||
|
type SetDefaultGroupAdministratorRightsRequest struct {
|
||||||
|
// Default administrator rights for adding the bot to basic group and supergroup chats; may be null
|
||||||
|
DefaultGroupAdministratorRights *ChatAdministratorRights `json:"default_group_administrator_rights"`
|
||||||
|
}
|
||||||
|
|
||||||
|
// Sets default administrator rights for adding the bot to basic group and supergroup chats; for bots only
|
||||||
|
func (client *Client) SetDefaultGroupAdministratorRights(req *SetDefaultGroupAdministratorRightsRequest) (*Ok, error) {
|
||||||
|
result, err := client.Send(Request{
|
||||||
|
meta: meta{
|
||||||
|
Type: "setDefaultGroupAdministratorRights",
|
||||||
|
},
|
||||||
|
Data: map[string]interface{}{
|
||||||
|
"default_group_administrator_rights": req.DefaultGroupAdministratorRights,
|
||||||
|
},
|
||||||
|
})
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
if result.Type == "error" {
|
||||||
|
return nil, buildResponseError(result.Data)
|
||||||
|
}
|
||||||
|
|
||||||
|
return UnmarshalOk(result.Data)
|
||||||
|
}
|
||||||
|
|
||||||
|
type SetDefaultChannelAdministratorRightsRequest struct {
|
||||||
|
// Default administrator rights for adding the bot to channels; may be null
|
||||||
|
DefaultChannelAdministratorRights *ChatAdministratorRights `json:"default_channel_administrator_rights"`
|
||||||
|
}
|
||||||
|
|
||||||
|
// Sets default administrator rights for adding the bot to channel chats; for bots only
|
||||||
|
func (client *Client) SetDefaultChannelAdministratorRights(req *SetDefaultChannelAdministratorRightsRequest) (*Ok, error) {
|
||||||
|
result, err := client.Send(Request{
|
||||||
|
meta: meta{
|
||||||
|
Type: "setDefaultChannelAdministratorRights",
|
||||||
|
},
|
||||||
|
Data: map[string]interface{}{
|
||||||
|
"default_channel_administrator_rights": req.DefaultChannelAdministratorRights,
|
||||||
|
},
|
||||||
|
})
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
if result.Type == "error" {
|
||||||
|
return nil, buildResponseError(result.Data)
|
||||||
|
}
|
||||||
|
|
||||||
|
return UnmarshalOk(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{
|
||||||
|
@ -10705,7 +11158,7 @@ type GetPaymentFormRequest struct {
|
||||||
// Message identifier
|
// Message identifier
|
||||||
MessageId int64 `json:"message_id"`
|
MessageId int64 `json:"message_id"`
|
||||||
// Preferred payment form theme; pass null to use the default theme
|
// Preferred payment form theme; pass null to use the default theme
|
||||||
Theme *PaymentFormTheme `json:"theme"`
|
Theme *ThemeParameters `json:"theme"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// Returns an invoice payment form. This method must be called when the user presses inlineKeyboardButtonBuy
|
// Returns an invoice payment form. This method must be called when the user presses inlineKeyboardButtonBuy
|
||||||
|
@ -12973,7 +13426,7 @@ type GetMapThumbnailFileRequest struct {
|
||||||
Height int32 `json:"height"`
|
Height int32 `json:"height"`
|
||||||
// Map scale; 1-3
|
// Map scale; 1-3
|
||||||
Scale int32 `json:"scale"`
|
Scale int32 `json:"scale"`
|
||||||
// Identifier of a chat, in which the thumbnail will be shown. Use 0 if unknown
|
// Identifier of a chat in which the thumbnail will be shown. Use 0 if unknown
|
||||||
ChatId int64 `json:"chat_id"`
|
ChatId int64 `json:"chat_id"`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -14015,7 +14468,7 @@ type TestProxyRequest struct {
|
||||||
Port int32 `json:"port"`
|
Port int32 `json:"port"`
|
||||||
// Proxy type
|
// Proxy type
|
||||||
Type ProxyType `json:"type"`
|
Type ProxyType `json:"type"`
|
||||||
// Identifier of a datacenter, with which to test connection
|
// Identifier of a datacenter with which to test connection
|
||||||
DcId int32 `json:"dc_id"`
|
DcId int32 `json:"dc_id"`
|
||||||
// The maximum overall timeout for the request
|
// The maximum overall timeout for the request
|
||||||
Timeout float64 `json:"timeout"`
|
Timeout float64 `json:"timeout"`
|
||||||
|
@ -14313,6 +14766,9 @@ func (client *Client) TestUseUpdate() (Update, error) {
|
||||||
case TypeUpdateSavedAnimations:
|
case TypeUpdateSavedAnimations:
|
||||||
return UnmarshalUpdateSavedAnimations(result.Data)
|
return UnmarshalUpdateSavedAnimations(result.Data)
|
||||||
|
|
||||||
|
case TypeUpdateSavedNotificationSounds:
|
||||||
|
return UnmarshalUpdateSavedNotificationSounds(result.Data)
|
||||||
|
|
||||||
case TypeUpdateSelectedBackground:
|
case TypeUpdateSelectedBackground:
|
||||||
return UnmarshalUpdateSelectedBackground(result.Data)
|
return UnmarshalUpdateSelectedBackground(result.Data)
|
||||||
|
|
||||||
|
@ -14331,6 +14787,12 @@ func (client *Client) TestUseUpdate() (Update, error) {
|
||||||
case TypeUpdateUsersNearby:
|
case TypeUpdateUsersNearby:
|
||||||
return UnmarshalUpdateUsersNearby(result.Data)
|
return UnmarshalUpdateUsersNearby(result.Data)
|
||||||
|
|
||||||
|
case TypeUpdateAttachmentMenuBots:
|
||||||
|
return UnmarshalUpdateAttachmentMenuBots(result.Data)
|
||||||
|
|
||||||
|
case TypeUpdateWebAppMessageSent:
|
||||||
|
return UnmarshalUpdateWebAppMessageSent(result.Data)
|
||||||
|
|
||||||
case TypeUpdateReactions:
|
case TypeUpdateReactions:
|
||||||
return UnmarshalUpdateReactions(result.Data)
|
return UnmarshalUpdateReactions(result.Data)
|
||||||
|
|
||||||
|
|
844
client/type.go
844
client/type.go
File diff suppressed because it is too large
Load diff
|
@ -938,6 +938,9 @@ func UnmarshalKeyboardButtonType(data json.RawMessage) (KeyboardButtonType, erro
|
||||||
case TypeKeyboardButtonTypeRequestPoll:
|
case TypeKeyboardButtonTypeRequestPoll:
|
||||||
return UnmarshalKeyboardButtonTypeRequestPoll(data)
|
return UnmarshalKeyboardButtonTypeRequestPoll(data)
|
||||||
|
|
||||||
|
case TypeKeyboardButtonTypeWebApp:
|
||||||
|
return UnmarshalKeyboardButtonTypeWebApp(data)
|
||||||
|
|
||||||
default:
|
default:
|
||||||
return nil, fmt.Errorf("Error unmarshaling. Unknown type: " + meta.Type)
|
return nil, fmt.Errorf("Error unmarshaling. Unknown type: " + meta.Type)
|
||||||
}
|
}
|
||||||
|
@ -972,6 +975,9 @@ func UnmarshalInlineKeyboardButtonType(data json.RawMessage) (InlineKeyboardButt
|
||||||
case TypeInlineKeyboardButtonTypeLoginUrl:
|
case TypeInlineKeyboardButtonTypeLoginUrl:
|
||||||
return UnmarshalInlineKeyboardButtonTypeLoginUrl(data)
|
return UnmarshalInlineKeyboardButtonTypeLoginUrl(data)
|
||||||
|
|
||||||
|
case TypeInlineKeyboardButtonTypeWebApp:
|
||||||
|
return UnmarshalInlineKeyboardButtonTypeWebApp(data)
|
||||||
|
|
||||||
case TypeInlineKeyboardButtonTypeCallback:
|
case TypeInlineKeyboardButtonTypeCallback:
|
||||||
return UnmarshalInlineKeyboardButtonTypeCallback(data)
|
return UnmarshalInlineKeyboardButtonTypeCallback(data)
|
||||||
|
|
||||||
|
@ -1846,6 +1852,12 @@ func UnmarshalMessageContent(data json.RawMessage) (MessageContent, error) {
|
||||||
case TypeMessageWebsiteConnected:
|
case TypeMessageWebsiteConnected:
|
||||||
return UnmarshalMessageWebsiteConnected(data)
|
return UnmarshalMessageWebsiteConnected(data)
|
||||||
|
|
||||||
|
case TypeMessageWebAppDataSent:
|
||||||
|
return UnmarshalMessageWebAppDataSent(data)
|
||||||
|
|
||||||
|
case TypeMessageWebAppDataReceived:
|
||||||
|
return UnmarshalMessageWebAppDataReceived(data)
|
||||||
|
|
||||||
case TypeMessagePassportDataSent:
|
case TypeMessagePassportDataSent:
|
||||||
return UnmarshalMessagePassportDataSent(data)
|
return UnmarshalMessagePassportDataSent(data)
|
||||||
|
|
||||||
|
@ -3672,6 +3684,9 @@ func UnmarshalInternalLinkType(data json.RawMessage) (InternalLinkType, error) {
|
||||||
case TypeInternalLinkTypeActiveSessions:
|
case TypeInternalLinkTypeActiveSessions:
|
||||||
return UnmarshalInternalLinkTypeActiveSessions(data)
|
return UnmarshalInternalLinkTypeActiveSessions(data)
|
||||||
|
|
||||||
|
case TypeInternalLinkTypeAttachmentMenuBot:
|
||||||
|
return UnmarshalInternalLinkTypeAttachmentMenuBot(data)
|
||||||
|
|
||||||
case TypeInternalLinkTypeAuthenticationCode:
|
case TypeInternalLinkTypeAuthenticationCode:
|
||||||
return UnmarshalInternalLinkTypeAuthenticationCode(data)
|
return UnmarshalInternalLinkTypeAuthenticationCode(data)
|
||||||
|
|
||||||
|
@ -3684,6 +3699,9 @@ func UnmarshalInternalLinkType(data json.RawMessage) (InternalLinkType, error) {
|
||||||
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)
|
||||||
|
|
||||||
|
@ -3790,6 +3808,9 @@ func UnmarshalFileType(data json.RawMessage) (FileType, error) {
|
||||||
case TypeFileTypeDocument:
|
case TypeFileTypeDocument:
|
||||||
return UnmarshalFileTypeDocument(data)
|
return UnmarshalFileTypeDocument(data)
|
||||||
|
|
||||||
|
case TypeFileTypeNotificationSound:
|
||||||
|
return UnmarshalFileTypeNotificationSound(data)
|
||||||
|
|
||||||
case TypeFileTypePhoto:
|
case TypeFileTypePhoto:
|
||||||
return UnmarshalFileTypePhoto(data)
|
return UnmarshalFileTypePhoto(data)
|
||||||
|
|
||||||
|
@ -4565,6 +4586,9 @@ func UnmarshalUpdate(data json.RawMessage) (Update, error) {
|
||||||
case TypeUpdateSavedAnimations:
|
case TypeUpdateSavedAnimations:
|
||||||
return UnmarshalUpdateSavedAnimations(data)
|
return UnmarshalUpdateSavedAnimations(data)
|
||||||
|
|
||||||
|
case TypeUpdateSavedNotificationSounds:
|
||||||
|
return UnmarshalUpdateSavedNotificationSounds(data)
|
||||||
|
|
||||||
case TypeUpdateSelectedBackground:
|
case TypeUpdateSelectedBackground:
|
||||||
return UnmarshalUpdateSelectedBackground(data)
|
return UnmarshalUpdateSelectedBackground(data)
|
||||||
|
|
||||||
|
@ -4583,6 +4607,12 @@ func UnmarshalUpdate(data json.RawMessage) (Update, error) {
|
||||||
case TypeUpdateUsersNearby:
|
case TypeUpdateUsersNearby:
|
||||||
return UnmarshalUpdateUsersNearby(data)
|
return UnmarshalUpdateUsersNearby(data)
|
||||||
|
|
||||||
|
case TypeUpdateAttachmentMenuBots:
|
||||||
|
return UnmarshalUpdateAttachmentMenuBots(data)
|
||||||
|
|
||||||
|
case TypeUpdateWebAppMessageSent:
|
||||||
|
return UnmarshalUpdateWebAppMessageSent(data)
|
||||||
|
|
||||||
case TypeUpdateReactions:
|
case TypeUpdateReactions:
|
||||||
return UnmarshalUpdateReactions(data)
|
return UnmarshalUpdateReactions(data)
|
||||||
|
|
||||||
|
@ -5330,6 +5360,14 @@ func UnmarshalBotCommands(data json.RawMessage) (*BotCommands, error) {
|
||||||
return &resp, err
|
return &resp, err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func UnmarshalBotMenuButton(data json.RawMessage) (*BotMenuButton, error) {
|
||||||
|
var resp BotMenuButton
|
||||||
|
|
||||||
|
err := json.Unmarshal(data, &resp)
|
||||||
|
|
||||||
|
return &resp, err
|
||||||
|
}
|
||||||
|
|
||||||
func UnmarshalChatLocation(data json.RawMessage) (*ChatLocation, error) {
|
func UnmarshalChatLocation(data json.RawMessage) (*ChatLocation, error) {
|
||||||
var resp ChatLocation
|
var resp ChatLocation
|
||||||
|
|
||||||
|
@ -5386,6 +5424,22 @@ func UnmarshalInputChatPhotoAnimation(data json.RawMessage) (*InputChatPhotoAnim
|
||||||
return &resp, err
|
return &resp, err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func UnmarshalChatPermissions(data json.RawMessage) (*ChatPermissions, error) {
|
||||||
|
var resp ChatPermissions
|
||||||
|
|
||||||
|
err := json.Unmarshal(data, &resp)
|
||||||
|
|
||||||
|
return &resp, err
|
||||||
|
}
|
||||||
|
|
||||||
|
func UnmarshalChatAdministratorRights(data json.RawMessage) (*ChatAdministratorRights, error) {
|
||||||
|
var resp ChatAdministratorRights
|
||||||
|
|
||||||
|
err := json.Unmarshal(data, &resp)
|
||||||
|
|
||||||
|
return &resp, err
|
||||||
|
}
|
||||||
|
|
||||||
func UnmarshalUser(data json.RawMessage) (*User, error) {
|
func UnmarshalUser(data json.RawMessage) (*User, error) {
|
||||||
var resp User
|
var resp User
|
||||||
|
|
||||||
|
@ -5394,6 +5448,14 @@ func UnmarshalUser(data json.RawMessage) (*User, error) {
|
||||||
return &resp, err
|
return &resp, err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func UnmarshalBotInfo(data json.RawMessage) (*BotInfo, error) {
|
||||||
|
var resp BotInfo
|
||||||
|
|
||||||
|
err := json.Unmarshal(data, &resp)
|
||||||
|
|
||||||
|
return &resp, err
|
||||||
|
}
|
||||||
|
|
||||||
func UnmarshalUserFullInfo(data json.RawMessage) (*UserFullInfo, error) {
|
func UnmarshalUserFullInfo(data json.RawMessage) (*UserFullInfo, error) {
|
||||||
var resp UserFullInfo
|
var resp UserFullInfo
|
||||||
|
|
||||||
|
@ -5426,14 +5488,6 @@ func UnmarshalChatAdministrators(data json.RawMessage) (*ChatAdministrators, err
|
||||||
return &resp, err
|
return &resp, err
|
||||||
}
|
}
|
||||||
|
|
||||||
func UnmarshalChatPermissions(data json.RawMessage) (*ChatPermissions, error) {
|
|
||||||
var resp ChatPermissions
|
|
||||||
|
|
||||||
err := json.Unmarshal(data, &resp)
|
|
||||||
|
|
||||||
return &resp, err
|
|
||||||
}
|
|
||||||
|
|
||||||
func UnmarshalChatMemberStatusCreator(data json.RawMessage) (*ChatMemberStatusCreator, error) {
|
func UnmarshalChatMemberStatusCreator(data json.RawMessage) (*ChatMemberStatusCreator, error) {
|
||||||
var resp ChatMemberStatusCreator
|
var resp ChatMemberStatusCreator
|
||||||
|
|
||||||
|
@ -6282,6 +6336,14 @@ func UnmarshalKeyboardButtonTypeRequestPoll(data json.RawMessage) (*KeyboardButt
|
||||||
return &resp, err
|
return &resp, err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func UnmarshalKeyboardButtonTypeWebApp(data json.RawMessage) (*KeyboardButtonTypeWebApp, error) {
|
||||||
|
var resp KeyboardButtonTypeWebApp
|
||||||
|
|
||||||
|
err := json.Unmarshal(data, &resp)
|
||||||
|
|
||||||
|
return &resp, err
|
||||||
|
}
|
||||||
|
|
||||||
func UnmarshalKeyboardButton(data json.RawMessage) (*KeyboardButton, error) {
|
func UnmarshalKeyboardButton(data json.RawMessage) (*KeyboardButton, error) {
|
||||||
var resp KeyboardButton
|
var resp KeyboardButton
|
||||||
|
|
||||||
|
@ -6306,6 +6368,14 @@ func UnmarshalInlineKeyboardButtonTypeLoginUrl(data json.RawMessage) (*InlineKey
|
||||||
return &resp, err
|
return &resp, err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func UnmarshalInlineKeyboardButtonTypeWebApp(data json.RawMessage) (*InlineKeyboardButtonTypeWebApp, error) {
|
||||||
|
var resp InlineKeyboardButtonTypeWebApp
|
||||||
|
|
||||||
|
err := json.Unmarshal(data, &resp)
|
||||||
|
|
||||||
|
return &resp, err
|
||||||
|
}
|
||||||
|
|
||||||
func UnmarshalInlineKeyboardButtonTypeCallback(data json.RawMessage) (*InlineKeyboardButtonTypeCallback, error) {
|
func UnmarshalInlineKeyboardButtonTypeCallback(data json.RawMessage) (*InlineKeyboardButtonTypeCallback, error) {
|
||||||
var resp InlineKeyboardButtonTypeCallback
|
var resp InlineKeyboardButtonTypeCallback
|
||||||
|
|
||||||
|
@ -6410,6 +6480,14 @@ func UnmarshalLoginUrlInfoRequestConfirmation(data json.RawMessage) (*LoginUrlIn
|
||||||
return &resp, err
|
return &resp, err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func UnmarshalWebAppInfo(data json.RawMessage) (*WebAppInfo, error) {
|
||||||
|
var resp WebAppInfo
|
||||||
|
|
||||||
|
err := json.Unmarshal(data, &resp)
|
||||||
|
|
||||||
|
return &resp, err
|
||||||
|
}
|
||||||
|
|
||||||
func UnmarshalMessageThreadInfo(data json.RawMessage) (*MessageThreadInfo, error) {
|
func UnmarshalMessageThreadInfo(data json.RawMessage) (*MessageThreadInfo, error) {
|
||||||
var resp MessageThreadInfo
|
var resp MessageThreadInfo
|
||||||
|
|
||||||
|
@ -6930,6 +7008,14 @@ func UnmarshalAddress(data json.RawMessage) (*Address, error) {
|
||||||
return &resp, err
|
return &resp, err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func UnmarshalThemeParameters(data json.RawMessage) (*ThemeParameters, error) {
|
||||||
|
var resp ThemeParameters
|
||||||
|
|
||||||
|
err := json.Unmarshal(data, &resp)
|
||||||
|
|
||||||
|
return &resp, err
|
||||||
|
}
|
||||||
|
|
||||||
func UnmarshalLabeledPricePart(data json.RawMessage) (*LabeledPricePart, error) {
|
func UnmarshalLabeledPricePart(data json.RawMessage) (*LabeledPricePart, error) {
|
||||||
var resp LabeledPricePart
|
var resp LabeledPricePart
|
||||||
|
|
||||||
|
@ -7010,14 +7096,6 @@ func UnmarshalPaymentsProviderStripe(data json.RawMessage) (*PaymentsProviderStr
|
||||||
return &resp, err
|
return &resp, err
|
||||||
}
|
}
|
||||||
|
|
||||||
func UnmarshalPaymentFormTheme(data json.RawMessage) (*PaymentFormTheme, error) {
|
|
||||||
var resp PaymentFormTheme
|
|
||||||
|
|
||||||
err := json.Unmarshal(data, &resp)
|
|
||||||
|
|
||||||
return &resp, err
|
|
||||||
}
|
|
||||||
|
|
||||||
func UnmarshalPaymentForm(data json.RawMessage) (*PaymentForm, error) {
|
func UnmarshalPaymentForm(data json.RawMessage) (*PaymentForm, error) {
|
||||||
var resp PaymentForm
|
var resp PaymentForm
|
||||||
|
|
||||||
|
@ -7994,6 +8072,22 @@ func UnmarshalMessageWebsiteConnected(data json.RawMessage) (*MessageWebsiteConn
|
||||||
return &resp, err
|
return &resp, err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func UnmarshalMessageWebAppDataSent(data json.RawMessage) (*MessageWebAppDataSent, error) {
|
||||||
|
var resp MessageWebAppDataSent
|
||||||
|
|
||||||
|
err := json.Unmarshal(data, &resp)
|
||||||
|
|
||||||
|
return &resp, err
|
||||||
|
}
|
||||||
|
|
||||||
|
func UnmarshalMessageWebAppDataReceived(data json.RawMessage) (*MessageWebAppDataReceived, error) {
|
||||||
|
var resp MessageWebAppDataReceived
|
||||||
|
|
||||||
|
err := json.Unmarshal(data, &resp)
|
||||||
|
|
||||||
|
return &resp, err
|
||||||
|
}
|
||||||
|
|
||||||
func UnmarshalMessagePassportDataSent(data json.RawMessage) (*MessagePassportDataSent, error) {
|
func UnmarshalMessagePassportDataSent(data json.RawMessage) (*MessagePassportDataSent, error) {
|
||||||
var resp MessagePassportDataSent
|
var resp MessagePassportDataSent
|
||||||
|
|
||||||
|
@ -9074,6 +9168,30 @@ func UnmarshalImportedContacts(data json.RawMessage) (*ImportedContacts, error)
|
||||||
return &resp, err
|
return &resp, err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func UnmarshalAttachmentMenuBotColor(data json.RawMessage) (*AttachmentMenuBotColor, error) {
|
||||||
|
var resp AttachmentMenuBotColor
|
||||||
|
|
||||||
|
err := json.Unmarshal(data, &resp)
|
||||||
|
|
||||||
|
return &resp, err
|
||||||
|
}
|
||||||
|
|
||||||
|
func UnmarshalAttachmentMenuBot(data json.RawMessage) (*AttachmentMenuBot, error) {
|
||||||
|
var resp AttachmentMenuBot
|
||||||
|
|
||||||
|
err := json.Unmarshal(data, &resp)
|
||||||
|
|
||||||
|
return &resp, err
|
||||||
|
}
|
||||||
|
|
||||||
|
func UnmarshalSentWebAppMessage(data json.RawMessage) (*SentWebAppMessage, error) {
|
||||||
|
var resp SentWebAppMessage
|
||||||
|
|
||||||
|
err := json.Unmarshal(data, &resp)
|
||||||
|
|
||||||
|
return &resp, err
|
||||||
|
}
|
||||||
|
|
||||||
func UnmarshalHttpUrl(data json.RawMessage) (*HttpUrl, error) {
|
func UnmarshalHttpUrl(data json.RawMessage) (*HttpUrl, error) {
|
||||||
var resp HttpUrl
|
var resp HttpUrl
|
||||||
|
|
||||||
|
@ -10330,6 +10448,22 @@ func UnmarshalNotificationGroupTypeCalls(data json.RawMessage) (*NotificationGro
|
||||||
return &resp, err
|
return &resp, err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func UnmarshalNotificationSound(data json.RawMessage) (*NotificationSound, error) {
|
||||||
|
var resp NotificationSound
|
||||||
|
|
||||||
|
err := json.Unmarshal(data, &resp)
|
||||||
|
|
||||||
|
return &resp, err
|
||||||
|
}
|
||||||
|
|
||||||
|
func UnmarshalNotificationSounds(data json.RawMessage) (*NotificationSounds, error) {
|
||||||
|
var resp NotificationSounds
|
||||||
|
|
||||||
|
err := json.Unmarshal(data, &resp)
|
||||||
|
|
||||||
|
return &resp, err
|
||||||
|
}
|
||||||
|
|
||||||
func UnmarshalNotification(data json.RawMessage) (*Notification, error) {
|
func UnmarshalNotification(data json.RawMessage) (*Notification, error) {
|
||||||
var resp Notification
|
var resp Notification
|
||||||
|
|
||||||
|
@ -10698,6 +10832,14 @@ func UnmarshalInternalLinkTypeActiveSessions(data json.RawMessage) (*InternalLin
|
||||||
return &resp, err
|
return &resp, err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func UnmarshalInternalLinkTypeAttachmentMenuBot(data json.RawMessage) (*InternalLinkTypeAttachmentMenuBot, error) {
|
||||||
|
var resp InternalLinkTypeAttachmentMenuBot
|
||||||
|
|
||||||
|
err := json.Unmarshal(data, &resp)
|
||||||
|
|
||||||
|
return &resp, err
|
||||||
|
}
|
||||||
|
|
||||||
func UnmarshalInternalLinkTypeAuthenticationCode(data json.RawMessage) (*InternalLinkTypeAuthenticationCode, error) {
|
func UnmarshalInternalLinkTypeAuthenticationCode(data json.RawMessage) (*InternalLinkTypeAuthenticationCode, error) {
|
||||||
var resp InternalLinkTypeAuthenticationCode
|
var resp InternalLinkTypeAuthenticationCode
|
||||||
|
|
||||||
|
@ -10730,6 +10872,14 @@ 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
|
||||||
|
|
||||||
|
@ -10962,6 +11112,14 @@ func UnmarshalFileTypeDocument(data json.RawMessage) (*FileTypeDocument, error)
|
||||||
return &resp, err
|
return &resp, err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func UnmarshalFileTypeNotificationSound(data json.RawMessage) (*FileTypeNotificationSound, error) {
|
||||||
|
var resp FileTypeNotificationSound
|
||||||
|
|
||||||
|
err := json.Unmarshal(data, &resp)
|
||||||
|
|
||||||
|
return &resp, err
|
||||||
|
}
|
||||||
|
|
||||||
func UnmarshalFileTypePhoto(data json.RawMessage) (*FileTypePhoto, error) {
|
func UnmarshalFileTypePhoto(data json.RawMessage) (*FileTypePhoto, error) {
|
||||||
var resp FileTypePhoto
|
var resp FileTypePhoto
|
||||||
|
|
||||||
|
@ -12258,6 +12416,14 @@ func UnmarshalUpdateSavedAnimations(data json.RawMessage) (*UpdateSavedAnimation
|
||||||
return &resp, err
|
return &resp, err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func UnmarshalUpdateSavedNotificationSounds(data json.RawMessage) (*UpdateSavedNotificationSounds, error) {
|
||||||
|
var resp UpdateSavedNotificationSounds
|
||||||
|
|
||||||
|
err := json.Unmarshal(data, &resp)
|
||||||
|
|
||||||
|
return &resp, err
|
||||||
|
}
|
||||||
|
|
||||||
func UnmarshalUpdateSelectedBackground(data json.RawMessage) (*UpdateSelectedBackground, error) {
|
func UnmarshalUpdateSelectedBackground(data json.RawMessage) (*UpdateSelectedBackground, error) {
|
||||||
var resp UpdateSelectedBackground
|
var resp UpdateSelectedBackground
|
||||||
|
|
||||||
|
@ -12306,6 +12472,22 @@ func UnmarshalUpdateUsersNearby(data json.RawMessage) (*UpdateUsersNearby, error
|
||||||
return &resp, err
|
return &resp, err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func UnmarshalUpdateAttachmentMenuBots(data json.RawMessage) (*UpdateAttachmentMenuBots, error) {
|
||||||
|
var resp UpdateAttachmentMenuBots
|
||||||
|
|
||||||
|
err := json.Unmarshal(data, &resp)
|
||||||
|
|
||||||
|
return &resp, err
|
||||||
|
}
|
||||||
|
|
||||||
|
func UnmarshalUpdateWebAppMessageSent(data json.RawMessage) (*UpdateWebAppMessageSent, error) {
|
||||||
|
var resp UpdateWebAppMessageSent
|
||||||
|
|
||||||
|
err := json.Unmarshal(data, &resp)
|
||||||
|
|
||||||
|
return &resp, err
|
||||||
|
}
|
||||||
|
|
||||||
func UnmarshalUpdateReactions(data json.RawMessage) (*UpdateReactions, error) {
|
func UnmarshalUpdateReactions(data json.RawMessage) (*UpdateReactions, error) {
|
||||||
var resp UpdateReactions
|
var resp UpdateReactions
|
||||||
|
|
||||||
|
@ -12795,6 +12977,9 @@ func UnmarshalType(data json.RawMessage) (Type, error) {
|
||||||
case TypeBotCommands:
|
case TypeBotCommands:
|
||||||
return UnmarshalBotCommands(data)
|
return UnmarshalBotCommands(data)
|
||||||
|
|
||||||
|
case TypeBotMenuButton:
|
||||||
|
return UnmarshalBotMenuButton(data)
|
||||||
|
|
||||||
case TypeChatLocation:
|
case TypeChatLocation:
|
||||||
return UnmarshalChatLocation(data)
|
return UnmarshalChatLocation(data)
|
||||||
|
|
||||||
|
@ -12816,9 +13001,18 @@ func UnmarshalType(data json.RawMessage) (Type, error) {
|
||||||
case TypeInputChatPhotoAnimation:
|
case TypeInputChatPhotoAnimation:
|
||||||
return UnmarshalInputChatPhotoAnimation(data)
|
return UnmarshalInputChatPhotoAnimation(data)
|
||||||
|
|
||||||
|
case TypeChatPermissions:
|
||||||
|
return UnmarshalChatPermissions(data)
|
||||||
|
|
||||||
|
case TypeChatAdministratorRights:
|
||||||
|
return UnmarshalChatAdministratorRights(data)
|
||||||
|
|
||||||
case TypeUser:
|
case TypeUser:
|
||||||
return UnmarshalUser(data)
|
return UnmarshalUser(data)
|
||||||
|
|
||||||
|
case TypeBotInfo:
|
||||||
|
return UnmarshalBotInfo(data)
|
||||||
|
|
||||||
case TypeUserFullInfo:
|
case TypeUserFullInfo:
|
||||||
return UnmarshalUserFullInfo(data)
|
return UnmarshalUserFullInfo(data)
|
||||||
|
|
||||||
|
@ -12831,9 +13025,6 @@ func UnmarshalType(data json.RawMessage) (Type, error) {
|
||||||
case TypeChatAdministrators:
|
case TypeChatAdministrators:
|
||||||
return UnmarshalChatAdministrators(data)
|
return UnmarshalChatAdministrators(data)
|
||||||
|
|
||||||
case TypeChatPermissions:
|
|
||||||
return UnmarshalChatPermissions(data)
|
|
||||||
|
|
||||||
case TypeChatMemberStatusCreator:
|
case TypeChatMemberStatusCreator:
|
||||||
return UnmarshalChatMemberStatusCreator(data)
|
return UnmarshalChatMemberStatusCreator(data)
|
||||||
|
|
||||||
|
@ -13152,6 +13343,9 @@ func UnmarshalType(data json.RawMessage) (Type, error) {
|
||||||
case TypeKeyboardButtonTypeRequestPoll:
|
case TypeKeyboardButtonTypeRequestPoll:
|
||||||
return UnmarshalKeyboardButtonTypeRequestPoll(data)
|
return UnmarshalKeyboardButtonTypeRequestPoll(data)
|
||||||
|
|
||||||
|
case TypeKeyboardButtonTypeWebApp:
|
||||||
|
return UnmarshalKeyboardButtonTypeWebApp(data)
|
||||||
|
|
||||||
case TypeKeyboardButton:
|
case TypeKeyboardButton:
|
||||||
return UnmarshalKeyboardButton(data)
|
return UnmarshalKeyboardButton(data)
|
||||||
|
|
||||||
|
@ -13161,6 +13355,9 @@ func UnmarshalType(data json.RawMessage) (Type, error) {
|
||||||
case TypeInlineKeyboardButtonTypeLoginUrl:
|
case TypeInlineKeyboardButtonTypeLoginUrl:
|
||||||
return UnmarshalInlineKeyboardButtonTypeLoginUrl(data)
|
return UnmarshalInlineKeyboardButtonTypeLoginUrl(data)
|
||||||
|
|
||||||
|
case TypeInlineKeyboardButtonTypeWebApp:
|
||||||
|
return UnmarshalInlineKeyboardButtonTypeWebApp(data)
|
||||||
|
|
||||||
case TypeInlineKeyboardButtonTypeCallback:
|
case TypeInlineKeyboardButtonTypeCallback:
|
||||||
return UnmarshalInlineKeyboardButtonTypeCallback(data)
|
return UnmarshalInlineKeyboardButtonTypeCallback(data)
|
||||||
|
|
||||||
|
@ -13200,6 +13397,9 @@ func UnmarshalType(data json.RawMessage) (Type, error) {
|
||||||
case TypeLoginUrlInfoRequestConfirmation:
|
case TypeLoginUrlInfoRequestConfirmation:
|
||||||
return UnmarshalLoginUrlInfoRequestConfirmation(data)
|
return UnmarshalLoginUrlInfoRequestConfirmation(data)
|
||||||
|
|
||||||
|
case TypeWebAppInfo:
|
||||||
|
return UnmarshalWebAppInfo(data)
|
||||||
|
|
||||||
case TypeMessageThreadInfo:
|
case TypeMessageThreadInfo:
|
||||||
return UnmarshalMessageThreadInfo(data)
|
return UnmarshalMessageThreadInfo(data)
|
||||||
|
|
||||||
|
@ -13395,6 +13595,9 @@ func UnmarshalType(data json.RawMessage) (Type, error) {
|
||||||
case TypeAddress:
|
case TypeAddress:
|
||||||
return UnmarshalAddress(data)
|
return UnmarshalAddress(data)
|
||||||
|
|
||||||
|
case TypeThemeParameters:
|
||||||
|
return UnmarshalThemeParameters(data)
|
||||||
|
|
||||||
case TypeLabeledPricePart:
|
case TypeLabeledPricePart:
|
||||||
return UnmarshalLabeledPricePart(data)
|
return UnmarshalLabeledPricePart(data)
|
||||||
|
|
||||||
|
@ -13425,9 +13628,6 @@ func UnmarshalType(data json.RawMessage) (Type, error) {
|
||||||
case TypePaymentsProviderStripe:
|
case TypePaymentsProviderStripe:
|
||||||
return UnmarshalPaymentsProviderStripe(data)
|
return UnmarshalPaymentsProviderStripe(data)
|
||||||
|
|
||||||
case TypePaymentFormTheme:
|
|
||||||
return UnmarshalPaymentFormTheme(data)
|
|
||||||
|
|
||||||
case TypePaymentForm:
|
case TypePaymentForm:
|
||||||
return UnmarshalPaymentForm(data)
|
return UnmarshalPaymentForm(data)
|
||||||
|
|
||||||
|
@ -13794,6 +13994,12 @@ func UnmarshalType(data json.RawMessage) (Type, error) {
|
||||||
case TypeMessageWebsiteConnected:
|
case TypeMessageWebsiteConnected:
|
||||||
return UnmarshalMessageWebsiteConnected(data)
|
return UnmarshalMessageWebsiteConnected(data)
|
||||||
|
|
||||||
|
case TypeMessageWebAppDataSent:
|
||||||
|
return UnmarshalMessageWebAppDataSent(data)
|
||||||
|
|
||||||
|
case TypeMessageWebAppDataReceived:
|
||||||
|
return UnmarshalMessageWebAppDataReceived(data)
|
||||||
|
|
||||||
case TypeMessagePassportDataSent:
|
case TypeMessagePassportDataSent:
|
||||||
return UnmarshalMessagePassportDataSent(data)
|
return UnmarshalMessagePassportDataSent(data)
|
||||||
|
|
||||||
|
@ -14199,6 +14405,15 @@ func UnmarshalType(data json.RawMessage) (Type, error) {
|
||||||
case TypeImportedContacts:
|
case TypeImportedContacts:
|
||||||
return UnmarshalImportedContacts(data)
|
return UnmarshalImportedContacts(data)
|
||||||
|
|
||||||
|
case TypeAttachmentMenuBotColor:
|
||||||
|
return UnmarshalAttachmentMenuBotColor(data)
|
||||||
|
|
||||||
|
case TypeAttachmentMenuBot:
|
||||||
|
return UnmarshalAttachmentMenuBot(data)
|
||||||
|
|
||||||
|
case TypeSentWebAppMessage:
|
||||||
|
return UnmarshalSentWebAppMessage(data)
|
||||||
|
|
||||||
case TypeHttpUrl:
|
case TypeHttpUrl:
|
||||||
return UnmarshalHttpUrl(data)
|
return UnmarshalHttpUrl(data)
|
||||||
|
|
||||||
|
@ -14670,6 +14885,12 @@ func UnmarshalType(data json.RawMessage) (Type, error) {
|
||||||
case TypeNotificationGroupTypeCalls:
|
case TypeNotificationGroupTypeCalls:
|
||||||
return UnmarshalNotificationGroupTypeCalls(data)
|
return UnmarshalNotificationGroupTypeCalls(data)
|
||||||
|
|
||||||
|
case TypeNotificationSound:
|
||||||
|
return UnmarshalNotificationSound(data)
|
||||||
|
|
||||||
|
case TypeNotificationSounds:
|
||||||
|
return UnmarshalNotificationSounds(data)
|
||||||
|
|
||||||
case TypeNotification:
|
case TypeNotification:
|
||||||
return UnmarshalNotification(data)
|
return UnmarshalNotification(data)
|
||||||
|
|
||||||
|
@ -14808,6 +15029,9 @@ func UnmarshalType(data json.RawMessage) (Type, error) {
|
||||||
case TypeInternalLinkTypeActiveSessions:
|
case TypeInternalLinkTypeActiveSessions:
|
||||||
return UnmarshalInternalLinkTypeActiveSessions(data)
|
return UnmarshalInternalLinkTypeActiveSessions(data)
|
||||||
|
|
||||||
|
case TypeInternalLinkTypeAttachmentMenuBot:
|
||||||
|
return UnmarshalInternalLinkTypeAttachmentMenuBot(data)
|
||||||
|
|
||||||
case TypeInternalLinkTypeAuthenticationCode:
|
case TypeInternalLinkTypeAuthenticationCode:
|
||||||
return UnmarshalInternalLinkTypeAuthenticationCode(data)
|
return UnmarshalInternalLinkTypeAuthenticationCode(data)
|
||||||
|
|
||||||
|
@ -14820,6 +15044,9 @@ func UnmarshalType(data json.RawMessage) (Type, error) {
|
||||||
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)
|
||||||
|
|
||||||
|
@ -14907,6 +15134,9 @@ func UnmarshalType(data json.RawMessage) (Type, error) {
|
||||||
case TypeFileTypeDocument:
|
case TypeFileTypeDocument:
|
||||||
return UnmarshalFileTypeDocument(data)
|
return UnmarshalFileTypeDocument(data)
|
||||||
|
|
||||||
|
case TypeFileTypeNotificationSound:
|
||||||
|
return UnmarshalFileTypeNotificationSound(data)
|
||||||
|
|
||||||
case TypeFileTypePhoto:
|
case TypeFileTypePhoto:
|
||||||
return UnmarshalFileTypePhoto(data)
|
return UnmarshalFileTypePhoto(data)
|
||||||
|
|
||||||
|
@ -15393,6 +15623,9 @@ func UnmarshalType(data json.RawMessage) (Type, error) {
|
||||||
case TypeUpdateSavedAnimations:
|
case TypeUpdateSavedAnimations:
|
||||||
return UnmarshalUpdateSavedAnimations(data)
|
return UnmarshalUpdateSavedAnimations(data)
|
||||||
|
|
||||||
|
case TypeUpdateSavedNotificationSounds:
|
||||||
|
return UnmarshalUpdateSavedNotificationSounds(data)
|
||||||
|
|
||||||
case TypeUpdateSelectedBackground:
|
case TypeUpdateSelectedBackground:
|
||||||
return UnmarshalUpdateSelectedBackground(data)
|
return UnmarshalUpdateSelectedBackground(data)
|
||||||
|
|
||||||
|
@ -15411,6 +15644,12 @@ func UnmarshalType(data json.RawMessage) (Type, error) {
|
||||||
case TypeUpdateUsersNearby:
|
case TypeUpdateUsersNearby:
|
||||||
return UnmarshalUpdateUsersNearby(data)
|
return UnmarshalUpdateUsersNearby(data)
|
||||||
|
|
||||||
|
case TypeUpdateAttachmentMenuBots:
|
||||||
|
return UnmarshalUpdateAttachmentMenuBots(data)
|
||||||
|
|
||||||
|
case TypeUpdateWebAppMessageSent:
|
||||||
|
return UnmarshalUpdateWebAppMessageSent(data)
|
||||||
|
|
||||||
case TypeUpdateReactions:
|
case TypeUpdateReactions:
|
||||||
return UnmarshalUpdateReactions(data)
|
return UnmarshalUpdateReactions(data)
|
||||||
|
|
||||||
|
|
308
data/td_api.tl
308
data/td_api.tl
|
@ -367,10 +367,14 @@ userTypeRegular = UserType;
|
||||||
//@description A deleted user or deleted bot. No information on the user besides the user identifier is available. It is not possible to perform any active actions on this type of user
|
//@description A deleted user or deleted bot. No information on the user besides the user identifier is available. It is not possible to perform any active actions on this type of user
|
||||||
userTypeDeleted = UserType;
|
userTypeDeleted = UserType;
|
||||||
|
|
||||||
//@description A bot (see https://core.telegram.org/bots) @can_join_groups True, if the bot can be invited to basic group and supergroup chats
|
//@description A bot (see https://core.telegram.org/bots)
|
||||||
|
//@can_join_groups True, if the bot can be invited to basic group and supergroup chats
|
||||||
//@can_read_all_group_messages True, if the bot can read all messages in basic group or supergroup chats and not just those addressed to the bot. In private and channel chats a bot can always read all messages
|
//@can_read_all_group_messages True, if the bot can read all messages in basic group or supergroup chats and not just those addressed to the bot. In private and channel chats a bot can always read all messages
|
||||||
//@is_inline True, if the bot supports inline queries @inline_query_placeholder Placeholder for inline queries (displayed on the application input field) @need_location True, if the location of the user is expected to be sent with every inline query to this bot
|
//@is_inline True, if the bot supports inline queries
|
||||||
userTypeBot can_join_groups:Bool can_read_all_group_messages:Bool is_inline:Bool inline_query_placeholder:string need_location:Bool = UserType;
|
//@inline_query_placeholder Placeholder for inline queries (displayed on the application input field)
|
||||||
|
//@need_location True, if the location of the user is expected to be sent with every inline query to this bot
|
||||||
|
//@can_be_added_to_attachment_menu True, if the bot can be added to attachment menu
|
||||||
|
userTypeBot can_join_groups:Bool can_read_all_group_messages:Bool is_inline:Bool inline_query_placeholder:string need_location:Bool can_be_added_to_attachment_menu:Bool = UserType;
|
||||||
|
|
||||||
//@description No information on the user besides the user identifier is available, yet this user has not been deleted. This object is extremely rare and must be handled like a deleted user. It is not possible to perform any actions on users of this type
|
//@description No information on the user besides the user identifier is available, yet this user has not been deleted. This object is extremely rare and must be handled like a deleted user. It is not possible to perform any actions on users of this type
|
||||||
userTypeUnknown = UserType;
|
userTypeUnknown = UserType;
|
||||||
|
@ -382,6 +386,9 @@ botCommand command:string description:string = BotCommand;
|
||||||
//@description Contains a list of bot commands @bot_user_id Bot's user identifier @commands List of bot commands
|
//@description Contains a list of bot commands @bot_user_id Bot's user identifier @commands List of bot commands
|
||||||
botCommands bot_user_id:int53 commands:vector<botCommand> = BotCommands;
|
botCommands bot_user_id:int53 commands:vector<botCommand> = BotCommands;
|
||||||
|
|
||||||
|
//@description Describes a button to be shown instead of bot commands menu button @text Text of the button @url URL to be passed to openWebApp
|
||||||
|
botMenuButton text:string url:string = BotMenuButton;
|
||||||
|
|
||||||
|
|
||||||
//@description Represents a location to which a chat is connected @location The location @address Location address; 1-64 characters, as defined by the chat owner
|
//@description Represents a location to which a chat is connected @location The location @address Location address; 1-64 characters, as defined by the chat owner
|
||||||
chatLocation location:location address:string = ChatLocation;
|
chatLocation location:location address:string = ChatLocation;
|
||||||
|
@ -420,6 +427,35 @@ inputChatPhotoStatic photo:InputFile = InputChatPhoto;
|
||||||
inputChatPhotoAnimation animation:InputFile main_frame_timestamp:double = InputChatPhoto;
|
inputChatPhotoAnimation animation:InputFile main_frame_timestamp:double = InputChatPhoto;
|
||||||
|
|
||||||
|
|
||||||
|
//@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, locations, and venues
|
||||||
|
//@can_send_media_messages True, if the user can send audio files, documents, photos, videos, video notes, and voice notes. Implies can_send_messages permissions
|
||||||
|
//@can_send_polls True, if the user can send polls. Implies can_send_messages permissions
|
||||||
|
//@can_send_stickers True, if the user can send stickers. Implies can_send_messages permissions
|
||||||
|
//@can_send_animations True, if the user can send animations. Implies can_send_messages permissions
|
||||||
|
//@can_send_games True, if the user can send games. Implies can_send_messages permissions
|
||||||
|
//@can_use_inline_bots True, if the user can use inline bots. Implies can_send_messages permissions
|
||||||
|
//@can_add_web_page_previews True, if the user may add a web page preview to their messages. Implies can_send_messages permissions
|
||||||
|
//@can_change_info True, if the user can change the chat title, photo, and other settings
|
||||||
|
//@can_invite_users True, if the user can invite new users to the chat
|
||||||
|
//@can_pin_messages True, if the user can pin messages
|
||||||
|
chatPermissions can_send_messages:Bool can_send_media_messages: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 = ChatPermissions;
|
||||||
|
|
||||||
|
//@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_change_info True, if the administrator can change the chat title, photo, and other settings
|
||||||
|
//@can_post_messages True, if the administrator can create channel posts; applicable to channels only
|
||||||
|
//@can_edit_messages True, if the administrator can edit messages of other users and pin messages; applicable to channels only
|
||||||
|
//@can_delete_messages True, if the administrator can delete messages of other users
|
||||||
|
//@can_invite_users True, if the administrator can invite new users to the chat
|
||||||
|
//@can_restrict_members True, if the administrator can restrict, ban, or unban chat members; always true for channels
|
||||||
|
//@can_pin_messages True, if the administrator can pin messages; applicable to basic groups and supergroups only
|
||||||
|
//@can_promote_members True, if the administrator can add new administrators with a subset of their own privileges or demote administrators that were directly or indirectly promoted by them
|
||||||
|
//@can_manage_video_chats True, if the administrator can manage video chats
|
||||||
|
//@is_anonymous True, if the administrator isn't shown in the chat member list and sends messages anonymously; applicable to supergroups only
|
||||||
|
chatAdministratorRights can_manage_chat:Bool can_change_info:Bool can_post_messages:Bool can_edit_messages:Bool can_delete_messages:Bool can_invite_users:Bool can_restrict_members:Bool can_pin_messages:Bool can_promote_members:Bool can_manage_video_chats:Bool is_anonymous:Bool = ChatAdministratorRights;
|
||||||
|
|
||||||
|
|
||||||
//@description Represents a user
|
//@description Represents a user
|
||||||
//@id User identifier
|
//@id User identifier
|
||||||
//@access_hash User access hash
|
//@access_hash User access hash
|
||||||
|
@ -441,6 +477,15 @@ inputChatPhotoAnimation animation:InputFile main_frame_timestamp:double = InputC
|
||||||
//@language_code IETF language tag of the user's language; only available to bots
|
//@language_code IETF language tag of the user's language; only available to bots
|
||||||
user id:int53 access_hash:int64 first_name:string last_name:string username:string phone_number:string status:UserStatus profile_photo:profilePhoto is_contact:Bool is_mutual_contact:Bool is_verified:Bool is_support:Bool restriction_reason:string is_scam:Bool is_fake:Bool have_access:Bool type:UserType language_code:string = User;
|
user id:int53 access_hash:int64 first_name:string last_name:string username:string phone_number:string status:UserStatus profile_photo:profilePhoto is_contact:Bool is_mutual_contact:Bool is_verified:Bool is_support:Bool restriction_reason:string is_scam:Bool is_fake:Bool have_access:Bool type:UserType language_code:string = User;
|
||||||
|
|
||||||
|
//@description Contains information about a bot
|
||||||
|
//@share_text The text that is shown on the bot's profile page and is sent together with the link when users share the bot
|
||||||
|
//@param_description The text shown in the chat with the bot if the chat is empty
|
||||||
|
//@menu_button Information about a button to show instead of the bot commands menu button; may be null if ordinary bot commands menu must be shown
|
||||||
|
//@commands List of the bot commands
|
||||||
|
//@default_group_administrator_rights Default administrator rights for adding the bot to basic group and supergroup chats; may be null
|
||||||
|
//@default_channel_administrator_rights Default administrator rights for adding the bot to channels; may be null
|
||||||
|
botInfo share_text:string description:string menu_button:botMenuButton commands:vector<botCommand> default_group_administrator_rights:chatAdministratorRights default_channel_administrator_rights:chatAdministratorRights = BotInfo;
|
||||||
|
|
||||||
//@description Contains full information about a user
|
//@description Contains full information about a user
|
||||||
//@photo User profile photo; may be null
|
//@photo User profile photo; may be null
|
||||||
//@is_blocked True, if the user is blocked by the current user
|
//@is_blocked True, if the user is blocked by the current user
|
||||||
|
@ -450,11 +495,9 @@ user id:int53 access_hash:int64 first_name:string last_name:string username:stri
|
||||||
//@has_private_forwards True, if the user can't be linked in forwarded messages due to their privacy settings
|
//@has_private_forwards True, if the user can't be linked in forwarded messages due to their privacy settings
|
||||||
//@need_phone_number_privacy_exception True, if the current user needs to explicitly allow to share their phone number with the user when the method addContact is used
|
//@need_phone_number_privacy_exception True, if the current user needs to explicitly allow to share their phone number with the user when the method addContact is used
|
||||||
//@bio A short user bio
|
//@bio A short user bio
|
||||||
//@share_text For bots, 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 For bots, the text shown in the chat with the bot if the chat is empty
|
|
||||||
//@group_in_common_count Number of group chats where both the other user and the current user are a member; 0 for the current user
|
//@group_in_common_count Number of group chats where both the other user and the current user are a member; 0 for the current user
|
||||||
//@commands For bots, list of the bot commands
|
//@bot_info For bots, information about the bot; may be null
|
||||||
userFullInfo photo:chatPhoto is_blocked:Bool can_be_called:Bool supports_video_calls:Bool has_private_calls:Bool has_private_forwards:Bool need_phone_number_privacy_exception:Bool bio:string share_text:string description:string group_in_common_count:int32 commands:vector<botCommand> = UserFullInfo;
|
userFullInfo photo:chatPhoto is_blocked:Bool can_be_called:Bool supports_video_calls:Bool has_private_calls:Bool has_private_forwards:Bool need_phone_number_privacy_exception:Bool bio:string group_in_common_count:int32 bot_info:botInfo = UserFullInfo;
|
||||||
|
|
||||||
//@description Represents a list of users @total_count Approximate total number of users found @user_ids A list of user identifiers
|
//@description Represents a list of users @total_count Approximate total number of users found @user_ids A list of user identifiers
|
||||||
users total_count:int32 user_ids:vector<int53> = Users;
|
users total_count:int32 user_ids:vector<int53> = Users;
|
||||||
|
@ -467,20 +510,6 @@ chatAdministrator user_id:int53 custom_title:string is_owner:Bool = ChatAdminist
|
||||||
chatAdministrators administrators:vector<chatAdministrator> = ChatAdministrators;
|
chatAdministrators administrators:vector<chatAdministrator> = ChatAdministrators;
|
||||||
|
|
||||||
|
|
||||||
//@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, locations, and venues
|
|
||||||
//@can_send_media_messages True, if the user can send audio files, documents, photos, videos, video notes, and voice notes. Implies can_send_messages permissions
|
|
||||||
//@can_send_polls True, if the user can send polls. Implies can_send_messages permissions
|
|
||||||
//@can_send_stickers True, if the user can send stickers. Implies can_send_messages permissions
|
|
||||||
//@can_send_animations True, if the user can send animations. Implies can_send_messages permissions
|
|
||||||
//@can_send_games True, if the user can send games. Implies can_send_messages permissions
|
|
||||||
//@can_use_inline_bots True, if the user can use inline bots. Implies can_send_messages permissions
|
|
||||||
//@can_add_web_page_previews True, if the user may add a web page preview to their messages. Implies can_send_messages permissions
|
|
||||||
//@can_change_info True, if the user can change the chat title, photo, and other settings
|
|
||||||
//@can_invite_users True, if the user can invite new users to the chat
|
|
||||||
//@can_pin_messages True, if the user can pin messages
|
|
||||||
chatPermissions can_send_messages:Bool can_send_media_messages: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 = ChatPermissions;
|
|
||||||
|
|
||||||
//@class ChatMemberStatus @description Provides information about the status of a member in a chat
|
//@class ChatMemberStatus @description Provides information about the status of a member in a chat
|
||||||
|
|
||||||
//@description The user is the owner of the chat and has all the administrator privileges
|
//@description The user is the owner of the chat and has all the administrator privileges
|
||||||
|
@ -492,18 +521,8 @@ chatMemberStatusCreator custom_title:string is_anonymous:Bool is_member:Bool = C
|
||||||
//@description The user is a member of the chat and has some additional privileges. In basic groups, administrators can edit and delete messages sent by others, add new members, ban unprivileged members, and manage video chats. In supergroups and channels, there are more detailed options for administrator privileges
|
//@description The user is a member of the chat and has some additional privileges. In basic groups, administrators can edit and delete messages sent by others, add new members, ban unprivileged members, and manage video chats. In supergroups and channels, there are more detailed options for administrator privileges
|
||||||
//@custom_title A custom title of the administrator; 0-16 characters without emojis; applicable to supergroups only
|
//@custom_title A custom title of the administrator; 0-16 characters without emojis; applicable to supergroups only
|
||||||
//@can_be_edited True, if the current user can edit the administrator privileges for the called user
|
//@can_be_edited True, if the current user can edit the administrator privileges for the called user
|
||||||
//@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
|
//@rights Rights of the administrator
|
||||||
//@can_change_info True, if the administrator can change the chat title, photo, and other settings
|
chatMemberStatusAdministrator custom_title:string can_be_edited:Bool rights:chatAdministratorRights = ChatMemberStatus;
|
||||||
//@can_post_messages True, if the administrator can create channel posts; applicable to channels only
|
|
||||||
//@can_edit_messages True, if the administrator can edit messages of other users and pin messages; applicable to channels only
|
|
||||||
//@can_delete_messages True, if the administrator can delete messages of other users
|
|
||||||
//@can_invite_users True, if the administrator can invite new users to the chat
|
|
||||||
//@can_restrict_members True, if the administrator can restrict, ban, or unban chat members; always true for channels
|
|
||||||
//@can_pin_messages True, if the administrator can pin messages; applicable to basic groups and supergroups only
|
|
||||||
//@can_promote_members True, if the administrator can add new administrators with a subset of their own privileges or demote administrators that were directly or indirectly promoted by them
|
|
||||||
//@can_manage_video_chats True, if the administrator can manage video chats
|
|
||||||
//@is_anonymous True, if the administrator isn't shown in the chat member list and sends messages anonymously; applicable to supergroups only
|
|
||||||
chatMemberStatusAdministrator custom_title:string can_be_edited:Bool can_manage_chat:Bool can_change_info:Bool can_post_messages:Bool can_edit_messages:Bool can_delete_messages:Bool can_invite_users:Bool can_restrict_members:Bool can_pin_messages:Bool can_promote_members:Bool can_manage_video_chats:Bool is_anonymous:Bool = ChatMemberStatus;
|
|
||||||
|
|
||||||
//@description The user is a member of the chat, without any additional privileges or restrictions
|
//@description The user is a member of the chat, without any additional privileges or restrictions
|
||||||
chatMemberStatusMember = ChatMemberStatus;
|
chatMemberStatusMember = ChatMemberStatus;
|
||||||
|
@ -782,7 +801,7 @@ messageReplyInfo reply_count:int32 recent_replier_ids:vector<MessageSender> last
|
||||||
//@reaction Text representation of the reaction
|
//@reaction Text representation of the reaction
|
||||||
//@total_count Number of times the reaction was added
|
//@total_count Number of times the reaction was added
|
||||||
//@is_chosen True, if the reaction is chosen by the current user
|
//@is_chosen True, if the reaction is chosen by the current user
|
||||||
//@recent_sender_ids Identifiers of at most 3 recent message senders, added the reaction; available in private chats, basic groups and supergroups
|
//@recent_sender_ids Identifiers of at most 3 recent message senders, added the reaction; available in private, basic group and supergroup chats
|
||||||
messageReaction reaction:string total_count:int32 is_chosen:Bool recent_sender_ids:vector<MessageSender> = MessageReaction;
|
messageReaction reaction:string total_count:int32 is_chosen:Bool recent_sender_ids:vector<MessageSender> = MessageReaction;
|
||||||
|
|
||||||
//@description Contains information about interactions with a message
|
//@description Contains information about interactions with a message
|
||||||
|
@ -873,7 +892,7 @@ messageCalendar total_count:int32 days:vector<messageCalendarDay> = MessageCalen
|
||||||
//@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
|
||||||
//@sponsor_chat_id Sponsor chat identifier; 0 if the sponsor chat is accessible through an invite link
|
//@sponsor_chat_id Sponsor chat identifier; 0 if the sponsor chat is accessible through an invite link
|
||||||
//@sponsor_chat_info Information about the sponsor chat; may be null unless sponsor_chat_id == 0
|
//@sponsor_chat_info Information about the sponsor chat; may be null unless sponsor_chat_id == 0
|
||||||
//@link An internal link to be opened when the sponsored message is clicked; may be null. If null, 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 sponsor_chat_id:int53 sponsor_chat_info:chatInviteLinkInfo link:InternalLinkType content:MessageContent = SponsoredMessage;
|
sponsoredMessage message_id:int53 sponsor_chat_id:int53 sponsor_chat_info:chatInviteLinkInfo link:InternalLinkType content:MessageContent = SponsoredMessage;
|
||||||
|
|
||||||
|
@ -904,32 +923,32 @@ foundFileDownloads total_counts:downloadedFileCounts files:vector<fileDownload>
|
||||||
//@description Notification settings applied to all private and secret chats when the corresponding chat setting has a default value
|
//@description Notification settings applied to all private and secret chats when the corresponding chat setting has a default value
|
||||||
notificationSettingsScopePrivateChats = NotificationSettingsScope;
|
notificationSettingsScopePrivateChats = NotificationSettingsScope;
|
||||||
|
|
||||||
//@description Notification settings applied to all basic groups and supergroups when the corresponding chat setting has a default value
|
//@description Notification settings applied to all basic group and supergroup chats when the corresponding chat setting has a default value
|
||||||
notificationSettingsScopeGroupChats = NotificationSettingsScope;
|
notificationSettingsScopeGroupChats = NotificationSettingsScope;
|
||||||
|
|
||||||
//@description Notification settings applied to all channels when the corresponding chat setting has a default value
|
//@description Notification settings applied to all channel chats when the corresponding chat setting has a default value
|
||||||
notificationSettingsScopeChannelChats = NotificationSettingsScope;
|
notificationSettingsScopeChannelChats = NotificationSettingsScope;
|
||||||
|
|
||||||
|
|
||||||
//@description Contains information about notification settings for a chat
|
//@description Contains information about notification settings for a chat
|
||||||
//@use_default_mute_for If true, mute_for is ignored and the value for the relevant type of chat is used instead @mute_for Time left before notifications will be unmuted, in seconds
|
//@use_default_mute_for If true, mute_for is ignored and the value for the relevant type of chat is used instead @mute_for Time left before notifications will be unmuted, in seconds
|
||||||
//@use_default_sound If true, sound is ignored and the value for the relevant type of chat is used instead @sound The name of an audio file to be used for notification sounds; only applies to iOS applications
|
//@use_default_sound If true, the value for the relevant type of chat is used instead of sound_id @sound_id Identifier of the notification sound to be played; 0 if sound is disabled
|
||||||
//@use_default_show_preview If true, show_preview is ignored and the value for the relevant type of chat is used instead @show_preview True, if message content must be displayed in notifications
|
//@use_default_show_preview If true, show_preview is ignored and the value for the relevant type of chat is used instead @show_preview True, if message content must be displayed in notifications
|
||||||
//@use_default_disable_pinned_message_notifications If true, disable_pinned_message_notifications is ignored and the value for the relevant type of chat is used instead @disable_pinned_message_notifications If true, notifications for incoming pinned messages will be created as for an ordinary unread message
|
//@use_default_disable_pinned_message_notifications If true, disable_pinned_message_notifications is ignored and the value for the relevant type of chat is used instead @disable_pinned_message_notifications If true, notifications for incoming pinned messages will be created as for an ordinary unread message
|
||||||
//@use_default_disable_mention_notifications If true, disable_mention_notifications is ignored and the value for the relevant type of chat is used instead @disable_mention_notifications If true, notifications for messages with mentions will be created as for an ordinary unread message
|
//@use_default_disable_mention_notifications If true, disable_mention_notifications is ignored and the value for the relevant type of chat is used instead @disable_mention_notifications If true, notifications for messages with mentions will be created as for an ordinary unread message
|
||||||
chatNotificationSettings use_default_mute_for:Bool mute_for:int32 use_default_sound:Bool sound:string use_default_show_preview:Bool show_preview:Bool use_default_disable_pinned_message_notifications:Bool disable_pinned_message_notifications:Bool use_default_disable_mention_notifications:Bool disable_mention_notifications:Bool = ChatNotificationSettings;
|
chatNotificationSettings use_default_mute_for:Bool mute_for:int32 use_default_sound:Bool sound_id:int64 use_default_show_preview:Bool show_preview:Bool use_default_disable_pinned_message_notifications:Bool disable_pinned_message_notifications:Bool use_default_disable_mention_notifications:Bool disable_mention_notifications:Bool = ChatNotificationSettings;
|
||||||
|
|
||||||
//@description Contains information about notification settings for several chats
|
//@description Contains information about notification settings for several chats
|
||||||
//@mute_for Time left before notifications will be unmuted, in seconds
|
//@mute_for Time left before notifications will be unmuted, in seconds
|
||||||
//@sound The name of an audio file to be used for notification sounds; only applies to iOS applications
|
//@sound_id Identifier of the notification sound to be played; 0 if sound is disabled
|
||||||
//@show_preview True, if message content must be displayed in notifications
|
//@show_preview True, if message content must be displayed in notifications
|
||||||
//@disable_pinned_message_notifications True, if notifications for incoming pinned messages will be created as for an ordinary unread message
|
//@disable_pinned_message_notifications True, if notifications for incoming pinned messages will be created as for an ordinary unread message
|
||||||
//@disable_mention_notifications True, if notifications for messages with mentions will be created as for an ordinary unread message
|
//@disable_mention_notifications True, if notifications for messages with mentions will be created as for an ordinary unread message
|
||||||
scopeNotificationSettings mute_for:int32 sound:string show_preview:Bool disable_pinned_message_notifications:Bool disable_mention_notifications:Bool = ScopeNotificationSettings;
|
scopeNotificationSettings mute_for:int32 sound_id:int64 show_preview:Bool disable_pinned_message_notifications:Bool disable_mention_notifications:Bool = ScopeNotificationSettings;
|
||||||
|
|
||||||
|
|
||||||
//@description Contains information about a message draft
|
//@description Contains information about a message draft
|
||||||
//@reply_to_message_id Identifier of the message to reply to; 0 if none
|
//@reply_to_message_id Identifier of the replied message; 0 if none
|
||||||
//@date Point in time (Unix timestamp) when the draft was created
|
//@date Point in time (Unix timestamp) when the draft was created
|
||||||
//@input_message_text Content of the message draft; must be of the type inputMessageText
|
//@input_message_text Content of the message draft; must be of the type inputMessageText
|
||||||
draftMessage reply_to_message_id:int53 date:int32 input_message_text:InputMessageContent = DraftMessage;
|
draftMessage reply_to_message_id:int53 date:int32 input_message_text:InputMessageContent = DraftMessage;
|
||||||
|
@ -1117,6 +1136,9 @@ keyboardButtonTypeRequestLocation = KeyboardButtonType;
|
||||||
//@description A button that allows the user to create and send a poll when pressed; available only in private chats @force_regular If true, only regular polls must be allowed to create @force_quiz If true, only polls in quiz mode must be allowed to create
|
//@description A button that allows the user to create and send a poll when pressed; available only in private chats @force_regular If true, only regular polls must be allowed to create @force_quiz If true, only polls in quiz mode must be allowed to create
|
||||||
keyboardButtonTypeRequestPoll force_regular:Bool force_quiz:Bool = KeyboardButtonType;
|
keyboardButtonTypeRequestPoll force_regular:Bool force_quiz:Bool = KeyboardButtonType;
|
||||||
|
|
||||||
|
//@description A button that opens a web app by calling getWebAppUrl @url An HTTP URL to pass to getWebAppUrl
|
||||||
|
keyboardButtonTypeWebApp url:string = KeyboardButtonType;
|
||||||
|
|
||||||
|
|
||||||
//@description Represents a single button in a bot keyboard @text Text of the button @type Type of the button
|
//@description Represents a single button in a bot keyboard @text Text of the button @type Type of the button
|
||||||
keyboardButton text:string type:KeyboardButtonType = KeyboardButton;
|
keyboardButton text:string type:KeyboardButtonType = KeyboardButton;
|
||||||
|
@ -1127,9 +1149,12 @@ keyboardButton text:string type:KeyboardButtonType = KeyboardButton;
|
||||||
//@description A button that opens a specified URL @url HTTP or tg:// URL to open
|
//@description A button that opens a specified URL @url HTTP or tg:// URL to open
|
||||||
inlineKeyboardButtonTypeUrl url:string = InlineKeyboardButtonType;
|
inlineKeyboardButtonTypeUrl url:string = InlineKeyboardButtonType;
|
||||||
|
|
||||||
//@description A button that opens a specified URL and automatically authorize the current user if allowed to do so @url An HTTP URL to open @id Unique button identifier @forward_text If non-empty, new text of the button in forwarded messages
|
//@description A button that opens a specified URL and automatically authorize the current user by calling getLoginUrlInfo @url An HTTP URL to pass to getLoginUrlInfo @id Unique button identifier @forward_text If non-empty, new text of the button in forwarded messages
|
||||||
inlineKeyboardButtonTypeLoginUrl url:string id:int53 forward_text:string = InlineKeyboardButtonType;
|
inlineKeyboardButtonTypeLoginUrl url:string id:int53 forward_text:string = InlineKeyboardButtonType;
|
||||||
|
|
||||||
|
//@description A button that opens a web app by calling openWebApp @url An HTTP URL to pass to openWebApp
|
||||||
|
inlineKeyboardButtonTypeWebApp url:string = InlineKeyboardButtonType;
|
||||||
|
|
||||||
//@description A button that sends a callback query to a bot @data Data to be sent to the bot via a callback query
|
//@description A button that sends a callback query to a bot @data Data to be sent to the bot via a callback query
|
||||||
inlineKeyboardButtonTypeCallback data:bytes = InlineKeyboardButtonType;
|
inlineKeyboardButtonTypeCallback data:bytes = InlineKeyboardButtonType;
|
||||||
|
|
||||||
|
@ -1187,6 +1212,10 @@ loginUrlInfoOpen url:string skip_confirm:Bool = LoginUrlInfo;
|
||||||
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 @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;
|
||||||
|
|
||||||
|
|
||||||
//@description Contains information about a message thread
|
//@description Contains information about a message thread
|
||||||
//@chat_id Identifier of the chat to which the message thread belongs
|
//@chat_id Identifier of the chat to which the message thread belongs
|
||||||
//@message_thread_id Message thread identifier, unique within the chat
|
//@message_thread_id Message thread identifier, unique within the chat
|
||||||
|
@ -1365,7 +1394,7 @@ pageBlockCollage page_blocks:vector<PageBlock> caption:pageBlockCaption = PageBl
|
||||||
//@description A slideshow @page_blocks Slideshow item contents @caption Block caption
|
//@description A slideshow @page_blocks Slideshow item contents @caption Block caption
|
||||||
pageBlockSlideshow page_blocks:vector<PageBlock> caption:pageBlockCaption = PageBlock;
|
pageBlockSlideshow page_blocks:vector<PageBlock> caption:pageBlockCaption = PageBlock;
|
||||||
|
|
||||||
//@description A link to a chat @title Chat title @photo Chat photo; may be null @username Chat username, by which all other information about the chat can be resolved
|
//@description A link to a chat @title Chat title @photo Chat photo; may be null @username Chat username by which all other information about the chat can be resolved
|
||||||
pageBlockChatLink title:string photo:chatPhotoInfo username:string = PageBlock;
|
pageBlockChatLink title:string photo:chatPhotoInfo username:string = PageBlock;
|
||||||
|
|
||||||
//@description A table @caption Table caption @cells Table cells @is_bordered True, if the table is bordered @is_striped True, if the table is striped
|
//@description A table @caption Table caption @cells Table cells @is_bordered True, if the table is bordered @is_striped True, if the table is striped
|
||||||
|
@ -1445,6 +1474,12 @@ bankCardInfo title:string actions:vector<bankCardActionOpenUrl> = BankCardInfo;
|
||||||
address country_code:string state:string city:string street_line1:string street_line2:string postal_code:string = Address;
|
address country_code:string state:string city:string street_line1:string street_line2:string postal_code:string = Address;
|
||||||
|
|
||||||
|
|
||||||
|
//@description Contains parameters of the app theme @background_color A color of the background in the RGB24 format @text_color A color of text in the RGB24 format
|
||||||
|
//@hint_color A color of hints in the RGB24 format @link_color A color of links in the RGB24 format @button_color A color of the buttons in the RGB24 format
|
||||||
|
//@button_text_color A color of text on the buttons in the RGB24 format
|
||||||
|
themeParameters background_color:int32 text_color:int32 hint_color:int32 link_color:int32 button_color:int32 button_text_color:int32 = ThemeParameters;
|
||||||
|
|
||||||
|
|
||||||
//@description Portion of the price of a product (e.g., "delivery cost", "tax amount") @label Label for this portion of the product price @amount Currency amount in the smallest units of the currency
|
//@description Portion of the price of a product (e.g., "delivery cost", "tax amount") @label Label for this portion of the product price @amount Currency amount in the smallest units of the currency
|
||||||
labeledPricePart label:string amount:int53 = LabeledPricePart;
|
labeledPricePart label:string amount:int53 = LabeledPricePart;
|
||||||
|
|
||||||
|
@ -1488,11 +1523,6 @@ inputCredentialsGooglePay data:string = InputCredentials;
|
||||||
//@description Stripe payment provider @publishable_key Stripe API publishable key @need_country True, if the user country must be provided @need_postal_code True, if the user ZIP/postal code must be provided @need_cardholder_name True, if the cardholder name must be provided
|
//@description Stripe payment provider @publishable_key Stripe API publishable key @need_country True, if the user country must be provided @need_postal_code True, if the user ZIP/postal code must be provided @need_cardholder_name True, if the cardholder name must be provided
|
||||||
paymentsProviderStripe publishable_key:string need_country:Bool need_postal_code:Bool need_cardholder_name:Bool = PaymentsProviderStripe;
|
paymentsProviderStripe publishable_key:string need_country:Bool need_postal_code:Bool need_cardholder_name:Bool = PaymentsProviderStripe;
|
||||||
|
|
||||||
//@description Theme colors for a payment form @background_color A color of the payment form background in the RGB24 format @text_color A color of text in the RGB24 format
|
|
||||||
//@hint_color A color of hints in the RGB24 format @link_color A color of links in the RGB24 format @button_color A color of the buttons in the RGB24 format
|
|
||||||
//@button_text_color A color of text on the buttons in the RGB24 format
|
|
||||||
paymentFormTheme background_color:int32 text_color:int32 hint_color:int32 link_color:int32 button_color:int32 button_text_color:int32 = PaymentFormTheme;
|
|
||||||
|
|
||||||
//@description Contains information about an invoice payment form
|
//@description Contains information about an invoice payment form
|
||||||
//@id The payment form identifier
|
//@id The payment form identifier
|
||||||
//@invoice Full information of the invoice
|
//@invoice Full information of the invoice
|
||||||
|
@ -1926,7 +1956,13 @@ messageContactRegistered = MessageContent;
|
||||||
//@description The current user has connected a website by logging in using Telegram Login Widget on it @domain_name Domain name of the connected website
|
//@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 Telegram Passport data has been sent @types List of Telegram Passport element types sent
|
//@description Data from a web app has been sent to a bot @button_text Text of the keyboardButtonTypeWebApp button, which opened the web app
|
||||||
|
messageWebAppDataSent button_text:string = MessageContent;
|
||||||
|
|
||||||
|
//@description Data from a web app has been received; for bots only @button_text Text of the keyboardButtonTypeWebApp button, which opened the web app @data Received data
|
||||||
|
messageWebAppDataReceived button_text:string data:string = MessageContent;
|
||||||
|
|
||||||
|
//@description Telegram Passport data has been sent to a bot @types List of Telegram Passport element types sent
|
||||||
messagePassportDataSent types:vector<PassportElementType> = MessageContent;
|
messagePassportDataSent types:vector<PassportElementType> = MessageContent;
|
||||||
|
|
||||||
//@description Telegram Passport data has been received; for bots only @elements List of received Telegram Passport elements @credentials Encrypted data credentials
|
//@description Telegram Passport data has been received; for bots only @elements List of received Telegram Passport elements @credentials Encrypted data credentials
|
||||||
|
@ -2488,6 +2524,25 @@ diceStickersSlotMachine background:sticker lever:sticker left_reel:sticker cente
|
||||||
importedContacts user_ids:vector<int53> importer_count:vector<int32> = ImportedContacts;
|
importedContacts user_ids:vector<int53> importer_count:vector<int32> = ImportedContacts;
|
||||||
|
|
||||||
|
|
||||||
|
//@description Describes a color to highlight a bot added to attachment menu @light_color Color in the RGB24 format for light themes @dark_color Color in the RGB24 format for dark themes
|
||||||
|
attachmentMenuBotColor light_color:int32 dark_color:int32 = AttachmentMenuBotColor;
|
||||||
|
|
||||||
|
//@description Represents a bot added to attachment menu
|
||||||
|
//@bot_user_id User identifier of the bot added to 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
|
||||||
|
//@default_icon Default attachment menu icon for the bot in SVG format; may be null
|
||||||
|
//@ios_static_icon Attachment menu icon for the bot in SVG format for the official iOS app; may be null
|
||||||
|
//@ios_animated_icon Attachment menu icon for the bot in TGS format for the official iOS app; may be null
|
||||||
|
//@android_icon Attachment menu icon for the bot in TGS format for the official Android app; may be null
|
||||||
|
//@macos_icon Attachment menu icon for the bot in TGS format for the official native macOS app; may be null
|
||||||
|
//@icon_color Color to highlight selected icon of the bot if appropriate; may be null
|
||||||
|
attachmentMenuBot bot_user_id:int53 name:string name_color:attachmentMenuBotColor default_icon:file ios_static_icon:file ios_animated_icon:file android_icon:file macos_icon:file icon_color:attachmentMenuBotColor = AttachmentMenuBot;
|
||||||
|
|
||||||
|
//@description Information about the message sent by answerWebAppQuery @inline_message_id Identifier of the sent inline message, if known
|
||||||
|
sentWebAppMessage inline_message_id:string = SentWebAppMessage;
|
||||||
|
|
||||||
|
|
||||||
//@description Contains an HTTP URL @url The URL
|
//@description Contains an HTTP URL @url The URL
|
||||||
httpUrl url:string = HttpUrl;
|
httpUrl url:string = HttpUrl;
|
||||||
|
|
||||||
|
@ -3111,9 +3166,22 @@ notificationGroupTypeSecretChat = NotificationGroupType;
|
||||||
notificationGroupTypeCalls = NotificationGroupType;
|
notificationGroupTypeCalls = NotificationGroupType;
|
||||||
|
|
||||||
|
|
||||||
|
//@description Describes a notification sound in MP3 format
|
||||||
|
//@id Unique identifier of the notification sound
|
||||||
|
//@duration Duration of the sound, in seconds
|
||||||
|
//@date Point in time (Unix timestamp) when the sound was created
|
||||||
|
//@title Title of the notification sound
|
||||||
|
//@data Arbitrary data, defined while the sound was uploaded
|
||||||
|
//@sound File containing the sound
|
||||||
|
notificationSound id:int64 duration:int32 date:int32 title:string data:string sound:file = NotificationSound;
|
||||||
|
|
||||||
|
//@description Contains a list of notification sounds @notification_sounds A list of notification sounds
|
||||||
|
notificationSounds notification_sounds:vector<notificationSound> = NotificationSounds;
|
||||||
|
|
||||||
|
|
||||||
//@description Contains information about a notification @id Unique persistent identifier of this notification @date Notification date
|
//@description Contains information about a notification @id Unique persistent identifier of this notification @date Notification date
|
||||||
//@is_silent True, if the notification was initially silent @type Notification type
|
//@sound_id Identifier of the notification sound to be played; 0 if sound is disabled @type Notification type
|
||||||
notification id:int32 date:int32 is_silent:Bool type:NotificationType = Notification;
|
notification id:int32 date:int32 sound_id:int64 type:NotificationType = Notification;
|
||||||
|
|
||||||
//@description Describes a group of notifications @id Unique persistent auto-incremented from 1 identifier of the notification group @type Type of the group
|
//@description Describes a group of notifications @id Unique persistent auto-incremented from 1 identifier of the notification group @type Type of the group
|
||||||
//@chat_id Identifier of a chat to which all notifications in the group belong
|
//@chat_id Identifier of a chat to which all notifications in the group belong
|
||||||
|
@ -3246,7 +3314,7 @@ sessions sessions:vector<session> inactive_session_ttl_days:int32 = Sessions;
|
||||||
//@log_in_date Point in time (Unix timestamp) when the user was logged in
|
//@log_in_date Point in time (Unix timestamp) when the user was logged in
|
||||||
//@last_active_date Point in time (Unix timestamp) when obtained authorization was last used
|
//@last_active_date Point in time (Unix timestamp) when obtained authorization was last used
|
||||||
//@ip IP address from which the user was logged in, in human-readable format
|
//@ip IP address from which the user was logged in, in human-readable format
|
||||||
//@location Human-readable description of a country and a region, from which the user was logged in, based on the IP address
|
//@location Human-readable description of a country and a region from which the user was logged in, based on the IP address
|
||||||
connectedWebsite id:int64 domain_name:string bot_user_id:int53 browser:string platform:string log_in_date:int32 last_active_date:int32 ip:string location:string = ConnectedWebsite;
|
connectedWebsite id:int64 domain_name:string bot_user_id:int53 browser:string platform:string log_in_date:int32 last_active_date:int32 ip:string location:string = ConnectedWebsite;
|
||||||
|
|
||||||
//@description Contains a list of websites the current user is logged in with Telegram @websites List of connected websites
|
//@description Contains a list of websites the current user is logged in with Telegram @websites List of connected websites
|
||||||
|
@ -3291,6 +3359,13 @@ chatReportReasonCustom = ChatReportReason;
|
||||||
//@description The link is a link to the active sessions section of the app. Use getActiveSessions to handle the link
|
//@description The link is a link to the active sessions section of the app. Use getActiveSessions to handle the link
|
||||||
internalLinkTypeActiveSessions = InternalLinkType;
|
internalLinkTypeActiveSessions = InternalLinkType;
|
||||||
|
|
||||||
|
//@description The link is a link to an attachment menu bot to be opened in the specified chat. Process given chat_link to open corresponding chat.
|
||||||
|
//-Then call searchPublicChat with the given bot username, check that the user is a bot and can be added to attachment menu. Then use getAttachmentMenuBot to receive information about the bot.
|
||||||
|
//-If the bot isn't added to attachment menu, then user needs to confirm adding the bot to attachment menu. If user confirms adding, then use toggleBotIsAddedToAttachmentMenu to add it.
|
||||||
|
//-If attachment menu bots can't be used in the current chat, show an error to the user. If the bot is added to attachment menu, then use openWebApp with the given URL
|
||||||
|
//@chat_link An internal link pointing to a chat; may be null if the current chat needs to be kept @bot_username Username of the bot @url URL to be passed to openWebApp
|
||||||
|
internalLinkTypeAttachmentMenuBot chat_link:InternalLinkType bot_username:string url:string = InternalLinkType;
|
||||||
|
|
||||||
//@description The link contains an authentication code. Call checkAuthenticationCode with the code if the current authorization state is authorizationStateWaitCode @code The authentication code
|
//@description The link contains an authentication code. Call checkAuthenticationCode with the code if the current authorization state is authorizationStateWaitCode @code The authentication code
|
||||||
internalLinkTypeAuthenticationCode code:string = InternalLinkType;
|
internalLinkTypeAuthenticationCode code:string = InternalLinkType;
|
||||||
|
|
||||||
|
@ -3303,9 +3378,19 @@ internalLinkTypeBackground background_name:string = InternalLinkType;
|
||||||
internalLinkTypeBotStart bot_username:string start_parameter:string = InternalLinkType;
|
internalLinkTypeBotStart bot_username:string start_parameter:string = InternalLinkType;
|
||||||
|
|
||||||
//@description The link is a link to a Telegram bot, which is supposed to be added to a group chat. Call searchPublicChat with the given bot username, check that the user is a bot and can be added to groups,
|
//@description The link is a link to a Telegram bot, which is supposed to be added to a group chat. Call searchPublicChat with the given bot username, check that the user is a bot and can be added to groups,
|
||||||
//-ask the current user to select a group to add the bot to, and then call sendBotStartMessage with the given start parameter and the chosen group chat. Bots can be added to a public group only by administrators of the group
|
//-ask the current user to select a basic group or a supergroup chat to add the bot to, taking into account that bots can be added to a public supergroup only by administrators of the supergroup.
|
||||||
//@bot_username Username of the bot @start_parameter The parameter to be passed to sendBotStartMessage
|
//-If administrator rights are provided by the link, call getChatMember to receive the current bot rights in the chat and if the bot already is an administrator,
|
||||||
internalLinkTypeBotStartInGroup bot_username:string start_parameter:string = InternalLinkType;
|
//-check that the current user can edit its administrator rights, combine received rights with the requested administrator rights, show confirmation box to the user,
|
||||||
|
//-and call setChatMemberStatus with the chosen chat and confirmed administrator rights. Before call to setChatMemberStatus it may be required to upgrade the chosen basic group chat to a supergroup chat.
|
||||||
|
//-Then if start_parameter isn't empty, call sendBotStartMessage with the given start parameter and the chosen chat, otherwise just send /start message with bot's username added to the chat.
|
||||||
|
//@bot_username Username of the bot @start_parameter The parameter to be passed to sendBotStartMessage @administrator_rights Expected administrator rights for the bot; may be null
|
||||||
|
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;
|
||||||
|
@ -3414,6 +3499,9 @@ fileTypeAudio = FileType;
|
||||||
//@description The file is a document
|
//@description The file is a document
|
||||||
fileTypeDocument = FileType;
|
fileTypeDocument = FileType;
|
||||||
|
|
||||||
|
//@description The file is a notification sound
|
||||||
|
fileTypeNotificationSound = FileType;
|
||||||
|
|
||||||
//@description The file is a photo
|
//@description The file is a photo
|
||||||
fileTypePhoto = FileType;
|
fileTypePhoto = FileType;
|
||||||
|
|
||||||
|
@ -3921,10 +4009,10 @@ updateNotification notification_group_id:int32 notification:notification = Updat
|
||||||
//@type New type of the notification group
|
//@type New type of the notification group
|
||||||
//@chat_id Identifier of a chat to which all notifications in the group belong
|
//@chat_id Identifier of a chat to which all notifications in the group belong
|
||||||
//@notification_settings_chat_id Chat identifier, which notification settings must be applied to the added notifications
|
//@notification_settings_chat_id Chat identifier, which notification settings must be applied to the added notifications
|
||||||
//@is_silent True, if the notifications must be shown without sound
|
//@notification_sound_id Identifier of the notification sound to be played; 0 if sound is disabled
|
||||||
//@total_count Total number of unread notifications in the group, can be bigger than number of active notifications
|
//@total_count Total number of unread notifications in the group, can be bigger than number of active notifications
|
||||||
//@added_notifications List of added group notifications, sorted by notification ID @removed_notification_ids Identifiers of removed group notifications, sorted by notification ID
|
//@added_notifications List of added group notifications, sorted by notification ID @removed_notification_ids Identifiers of removed group notifications, sorted by notification ID
|
||||||
updateNotificationGroup notification_group_id:int32 type:NotificationGroupType chat_id:int53 notification_settings_chat_id:int53 is_silent:Bool total_count:int32 added_notifications:vector<notification> removed_notification_ids:vector<int32> = Update;
|
updateNotificationGroup notification_group_id:int32 type:NotificationGroupType chat_id:int53 notification_settings_chat_id:int53 notification_sound_id:int64 total_count:int32 added_notifications:vector<notification> removed_notification_ids:vector<int32> = Update;
|
||||||
|
|
||||||
//@description Contains active notifications that was shown on previous application launches. This update is sent only if the message database is used. In that case it comes once before any updateNotification and updateNotificationGroup update @groups Lists of active notification groups
|
//@description Contains active notifications that was shown on previous application launches. This update is sent only if the message database is used. In that case it comes once before any updateNotification and updateNotificationGroup update @groups Lists of active notification groups
|
||||||
updateActiveNotifications groups:vector<notificationGroup> = Update;
|
updateActiveNotifications groups:vector<notificationGroup> = Update;
|
||||||
|
@ -4050,6 +4138,9 @@ updateFavoriteStickers sticker_ids:vector<int32> = Update;
|
||||||
//@description The list of saved animations was updated @animation_ids The new list of file identifiers of saved animations
|
//@description The list of saved animations was updated @animation_ids The new list of file identifiers of saved animations
|
||||||
updateSavedAnimations animation_ids:vector<int32> = Update;
|
updateSavedAnimations animation_ids:vector<int32> = Update;
|
||||||
|
|
||||||
|
//@description The list of saved notifications sounds was updated. This update may not be sent until information about a notification sound was requested for the first time @notification_sound_ids The new list of identifiers of saved notification sounds
|
||||||
|
updateSavedNotificationSounds notification_sound_ids:vector<int64> = Update;
|
||||||
|
|
||||||
//@description The selected background has changed @for_dark_theme True, if background for dark theme has changed @background The new selected background; may be null
|
//@description The selected background has changed @for_dark_theme True, if background for dark theme has changed @background The new selected background; may be null
|
||||||
updateSelectedBackground for_dark_theme:Bool background:background = Update;
|
updateSelectedBackground for_dark_theme:Bool background:background = Update;
|
||||||
|
|
||||||
|
@ -4068,6 +4159,12 @@ updateTermsOfService terms_of_service_id:string terms_of_service:termsOfService
|
||||||
//@description The list of users nearby has changed. The update is guaranteed to be sent only 60 seconds after a successful searchChatsNearby request @users_nearby The new list of users nearby
|
//@description The list of users nearby has changed. The update is guaranteed to be sent only 60 seconds after a successful searchChatsNearby request @users_nearby The new list of users nearby
|
||||||
updateUsersNearby users_nearby:vector<chatNearby> = Update;
|
updateUsersNearby users_nearby:vector<chatNearby> = Update;
|
||||||
|
|
||||||
|
//@description The list of bots added to attachment menu has changed @bots The new list of bots added to attachment menu. The bots must be shown in attachment menu only in private chats. The bots must not be shown on scheduled messages screen
|
||||||
|
updateAttachmentMenuBots bots:vector<attachmentMenuBot> = Update;
|
||||||
|
|
||||||
|
//@description A message was sent by an opened web app, so the web app needs to be closed @web_app_launch_id Identifier of web app launch
|
||||||
|
updateWebAppMessageSent web_app_launch_id:int64 = Update;
|
||||||
|
|
||||||
//@description The list of supported reactions has changed @reactions The new list of supported reactions
|
//@description The list of supported reactions has changed @reactions The new list of supported reactions
|
||||||
updateReactions reactions:vector<reaction> = Update;
|
updateReactions reactions:vector<reaction> = Update;
|
||||||
|
|
||||||
|
@ -4085,7 +4182,7 @@ updateAnimationSearchParameters provider:string emojis:vector<string> = Update;
|
||||||
updateSuggestedActions added_actions:vector<SuggestedAction> removed_actions:vector<SuggestedAction> = Update;
|
updateSuggestedActions added_actions:vector<SuggestedAction> removed_actions:vector<SuggestedAction> = Update;
|
||||||
|
|
||||||
//@description A new incoming inline query; for bots only @id Unique query identifier @sender_user_id Identifier of the user who sent the query @user_location User location; may be null
|
//@description A new incoming inline query; for bots only @id Unique query identifier @sender_user_id Identifier of the user who sent the query @user_location User location; may be null
|
||||||
//@chat_type The type of the chat, from which the query originated; may be null if unknown @query Text of the query @offset Offset of the first entry to return
|
//@chat_type The type of the chat from which the query originated; may be null if unknown @query Text of the query @offset Offset of the first entry to return
|
||||||
updateNewInlineQuery id:int64 sender_user_id:int53 user_location:location chat_type:ChatType query:string offset:string = Update;
|
updateNewInlineQuery id:int64 sender_user_id:int53 user_location:location chat_type:ChatType query:string offset:string = Update;
|
||||||
|
|
||||||
//@description The user has chosen a result of an inline query; for bots only @sender_user_id Identifier of the user who sent the query @user_location User location; may be null
|
//@description The user has chosen a result of an inline query; for bots only @sender_user_id Identifier of the user who sent the query @user_location User location; may be null
|
||||||
|
@ -4093,11 +4190,11 @@ updateNewInlineQuery id:int64 sender_user_id:int53 user_location:location chat_t
|
||||||
updateNewChosenInlineResult sender_user_id:int53 user_location:location query:string result_id:string inline_message_id:string = Update;
|
updateNewChosenInlineResult sender_user_id:int53 user_location:location query:string result_id:string inline_message_id:string = Update;
|
||||||
|
|
||||||
//@description A new incoming callback query; for bots only @id Unique query identifier @sender_user_id Identifier of the user who sent the query
|
//@description A new incoming callback query; for bots only @id Unique query identifier @sender_user_id Identifier of the user who sent the query
|
||||||
//@chat_id Identifier of the chat where the query was sent @message_id Identifier of the message, from which the query originated
|
//@chat_id Identifier of the chat where the query was sent @message_id Identifier of the message from which the query originated
|
||||||
//@chat_instance Identifier that uniquely corresponds to the chat to which the message was sent @payload Query payload
|
//@chat_instance Identifier that uniquely corresponds to the chat to which the message was sent @payload Query payload
|
||||||
updateNewCallbackQuery id:int64 sender_user_id:int53 chat_id:int53 message_id:int53 chat_instance:int64 payload:CallbackQueryPayload = Update;
|
updateNewCallbackQuery id:int64 sender_user_id:int53 chat_id:int53 message_id:int53 chat_instance:int64 payload:CallbackQueryPayload = Update;
|
||||||
|
|
||||||
//@description A new incoming callback query from a message sent via a bot; for bots only @id Unique query identifier @sender_user_id Identifier of the user who sent the query @inline_message_id Identifier of the inline message, from which the query originated
|
//@description A new incoming callback query from a message sent via a bot; for bots only @id Unique query identifier @sender_user_id Identifier of the user who sent the query @inline_message_id Identifier of the inline message from which the query originated
|
||||||
//@chat_instance An identifier uniquely corresponding to the chat a message was sent to @payload Query payload
|
//@chat_instance An identifier uniquely corresponding to the chat a message was sent to @payload Query payload
|
||||||
updateNewInlineCallbackQuery id:int64 sender_user_id:int53 inline_message_id:string chat_instance:int64 payload:CallbackQueryPayload = Update;
|
updateNewInlineCallbackQuery id:int64 sender_user_id:int53 inline_message_id:string chat_instance:int64 payload:CallbackQueryPayload = Update;
|
||||||
|
|
||||||
|
@ -4428,7 +4525,7 @@ getMessageThreadHistory chat_id:int53 message_id:int53 from_message_id:int53 off
|
||||||
//@chat_id Chat identifier @remove_from_chat_list Pass true to remove the chat from all chat lists @revoke Pass true to delete chat history for all users
|
//@chat_id Chat identifier @remove_from_chat_list Pass true to remove the chat from all chat lists @revoke Pass true to delete chat history for all users
|
||||||
deleteChatHistory chat_id:int53 remove_from_chat_list:Bool revoke:Bool = Ok;
|
deleteChatHistory chat_id:int53 remove_from_chat_list:Bool revoke:Bool = Ok;
|
||||||
|
|
||||||
//@description Deletes a chat along with all messages in the corresponding chat for all chat members; requires owner privileges. For group chats this will release the username and remove all members. Chats with more than 1000 members can't be deleted using this method @chat_id Chat identifier
|
//@description Deletes a chat along with all messages in the corresponding chat for all chat members. For group chats this will release the username and remove all members. Use the field chat.can_be_deleted_for_all_users to find whether the method can be applied to the chat @chat_id Chat identifier
|
||||||
deleteChat chat_id:int53 = Ok;
|
deleteChat chat_id:int53 = Ok;
|
||||||
|
|
||||||
//@description Searches for messages with given words in the chat. Returns the results in reverse chronological order, i.e. in order of decreasing message_id. Cannot be used in secret chats with a non-empty query
|
//@description Searches for messages with given words in the chat. Returns the results in reverse chronological order, i.e. in order of decreasing message_id. Cannot be used in secret chats with a non-empty query
|
||||||
|
@ -4559,7 +4656,7 @@ setChatMessageSender chat_id:int53 message_sender_id:MessageSender = Ok;
|
||||||
//@description Sends a message. Returns the sent message
|
//@description Sends a message. Returns the sent message
|
||||||
//@chat_id Target chat
|
//@chat_id Target chat
|
||||||
//@message_thread_id If not 0, a message thread identifier in which the message will be sent
|
//@message_thread_id If not 0, a message thread identifier in which the message will be sent
|
||||||
//@reply_to_message_id Identifier of the message to reply to or 0
|
//@reply_to_message_id Identifier of the replied message; 0 if none
|
||||||
//@options Options to be used to send the message; pass null to use default options
|
//@options Options to be used to send the message; pass null to use default options
|
||||||
//@reply_markup Markup for replying to the message; pass null if none; for bots only
|
//@reply_markup Markup for replying to the message; pass null if none; for bots only
|
||||||
//@input_message_content The content of the message to be sent
|
//@input_message_content The content of the message to be sent
|
||||||
|
@ -4568,7 +4665,7 @@ sendMessage chat_id:int53 message_thread_id:int53 reply_to_message_id:int53 opti
|
||||||
//@description Sends 2-10 messages grouped together into an album. Currently, only audio, document, photo and video messages can be grouped into an album. Documents and audio files can be only grouped in an album with messages of the same type. Returns sent messages
|
//@description Sends 2-10 messages grouped together into an album. Currently, only audio, document, photo and video messages can be grouped into an album. Documents and audio files can be only grouped in an album with messages of the same type. Returns sent messages
|
||||||
//@chat_id Target chat
|
//@chat_id Target chat
|
||||||
//@message_thread_id If not 0, a message thread identifier in which the messages will be sent
|
//@message_thread_id If not 0, a message thread identifier in which the messages will be sent
|
||||||
//@reply_to_message_id Identifier of a message to reply to or 0
|
//@reply_to_message_id Identifier of a replied message; 0 if none
|
||||||
//@options Options to be used to send the messages; pass null to use default options
|
//@options Options to be used to send the messages; pass null to use default options
|
||||||
//@input_message_contents Contents of messages to be sent. At most 10 messages can be added to an album
|
//@input_message_contents Contents of messages to be sent. At most 10 messages can be added to an album
|
||||||
//@only_preview Pass true to get fake messages instead of actually sending them
|
//@only_preview Pass true to get fake messages instead of actually sending them
|
||||||
|
@ -4581,7 +4678,7 @@ sendBotStartMessage bot_user_id:int53 chat_id:int53 parameter:string = Message;
|
||||||
//@description Sends the result of an inline query as a message. Returns the sent message. Always clears a chat draft message
|
//@description Sends the result of an inline query as a message. Returns the sent message. Always clears a chat draft message
|
||||||
//@chat_id Target chat
|
//@chat_id Target chat
|
||||||
//@message_thread_id If not 0, a message thread identifier in which the message will be sent
|
//@message_thread_id If not 0, a message thread identifier in which the message will be sent
|
||||||
//@reply_to_message_id Identifier of a message to reply to or 0
|
//@reply_to_message_id Identifier of a replied message; 0 if none
|
||||||
//@options Options to be used to send the message; pass null to use default options
|
//@options Options to be used to send the message; pass null to use default options
|
||||||
//@query_id Identifier of the inline query
|
//@query_id Identifier of the inline query
|
||||||
//@result_id Identifier of the inline result
|
//@result_id Identifier of the inline result
|
||||||
|
@ -4609,7 +4706,7 @@ sendChatScreenshotTakenNotification chat_id:int53 = Ok;
|
||||||
//@description Adds a local message to a chat. The message is persistent across application restarts only if the message database is used. Returns the added message
|
//@description Adds a local message to a chat. The message is persistent across application restarts only if the message database is used. Returns the added message
|
||||||
//@chat_id Target chat
|
//@chat_id Target chat
|
||||||
//@sender_id Identifier of the sender of the message
|
//@sender_id Identifier of the sender of the message
|
||||||
//@reply_to_message_id Identifier of the message to reply to or 0
|
//@reply_to_message_id Identifier of the replied message; 0 if none
|
||||||
//@disable_notification Pass true to disable notification for the message
|
//@disable_notification Pass true to disable notification for the message
|
||||||
//@input_message_content The content of the message to be added
|
//@input_message_content The content of the message to be added
|
||||||
addLocalMessage chat_id:int53 sender_id:MessageSender reply_to_message_id:int53 disable_notification:Bool input_message_content:InputMessageContent = Message;
|
addLocalMessage chat_id:int53 sender_id:MessageSender reply_to_message_id:int53 disable_notification:Bool input_message_content:InputMessageContent = Message;
|
||||||
|
@ -4753,6 +4850,9 @@ getJsonValue json:string = JsonValue;
|
||||||
//@description Converts a JsonValue object to corresponding JSON-serialized string. Can be called synchronously @json_value The JsonValue object
|
//@description Converts a JsonValue object to corresponding JSON-serialized string. Can be called synchronously @json_value The JsonValue object
|
||||||
getJsonString json_value:JsonValue = Text;
|
getJsonString json_value:JsonValue = Text;
|
||||||
|
|
||||||
|
//@description Converts a themeParameters object to corresponding JSON-serialized string. Can be called synchronously @theme Theme parameters to convert to JSON
|
||||||
|
getThemeParametersJsonString theme:themeParameters = Text;
|
||||||
|
|
||||||
|
|
||||||
//@description Changes the user answer to a poll. A poll in quiz mode can be answered only once
|
//@description Changes the user answer to a poll. A poll in quiz mode can be answered only once
|
||||||
//@chat_id Identifier of the chat to which the poll belongs
|
//@chat_id Identifier of the chat to which the poll belongs
|
||||||
|
@ -4809,6 +4909,34 @@ getInlineQueryResults bot_user_id:int53 chat_id:int53 user_location:location que
|
||||||
answerInlineQuery inline_query_id:int64 is_personal:Bool results:vector<InputInlineQueryResult> cache_time:int32 next_offset:string switch_pm_text:string switch_pm_parameter:string = Ok;
|
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
|
||||||
|
//@bot_user_id Identifier of the target bot
|
||||||
|
//@url The URL from the keyboardButtonTypeWebApp button
|
||||||
|
//@theme Preferred web app theme; pass null to use the default theme
|
||||||
|
getWebAppUrl bot_user_id:int53 url:string theme:themeParameters = HttpUrl;
|
||||||
|
|
||||||
|
//@description Sends data received from a keyboardButtonTypeWebApp web app to a bot
|
||||||
|
//@bot_user_id Identifier of the target bot @button_text Text of the keyboardButtonTypeWebApp button, which opened the web app @data Received data
|
||||||
|
sendWebAppData bot_user_id:int53 button_text:string data:string = Ok;
|
||||||
|
|
||||||
|
//@description Informs TDLib that a web app is being opened from attachment menu, a botMenuButton button, an internalLinkTypeAttachmentMenuBot link, or an inlineKeyboardButtonTypeWebApp button.
|
||||||
|
//-For each bot, a confirmation alert about data sent to the bot must be shown once
|
||||||
|
//@chat_id Identifier of the chat in which the web app is opened. Web apps can be opened only in private chats for now
|
||||||
|
//@bot_user_id Identifier of the bot, providing the web app
|
||||||
|
//@url The URL from an inlineKeyboardButtonTypeWebApp button, a botMenuButton button, or an internalLinkTypeAttachmentMenuBot link, or an empty string otherwise
|
||||||
|
//@theme Preferred web app theme; pass null to use the default theme
|
||||||
|
//@reply_to_message_id Identifier of the replied message for the message sent by the web app; 0 if none
|
||||||
|
openWebApp chat_id:int53 bot_user_id:int53 url:string theme:themeParameters reply_to_message_id:int53 = WebAppInfo;
|
||||||
|
|
||||||
|
//@description Informs TDLib that a previously opened web app was closed @web_app_launch_id Identifier of web app launch, received from openWebApp
|
||||||
|
closeWebApp web_app_launch_id:int64 = Ok;
|
||||||
|
|
||||||
|
//@description Sets the result of interaction with a web app and sends corresponding message on behalf of the user to the chat from which the query originated; for bots only
|
||||||
|
//@web_app_query_id Identifier of the web app query
|
||||||
|
//@result The result of the query
|
||||||
|
answerWebAppQuery web_app_query_id:string result:InputInlineQueryResult = SentWebAppMessage;
|
||||||
|
|
||||||
|
|
||||||
//@description Sends a callback query to a bot and returns an answer. Returns an error with code 502 if the bot fails to answer the query before the query timeout expires @chat_id Identifier of the chat with the message @message_id Identifier of the message from which the query originated @payload Query payload
|
//@description Sends a callback query to a bot and returns an answer. Returns an error with code 502 if the bot fails to answer the query before the query timeout expires @chat_id Identifier of the chat with the message @message_id Identifier of the message from which the query originated @payload Query payload
|
||||||
getCallbackQueryAnswer chat_id:int53 message_id:int53 payload:CallbackQueryPayload = CallbackQueryAnswer;
|
getCallbackQueryAnswer chat_id:int53 message_id:int53 payload:CallbackQueryPayload = CallbackQueryAnswer;
|
||||||
|
|
||||||
|
@ -4954,8 +5082,8 @@ setChatTitle chat_id:int53 title:string = Ok;
|
||||||
setChatPhoto chat_id:int53 photo:InputChatPhoto = Ok;
|
setChatPhoto chat_id:int53 photo:InputChatPhoto = Ok;
|
||||||
|
|
||||||
//@description Changes the message TTL in a chat. Requires can_delete_messages administrator right in basic groups, supergroups and channels
|
//@description Changes the message TTL in a chat. Requires can_delete_messages administrator right in basic groups, supergroups and channels
|
||||||
//-Message TTL can't be changed in a chat with the current user (Saved Messages) and the chat 777000 (Telegram)
|
//-Message TTL can't be changed in a chat with the current user (Saved Messages) and the chat 777000 (Telegram).
|
||||||
//@chat_id Chat identifier @ttl New TTL value, in seconds; must be one of 0, 86400, 7 * 86400, or 31 * 86400 unless the chat is secret
|
//@chat_id Chat identifier @ttl New TTL value, in seconds; unless the chat is secret, it must be from 0 up to 365 * 86400 and be divisible by 86400
|
||||||
setChatMessageTtl chat_id:int53 ttl:int32 = Ok;
|
setChatMessageTtl chat_id:int53 ttl:int32 = Ok;
|
||||||
|
|
||||||
//@description Changes the chat members permissions. Supported only for basic groups and supergroups. Requires can_restrict_members administrator right
|
//@description Changes the chat members permissions. Supported only for basic groups and supergroups. Requires can_restrict_members administrator right
|
||||||
|
@ -5065,6 +5193,19 @@ getChatAdministrators chat_id:int53 = ChatAdministrators;
|
||||||
clearAllDraftMessages exclude_secret_chats:Bool = Ok;
|
clearAllDraftMessages exclude_secret_chats:Bool = Ok;
|
||||||
|
|
||||||
|
|
||||||
|
//@description Returns saved notification sound by its identifier. Returns a 404 error if there is no saved notification sound with the specified identifier @notification_sound_id Identifier of the notification sound
|
||||||
|
getSavedNotificationSound notification_sound_id:int64 = NotificationSounds;
|
||||||
|
|
||||||
|
//@description Returns list of saved notification sounds. If a sound isn't in the list, then default sound needs to be used
|
||||||
|
getSavedNotificationSounds = NotificationSounds;
|
||||||
|
|
||||||
|
//@description Adds a new notification sound to the list of saved notification sounds. The new notification sound is added to the top of the list. If it is already in the list, its position isn't changed @sound Notification sound file to add
|
||||||
|
addSavedNotificationSound sound:InputFile = NotificationSound;
|
||||||
|
|
||||||
|
//@description Removes a notification sound from the list of saved notification sounds @notification_sound_id Identifier of the notification sound
|
||||||
|
removeSavedNotificationSound notification_sound_id:int64 = Ok;
|
||||||
|
|
||||||
|
|
||||||
//@description Returns list of chats with non-default notification settings
|
//@description Returns list of chats with non-default notification settings
|
||||||
//@scope If specified, only chats from the scope will be returned; pass null to return chats from all scopes
|
//@scope If specified, only chats from the scope will be returned; pass null to return chats from all scopes
|
||||||
//@compare_sound Pass true to include in the response chats with only non-default sound
|
//@compare_sound Pass true to include in the response chats with only non-default sound
|
||||||
|
@ -5076,7 +5217,7 @@ getScopeNotificationSettings scope:NotificationSettingsScope = ScopeNotification
|
||||||
//@description Changes notification settings for chats of a given type @scope Types of chats for which to change the notification settings @notification_settings The new notification settings for the given scope
|
//@description Changes notification settings for chats of a given type @scope Types of chats for which to change the notification settings @notification_settings The new notification settings for the given scope
|
||||||
setScopeNotificationSettings scope:NotificationSettingsScope notification_settings:scopeNotificationSettings = Ok;
|
setScopeNotificationSettings scope:NotificationSettingsScope notification_settings:scopeNotificationSettings = Ok;
|
||||||
|
|
||||||
//@description Resets all notification settings to their default values. By default, all chats are unmuted, the sound is set to "default" and message previews are shown
|
//@description Resets all notification settings to their default values. By default, all chats are unmuted and message previews are shown
|
||||||
resetAllNotificationSettings = Ok;
|
resetAllNotificationSettings = Ok;
|
||||||
|
|
||||||
|
|
||||||
|
@ -5088,6 +5229,13 @@ toggleChatIsPinned chat_list:ChatList chat_id:int53 is_pinned:Bool = Ok;
|
||||||
setPinnedChats chat_list:ChatList chat_ids:vector<int53> = Ok;
|
setPinnedChats chat_list:ChatList chat_ids:vector<int53> = Ok;
|
||||||
|
|
||||||
|
|
||||||
|
//@description Returns information about a bot that can be added to attachment menu @bot_user_id Bot's user identifier
|
||||||
|
getAttachmentMenuBot bot_user_id:int53 = AttachmentMenuBot;
|
||||||
|
|
||||||
|
//@description Adds or removes a bot to attachment menu. Bot can be added to attachment menu, only if userTypeBot.can_be_added_to_attachment_menu == true @bot_user_id Bot's user identifier @is_added Pass true to add the bot to attachment menu; pass false to remove the bot from attachment menu
|
||||||
|
toggleBotIsAddedToAttachmentMenu bot_user_id:int53 is_added:Bool = Ok;
|
||||||
|
|
||||||
|
|
||||||
//@description Downloads a file from the cloud. Download progress and completion of the download will be notified through updateFile updates
|
//@description Downloads a file from the cloud. Download progress and completion of the download will be notified through updateFile updates
|
||||||
//@file_id Identifier of the file to download
|
//@file_id Identifier of the file to download
|
||||||
//@priority Priority of the download (1-32). The higher the priority, the earlier the file will be downloaded. If the priorities of two files are equal, then the last one for which downloadFile/addFileToDownloads was called will be downloaded first
|
//@priority Priority of the download (1-32). The higher the priority, the earlier the file will be downloaded. If the priorities of two files are equal, then the last one for which downloadFile/addFileToDownloads was called will be downloaded first
|
||||||
|
@ -5291,7 +5439,7 @@ getVideoChatAvailableParticipants chat_id:int53 = MessageSenders;
|
||||||
setVideoChatDefaultParticipant chat_id:int53 default_participant_id:MessageSender = Ok;
|
setVideoChatDefaultParticipant chat_id:int53 default_participant_id:MessageSender = Ok;
|
||||||
|
|
||||||
//@description Creates a video chat (a group call bound to a chat). Available only for basic groups, supergroups and channels; requires can_manage_video_chats rights
|
//@description Creates a video chat (a group call bound to a chat). Available only for basic groups, supergroups and channels; requires can_manage_video_chats rights
|
||||||
//@chat_id Chat identifier, in which the video chat will be created
|
//@chat_id Identifier of a chat in which the video chat will be created
|
||||||
//@title Group call title; if empty, chat title will be used
|
//@title Group call title; if empty, chat title will be used
|
||||||
//@start_date Point in time (Unix timestamp) when the group call is supposed to be started by an administrator; 0 to start the video chat immediately. The date must be at least 10 seconds and at most 8 days in the future
|
//@start_date Point in time (Unix timestamp) when the group call is supposed to be started by an administrator; 0 to start the video chat immediately. The date must be at least 10 seconds and at most 8 days in the future
|
||||||
//@is_rtmp_stream Pass true to create an RTMP stream instead of an ordinary video chat; requires creator privileges
|
//@is_rtmp_stream Pass true to create an RTMP stream instead of an ordinary video chat; requires creator privileges
|
||||||
|
@ -5610,6 +5758,20 @@ deleteCommands scope:BotCommandScope language_code:string = Ok;
|
||||||
//@language_code A two-letter ISO 639-1 language code or an empty string
|
//@language_code A two-letter ISO 639-1 language code or an empty string
|
||||||
getCommands scope:BotCommandScope language_code:string = BotCommands;
|
getCommands scope:BotCommandScope language_code:string = BotCommands;
|
||||||
|
|
||||||
|
//@description Sets menu button for the given user or for all users; for bots only
|
||||||
|
//@user_id Identifier of the user or 0 to set menu button for all users
|
||||||
|
//@menu_button New menu button
|
||||||
|
setMenuButton user_id:int53 menu_button:botMenuButton = Ok;
|
||||||
|
|
||||||
|
//@description Returns menu button set by the bot for the given user; for bots only @user_id Identifier of the user or 0 to get the default menu button
|
||||||
|
getMenuButton user_id:int53 = BotMenuButton;
|
||||||
|
|
||||||
|
//@description Sets default administrator rights for adding the bot to basic group and supergroup chats; for bots only @default_group_administrator_rights Default administrator rights for adding the bot to basic group and supergroup chats; may be null
|
||||||
|
setDefaultGroupAdministratorRights default_group_administrator_rights:chatAdministratorRights = Ok;
|
||||||
|
|
||||||
|
//@description Sets default administrator rights for adding the bot to channel chats; for bots only @default_channel_administrator_rights Default administrator rights for adding the bot to channels; may be null
|
||||||
|
setDefaultChannelAdministratorRights default_channel_administrator_rights:chatAdministratorRights = Ok;
|
||||||
|
|
||||||
|
|
||||||
//@description Returns all active sessions of the current user
|
//@description Returns all active sessions of the current user
|
||||||
getActiveSessions = Sessions;
|
getActiveSessions = Sessions;
|
||||||
|
@ -5677,7 +5839,7 @@ getChatEventLog chat_id:int53 query:string from_event_id:int64 limit:int32 filte
|
||||||
//@chat_id Chat identifier of the Invoice message
|
//@chat_id Chat identifier of the Invoice message
|
||||||
//@message_id Message identifier
|
//@message_id Message identifier
|
||||||
//@theme Preferred payment form theme; pass null to use the default theme
|
//@theme Preferred payment form theme; pass null to use the default theme
|
||||||
getPaymentForm chat_id:int53 message_id:int53 theme:paymentFormTheme = PaymentForm;
|
getPaymentForm chat_id:int53 message_id:int53 theme:themeParameters = PaymentForm;
|
||||||
|
|
||||||
//@description Validates the order information provided by a user and returns the available shipping options for a flexible invoice
|
//@description Validates the order information provided by a user and returns the available shipping options for a flexible invoice
|
||||||
//@chat_id Chat identifier of the Invoice message
|
//@chat_id Chat identifier of the Invoice message
|
||||||
|
@ -5966,7 +6128,7 @@ setStickerPositionInSet sticker:InputFile position:int32 = Ok;
|
||||||
removeStickerFromSet sticker:InputFile = Ok;
|
removeStickerFromSet sticker:InputFile = 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 @location Location of the map center @zoom Map zoom level; 13-20 @width Map width in pixels before applying scale; 16-1024 @height Map height in pixels before applying scale; 16-1024 @scale Map scale; 1-3 @chat_id Identifier of a chat, in which the thumbnail will be shown. Use 0 if unknown
|
//@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 @zoom Map zoom level; 13-20 @width Map width in pixels before applying scale; 16-1024 @height Map height in pixels before applying scale; 16-1024 @scale Map scale; 1-3 @chat_id Identifier of a chat in which the thumbnail will be shown. Use 0 if unknown
|
||||||
getMapThumbnailFile location:location zoom:int32 width:int32 height:int32 scale:int32 chat_id:int53 = File;
|
getMapThumbnailFile location:location zoom:int32 width:int32 height:int32 scale:int32 chat_id:int53 = File;
|
||||||
|
|
||||||
|
|
||||||
|
@ -6084,7 +6246,7 @@ testSquareInt x:int32 = TestInt;
|
||||||
//@description Sends a simple network request to the Telegram servers; for testing only. Can be called before authorization
|
//@description Sends a simple network request to the Telegram servers; for testing only. Can be called before authorization
|
||||||
testNetwork = Ok;
|
testNetwork = Ok;
|
||||||
//@description Sends a simple network request to the Telegram servers via proxy; for testing only. Can be called before authorization @server Proxy server IP address @port Proxy server port @type Proxy type
|
//@description Sends a simple network request to the Telegram servers via proxy; for testing only. Can be called before authorization @server Proxy server IP address @port Proxy server port @type Proxy type
|
||||||
//@dc_id Identifier of a datacenter, with which to test connection @timeout The maximum overall timeout for the request
|
//@dc_id Identifier of a datacenter with which to test connection @timeout The maximum overall timeout for the request
|
||||||
testProxy server:string port:int32 type:ProxyType dc_id:int32 timeout:double = Ok;
|
testProxy server:string port:int32 type:ProxyType dc_id:int32 timeout:double = Ok;
|
||||||
//@description Forces an updates.getDifference call to the Telegram servers; for testing only
|
//@description Forces an updates.getDifference call to the Telegram servers; for testing only
|
||||||
testGetDifference = Ok;
|
testGetDifference = Ok;
|
||||||
|
|
Loading…
Reference in a new issue