mirror of
https://github.com/c0re100/gotdlib.git
synced 2026-02-21 20:20:17 +01:00
Update to TDLib 1.8.27
This commit is contained in:
parent
7005072ba4
commit
0465eebee7
4 changed files with 2661 additions and 127 deletions
|
|
@ -2200,6 +2200,25 @@ func (client *Client) GetInactiveSupergroupChats() (*Chats, error) {
|
|||
return UnmarshalChats(result.Data)
|
||||
}
|
||||
|
||||
// Returns a list of channel chats, which can be used as a personal chat
|
||||
func (client *Client) GetSuitablePersonalChats() (*Chats, error) {
|
||||
result, err := client.Send(Request{
|
||||
meta: meta{
|
||||
Type: "getSuitablePersonalChats",
|
||||
},
|
||||
Data: map[string]interface{}{},
|
||||
})
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
if result.Type == "error" {
|
||||
return nil, buildResponseError(result.Data)
|
||||
}
|
||||
|
||||
return UnmarshalChats(result.Data)
|
||||
}
|
||||
|
||||
type LoadSavedMessagesTopicsRequest struct {
|
||||
// The maximum number of topics to be loaded. For optimal performance, the number of loaded topics is chosen by TDLib and can be smaller than the specified limit, even if the end of the list is not reached
|
||||
Limit int32 `json:"limit"`
|
||||
|
|
@ -3133,6 +3152,56 @@ func (client *Client) ClickChatSponsoredMessage(req *ClickChatSponsoredMessageRe
|
|||
return UnmarshalOk(result.Data)
|
||||
}
|
||||
|
||||
type ReportChatSponsoredMessageRequest struct {
|
||||
// Chat identifier of the sponsored message
|
||||
ChatId int64 `json:"chat_id"`
|
||||
// Identifier of the sponsored message
|
||||
MessageId int64 `json:"message_id"`
|
||||
// Option identifier chosen by the user; leave empty for the initial request
|
||||
OptionId []byte `json:"option_id"`
|
||||
}
|
||||
|
||||
// Reports a sponsored message to Telegram moderators
|
||||
func (client *Client) ReportChatSponsoredMessage(req *ReportChatSponsoredMessageRequest) (ReportChatSponsoredMessageResult, error) {
|
||||
result, err := client.Send(Request{
|
||||
meta: meta{
|
||||
Type: "reportChatSponsoredMessage",
|
||||
},
|
||||
Data: map[string]interface{}{
|
||||
"chat_id": req.ChatId,
|
||||
"message_id": req.MessageId,
|
||||
"option_id": req.OptionId,
|
||||
},
|
||||
})
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
if result.Type == "error" {
|
||||
return nil, buildResponseError(result.Data)
|
||||
}
|
||||
|
||||
switch result.Type {
|
||||
case TypeReportChatSponsoredMessageResultOk:
|
||||
return UnmarshalReportChatSponsoredMessageResultOk(result.Data)
|
||||
|
||||
case TypeReportChatSponsoredMessageResultFailed:
|
||||
return UnmarshalReportChatSponsoredMessageResultFailed(result.Data)
|
||||
|
||||
case TypeReportChatSponsoredMessageResultOptionRequired:
|
||||
return UnmarshalReportChatSponsoredMessageResultOptionRequired(result.Data)
|
||||
|
||||
case TypeReportChatSponsoredMessageResultAdsHidden:
|
||||
return UnmarshalReportChatSponsoredMessageResultAdsHidden(result.Data)
|
||||
|
||||
case TypeReportChatSponsoredMessageResultPremiumRequired:
|
||||
return UnmarshalReportChatSponsoredMessageResultPremiumRequired(result.Data)
|
||||
|
||||
default:
|
||||
return nil, errors.New("invalid type")
|
||||
}
|
||||
}
|
||||
|
||||
type RemoveNotificationRequest struct {
|
||||
// Identifier of notification group to which the notification belongs
|
||||
NotificationGroupId int32 `json:"notification_group_id"`
|
||||
|
|
@ -4260,6 +4329,91 @@ func (client *Client) EditMessageSchedulingState(req *EditMessageSchedulingState
|
|||
return UnmarshalOk(result.Data)
|
||||
}
|
||||
|
||||
type SendBusinessMessageRequest struct {
|
||||
// Unique identifier of business connection on behalf of which to send the request
|
||||
BusinessConnectionId string `json:"business_connection_id"`
|
||||
// Target chat
|
||||
ChatId int64 `json:"chat_id"`
|
||||
// Information about the message to be replied; pass null if none
|
||||
ReplyTo InputMessageReplyTo `json:"reply_to"`
|
||||
// Pass true to disable notification for the message
|
||||
DisableNotification bool `json:"disable_notification"`
|
||||
// Pass true if the content of the message must be protected from forwarding and saving
|
||||
ProtectContent bool `json:"protect_content"`
|
||||
// Markup for replying to the message; pass null if none
|
||||
ReplyMarkup ReplyMarkup `json:"reply_markup"`
|
||||
// The content of the message to be sent
|
||||
InputMessageContent InputMessageContent `json:"input_message_content"`
|
||||
}
|
||||
|
||||
// Sends a message on behalf of a business account; for bots only. Returns the message after it was sent
|
||||
func (client *Client) SendBusinessMessage(req *SendBusinessMessageRequest) (*BusinessMessage, error) {
|
||||
result, err := client.Send(Request{
|
||||
meta: meta{
|
||||
Type: "sendBusinessMessage",
|
||||
},
|
||||
Data: map[string]interface{}{
|
||||
"business_connection_id": req.BusinessConnectionId,
|
||||
"chat_id": req.ChatId,
|
||||
"reply_to": req.ReplyTo,
|
||||
"disable_notification": req.DisableNotification,
|
||||
"protect_content": req.ProtectContent,
|
||||
"reply_markup": req.ReplyMarkup,
|
||||
"input_message_content": req.InputMessageContent,
|
||||
},
|
||||
})
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
if result.Type == "error" {
|
||||
return nil, buildResponseError(result.Data)
|
||||
}
|
||||
|
||||
return UnmarshalBusinessMessage(result.Data)
|
||||
}
|
||||
|
||||
type SendBusinessMessageAlbumRequest struct {
|
||||
// Unique identifier of business connection on behalf of which to send the request
|
||||
BusinessConnectionId string `json:"business_connection_id"`
|
||||
// Target chat
|
||||
ChatId int64 `json:"chat_id"`
|
||||
// Information about the message to be replied; pass null if none
|
||||
ReplyTo InputMessageReplyTo `json:"reply_to"`
|
||||
// Pass true to disable notification for the message
|
||||
DisableNotification bool `json:"disable_notification"`
|
||||
// Pass true if the content of the message must be protected from forwarding and saving
|
||||
ProtectContent bool `json:"protect_content"`
|
||||
// Contents of messages to be sent. At most 10 messages can be added to an album
|
||||
InputMessageContents []InputMessageContent `json:"input_message_contents"`
|
||||
}
|
||||
|
||||
// Sends 2-10 messages grouped together into an album on behalf of a business account; for bots only. 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
|
||||
func (client *Client) SendBusinessMessageAlbum(req *SendBusinessMessageAlbumRequest) (*BusinessMessages, error) {
|
||||
result, err := client.Send(Request{
|
||||
meta: meta{
|
||||
Type: "sendBusinessMessageAlbum",
|
||||
},
|
||||
Data: map[string]interface{}{
|
||||
"business_connection_id": req.BusinessConnectionId,
|
||||
"chat_id": req.ChatId,
|
||||
"reply_to": req.ReplyTo,
|
||||
"disable_notification": req.DisableNotification,
|
||||
"protect_content": req.ProtectContent,
|
||||
"input_message_contents": req.InputMessageContents,
|
||||
},
|
||||
})
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
if result.Type == "error" {
|
||||
return nil, buildResponseError(result.Data)
|
||||
}
|
||||
|
||||
return UnmarshalBusinessMessages(result.Data)
|
||||
}
|
||||
|
||||
type CheckQuickReplyShortcutNameRequest struct {
|
||||
// The name of the shortcut; 1-32 characters
|
||||
Name string `json:"name"`
|
||||
|
|
@ -5719,6 +5873,32 @@ func (client *Client) HideSuggestedAction(req *HideSuggestedActionRequest) (*Ok,
|
|||
return UnmarshalOk(result.Data)
|
||||
}
|
||||
|
||||
type GetBusinessConnectionRequest struct {
|
||||
// Identifier of the business connection to return
|
||||
ConnectionId string `json:"connection_id"`
|
||||
}
|
||||
|
||||
// Returns information about a business connection by its identifier; for bots only
|
||||
func (client *Client) GetBusinessConnection(req *GetBusinessConnectionRequest) (*BusinessConnection, error) {
|
||||
result, err := client.Send(Request{
|
||||
meta: meta{
|
||||
Type: "getBusinessConnection",
|
||||
},
|
||||
Data: map[string]interface{}{
|
||||
"connection_id": req.ConnectionId,
|
||||
},
|
||||
})
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
if result.Type == "error" {
|
||||
return nil, buildResponseError(result.Data)
|
||||
}
|
||||
|
||||
return UnmarshalBusinessConnection(result.Data)
|
||||
}
|
||||
|
||||
type GetLoginUrlInfoRequest struct {
|
||||
// Chat identifier of the message with the button
|
||||
ChatId int64 `json:"chat_id"`
|
||||
|
|
@ -6494,6 +6674,8 @@ type SendChatActionRequest struct {
|
|||
ChatId int64 `json:"chat_id"`
|
||||
// If not 0, the message thread identifier in which the action was performed
|
||||
MessageThreadId int64 `json:"message_thread_id"`
|
||||
// Unique identifier of business connection on behalf of which to send the request; for bots only
|
||||
BusinessConnectionId string `json:"business_connection_id"`
|
||||
// The action description; pass null to cancel the currently active action
|
||||
Action ChatAction `json:"action"`
|
||||
}
|
||||
|
|
@ -6507,6 +6689,7 @@ func (client *Client) SendChatAction(req *SendChatActionRequest) (*Ok, error) {
|
|||
Data: map[string]interface{}{
|
||||
"chat_id": req.ChatId,
|
||||
"message_thread_id": req.MessageThreadId,
|
||||
"business_connection_id": req.BusinessConnectionId,
|
||||
"action": req.Action,
|
||||
},
|
||||
})
|
||||
|
|
@ -9451,7 +9634,7 @@ type SendStoryRequest struct {
|
|||
Content InputStoryContent `json:"content"`
|
||||
// Clickable rectangle areas to be shown on the story media; pass null if none
|
||||
Areas *InputStoryAreas `json:"areas"`
|
||||
// Story caption; pass null to use an empty caption; 0-getOption("story_caption_length_max") characters
|
||||
// Story caption; pass null to use an empty caption; 0-getOption("story_caption_length_max") characters; can have entities only if getOption("can_use_text_entities_in_story_caption")
|
||||
Caption *FormattedText `json:"caption"`
|
||||
// The privacy settings for the story; ignored for stories sent to supergroup and channel chats
|
||||
PrivacySettings StoryPrivacySettings `json:"privacy_settings"`
|
||||
|
|
@ -13353,7 +13536,7 @@ func (client *Client) GetInstalledStickerSets(req *GetInstalledStickerSetsReques
|
|||
type GetArchivedStickerSetsRequest struct {
|
||||
// Type of the sticker sets to return
|
||||
StickerType StickerType `json:"sticker_type"`
|
||||
// Identifier of the sticker set from which to return the result
|
||||
// Identifier of the sticker set from which to return the result; use 0 to get results from the beginning
|
||||
OffsetStickerSetId JsonInt64 `json:"offset_sticker_set_id"`
|
||||
// The maximum number of sticker sets to return; up to 100
|
||||
Limit int32 `json:"limit"`
|
||||
|
|
@ -13673,7 +13856,7 @@ type AddRecentStickerRequest struct {
|
|||
Sticker InputFile `json:"sticker"`
|
||||
}
|
||||
|
||||
// Manually adds a new sticker to the list of recently used stickers. The new sticker is added to the top of the list. If the sticker was already in the list, it is removed from the list first. Only stickers belonging to a sticker set or in WEBP format can be added to this list. Emoji stickers can't be added to recent stickers
|
||||
// Manually adds a new sticker to the list of recently used stickers. The new sticker is added to the top of the list. If the sticker was already in the list, it is removed from the list first. Only stickers belonging to a sticker set or in WEBP or WEBM format can be added to this list. Emoji stickers can't be added to recent stickers
|
||||
func (client *Client) AddRecentSticker(req *AddRecentStickerRequest) (*Stickers, error) {
|
||||
result, err := client.Send(Request{
|
||||
meta: meta{
|
||||
|
|
@ -13774,7 +13957,7 @@ type AddFavoriteStickerRequest struct {
|
|||
Sticker InputFile `json:"sticker"`
|
||||
}
|
||||
|
||||
// Adds a new sticker to the list of favorite stickers. The new sticker is added to the top of the list. If the sticker was already in the list, it is removed from the list first. Only stickers belonging to a sticker set or in WEBP format can be added to this list. Emoji stickers can't be added to favorite stickers
|
||||
// Adds a new sticker to the list of favorite stickers. The new sticker is added to the top of the list. If the sticker was already in the list, it is removed from the list first. Only stickers belonging to a sticker set or in WEBP or WEBM format can be added to this list. Emoji stickers can't be added to favorite stickers
|
||||
func (client *Client) AddFavoriteSticker(req *AddFavoriteStickerRequest) (*Ok, error) {
|
||||
result, err := client.Send(Request{
|
||||
meta: meta{
|
||||
|
|
@ -14518,6 +14701,58 @@ func (client *Client) ReorderActiveUsernames(req *ReorderActiveUsernamesRequest)
|
|||
return UnmarshalOk(result.Data)
|
||||
}
|
||||
|
||||
type SetBirthdateRequest struct {
|
||||
// The new value of the current user's birthdate; pass null to remove the birthdate
|
||||
Birthdate *Birthdate `json:"birthdate"`
|
||||
}
|
||||
|
||||
// Changes the birthdate of the current user
|
||||
func (client *Client) SetBirthdate(req *SetBirthdateRequest) (*Ok, error) {
|
||||
result, err := client.Send(Request{
|
||||
meta: meta{
|
||||
Type: "setBirthdate",
|
||||
},
|
||||
Data: map[string]interface{}{
|
||||
"birthdate": req.Birthdate,
|
||||
},
|
||||
})
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
if result.Type == "error" {
|
||||
return nil, buildResponseError(result.Data)
|
||||
}
|
||||
|
||||
return UnmarshalOk(result.Data)
|
||||
}
|
||||
|
||||
type SetPersonalChatRequest struct {
|
||||
// Identifier of the new personal chat; pass 0 to remove the chat. Use getSuitablePersonalChats to get suitable chats
|
||||
ChatId int64 `json:"chat_id"`
|
||||
}
|
||||
|
||||
// Changes the personal chat of the current user
|
||||
func (client *Client) SetPersonalChat(req *SetPersonalChatRequest) (*Ok, error) {
|
||||
result, err := client.Send(Request{
|
||||
meta: meta{
|
||||
Type: "setPersonalChat",
|
||||
},
|
||||
Data: map[string]interface{}{
|
||||
"chat_id": req.ChatId,
|
||||
},
|
||||
})
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
if result.Type == "error" {
|
||||
return nil, buildResponseError(result.Data)
|
||||
}
|
||||
|
||||
return UnmarshalOk(result.Data)
|
||||
}
|
||||
|
||||
type SetEmojiStatusRequest struct {
|
||||
// New emoji status; pass null to switch to the default badge
|
||||
EmojiStatus *EmojiStatus `json:"emoji_status"`
|
||||
|
|
@ -14597,7 +14832,7 @@ func (client *Client) SetBusinessLocation(req *SetBusinessLocationRequest) (*Ok,
|
|||
}
|
||||
|
||||
type SetBusinessOpeningHoursRequest struct {
|
||||
// The new opening hours of the business; pass null to remove the opening hours
|
||||
// The new opening hours of the business; pass null to remove the opening hours; up to 28 time intervals can be specified
|
||||
OpeningHours *BusinessOpeningHours `json:"opening_hours"`
|
||||
}
|
||||
|
||||
|
|
@ -14674,6 +14909,32 @@ func (client *Client) SetBusinessAwayMessageSettings(req *SetBusinessAwayMessage
|
|||
return UnmarshalOk(result.Data)
|
||||
}
|
||||
|
||||
type SetBusinessIntroRequest struct {
|
||||
// The new intro of the business; pass null to remove the intro
|
||||
Intro *InputBusinessIntro `json:"intro"`
|
||||
}
|
||||
|
||||
// Changes the business intro of the current user. Requires Telegram Business subscription
|
||||
func (client *Client) SetBusinessIntro(req *SetBusinessIntroRequest) (*Ok, error) {
|
||||
result, err := client.Send(Request{
|
||||
meta: meta{
|
||||
Type: "setBusinessIntro",
|
||||
},
|
||||
Data: map[string]interface{}{
|
||||
"intro": req.Intro,
|
||||
},
|
||||
})
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
if result.Type == "error" {
|
||||
return nil, buildResponseError(result.Data)
|
||||
}
|
||||
|
||||
return UnmarshalOk(result.Data)
|
||||
}
|
||||
|
||||
type ChangePhoneNumberRequest struct {
|
||||
// The new phone number of the user in international format
|
||||
PhoneNumber string `json:"phone_number"`
|
||||
|
|
@ -17144,7 +17405,7 @@ type SetNewChatPrivacySettingsRequest struct {
|
|||
Settings *NewChatPrivacySettings `json:"settings"`
|
||||
}
|
||||
|
||||
// Changes privacy settings for new chat creation; for Telegram Premium users only
|
||||
// Changes privacy settings for new chat creation; can be used only if getOption("can_set_new_chat_privacy_settings")
|
||||
func (client *Client) SetNewChatPrivacySettings(req *SetNewChatPrivacySettingsRequest) (*Ok, error) {
|
||||
result, err := client.Send(Request{
|
||||
meta: meta{
|
||||
|
|
@ -18774,15 +19035,13 @@ type CreateNewStickerSetRequest struct {
|
|||
UserId int64 `json:"user_id"`
|
||||
// Sticker set title; 1-64 characters
|
||||
Title string `json:"title"`
|
||||
// Sticker set name. Can contain only English letters, digits and underscores. Must end with *"_by_<bot username>"* (*<bot_username>* is case insensitive) for bots; 1-64 characters
|
||||
// Sticker set name. Can contain only English letters, digits and underscores. Must end with *"_by_<bot username>"* (*<bot_username>* is case insensitive) for bots; 0-64 characters. If empty, then the name returned by getSuggestedStickerSetName will be used automatically
|
||||
Name string `json:"name"`
|
||||
// Format of the stickers in the set
|
||||
StickerFormat StickerFormat `json:"sticker_format"`
|
||||
// Type of the stickers in the set
|
||||
StickerType StickerType `json:"sticker_type"`
|
||||
// Pass true if stickers in the sticker set must be repainted; for custom emoji sticker sets only
|
||||
NeedsRepainting bool `json:"needs_repainting"`
|
||||
// List of stickers to be added to the set; must be non-empty. All stickers must have the same format. For TGS stickers, uploadStickerFile must be used before the sticker is shown
|
||||
// List of stickers to be added to the set; 1-200 stickers for custom emoji sticker sets, and 1-120 stickers otherwise. For TGS stickers, uploadStickerFile must be used before the sticker is shown
|
||||
Stickers []*InputSticker `json:"stickers"`
|
||||
// Source of the sticker set; may be empty if unknown
|
||||
Source string `json:"source"`
|
||||
|
|
@ -18798,7 +19057,6 @@ func (client *Client) CreateNewStickerSet(req *CreateNewStickerSetRequest) (*Sti
|
|||
"user_id": req.UserId,
|
||||
"title": req.Title,
|
||||
"name": req.Name,
|
||||
"sticker_format": req.StickerFormat,
|
||||
"sticker_type": req.StickerType,
|
||||
"needs_repainting": req.NeedsRepainting,
|
||||
"stickers": req.Stickers,
|
||||
|
|
@ -18817,15 +19075,15 @@ func (client *Client) CreateNewStickerSet(req *CreateNewStickerSetRequest) (*Sti
|
|||
}
|
||||
|
||||
type AddStickerToSetRequest struct {
|
||||
// Sticker set owner
|
||||
// Sticker set owner; ignored for regular users
|
||||
UserId int64 `json:"user_id"`
|
||||
// Sticker set name
|
||||
// Sticker set name. The sticker set must be owned by the current user, and contain less than 200 stickers for custom emoji sticker sets and less than 120 otherwise
|
||||
Name string `json:"name"`
|
||||
// Sticker to add to the set
|
||||
Sticker *InputSticker `json:"sticker"`
|
||||
}
|
||||
|
||||
// Adds a new sticker to a set; for bots only
|
||||
// Adds a new sticker to a set
|
||||
func (client *Client) AddStickerToSet(req *AddStickerToSetRequest) (*Ok, error) {
|
||||
result, err := client.Send(Request{
|
||||
meta: meta{
|
||||
|
|
@ -18848,16 +19106,53 @@ func (client *Client) AddStickerToSet(req *AddStickerToSetRequest) (*Ok, error)
|
|||
return UnmarshalOk(result.Data)
|
||||
}
|
||||
|
||||
type SetStickerSetThumbnailRequest struct {
|
||||
// Sticker set owner
|
||||
type ReplaceStickerInSetRequest struct {
|
||||
// Sticker set owner; ignored for regular users
|
||||
UserId int64 `json:"user_id"`
|
||||
// Sticker set name
|
||||
// Sticker set name. The sticker set must be owned by the current user
|
||||
Name string `json:"name"`
|
||||
// Thumbnail to set in PNG, TGS, or WEBM format; pass null to remove the sticker set thumbnail. Thumbnail format must match the format of stickers in the set
|
||||
Thumbnail InputFile `json:"thumbnail"`
|
||||
// Sticker to remove from the set
|
||||
OldSticker InputFile `json:"old_sticker"`
|
||||
// Sticker to add to the set
|
||||
NewSticker *InputSticker `json:"new_sticker"`
|
||||
}
|
||||
|
||||
// Sets a sticker set thumbnail; for bots only
|
||||
// Replaces existing sticker in a set. The function is equivalent to removeStickerFromSet, then addStickerToSet, then setStickerPositionInSet
|
||||
func (client *Client) ReplaceStickerInSet(req *ReplaceStickerInSetRequest) (*Ok, error) {
|
||||
result, err := client.Send(Request{
|
||||
meta: meta{
|
||||
Type: "replaceStickerInSet",
|
||||
},
|
||||
Data: map[string]interface{}{
|
||||
"user_id": req.UserId,
|
||||
"name": req.Name,
|
||||
"old_sticker": req.OldSticker,
|
||||
"new_sticker": req.NewSticker,
|
||||
},
|
||||
})
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
if result.Type == "error" {
|
||||
return nil, buildResponseError(result.Data)
|
||||
}
|
||||
|
||||
return UnmarshalOk(result.Data)
|
||||
}
|
||||
|
||||
type SetStickerSetThumbnailRequest struct {
|
||||
// Sticker set owner; ignored for regular users
|
||||
UserId int64 `json:"user_id"`
|
||||
// Sticker set name. The sticker set must be owned by the current user
|
||||
Name string `json:"name"`
|
||||
// Thumbnail to set; pass null to remove the sticker set thumbnail
|
||||
Thumbnail InputFile `json:"thumbnail"`
|
||||
// Format of the thumbnail; pass null if thumbnail is removed
|
||||
Format StickerFormat `json:"format"`
|
||||
}
|
||||
|
||||
// Sets a sticker set thumbnail
|
||||
func (client *Client) SetStickerSetThumbnail(req *SetStickerSetThumbnailRequest) (*Ok, error) {
|
||||
result, err := client.Send(Request{
|
||||
meta: meta{
|
||||
|
|
@ -18867,6 +19162,7 @@ func (client *Client) SetStickerSetThumbnail(req *SetStickerSetThumbnailRequest)
|
|||
"user_id": req.UserId,
|
||||
"name": req.Name,
|
||||
"thumbnail": req.Thumbnail,
|
||||
"format": req.Format,
|
||||
},
|
||||
})
|
||||
if err != nil {
|
||||
|
|
@ -18881,13 +19177,13 @@ func (client *Client) SetStickerSetThumbnail(req *SetStickerSetThumbnailRequest)
|
|||
}
|
||||
|
||||
type SetCustomEmojiStickerSetThumbnailRequest struct {
|
||||
// Sticker set name
|
||||
// Sticker set name. The sticker set must be owned by the current user
|
||||
Name string `json:"name"`
|
||||
// Identifier of the custom emoji from the sticker set, which will be set as sticker set thumbnail; pass 0 to remove the sticker set thumbnail
|
||||
CustomEmojiId JsonInt64 `json:"custom_emoji_id"`
|
||||
}
|
||||
|
||||
// Sets a custom emoji sticker set thumbnail; for bots only
|
||||
// Sets a custom emoji sticker set thumbnail
|
||||
func (client *Client) SetCustomEmojiStickerSetThumbnail(req *SetCustomEmojiStickerSetThumbnailRequest) (*Ok, error) {
|
||||
result, err := client.Send(Request{
|
||||
meta: meta{
|
||||
|
|
@ -18910,13 +19206,13 @@ func (client *Client) SetCustomEmojiStickerSetThumbnail(req *SetCustomEmojiStick
|
|||
}
|
||||
|
||||
type SetStickerSetTitleRequest struct {
|
||||
// Sticker set name
|
||||
// Sticker set name. The sticker set must be owned by the current user
|
||||
Name string `json:"name"`
|
||||
// New sticker set title
|
||||
Title string `json:"title"`
|
||||
}
|
||||
|
||||
// Sets a sticker set title; for bots only
|
||||
// Sets a sticker set title
|
||||
func (client *Client) SetStickerSetTitle(req *SetStickerSetTitleRequest) (*Ok, error) {
|
||||
result, err := client.Send(Request{
|
||||
meta: meta{
|
||||
|
|
@ -18939,11 +19235,11 @@ func (client *Client) SetStickerSetTitle(req *SetStickerSetTitleRequest) (*Ok, e
|
|||
}
|
||||
|
||||
type DeleteStickerSetRequest struct {
|
||||
// Sticker set name
|
||||
// Sticker set name. The sticker set must be owned by the current user
|
||||
Name string `json:"name"`
|
||||
}
|
||||
|
||||
// Deleted a sticker set; for bots only
|
||||
// Completely deletes a sticker set
|
||||
func (client *Client) DeleteStickerSet(req *DeleteStickerSetRequest) (*Ok, error) {
|
||||
result, err := client.Send(Request{
|
||||
meta: meta{
|
||||
|
|
@ -18971,7 +19267,7 @@ type SetStickerPositionInSetRequest struct {
|
|||
Position int32 `json:"position"`
|
||||
}
|
||||
|
||||
// Changes the position of a sticker in the set to which it belongs; for bots only. The sticker set must have been created by the bot
|
||||
// Changes the position of a sticker in the set to which it belongs. The sticker set must be owned by the current user
|
||||
func (client *Client) SetStickerPositionInSet(req *SetStickerPositionInSetRequest) (*Ok, error) {
|
||||
result, err := client.Send(Request{
|
||||
meta: meta{
|
||||
|
|
@ -18994,11 +19290,11 @@ func (client *Client) SetStickerPositionInSet(req *SetStickerPositionInSetReques
|
|||
}
|
||||
|
||||
type RemoveStickerFromSetRequest struct {
|
||||
// Sticker
|
||||
// Sticker to remove from the set
|
||||
Sticker InputFile `json:"sticker"`
|
||||
}
|
||||
|
||||
// Removes a sticker from the set to which it belongs; for bots only. The sticker set must have been created by the bot
|
||||
// Removes a sticker from the set to which it belongs. The sticker set must be owned by the current user
|
||||
func (client *Client) RemoveStickerFromSet(req *RemoveStickerFromSetRequest) (*Ok, error) {
|
||||
result, err := client.Send(Request{
|
||||
meta: meta{
|
||||
|
|
@ -19026,7 +19322,7 @@ type SetStickerEmojisRequest struct {
|
|||
Emojis string `json:"emojis"`
|
||||
}
|
||||
|
||||
// Changes the list of emoji corresponding to a sticker; for bots only. The sticker must belong to a regular or custom emoji sticker set created by the bot
|
||||
// Changes the list of emoji corresponding to a sticker. The sticker must belong to a regular or custom emoji sticker set that is owned by the current user
|
||||
func (client *Client) SetStickerEmojis(req *SetStickerEmojisRequest) (*Ok, error) {
|
||||
result, err := client.Send(Request{
|
||||
meta: meta{
|
||||
|
|
@ -19055,7 +19351,7 @@ type SetStickerKeywordsRequest struct {
|
|||
Keywords []string `json:"keywords"`
|
||||
}
|
||||
|
||||
// Changes the list of keywords of a sticker; for bots only. The sticker must belong to a regular or custom emoji sticker set created by the bot
|
||||
// Changes the list of keywords of a sticker. The sticker must belong to a regular or custom emoji sticker set that is owned by the current user
|
||||
func (client *Client) SetStickerKeywords(req *SetStickerKeywordsRequest) (*Ok, error) {
|
||||
result, err := client.Send(Request{
|
||||
meta: meta{
|
||||
|
|
@ -19084,7 +19380,7 @@ type SetStickerMaskPositionRequest struct {
|
|||
MaskPosition *MaskPosition `json:"mask_position"`
|
||||
}
|
||||
|
||||
// Changes the mask position of a mask sticker; for bots only. The sticker must belong to a mask sticker set created by the bot
|
||||
// Changes the mask position of a mask sticker. The sticker must belong to a mask sticker set that is owned by the current user
|
||||
func (client *Client) SetStickerMaskPosition(req *SetStickerMaskPositionRequest) (*Ok, error) {
|
||||
result, err := client.Send(Request{
|
||||
meta: meta{
|
||||
|
|
@ -19106,6 +19402,35 @@ func (client *Client) SetStickerMaskPosition(req *SetStickerMaskPositionRequest)
|
|||
return UnmarshalOk(result.Data)
|
||||
}
|
||||
|
||||
type GetOwnedStickerSetsRequest struct {
|
||||
// Identifier of the sticker set from which to return owned sticker sets; use 0 to get results from the beginning
|
||||
OffsetStickerSetId JsonInt64 `json:"offset_sticker_set_id"`
|
||||
// The maximum number of sticker sets to be returned; must be positive and can't be greater than 100. For optimal performance, the number of returned objects is chosen by TDLib and can be smaller than the specified limit
|
||||
Limit int32 `json:"limit"`
|
||||
}
|
||||
|
||||
// Returns sticker sets owned by the current user
|
||||
func (client *Client) GetOwnedStickerSets(req *GetOwnedStickerSetsRequest) (*StickerSets, error) {
|
||||
result, err := client.Send(Request{
|
||||
meta: meta{
|
||||
Type: "getOwnedStickerSets",
|
||||
},
|
||||
Data: map[string]interface{}{
|
||||
"offset_sticker_set_id": req.OffsetStickerSetId,
|
||||
"limit": req.Limit,
|
||||
},
|
||||
})
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
if result.Type == "error" {
|
||||
return nil, buildResponseError(result.Data)
|
||||
}
|
||||
|
||||
return UnmarshalStickerSets(result.Data)
|
||||
}
|
||||
|
||||
type GetMapThumbnailFileRequest struct {
|
||||
// Location of the map center
|
||||
Location *Location `json:"location"`
|
||||
|
|
@ -19517,6 +19842,32 @@ func (client *Client) AssignGooglePlayTransaction(req *AssignGooglePlayTransacti
|
|||
return UnmarshalOk(result.Data)
|
||||
}
|
||||
|
||||
type GetBusinessFeaturesRequest struct {
|
||||
// Source of the request; pass null if the method is called from settings or some non-standard source
|
||||
Source BusinessFeature `json:"source"`
|
||||
}
|
||||
|
||||
// Returns information about features, available to Business users
|
||||
func (client *Client) GetBusinessFeatures(req *GetBusinessFeaturesRequest) (*BusinessFeatures, error) {
|
||||
result, err := client.Send(Request{
|
||||
meta: meta{
|
||||
Type: "getBusinessFeatures",
|
||||
},
|
||||
Data: map[string]interface{}{
|
||||
"source": req.Source,
|
||||
},
|
||||
})
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
if result.Type == "error" {
|
||||
return nil, buildResponseError(result.Data)
|
||||
}
|
||||
|
||||
return UnmarshalBusinessFeatures(result.Data)
|
||||
}
|
||||
|
||||
type AcceptTermsOfServiceRequest struct {
|
||||
// Terms of service identifier
|
||||
TermsOfServiceId string `json:"terms_of_service_id"`
|
||||
|
|
@ -19765,6 +20116,32 @@ func GetPhoneNumberInfoSync(req *GetPhoneNumberInfoSyncRequest) (*PhoneNumberInf
|
|||
func (client *Client) GetPhoneNumberInfoSync(req *GetPhoneNumberInfoSyncRequest) (*PhoneNumberInfo, error) {
|
||||
return GetPhoneNumberInfoSync(req)}
|
||||
|
||||
type GetCollectibleItemInfoRequest struct {
|
||||
// Type of the collectible item. The item must be used by a user and must be visible to the current user
|
||||
Type CollectibleItemType `json:"type"`
|
||||
}
|
||||
|
||||
// Returns information about a given collectible item that was purchased at https://fragment.com
|
||||
func (client *Client) GetCollectibleItemInfo(req *GetCollectibleItemInfoRequest) (*CollectibleItemInfo, error) {
|
||||
result, err := client.Send(Request{
|
||||
meta: meta{
|
||||
Type: "getCollectibleItemInfo",
|
||||
},
|
||||
Data: map[string]interface{}{
|
||||
"type": req.Type,
|
||||
},
|
||||
})
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
if result.Type == "error" {
|
||||
return nil, buildResponseError(result.Data)
|
||||
}
|
||||
|
||||
return UnmarshalCollectibleItemInfo(result.Data)
|
||||
}
|
||||
|
||||
type GetDeepLinkInfoRequest struct {
|
||||
// The link
|
||||
Link string `json:"link"`
|
||||
|
|
@ -21064,12 +21441,27 @@ func (client *Client) TestUseUpdate() (Update, error) {
|
|||
case TypeUpdateSuggestedActions:
|
||||
return UnmarshalUpdateSuggestedActions(result.Data)
|
||||
|
||||
case TypeUpdateContactCloseBirthdays:
|
||||
return UnmarshalUpdateContactCloseBirthdays(result.Data)
|
||||
|
||||
case TypeUpdateAddChatMembersPrivacyForbidden:
|
||||
return UnmarshalUpdateAddChatMembersPrivacyForbidden(result.Data)
|
||||
|
||||
case TypeUpdateAutosaveSettings:
|
||||
return UnmarshalUpdateAutosaveSettings(result.Data)
|
||||
|
||||
case TypeUpdateBusinessConnection:
|
||||
return UnmarshalUpdateBusinessConnection(result.Data)
|
||||
|
||||
case TypeUpdateNewBusinessMessage:
|
||||
return UnmarshalUpdateNewBusinessMessage(result.Data)
|
||||
|
||||
case TypeUpdateBusinessMessageEdited:
|
||||
return UnmarshalUpdateBusinessMessageEdited(result.Data)
|
||||
|
||||
case TypeUpdateBusinessMessagesDeleted:
|
||||
return UnmarshalUpdateBusinessMessagesDeleted(result.Data)
|
||||
|
||||
case TypeUpdateNewInlineQuery:
|
||||
return UnmarshalUpdateNewInlineQuery(result.Data)
|
||||
|
||||
|
|
|
|||
1329
client/type.go
1329
client/type.go
File diff suppressed because it is too large
Load diff
|
|
@ -1271,6 +1271,49 @@ func UnmarshalListOfMessageSponsorType(dataList []json.RawMessage) ([]MessageSpo
|
|||
return list, nil
|
||||
}
|
||||
|
||||
func UnmarshalReportChatSponsoredMessageResult(data json.RawMessage) (ReportChatSponsoredMessageResult, error) {
|
||||
var meta meta
|
||||
|
||||
err := json.Unmarshal(data, &meta)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
switch meta.Type {
|
||||
case TypeReportChatSponsoredMessageResultOk:
|
||||
return UnmarshalReportChatSponsoredMessageResultOk(data)
|
||||
|
||||
case TypeReportChatSponsoredMessageResultFailed:
|
||||
return UnmarshalReportChatSponsoredMessageResultFailed(data)
|
||||
|
||||
case TypeReportChatSponsoredMessageResultOptionRequired:
|
||||
return UnmarshalReportChatSponsoredMessageResultOptionRequired(data)
|
||||
|
||||
case TypeReportChatSponsoredMessageResultAdsHidden:
|
||||
return UnmarshalReportChatSponsoredMessageResultAdsHidden(data)
|
||||
|
||||
case TypeReportChatSponsoredMessageResultPremiumRequired:
|
||||
return UnmarshalReportChatSponsoredMessageResultPremiumRequired(data)
|
||||
|
||||
default:
|
||||
return nil, fmt.Errorf("Error unmarshaling. Unknown type: " + meta.Type)
|
||||
}
|
||||
}
|
||||
|
||||
func UnmarshalListOfReportChatSponsoredMessageResult(dataList []json.RawMessage) ([]ReportChatSponsoredMessageResult, error) {
|
||||
list := []ReportChatSponsoredMessageResult{}
|
||||
|
||||
for _, data := range dataList {
|
||||
entity, err := UnmarshalReportChatSponsoredMessageResult(data)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
list = append(list, entity)
|
||||
}
|
||||
|
||||
return list, nil
|
||||
}
|
||||
|
||||
func UnmarshalNotificationSettingsScope(data json.RawMessage) (NotificationSettingsScope, error) {
|
||||
var meta meta
|
||||
|
||||
|
|
@ -2019,6 +2062,40 @@ func UnmarshalListOfPageBlock(dataList []json.RawMessage) ([]PageBlock, error) {
|
|||
return list, nil
|
||||
}
|
||||
|
||||
func UnmarshalCollectibleItemType(data json.RawMessage) (CollectibleItemType, error) {
|
||||
var meta meta
|
||||
|
||||
err := json.Unmarshal(data, &meta)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
switch meta.Type {
|
||||
case TypeCollectibleItemTypeUsername:
|
||||
return UnmarshalCollectibleItemTypeUsername(data)
|
||||
|
||||
case TypeCollectibleItemTypePhoneNumber:
|
||||
return UnmarshalCollectibleItemTypePhoneNumber(data)
|
||||
|
||||
default:
|
||||
return nil, fmt.Errorf("Error unmarshaling. Unknown type: " + meta.Type)
|
||||
}
|
||||
}
|
||||
|
||||
func UnmarshalListOfCollectibleItemType(dataList []json.RawMessage) ([]CollectibleItemType, error) {
|
||||
list := []CollectibleItemType{}
|
||||
|
||||
for _, data := range dataList {
|
||||
entity, err := UnmarshalCollectibleItemType(data)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
list = append(list, entity)
|
||||
}
|
||||
|
||||
return list, nil
|
||||
}
|
||||
|
||||
func UnmarshalInputCredentials(data json.RawMessage) (InputCredentials, error) {
|
||||
var meta meta
|
||||
|
||||
|
|
@ -4490,6 +4567,9 @@ func UnmarshalPremiumFeature(data json.RawMessage) (PremiumFeature, error) {
|
|||
case TypePremiumFeatureLastSeenTimes:
|
||||
return UnmarshalPremiumFeatureLastSeenTimes(data)
|
||||
|
||||
case TypePremiumFeatureBusiness:
|
||||
return UnmarshalPremiumFeatureBusiness(data)
|
||||
|
||||
default:
|
||||
return nil, fmt.Errorf("Error unmarshaling. Unknown type: " + meta.Type)
|
||||
}
|
||||
|
|
@ -4509,6 +4589,67 @@ func UnmarshalListOfPremiumFeature(dataList []json.RawMessage) ([]PremiumFeature
|
|||
return list, nil
|
||||
}
|
||||
|
||||
func UnmarshalBusinessFeature(data json.RawMessage) (BusinessFeature, error) {
|
||||
var meta meta
|
||||
|
||||
err := json.Unmarshal(data, &meta)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
switch meta.Type {
|
||||
case TypeBusinessFeatureLocation:
|
||||
return UnmarshalBusinessFeatureLocation(data)
|
||||
|
||||
case TypeBusinessFeatureOpeningHours:
|
||||
return UnmarshalBusinessFeatureOpeningHours(data)
|
||||
|
||||
case TypeBusinessFeatureQuickReplies:
|
||||
return UnmarshalBusinessFeatureQuickReplies(data)
|
||||
|
||||
case TypeBusinessFeatureGreetingMessage:
|
||||
return UnmarshalBusinessFeatureGreetingMessage(data)
|
||||
|
||||
case TypeBusinessFeatureAwayMessage:
|
||||
return UnmarshalBusinessFeatureAwayMessage(data)
|
||||
|
||||
case TypeBusinessFeatureAccountLinks:
|
||||
return UnmarshalBusinessFeatureAccountLinks(data)
|
||||
|
||||
case TypeBusinessFeatureIntro:
|
||||
return UnmarshalBusinessFeatureIntro(data)
|
||||
|
||||
case TypeBusinessFeatureBots:
|
||||
return UnmarshalBusinessFeatureBots(data)
|
||||
|
||||
case TypeBusinessFeatureEmojiStatus:
|
||||
return UnmarshalBusinessFeatureEmojiStatus(data)
|
||||
|
||||
case TypeBusinessFeatureChatFolderTags:
|
||||
return UnmarshalBusinessFeatureChatFolderTags(data)
|
||||
|
||||
case TypeBusinessFeatureUpgradedStories:
|
||||
return UnmarshalBusinessFeatureUpgradedStories(data)
|
||||
|
||||
default:
|
||||
return nil, fmt.Errorf("Error unmarshaling. Unknown type: " + meta.Type)
|
||||
}
|
||||
}
|
||||
|
||||
func UnmarshalListOfBusinessFeature(dataList []json.RawMessage) ([]BusinessFeature, error) {
|
||||
list := []BusinessFeature{}
|
||||
|
||||
for _, data := range dataList {
|
||||
entity, err := UnmarshalBusinessFeature(data)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
list = append(list, entity)
|
||||
}
|
||||
|
||||
return list, nil
|
||||
}
|
||||
|
||||
func UnmarshalPremiumStoryFeature(data json.RawMessage) (PremiumStoryFeature, error) {
|
||||
var meta meta
|
||||
|
||||
|
|
@ -4573,6 +4714,9 @@ func UnmarshalPremiumSource(data json.RawMessage) (PremiumSource, error) {
|
|||
case TypePremiumSourceFeature:
|
||||
return UnmarshalPremiumSourceFeature(data)
|
||||
|
||||
case TypePremiumSourceBusinessFeature:
|
||||
return UnmarshalPremiumSourceBusinessFeature(data)
|
||||
|
||||
case TypePremiumSourceStoryFeature:
|
||||
return UnmarshalPremiumSourceStoryFeature(data)
|
||||
|
||||
|
|
@ -5447,6 +5591,9 @@ func UnmarshalUserPrivacySettingRule(data json.RawMessage) (UserPrivacySettingRu
|
|||
case TypeUserPrivacySettingRuleAllowContacts:
|
||||
return UnmarshalUserPrivacySettingRuleAllowContacts(data)
|
||||
|
||||
case TypeUserPrivacySettingRuleAllowPremiumUsers:
|
||||
return UnmarshalUserPrivacySettingRuleAllowPremiumUsers(data)
|
||||
|
||||
case TypeUserPrivacySettingRuleAllowUsers:
|
||||
return UnmarshalUserPrivacySettingRuleAllowUsers(data)
|
||||
|
||||
|
|
@ -5508,6 +5655,9 @@ func UnmarshalUserPrivacySetting(data json.RawMessage) (UserPrivacySetting, erro
|
|||
case TypeUserPrivacySettingShowBio:
|
||||
return UnmarshalUserPrivacySettingShowBio(data)
|
||||
|
||||
case TypeUserPrivacySettingShowBirthdate:
|
||||
return UnmarshalUserPrivacySettingShowBirthdate(data)
|
||||
|
||||
case TypeUserPrivacySettingAllowChatInvites:
|
||||
return UnmarshalUserPrivacySettingAllowChatInvites(data)
|
||||
|
||||
|
|
@ -6317,6 +6467,9 @@ func UnmarshalSuggestedAction(data json.RawMessage) (SuggestedAction, error) {
|
|||
case TypeSuggestedActionGiftPremiumForChristmas:
|
||||
return UnmarshalSuggestedActionGiftPremiumForChristmas(data)
|
||||
|
||||
case TypeSuggestedActionSetBirthdate:
|
||||
return UnmarshalSuggestedActionSetBirthdate(data)
|
||||
|
||||
default:
|
||||
return nil, fmt.Errorf("Error unmarshaling. Unknown type: " + meta.Type)
|
||||
}
|
||||
|
|
@ -6958,12 +7111,27 @@ func UnmarshalUpdate(data json.RawMessage) (Update, error) {
|
|||
case TypeUpdateSuggestedActions:
|
||||
return UnmarshalUpdateSuggestedActions(data)
|
||||
|
||||
case TypeUpdateContactCloseBirthdays:
|
||||
return UnmarshalUpdateContactCloseBirthdays(data)
|
||||
|
||||
case TypeUpdateAddChatMembersPrivacyForbidden:
|
||||
return UnmarshalUpdateAddChatMembersPrivacyForbidden(data)
|
||||
|
||||
case TypeUpdateAutosaveSettings:
|
||||
return UnmarshalUpdateAutosaveSettings(data)
|
||||
|
||||
case TypeUpdateBusinessConnection:
|
||||
return UnmarshalUpdateBusinessConnection(data)
|
||||
|
||||
case TypeUpdateNewBusinessMessage:
|
||||
return UnmarshalUpdateNewBusinessMessage(data)
|
||||
|
||||
case TypeUpdateBusinessMessageEdited:
|
||||
return UnmarshalUpdateBusinessMessageEdited(data)
|
||||
|
||||
case TypeUpdateBusinessMessagesDeleted:
|
||||
return UnmarshalUpdateBusinessMessagesDeleted(data)
|
||||
|
||||
case TypeUpdateNewInlineQuery:
|
||||
return UnmarshalUpdateNewInlineQuery(data)
|
||||
|
||||
|
|
@ -7857,6 +8025,22 @@ func UnmarshalChatLocation(data json.RawMessage) (*ChatLocation, error) {
|
|||
return &resp, err
|
||||
}
|
||||
|
||||
func UnmarshalBirthdate(data json.RawMessage) (*Birthdate, error) {
|
||||
var resp Birthdate
|
||||
|
||||
err := json.Unmarshal(data, &resp)
|
||||
|
||||
return &resp, err
|
||||
}
|
||||
|
||||
func UnmarshalCloseBirthdayUser(data json.RawMessage) (*CloseBirthdayUser, error) {
|
||||
var resp CloseBirthdayUser
|
||||
|
||||
err := json.Unmarshal(data, &resp)
|
||||
|
||||
return &resp, err
|
||||
}
|
||||
|
||||
func UnmarshalBusinessAwayMessageScheduleAlways(data json.RawMessage) (*BusinessAwayMessageScheduleAlways, error) {
|
||||
var resp BusinessAwayMessageScheduleAlways
|
||||
|
||||
|
|
@ -7921,6 +8105,22 @@ func UnmarshalBusinessConnectedBot(data json.RawMessage) (*BusinessConnectedBot,
|
|||
return &resp, err
|
||||
}
|
||||
|
||||
func UnmarshalBusinessIntro(data json.RawMessage) (*BusinessIntro, error) {
|
||||
var resp BusinessIntro
|
||||
|
||||
err := json.Unmarshal(data, &resp)
|
||||
|
||||
return &resp, err
|
||||
}
|
||||
|
||||
func UnmarshalInputBusinessIntro(data json.RawMessage) (*InputBusinessIntro, error) {
|
||||
var resp InputBusinessIntro
|
||||
|
||||
err := json.Unmarshal(data, &resp)
|
||||
|
||||
return &resp, err
|
||||
}
|
||||
|
||||
func UnmarshalBusinessOpeningHoursInterval(data json.RawMessage) (*BusinessOpeningHoursInterval, error) {
|
||||
var resp BusinessOpeningHoursInterval
|
||||
|
||||
|
|
@ -8921,6 +9121,22 @@ func UnmarshalMessageCalendar(data json.RawMessage) (*MessageCalendar, error) {
|
|||
return &resp, err
|
||||
}
|
||||
|
||||
func UnmarshalBusinessMessage(data json.RawMessage) (*BusinessMessage, error) {
|
||||
var resp BusinessMessage
|
||||
|
||||
err := json.Unmarshal(data, &resp)
|
||||
|
||||
return &resp, err
|
||||
}
|
||||
|
||||
func UnmarshalBusinessMessages(data json.RawMessage) (*BusinessMessages, error) {
|
||||
var resp BusinessMessages
|
||||
|
||||
err := json.Unmarshal(data, &resp)
|
||||
|
||||
return &resp, err
|
||||
}
|
||||
|
||||
func UnmarshalMessageSourceChatHistory(data json.RawMessage) (*MessageSourceChatHistory, error) {
|
||||
var resp MessageSourceChatHistory
|
||||
|
||||
|
|
@ -9065,6 +9281,54 @@ func UnmarshalSponsoredMessages(data json.RawMessage) (*SponsoredMessages, error
|
|||
return &resp, err
|
||||
}
|
||||
|
||||
func UnmarshalReportChatSponsoredMessageOption(data json.RawMessage) (*ReportChatSponsoredMessageOption, error) {
|
||||
var resp ReportChatSponsoredMessageOption
|
||||
|
||||
err := json.Unmarshal(data, &resp)
|
||||
|
||||
return &resp, err
|
||||
}
|
||||
|
||||
func UnmarshalReportChatSponsoredMessageResultOk(data json.RawMessage) (*ReportChatSponsoredMessageResultOk, error) {
|
||||
var resp ReportChatSponsoredMessageResultOk
|
||||
|
||||
err := json.Unmarshal(data, &resp)
|
||||
|
||||
return &resp, err
|
||||
}
|
||||
|
||||
func UnmarshalReportChatSponsoredMessageResultFailed(data json.RawMessage) (*ReportChatSponsoredMessageResultFailed, error) {
|
||||
var resp ReportChatSponsoredMessageResultFailed
|
||||
|
||||
err := json.Unmarshal(data, &resp)
|
||||
|
||||
return &resp, err
|
||||
}
|
||||
|
||||
func UnmarshalReportChatSponsoredMessageResultOptionRequired(data json.RawMessage) (*ReportChatSponsoredMessageResultOptionRequired, error) {
|
||||
var resp ReportChatSponsoredMessageResultOptionRequired
|
||||
|
||||
err := json.Unmarshal(data, &resp)
|
||||
|
||||
return &resp, err
|
||||
}
|
||||
|
||||
func UnmarshalReportChatSponsoredMessageResultAdsHidden(data json.RawMessage) (*ReportChatSponsoredMessageResultAdsHidden, error) {
|
||||
var resp ReportChatSponsoredMessageResultAdsHidden
|
||||
|
||||
err := json.Unmarshal(data, &resp)
|
||||
|
||||
return &resp, err
|
||||
}
|
||||
|
||||
func UnmarshalReportChatSponsoredMessageResultPremiumRequired(data json.RawMessage) (*ReportChatSponsoredMessageResultPremiumRequired, error) {
|
||||
var resp ReportChatSponsoredMessageResultPremiumRequired
|
||||
|
||||
err := json.Unmarshal(data, &resp)
|
||||
|
||||
return &resp, err
|
||||
}
|
||||
|
||||
func UnmarshalFileDownload(data json.RawMessage) (*FileDownload, error) {
|
||||
var resp FileDownload
|
||||
|
||||
|
|
@ -9729,6 +9993,22 @@ func UnmarshalLinkPreviewOptions(data json.RawMessage) (*LinkPreviewOptions, err
|
|||
return &resp, err
|
||||
}
|
||||
|
||||
func UnmarshalSharedUser(data json.RawMessage) (*SharedUser, error) {
|
||||
var resp SharedUser
|
||||
|
||||
err := json.Unmarshal(data, &resp)
|
||||
|
||||
return &resp, err
|
||||
}
|
||||
|
||||
func UnmarshalSharedChat(data json.RawMessage) (*SharedChat, error) {
|
||||
var resp SharedChat
|
||||
|
||||
err := json.Unmarshal(data, &resp)
|
||||
|
||||
return &resp, err
|
||||
}
|
||||
|
||||
func UnmarshalRichTextPlain(data json.RawMessage) (*RichTextPlain, error) {
|
||||
var resp RichTextPlain
|
||||
|
||||
|
|
@ -10217,6 +10497,30 @@ func UnmarshalPhoneNumberInfo(data json.RawMessage) (*PhoneNumberInfo, error) {
|
|||
return &resp, err
|
||||
}
|
||||
|
||||
func UnmarshalCollectibleItemTypeUsername(data json.RawMessage) (*CollectibleItemTypeUsername, error) {
|
||||
var resp CollectibleItemTypeUsername
|
||||
|
||||
err := json.Unmarshal(data, &resp)
|
||||
|
||||
return &resp, err
|
||||
}
|
||||
|
||||
func UnmarshalCollectibleItemTypePhoneNumber(data json.RawMessage) (*CollectibleItemTypePhoneNumber, error) {
|
||||
var resp CollectibleItemTypePhoneNumber
|
||||
|
||||
err := json.Unmarshal(data, &resp)
|
||||
|
||||
return &resp, err
|
||||
}
|
||||
|
||||
func UnmarshalCollectibleItemInfo(data json.RawMessage) (*CollectibleItemInfo, error) {
|
||||
var resp CollectibleItemInfo
|
||||
|
||||
err := json.Unmarshal(data, &resp)
|
||||
|
||||
return &resp, err
|
||||
}
|
||||
|
||||
func UnmarshalBankCardActionOpenUrl(data json.RawMessage) (*BankCardActionOpenUrl, error) {
|
||||
var resp BankCardActionOpenUrl
|
||||
|
||||
|
|
@ -13209,6 +13513,14 @@ func UnmarshalSpeechRecognitionResultError(data json.RawMessage) (*SpeechRecogni
|
|||
return &resp, err
|
||||
}
|
||||
|
||||
func UnmarshalBusinessConnection(data json.RawMessage) (*BusinessConnection, error) {
|
||||
var resp BusinessConnection
|
||||
|
||||
err := json.Unmarshal(data, &resp)
|
||||
|
||||
return &resp, err
|
||||
}
|
||||
|
||||
func UnmarshalAttachmentMenuBotColor(data json.RawMessage) (*AttachmentMenuBotColor, error) {
|
||||
var resp AttachmentMenuBotColor
|
||||
|
||||
|
|
@ -14361,6 +14673,102 @@ func UnmarshalPremiumFeatureLastSeenTimes(data json.RawMessage) (*PremiumFeature
|
|||
return &resp, err
|
||||
}
|
||||
|
||||
func UnmarshalPremiumFeatureBusiness(data json.RawMessage) (*PremiumFeatureBusiness, error) {
|
||||
var resp PremiumFeatureBusiness
|
||||
|
||||
err := json.Unmarshal(data, &resp)
|
||||
|
||||
return &resp, err
|
||||
}
|
||||
|
||||
func UnmarshalBusinessFeatureLocation(data json.RawMessage) (*BusinessFeatureLocation, error) {
|
||||
var resp BusinessFeatureLocation
|
||||
|
||||
err := json.Unmarshal(data, &resp)
|
||||
|
||||
return &resp, err
|
||||
}
|
||||
|
||||
func UnmarshalBusinessFeatureOpeningHours(data json.RawMessage) (*BusinessFeatureOpeningHours, error) {
|
||||
var resp BusinessFeatureOpeningHours
|
||||
|
||||
err := json.Unmarshal(data, &resp)
|
||||
|
||||
return &resp, err
|
||||
}
|
||||
|
||||
func UnmarshalBusinessFeatureQuickReplies(data json.RawMessage) (*BusinessFeatureQuickReplies, error) {
|
||||
var resp BusinessFeatureQuickReplies
|
||||
|
||||
err := json.Unmarshal(data, &resp)
|
||||
|
||||
return &resp, err
|
||||
}
|
||||
|
||||
func UnmarshalBusinessFeatureGreetingMessage(data json.RawMessage) (*BusinessFeatureGreetingMessage, error) {
|
||||
var resp BusinessFeatureGreetingMessage
|
||||
|
||||
err := json.Unmarshal(data, &resp)
|
||||
|
||||
return &resp, err
|
||||
}
|
||||
|
||||
func UnmarshalBusinessFeatureAwayMessage(data json.RawMessage) (*BusinessFeatureAwayMessage, error) {
|
||||
var resp BusinessFeatureAwayMessage
|
||||
|
||||
err := json.Unmarshal(data, &resp)
|
||||
|
||||
return &resp, err
|
||||
}
|
||||
|
||||
func UnmarshalBusinessFeatureAccountLinks(data json.RawMessage) (*BusinessFeatureAccountLinks, error) {
|
||||
var resp BusinessFeatureAccountLinks
|
||||
|
||||
err := json.Unmarshal(data, &resp)
|
||||
|
||||
return &resp, err
|
||||
}
|
||||
|
||||
func UnmarshalBusinessFeatureIntro(data json.RawMessage) (*BusinessFeatureIntro, error) {
|
||||
var resp BusinessFeatureIntro
|
||||
|
||||
err := json.Unmarshal(data, &resp)
|
||||
|
||||
return &resp, err
|
||||
}
|
||||
|
||||
func UnmarshalBusinessFeatureBots(data json.RawMessage) (*BusinessFeatureBots, error) {
|
||||
var resp BusinessFeatureBots
|
||||
|
||||
err := json.Unmarshal(data, &resp)
|
||||
|
||||
return &resp, err
|
||||
}
|
||||
|
||||
func UnmarshalBusinessFeatureEmojiStatus(data json.RawMessage) (*BusinessFeatureEmojiStatus, error) {
|
||||
var resp BusinessFeatureEmojiStatus
|
||||
|
||||
err := json.Unmarshal(data, &resp)
|
||||
|
||||
return &resp, err
|
||||
}
|
||||
|
||||
func UnmarshalBusinessFeatureChatFolderTags(data json.RawMessage) (*BusinessFeatureChatFolderTags, error) {
|
||||
var resp BusinessFeatureChatFolderTags
|
||||
|
||||
err := json.Unmarshal(data, &resp)
|
||||
|
||||
return &resp, err
|
||||
}
|
||||
|
||||
func UnmarshalBusinessFeatureUpgradedStories(data json.RawMessage) (*BusinessFeatureUpgradedStories, error) {
|
||||
var resp BusinessFeatureUpgradedStories
|
||||
|
||||
err := json.Unmarshal(data, &resp)
|
||||
|
||||
return &resp, err
|
||||
}
|
||||
|
||||
func UnmarshalPremiumStoryFeaturePriorityOrder(data json.RawMessage) (*PremiumStoryFeaturePriorityOrder, error) {
|
||||
var resp PremiumStoryFeaturePriorityOrder
|
||||
|
||||
|
|
@ -14433,6 +14841,14 @@ func UnmarshalPremiumFeatures(data json.RawMessage) (*PremiumFeatures, error) {
|
|||
return &resp, err
|
||||
}
|
||||
|
||||
func UnmarshalBusinessFeatures(data json.RawMessage) (*BusinessFeatures, error) {
|
||||
var resp BusinessFeatures
|
||||
|
||||
err := json.Unmarshal(data, &resp)
|
||||
|
||||
return &resp, err
|
||||
}
|
||||
|
||||
func UnmarshalPremiumSourceLimitExceeded(data json.RawMessage) (*PremiumSourceLimitExceeded, error) {
|
||||
var resp PremiumSourceLimitExceeded
|
||||
|
||||
|
|
@ -14449,6 +14865,14 @@ func UnmarshalPremiumSourceFeature(data json.RawMessage) (*PremiumSourceFeature,
|
|||
return &resp, err
|
||||
}
|
||||
|
||||
func UnmarshalPremiumSourceBusinessFeature(data json.RawMessage) (*PremiumSourceBusinessFeature, error) {
|
||||
var resp PremiumSourceBusinessFeature
|
||||
|
||||
err := json.Unmarshal(data, &resp)
|
||||
|
||||
return &resp, err
|
||||
}
|
||||
|
||||
func UnmarshalPremiumSourceStoryFeature(data json.RawMessage) (*PremiumSourceStoryFeature, error) {
|
||||
var resp PremiumSourceStoryFeature
|
||||
|
||||
|
|
@ -14481,6 +14905,14 @@ func UnmarshalPremiumFeaturePromotionAnimation(data json.RawMessage) (*PremiumFe
|
|||
return &resp, err
|
||||
}
|
||||
|
||||
func UnmarshalBusinessFeaturePromotionAnimation(data json.RawMessage) (*BusinessFeaturePromotionAnimation, error) {
|
||||
var resp BusinessFeaturePromotionAnimation
|
||||
|
||||
err := json.Unmarshal(data, &resp)
|
||||
|
||||
return &resp, err
|
||||
}
|
||||
|
||||
func UnmarshalPremiumState(data json.RawMessage) (*PremiumState, error) {
|
||||
var resp PremiumState
|
||||
|
||||
|
|
@ -15465,6 +15897,14 @@ func UnmarshalUserPrivacySettingRuleAllowContacts(data json.RawMessage) (*UserPr
|
|||
return &resp, err
|
||||
}
|
||||
|
||||
func UnmarshalUserPrivacySettingRuleAllowPremiumUsers(data json.RawMessage) (*UserPrivacySettingRuleAllowPremiumUsers, error) {
|
||||
var resp UserPrivacySettingRuleAllowPremiumUsers
|
||||
|
||||
err := json.Unmarshal(data, &resp)
|
||||
|
||||
return &resp, err
|
||||
}
|
||||
|
||||
func UnmarshalUserPrivacySettingRuleAllowUsers(data json.RawMessage) (*UserPrivacySettingRuleAllowUsers, error) {
|
||||
var resp UserPrivacySettingRuleAllowUsers
|
||||
|
||||
|
|
@ -15561,6 +16001,14 @@ func UnmarshalUserPrivacySettingShowBio(data json.RawMessage) (*UserPrivacySetti
|
|||
return &resp, err
|
||||
}
|
||||
|
||||
func UnmarshalUserPrivacySettingShowBirthdate(data json.RawMessage) (*UserPrivacySettingShowBirthdate, error) {
|
||||
var resp UserPrivacySettingShowBirthdate
|
||||
|
||||
err := json.Unmarshal(data, &resp)
|
||||
|
||||
return &resp, err
|
||||
}
|
||||
|
||||
func UnmarshalUserPrivacySettingAllowChatInvites(data json.RawMessage) (*UserPrivacySettingAllowChatInvites, error) {
|
||||
var resp UserPrivacySettingAllowChatInvites
|
||||
|
||||
|
|
@ -16905,6 +17353,14 @@ func UnmarshalSuggestedActionGiftPremiumForChristmas(data json.RawMessage) (*Sug
|
|||
return &resp, err
|
||||
}
|
||||
|
||||
func UnmarshalSuggestedActionSetBirthdate(data json.RawMessage) (*SuggestedActionSetBirthdate, error) {
|
||||
var resp SuggestedActionSetBirthdate
|
||||
|
||||
err := json.Unmarshal(data, &resp)
|
||||
|
||||
return &resp, err
|
||||
}
|
||||
|
||||
func UnmarshalCount(data json.RawMessage) (*Count, error) {
|
||||
var resp Count
|
||||
|
||||
|
|
@ -18153,6 +18609,14 @@ func UnmarshalUpdateSuggestedActions(data json.RawMessage) (*UpdateSuggestedActi
|
|||
return &resp, err
|
||||
}
|
||||
|
||||
func UnmarshalUpdateContactCloseBirthdays(data json.RawMessage) (*UpdateContactCloseBirthdays, error) {
|
||||
var resp UpdateContactCloseBirthdays
|
||||
|
||||
err := json.Unmarshal(data, &resp)
|
||||
|
||||
return &resp, err
|
||||
}
|
||||
|
||||
func UnmarshalUpdateAddChatMembersPrivacyForbidden(data json.RawMessage) (*UpdateAddChatMembersPrivacyForbidden, error) {
|
||||
var resp UpdateAddChatMembersPrivacyForbidden
|
||||
|
||||
|
|
@ -18169,6 +18633,38 @@ func UnmarshalUpdateAutosaveSettings(data json.RawMessage) (*UpdateAutosaveSetti
|
|||
return &resp, err
|
||||
}
|
||||
|
||||
func UnmarshalUpdateBusinessConnection(data json.RawMessage) (*UpdateBusinessConnection, error) {
|
||||
var resp UpdateBusinessConnection
|
||||
|
||||
err := json.Unmarshal(data, &resp)
|
||||
|
||||
return &resp, err
|
||||
}
|
||||
|
||||
func UnmarshalUpdateNewBusinessMessage(data json.RawMessage) (*UpdateNewBusinessMessage, error) {
|
||||
var resp UpdateNewBusinessMessage
|
||||
|
||||
err := json.Unmarshal(data, &resp)
|
||||
|
||||
return &resp, err
|
||||
}
|
||||
|
||||
func UnmarshalUpdateBusinessMessageEdited(data json.RawMessage) (*UpdateBusinessMessageEdited, error) {
|
||||
var resp UpdateBusinessMessageEdited
|
||||
|
||||
err := json.Unmarshal(data, &resp)
|
||||
|
||||
return &resp, err
|
||||
}
|
||||
|
||||
func UnmarshalUpdateBusinessMessagesDeleted(data json.RawMessage) (*UpdateBusinessMessagesDeleted, error) {
|
||||
var resp UpdateBusinessMessagesDeleted
|
||||
|
||||
err := json.Unmarshal(data, &resp)
|
||||
|
||||
return &resp, err
|
||||
}
|
||||
|
||||
func UnmarshalUpdateNewInlineQuery(data json.RawMessage) (*UpdateNewInlineQuery, error) {
|
||||
var resp UpdateNewInlineQuery
|
||||
|
||||
|
|
@ -18707,6 +19203,12 @@ func UnmarshalType(data json.RawMessage) (Type, error) {
|
|||
case TypeChatLocation:
|
||||
return UnmarshalChatLocation(data)
|
||||
|
||||
case TypeBirthdate:
|
||||
return UnmarshalBirthdate(data)
|
||||
|
||||
case TypeCloseBirthdayUser:
|
||||
return UnmarshalCloseBirthdayUser(data)
|
||||
|
||||
case TypeBusinessAwayMessageScheduleAlways:
|
||||
return UnmarshalBusinessAwayMessageScheduleAlways(data)
|
||||
|
||||
|
|
@ -18731,6 +19233,12 @@ func UnmarshalType(data json.RawMessage) (Type, error) {
|
|||
case TypeBusinessConnectedBot:
|
||||
return UnmarshalBusinessConnectedBot(data)
|
||||
|
||||
case TypeBusinessIntro:
|
||||
return UnmarshalBusinessIntro(data)
|
||||
|
||||
case TypeInputBusinessIntro:
|
||||
return UnmarshalInputBusinessIntro(data)
|
||||
|
||||
case TypeBusinessOpeningHoursInterval:
|
||||
return UnmarshalBusinessOpeningHoursInterval(data)
|
||||
|
||||
|
|
@ -19106,6 +19614,12 @@ func UnmarshalType(data json.RawMessage) (Type, error) {
|
|||
case TypeMessageCalendar:
|
||||
return UnmarshalMessageCalendar(data)
|
||||
|
||||
case TypeBusinessMessage:
|
||||
return UnmarshalBusinessMessage(data)
|
||||
|
||||
case TypeBusinessMessages:
|
||||
return UnmarshalBusinessMessages(data)
|
||||
|
||||
case TypeMessageSourceChatHistory:
|
||||
return UnmarshalMessageSourceChatHistory(data)
|
||||
|
||||
|
|
@ -19160,6 +19674,24 @@ func UnmarshalType(data json.RawMessage) (Type, error) {
|
|||
case TypeSponsoredMessages:
|
||||
return UnmarshalSponsoredMessages(data)
|
||||
|
||||
case TypeReportChatSponsoredMessageOption:
|
||||
return UnmarshalReportChatSponsoredMessageOption(data)
|
||||
|
||||
case TypeReportChatSponsoredMessageResultOk:
|
||||
return UnmarshalReportChatSponsoredMessageResultOk(data)
|
||||
|
||||
case TypeReportChatSponsoredMessageResultFailed:
|
||||
return UnmarshalReportChatSponsoredMessageResultFailed(data)
|
||||
|
||||
case TypeReportChatSponsoredMessageResultOptionRequired:
|
||||
return UnmarshalReportChatSponsoredMessageResultOptionRequired(data)
|
||||
|
||||
case TypeReportChatSponsoredMessageResultAdsHidden:
|
||||
return UnmarshalReportChatSponsoredMessageResultAdsHidden(data)
|
||||
|
||||
case TypeReportChatSponsoredMessageResultPremiumRequired:
|
||||
return UnmarshalReportChatSponsoredMessageResultPremiumRequired(data)
|
||||
|
||||
case TypeFileDownload:
|
||||
return UnmarshalFileDownload(data)
|
||||
|
||||
|
|
@ -19409,6 +19941,12 @@ func UnmarshalType(data json.RawMessage) (Type, error) {
|
|||
case TypeLinkPreviewOptions:
|
||||
return UnmarshalLinkPreviewOptions(data)
|
||||
|
||||
case TypeSharedUser:
|
||||
return UnmarshalSharedUser(data)
|
||||
|
||||
case TypeSharedChat:
|
||||
return UnmarshalSharedChat(data)
|
||||
|
||||
case TypeRichTextPlain:
|
||||
return UnmarshalRichTextPlain(data)
|
||||
|
||||
|
|
@ -19592,6 +20130,15 @@ func UnmarshalType(data json.RawMessage) (Type, error) {
|
|||
case TypePhoneNumberInfo:
|
||||
return UnmarshalPhoneNumberInfo(data)
|
||||
|
||||
case TypeCollectibleItemTypeUsername:
|
||||
return UnmarshalCollectibleItemTypeUsername(data)
|
||||
|
||||
case TypeCollectibleItemTypePhoneNumber:
|
||||
return UnmarshalCollectibleItemTypePhoneNumber(data)
|
||||
|
||||
case TypeCollectibleItemInfo:
|
||||
return UnmarshalCollectibleItemInfo(data)
|
||||
|
||||
case TypeBankCardActionOpenUrl:
|
||||
return UnmarshalBankCardActionOpenUrl(data)
|
||||
|
||||
|
|
@ -20714,6 +21261,9 @@ func UnmarshalType(data json.RawMessage) (Type, error) {
|
|||
case TypeSpeechRecognitionResultError:
|
||||
return UnmarshalSpeechRecognitionResultError(data)
|
||||
|
||||
case TypeBusinessConnection:
|
||||
return UnmarshalBusinessConnection(data)
|
||||
|
||||
case TypeAttachmentMenuBotColor:
|
||||
return UnmarshalAttachmentMenuBotColor(data)
|
||||
|
||||
|
|
@ -21146,6 +21696,42 @@ func UnmarshalType(data json.RawMessage) (Type, error) {
|
|||
case TypePremiumFeatureLastSeenTimes:
|
||||
return UnmarshalPremiumFeatureLastSeenTimes(data)
|
||||
|
||||
case TypePremiumFeatureBusiness:
|
||||
return UnmarshalPremiumFeatureBusiness(data)
|
||||
|
||||
case TypeBusinessFeatureLocation:
|
||||
return UnmarshalBusinessFeatureLocation(data)
|
||||
|
||||
case TypeBusinessFeatureOpeningHours:
|
||||
return UnmarshalBusinessFeatureOpeningHours(data)
|
||||
|
||||
case TypeBusinessFeatureQuickReplies:
|
||||
return UnmarshalBusinessFeatureQuickReplies(data)
|
||||
|
||||
case TypeBusinessFeatureGreetingMessage:
|
||||
return UnmarshalBusinessFeatureGreetingMessage(data)
|
||||
|
||||
case TypeBusinessFeatureAwayMessage:
|
||||
return UnmarshalBusinessFeatureAwayMessage(data)
|
||||
|
||||
case TypeBusinessFeatureAccountLinks:
|
||||
return UnmarshalBusinessFeatureAccountLinks(data)
|
||||
|
||||
case TypeBusinessFeatureIntro:
|
||||
return UnmarshalBusinessFeatureIntro(data)
|
||||
|
||||
case TypeBusinessFeatureBots:
|
||||
return UnmarshalBusinessFeatureBots(data)
|
||||
|
||||
case TypeBusinessFeatureEmojiStatus:
|
||||
return UnmarshalBusinessFeatureEmojiStatus(data)
|
||||
|
||||
case TypeBusinessFeatureChatFolderTags:
|
||||
return UnmarshalBusinessFeatureChatFolderTags(data)
|
||||
|
||||
case TypeBusinessFeatureUpgradedStories:
|
||||
return UnmarshalBusinessFeatureUpgradedStories(data)
|
||||
|
||||
case TypePremiumStoryFeaturePriorityOrder:
|
||||
return UnmarshalPremiumStoryFeaturePriorityOrder(data)
|
||||
|
||||
|
|
@ -21173,12 +21759,18 @@ func UnmarshalType(data json.RawMessage) (Type, error) {
|
|||
case TypePremiumFeatures:
|
||||
return UnmarshalPremiumFeatures(data)
|
||||
|
||||
case TypeBusinessFeatures:
|
||||
return UnmarshalBusinessFeatures(data)
|
||||
|
||||
case TypePremiumSourceLimitExceeded:
|
||||
return UnmarshalPremiumSourceLimitExceeded(data)
|
||||
|
||||
case TypePremiumSourceFeature:
|
||||
return UnmarshalPremiumSourceFeature(data)
|
||||
|
||||
case TypePremiumSourceBusinessFeature:
|
||||
return UnmarshalPremiumSourceBusinessFeature(data)
|
||||
|
||||
case TypePremiumSourceStoryFeature:
|
||||
return UnmarshalPremiumSourceStoryFeature(data)
|
||||
|
||||
|
|
@ -21191,6 +21783,9 @@ func UnmarshalType(data json.RawMessage) (Type, error) {
|
|||
case TypePremiumFeaturePromotionAnimation:
|
||||
return UnmarshalPremiumFeaturePromotionAnimation(data)
|
||||
|
||||
case TypeBusinessFeaturePromotionAnimation:
|
||||
return UnmarshalBusinessFeaturePromotionAnimation(data)
|
||||
|
||||
case TypePremiumState:
|
||||
return UnmarshalPremiumState(data)
|
||||
|
||||
|
|
@ -21560,6 +22155,9 @@ func UnmarshalType(data json.RawMessage) (Type, error) {
|
|||
case TypeUserPrivacySettingRuleAllowContacts:
|
||||
return UnmarshalUserPrivacySettingRuleAllowContacts(data)
|
||||
|
||||
case TypeUserPrivacySettingRuleAllowPremiumUsers:
|
||||
return UnmarshalUserPrivacySettingRuleAllowPremiumUsers(data)
|
||||
|
||||
case TypeUserPrivacySettingRuleAllowUsers:
|
||||
return UnmarshalUserPrivacySettingRuleAllowUsers(data)
|
||||
|
||||
|
|
@ -21596,6 +22194,9 @@ func UnmarshalType(data json.RawMessage) (Type, error) {
|
|||
case TypeUserPrivacySettingShowBio:
|
||||
return UnmarshalUserPrivacySettingShowBio(data)
|
||||
|
||||
case TypeUserPrivacySettingShowBirthdate:
|
||||
return UnmarshalUserPrivacySettingShowBirthdate(data)
|
||||
|
||||
case TypeUserPrivacySettingAllowChatInvites:
|
||||
return UnmarshalUserPrivacySettingAllowChatInvites(data)
|
||||
|
||||
|
|
@ -22100,6 +22701,9 @@ func UnmarshalType(data json.RawMessage) (Type, error) {
|
|||
case TypeSuggestedActionGiftPremiumForChristmas:
|
||||
return UnmarshalSuggestedActionGiftPremiumForChristmas(data)
|
||||
|
||||
case TypeSuggestedActionSetBirthdate:
|
||||
return UnmarshalSuggestedActionSetBirthdate(data)
|
||||
|
||||
case TypeCount:
|
||||
return UnmarshalCount(data)
|
||||
|
||||
|
|
@ -22568,12 +23172,27 @@ func UnmarshalType(data json.RawMessage) (Type, error) {
|
|||
case TypeUpdateSuggestedActions:
|
||||
return UnmarshalUpdateSuggestedActions(data)
|
||||
|
||||
case TypeUpdateContactCloseBirthdays:
|
||||
return UnmarshalUpdateContactCloseBirthdays(data)
|
||||
|
||||
case TypeUpdateAddChatMembersPrivacyForbidden:
|
||||
return UnmarshalUpdateAddChatMembersPrivacyForbidden(data)
|
||||
|
||||
case TypeUpdateAutosaveSettings:
|
||||
return UnmarshalUpdateAutosaveSettings(data)
|
||||
|
||||
case TypeUpdateBusinessConnection:
|
||||
return UnmarshalUpdateBusinessConnection(data)
|
||||
|
||||
case TypeUpdateNewBusinessMessage:
|
||||
return UnmarshalUpdateNewBusinessMessage(data)
|
||||
|
||||
case TypeUpdateBusinessMessageEdited:
|
||||
return UnmarshalUpdateBusinessMessageEdited(data)
|
||||
|
||||
case TypeUpdateBusinessMessagesDeleted:
|
||||
return UnmarshalUpdateBusinessMessagesDeleted(data)
|
||||
|
||||
case TypeUpdateNewInlineQuery:
|
||||
return UnmarshalUpdateNewInlineQuery(data)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue