Update to TDLib 1.8.51

This commit is contained in:
c0re100 2025-07-02 23:52:52 +08:00
parent bc2b5f5823
commit 51f3ce0659
No known key found for this signature in database
GPG key ID: 7C3B3004FE745AAF
4 changed files with 1181 additions and 44 deletions

View file

@ -1429,7 +1429,7 @@ type GetRepliedMessageRequest struct {
MessageId int64 `json:"message_id"`
}
// Returns information about a non-bundled message that is replied by a given message. Also, returns the pinned message, the game message, the invoice message, the message with a previously set same background, the giveaway message, and the topic creation message for messages of the types messagePinMessage, messageGameScore, messagePaymentSuccessful, messageChatSetBackground, messageGiveawayCompleted and topic messages without non-bundled replied message respectively. Returns a 404 error if the message doesn't exist
// Returns information about a non-bundled message that is replied by a given message. Also, returns the pinned message, the game message, the invoice message, the message with a previously set same background, the giveaway message, the checklist message, and the topic creation message for messages of the types messagePinMessage, messageGameScore, messagePaymentSuccessful, messageChatSetBackground, messageGiveawayCompleted, messageChecklistTasksDone and messageChecklistTasksAdded, and topic messages without non-bundled replied message respectively. Returns a 404 error if the message doesn't exist
func (client *Client) GetRepliedMessage(req *GetRepliedMessageRequest) (*Message, error) {
result, err := client.Send(Request{
meta: meta{
@ -2768,6 +2768,70 @@ func (client *Client) ReadAllDirectMessagesChatTopicReactions(req *ReadAllDirect
return UnmarshalOk(result.Data)
}
type GetDirectMessagesChatTopicRevenueRequest struct {
// Chat identifier of the channel direct messages chat administered by the current user
ChatId int64 `json:"chat_id"`
// Identifier of the topic
TopicId int64 `json:"topic_id"`
}
// Returns the total number of Telegram Stars received by the channel chat for direct messages from the given topic
func (client *Client) GetDirectMessagesChatTopicRevenue(req *GetDirectMessagesChatTopicRevenueRequest) (*StarCount, error) {
result, err := client.Send(Request{
meta: meta{
Type: "getDirectMessagesChatTopicRevenue",
},
Data: map[string]interface{}{
"chat_id": req.ChatId,
"topic_id": req.TopicId,
},
})
if err != nil {
return nil, err
}
if result.Type == "error" {
return nil, buildResponseError(result.Data)
}
return UnmarshalStarCount(result.Data)
}
type ToggleDirectMessagesChatTopicCanSendUnpaidMessagesRequest struct {
// Chat identifier
ChatId int64 `json:"chat_id"`
// Identifier of the topic
TopicId int64 `json:"topic_id"`
// Pass true to allow unpaid messages; pass false to disallow unpaid messages
CanSendUnpaidMessages bool `json:"can_send_unpaid_messages"`
// Pass true to refund the user previously paid messages
RefundPayments bool `json:"refund_payments"`
}
// Allows to send unpaid messages to the given topic of the channel direct messages chat administered by the current user
func (client *Client) ToggleDirectMessagesChatTopicCanSendUnpaidMessages(req *ToggleDirectMessagesChatTopicCanSendUnpaidMessagesRequest) (*Ok, error) {
result, err := client.Send(Request{
meta: meta{
Type: "toggleDirectMessagesChatTopicCanSendUnpaidMessages",
},
Data: map[string]interface{}{
"chat_id": req.ChatId,
"topic_id": req.TopicId,
"can_send_unpaid_messages": req.CanSendUnpaidMessages,
"refund_payments": req.RefundPayments,
},
})
if err != nil {
return nil, err
}
if result.Type == "error" {
return nil, buildResponseError(result.Data)
}
return UnmarshalOk(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"`
@ -4075,6 +4139,134 @@ func (client *Client) ReportSponsoredChat(req *ReportSponsoredChatRequest) (Repo
}
}
type GetVideoMessageAdvertisementsRequest struct {
// Identifier of the chat with the message
ChatId int64 `json:"chat_id"`
// Identifier of the message
MessageId int64 `json:"message_id"`
}
// Returns advertisements to be shown while a video from a message is watched. Available only if messageProperties.can_get_video_advertisements
func (client *Client) GetVideoMessageAdvertisements(req *GetVideoMessageAdvertisementsRequest) (*VideoMessageAdvertisements, error) {
result, err := client.Send(Request{
meta: meta{
Type: "getVideoMessageAdvertisements",
},
Data: map[string]interface{}{
"chat_id": req.ChatId,
"message_id": req.MessageId,
},
})
if err != nil {
return nil, err
}
if result.Type == "error" {
return nil, buildResponseError(result.Data)
}
return UnmarshalVideoMessageAdvertisements(result.Data)
}
type ViewVideoMessageAdvertisementRequest struct {
// Unique identifier of the advertisement
AdvertisementUniqueId int64 `json:"advertisement_unique_id"`
}
// Informs TDLib that the user viewed a video message advertisement
func (client *Client) ViewVideoMessageAdvertisement(req *ViewVideoMessageAdvertisementRequest) (*Ok, error) {
result, err := client.Send(Request{
meta: meta{
Type: "viewVideoMessageAdvertisement",
},
Data: map[string]interface{}{
"advertisement_unique_id": req.AdvertisementUniqueId,
},
})
if err != nil {
return nil, err
}
if result.Type == "error" {
return nil, buildResponseError(result.Data)
}
return UnmarshalOk(result.Data)
}
type ClickVideoMessageAdvertisementRequest struct {
// Unique identifier of the advertisement
AdvertisementUniqueId int64 `json:"advertisement_unique_id"`
}
// Informs TDLib that the user clicked a video message advertisement
func (client *Client) ClickVideoMessageAdvertisement(req *ClickVideoMessageAdvertisementRequest) (*Ok, error) {
result, err := client.Send(Request{
meta: meta{
Type: "clickVideoMessageAdvertisement",
},
Data: map[string]interface{}{
"advertisement_unique_id": req.AdvertisementUniqueId,
},
})
if err != nil {
return nil, err
}
if result.Type == "error" {
return nil, buildResponseError(result.Data)
}
return UnmarshalOk(result.Data)
}
type ReportVideoMessageAdvertisementRequest struct {
// Unique identifier of the advertisement
AdvertisementUniqueId int64 `json:"advertisement_unique_id"`
// Option identifier chosen by the user; leave empty for the initial request
OptionId []byte `json:"option_id"`
}
// Reports a video message advertisement to Telegram moderators
func (client *Client) ReportVideoMessageAdvertisement(req *ReportVideoMessageAdvertisementRequest) (ReportSponsoredResult, error) {
result, err := client.Send(Request{
meta: meta{
Type: "reportVideoMessageAdvertisement",
},
Data: map[string]interface{}{
"advertisement_unique_id": req.AdvertisementUniqueId,
"option_id": req.OptionId,
},
})
if err != nil {
return nil, err
}
if result.Type == "error" {
return nil, buildResponseError(result.Data)
}
switch result.Type {
case TypeReportSponsoredResultOk:
return UnmarshalReportSponsoredResultOk(result.Data)
case TypeReportSponsoredResultFailed:
return UnmarshalReportSponsoredResultFailed(result.Data)
case TypeReportSponsoredResultOptionRequired:
return UnmarshalReportSponsoredResultOptionRequired(result.Data)
case TypeReportSponsoredResultAdsHidden:
return UnmarshalReportSponsoredResultAdsHidden(result.Data)
case TypeReportSponsoredResultPremiumRequired:
return UnmarshalReportSponsoredResultPremiumRequired(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"`
@ -4911,6 +5103,41 @@ func (client *Client) EditMessageLiveLocation(req *EditMessageLiveLocationReques
return UnmarshalMessage(result.Data)
}
type EditMessageChecklistRequest struct {
// The chat the message belongs to
ChatId int64 `json:"chat_id"`
// Identifier of the message. Use messageProperties.can_be_edited to check whether the message can be edited
MessageId int64 `json:"message_id"`
// The new message reply markup; pass null if none; for bots only
ReplyMarkup ReplyMarkup `json:"reply_markup"`
// The new checklist. If some tasks were completed, this information will be kept
Checklist *InputChecklist `json:"checklist"`
}
// Edits the message content of a checklist. Returns the edited message after the edit is completed on the server side
func (client *Client) EditMessageChecklist(req *EditMessageChecklistRequest) (*Message, error) {
result, err := client.Send(Request{
meta: meta{
Type: "editMessageChecklist",
},
Data: map[string]interface{}{
"chat_id": req.ChatId,
"message_id": req.MessageId,
"reply_markup": req.ReplyMarkup,
"checklist": req.Checklist,
},
})
if err != nil {
return nil, err
}
if result.Type == "error" {
return nil, buildResponseError(result.Data)
}
return UnmarshalMessage(result.Data)
}
type EditMessageMediaRequest struct {
// The chat the message belongs to
ChatId int64 `json:"chat_id"`
@ -5425,6 +5652,44 @@ func (client *Client) EditBusinessMessageLiveLocation(req *EditBusinessMessageLi
return UnmarshalBusinessMessage(result.Data)
}
type EditBusinessMessageChecklistRequest struct {
// Unique identifier of business connection on behalf of which the message was sent
BusinessConnectionId string `json:"business_connection_id"`
// The chat the message belongs to
ChatId int64 `json:"chat_id"`
// Identifier of the message
MessageId int64 `json:"message_id"`
// The new message reply markup; pass null if none
ReplyMarkup ReplyMarkup `json:"reply_markup"`
// The new checklist. If some tasks were completed, this information will be kept
Checklist *InputChecklist `json:"checklist"`
}
// Edits the content of a checklist in a message sent on behalf of a business account; for bots only
func (client *Client) EditBusinessMessageChecklist(req *EditBusinessMessageChecklistRequest) (*BusinessMessage, error) {
result, err := client.Send(Request{
meta: meta{
Type: "editBusinessMessageChecklist",
},
Data: map[string]interface{}{
"business_connection_id": req.BusinessConnectionId,
"chat_id": req.ChatId,
"message_id": req.MessageId,
"reply_markup": req.ReplyMarkup,
"checklist": req.Checklist,
},
})
if err != nil {
return nil, err
}
if result.Type == "error" {
return nil, buildResponseError(result.Data)
}
return UnmarshalBusinessMessage(result.Data)
}
type EditBusinessMessageMediaRequest struct {
// Unique identifier of business connection on behalf of which the message was sent
BusinessConnectionId string `json:"business_connection_id"`
@ -6137,7 +6402,7 @@ type AddQuickReplyShortcutMessageRequest struct {
ShortcutName string `json:"shortcut_name"`
// Identifier of a quick reply message in the same shortcut to be replied; pass 0 if none
ReplyToMessageId int64 `json:"reply_to_message_id"`
// The content of the message to be added; inputMessagePoll, inputMessageForwarded and inputMessageLocation with live_period aren't supported
// The content of the message to be added; inputMessagePaidMedia, inputMessageForwarded and inputMessageLocation with live_period aren't supported
InputMessageContent InputMessageContent `json:"input_message_content"`
}
@ -6268,11 +6533,11 @@ type EditQuickReplyMessageRequest struct {
ShortcutId int32 `json:"shortcut_id"`
// Identifier of the message
MessageId int64 `json:"message_id"`
// New content of the message. Must be one of the following types: inputMessageText, inputMessageAnimation, inputMessageAudio, inputMessageDocument, inputMessagePhoto or inputMessageVideo
// New content of the message. Must be one of the following types: inputMessageAnimation, inputMessageAudio, inputMessageChecklist, inputMessageDocument, inputMessagePhoto, inputMessageText, or inputMessageVideo
InputMessageContent InputMessageContent `json:"input_message_content"`
}
// Asynchronously edits the text, media or caption of a quick reply message. Use quickReplyMessage.can_be_edited to check whether a message can be edited. Media message can be edited only to a media message. The type of message content in an album can't be changed with exception of replacing a photo with a video or vice versa
// Asynchronously edits the text, media or caption of a quick reply message. Use quickReplyMessage.can_be_edited to check whether a message can be edited. Media message can be edited only to a media message. Checklist messages can be edited only to a checklist message. The type of message content in an album can't be changed with exception of replacing a photo with a video or vice versa
func (client *Client) EditQuickReplyMessage(req *EditQuickReplyMessageRequest) (*Ok, error) {
result, err := client.Send(Request{
meta: meta{
@ -7719,6 +7984,73 @@ func (client *Client) StopPoll(req *StopPollRequest) (*Ok, error) {
return UnmarshalOk(result.Data)
}
type AddChecklistTasksRequest struct {
// Identifier of the chat with the message
ChatId int64 `json:"chat_id"`
// Identifier of the message containing the checklist. Use messageProperties.can_add_tasks to check whether the tasks can be added
MessageId int64 `json:"message_id"`
// List of added tasks
Tasks []*InputChecklistTask `json:"tasks"`
}
// Adds tasks to a checklist in a message
func (client *Client) AddChecklistTasks(req *AddChecklistTasksRequest) (*Ok, error) {
result, err := client.Send(Request{
meta: meta{
Type: "addChecklistTasks",
},
Data: map[string]interface{}{
"chat_id": req.ChatId,
"message_id": req.MessageId,
"tasks": req.Tasks,
},
})
if err != nil {
return nil, err
}
if result.Type == "error" {
return nil, buildResponseError(result.Data)
}
return UnmarshalOk(result.Data)
}
type MarkChecklistTasksAsDoneRequest struct {
// Identifier of the chat with the message
ChatId int64 `json:"chat_id"`
// Identifier of the message containing the checklist. Use messageProperties.can_mark_tasks_as_done to check whether the tasks can be marked as done or not done
MessageId int64 `json:"message_id"`
// Identifiers of tasks that were marked as done
MarkedAsDoneTaskIds []int32 `json:"marked_as_done_task_ids"`
// Identifiers of tasks that were marked as not done
MarkedAsNotDoneTaskIds []int32 `json:"marked_as_not_done_task_ids"`
}
// Adds tasks of a checklist in a message as done or not done
func (client *Client) MarkChecklistTasksAsDone(req *MarkChecklistTasksAsDoneRequest) (*Ok, error) {
result, err := client.Send(Request{
meta: meta{
Type: "markChecklistTasksAsDone",
},
Data: map[string]interface{}{
"chat_id": req.ChatId,
"message_id": req.MessageId,
"marked_as_done_task_ids": req.MarkedAsDoneTaskIds,
"marked_as_not_done_task_ids": req.MarkedAsNotDoneTaskIds,
},
})
if err != nil {
return nil, err
}
if result.Type == "error" {
return nil, buildResponseError(result.Data)
}
return UnmarshalOk(result.Data)
}
type HideSuggestedActionRequest struct {
// Suggested action to hide
Action SuggestedAction `json:"action"`

View file

@ -200,6 +200,10 @@ const (
ClassClosedVectorPath = "ClosedVectorPath"
ClassOutline = "Outline"
ClassPollOption = "PollOption"
ClassChecklistTask = "ChecklistTask"
ClassInputChecklistTask = "InputChecklistTask"
ClassChecklist = "Checklist"
ClassInputChecklist = "InputChecklist"
ClassAnimation = "Animation"
ClassAudio = "Audio"
ClassDocument = "Document"
@ -216,6 +220,7 @@ const (
ClassWebApp = "WebApp"
ClassPoll = "Poll"
ClassAlternativeVideo = "AlternativeVideo"
ClassVideoStoryboard = "VideoStoryboard"
ClassBackground = "Background"
ClassBackgrounds = "Backgrounds"
ClassChatBackground = "ChatBackground"
@ -357,11 +362,13 @@ const (
ClassMessageCalendar = "MessageCalendar"
ClassBusinessMessage = "BusinessMessage"
ClassBusinessMessages = "BusinessMessages"
ClassMessageSponsor = "MessageSponsor"
ClassAdvertisementSponsor = "AdvertisementSponsor"
ClassSponsoredMessage = "SponsoredMessage"
ClassSponsoredMessages = "SponsoredMessages"
ClassSponsoredChat = "SponsoredChat"
ClassSponsoredChats = "SponsoredChats"
ClassVideoMessageAdvertisement = "VideoMessageAdvertisement"
ClassVideoMessageAdvertisements = "VideoMessageAdvertisements"
ClassReportOption = "ReportOption"
ClassFileDownload = "FileDownload"
ClassDownloadedFileCounts = "DownloadedFileCounts"
@ -704,6 +711,10 @@ const (
TypePollOption = "pollOption"
TypePollTypeRegular = "pollTypeRegular"
TypePollTypeQuiz = "pollTypeQuiz"
TypeChecklistTask = "checklistTask"
TypeInputChecklistTask = "inputChecklistTask"
TypeChecklist = "checklist"
TypeInputChecklist = "inputChecklist"
TypeAnimation = "animation"
TypeAudio = "audio"
TypeDocument = "document"
@ -720,6 +731,7 @@ const (
TypeWebApp = "webApp"
TypePoll = "poll"
TypeAlternativeVideo = "alternativeVideo"
TypeVideoStoryboard = "videoStoryboard"
TypeBackground = "background"
TypeBackgrounds = "backgrounds"
TypeChatBackground = "chatBackground"
@ -1004,11 +1016,13 @@ const (
TypeMessageSourceNotification = "messageSourceNotification"
TypeMessageSourceScreenshot = "messageSourceScreenshot"
TypeMessageSourceOther = "messageSourceOther"
TypeMessageSponsor = "messageSponsor"
TypeAdvertisementSponsor = "advertisementSponsor"
TypeSponsoredMessage = "sponsoredMessage"
TypeSponsoredMessages = "sponsoredMessages"
TypeSponsoredChat = "sponsoredChat"
TypeSponsoredChats = "sponsoredChats"
TypeVideoMessageAdvertisement = "videoMessageAdvertisement"
TypeVideoMessageAdvertisements = "videoMessageAdvertisements"
TypeReportOption = "reportOption"
TypeReportSponsoredResultOk = "reportSponsoredResultOk"
TypeReportSponsoredResultFailed = "reportSponsoredResultFailed"
@ -1344,6 +1358,7 @@ const (
TypeMessageGame = "messageGame"
TypeMessagePoll = "messagePoll"
TypeMessageStory = "messageStory"
TypeMessageChecklist = "messageChecklist"
TypeMessageInvoice = "messageInvoice"
TypeMessageCall = "messageCall"
TypeMessageGroupCall = "messageGroupCall"
@ -1392,6 +1407,8 @@ const (
TypeMessagePaidMessagesRefunded = "messagePaidMessagesRefunded"
TypeMessagePaidMessagePriceChanged = "messagePaidMessagePriceChanged"
TypeMessageDirectMessagePriceChanged = "messageDirectMessagePriceChanged"
TypeMessageChecklistTasksDone = "messageChecklistTasksDone"
TypeMessageChecklistTasksAdded = "messageChecklistTasksAdded"
TypeMessageContactRegistered = "messageContactRegistered"
TypeMessageUsersShared = "messageUsersShared"
TypeMessageChatShared = "messageChatShared"
@ -1453,6 +1470,7 @@ const (
TypeInputMessageInvoice = "inputMessageInvoice"
TypeInputMessagePoll = "inputMessagePoll"
TypeInputMessageStory = "inputMessageStory"
TypeInputMessageChecklist = "inputMessageChecklist"
TypeInputMessageForwarded = "inputMessageForwarded"
TypeMessageProperties = "messageProperties"
TypeSearchMessagesFilterEmpty = "searchMessagesFilterEmpty"
@ -1800,6 +1818,7 @@ const (
TypePremiumFeatureLastSeenTimes = "premiumFeatureLastSeenTimes"
TypePremiumFeatureBusiness = "premiumFeatureBusiness"
TypePremiumFeatureMessageEffects = "premiumFeatureMessageEffects"
TypePremiumFeatureChecklists = "premiumFeatureChecklists"
TypeBusinessFeatureLocation = "businessFeatureLocation"
TypeBusinessFeatureOpeningHours = "businessFeatureOpeningHours"
TypeBusinessFeatureQuickReplies = "businessFeatureQuickReplies"
@ -1919,6 +1938,7 @@ const (
TypePushMessageContentSticker = "pushMessageContentSticker"
TypePushMessageContentStory = "pushMessageContentStory"
TypePushMessageContentText = "pushMessageContentText"
TypePushMessageContentChecklist = "pushMessageContentChecklist"
TypePushMessageContentVideo = "pushMessageContentVideo"
TypePushMessageContentVideoNote = "pushMessageContentVideoNote"
TypePushMessageContentVoiceNote = "pushMessageContentVoiceNote"
@ -1937,6 +1957,8 @@ const (
TypePushMessageContentRecurringPayment = "pushMessageContentRecurringPayment"
TypePushMessageContentSuggestProfilePhoto = "pushMessageContentSuggestProfilePhoto"
TypePushMessageContentProximityAlertTriggered = "pushMessageContentProximityAlertTriggered"
TypePushMessageContentChecklistTasksAdded = "pushMessageContentChecklistTasksAdded"
TypePushMessageContentChecklistTasksDone = "pushMessageContentChecklistTasksDone"
TypePushMessageContentMessageForwards = "pushMessageContentMessageForwards"
TypePushMessageContentMediaAlbum = "pushMessageContentMediaAlbum"
TypeNotificationTypeNewMessage = "notificationTypeNewMessage"
@ -5493,6 +5515,122 @@ func (*PollTypeQuiz) PollTypeType() string {
return TypePollTypeQuiz
}
// Describes a task in a checklist
type ChecklistTask struct {
meta
// Unique identifier of the task
Id int32 `json:"id"`
// Text of the task; may contain only Bold, Italic, Underline, Strikethrough, Spoiler, CustomEmoji, Url, EmailAddress, Mention, Hashtag, Cashtag and PhoneNumber entities
Text *FormattedText `json:"text"`
// Identifier of the user that completed the task; 0 if the task isn't completed
CompletedByUserId int64 `json:"completed_by_user_id"`
// Point in time (Unix timestamp) when the task was completed; 0 if the task isn't completed
CompletionDate int32 `json:"completion_date"`
}
func (entity *ChecklistTask) MarshalJSON() ([]byte, error) {
entity.meta.Type = entity.GetType()
type stub ChecklistTask
return json.Marshal((*stub)(entity))
}
func (*ChecklistTask) GetClass() string {
return ClassChecklistTask
}
func (*ChecklistTask) GetType() string {
return TypeChecklistTask
}
// Describes a task in a checklist to be sent
type InputChecklistTask struct {
meta
// Unique identifier of the task; must be positive
Id int32 `json:"id"`
// Text of the task; 1-getOption("checklist_task_text_length_max") characters without line feeds. May contain only Bold, Italic, Underline, Strikethrough, Spoiler, and CustomEmoji entities
Text *FormattedText `json:"text"`
}
func (entity *InputChecklistTask) MarshalJSON() ([]byte, error) {
entity.meta.Type = entity.GetType()
type stub InputChecklistTask
return json.Marshal((*stub)(entity))
}
func (*InputChecklistTask) GetClass() string {
return ClassInputChecklistTask
}
func (*InputChecklistTask) GetType() string {
return TypeInputChecklistTask
}
// Describes a checklist
type Checklist struct {
meta
// Title of the checklist; may contain only Bold, Italic, Underline, Strikethrough, Spoiler, and CustomEmoji entities
Title *FormattedText `json:"title"`
// List of tasks in the checklist
Tasks []*ChecklistTask `json:"tasks"`
// True, if users other than creator of the list can add tasks to the list
OthersCanAddTasks bool `json:"others_can_add_tasks"`
// True, if the current user can add tasks to the list if they have Telegram Premium subscription
CanAddTasks bool `json:"can_add_tasks"`
// True, if users other than creator of the list can mark tasks as done or not done. If true, then the checklist is called "group checklist"
OthersCanMarkTasksAsDone bool `json:"others_can_mark_tasks_as_done"`
// True, if the current user can mark tasks as done or not done if they have Telegram Premium subscription
CanMarkTasksAsDone bool `json:"can_mark_tasks_as_done"`
}
func (entity *Checklist) MarshalJSON() ([]byte, error) {
entity.meta.Type = entity.GetType()
type stub Checklist
return json.Marshal((*stub)(entity))
}
func (*Checklist) GetClass() string {
return ClassChecklist
}
func (*Checklist) GetType() string {
return TypeChecklist
}
// Describes a checklist to be sent
type InputChecklist struct {
meta
// Title of the checklist; 1-getOption("checklist_title_length_max") characters. May contain only Bold, Italic, Underline, Strikethrough, Spoiler, and CustomEmoji entities
Title *FormattedText `json:"title"`
// List of tasks in the checklist; 1-getOption("checklist_task_count_max") tasks
Tasks []*InputChecklistTask `json:"tasks"`
// True, if other users can add tasks to the list
OthersCanAddTasks bool `json:"others_can_add_tasks"`
// True, if other users can mark tasks as done or not done
OthersCanMarkTasksAsDone bool `json:"others_can_mark_tasks_as_done"`
}
func (entity *InputChecklist) MarshalJSON() ([]byte, error) {
entity.meta.Type = entity.GetType()
type stub InputChecklist
return json.Marshal((*stub)(entity))
}
func (*InputChecklist) GetClass() string {
return ClassInputChecklist
}
func (*InputChecklist) GetType() string {
return TypeInputChecklist
}
// Describes an animation file. The animation must be encoded in GIF or MPEG4 format
type Animation struct {
meta
@ -6163,6 +6301,35 @@ func (*AlternativeVideo) GetType() string {
return TypeAlternativeVideo
}
// Describes a storyboard for a video
type VideoStoryboard struct {
meta
// A JPEG file that contains tiled previews of video
StoryboardFile *File `json:"storyboard_file"`
// Width of a tile
Width int32 `json:"width"`
// Height of a tile
Height int32 `json:"height"`
// File that describes mapping of position in the video to a tile in the JPEG file
MapFile *File `json:"map_file"`
}
func (entity *VideoStoryboard) MarshalJSON() ([]byte, error) {
entity.meta.Type = entity.GetType()
type stub VideoStoryboard
return json.Marshal((*stub)(entity))
}
func (*VideoStoryboard) GetClass() string {
return ClassVideoStoryboard
}
func (*VideoStoryboard) GetType() string {
return TypeVideoStoryboard
}
// Describes a chat background
type Background struct {
meta
@ -7600,7 +7767,7 @@ type ChatPermissions struct {
CanSendVideoNotes bool `json:"can_send_video_notes"`
// True, if the user can send voice notes
CanSendVoiceNotes bool `json:"can_send_voice_notes"`
// True, if the user can send polls
// True, if the user can send polls and checklists
CanSendPolls bool `json:"can_send_polls"`
// True, if the user can send stickers. Implies can_send_messages permissions
CanSendStickers bool `json:"can_send_stickers"`
@ -13352,6 +13519,8 @@ type SupergroupFullInfo struct {
MyBoostCount int32 `json:"my_boost_count"`
// Number of times the supergroup must be boosted by a user to ignore slow mode and chat permission restrictions; 0 if unspecified
UnrestrictBoostCount int32 `json:"unrestrict_boost_count"`
// Number of Telegram Stars that must be paid by the current user for each sent message to the supergroup
OutgoingPaidMessageStarCount int64 `json:"outgoing_paid_message_star_count"`
// Identifier of the supergroup sticker set that must be shown before user sticker sets; 0 if none
StickerSetId JsonInt64 `json:"sticker_set_id"`
// Identifier of the custom emoji sticker set that can be used in the supergroup without Telegram Premium subscription; 0 if none
@ -14872,7 +15041,7 @@ type MessageReplyToMessage struct {
Origin MessageOrigin `json:"origin"`
// Point in time (Unix timestamp) when the message was sent if the message was from another chat or topic; 0 for messages from the same chat
OriginSendDate int32 `json:"origin_send_date"`
// Media content of the message if the message was from another chat or topic; may be null for messages from the same chat and messages without media. Can be only one of the following types: messageAnimation, messageAudio, messageContact, messageDice, messageDocument, messageGame, messageGiveaway, messageGiveawayWinners, messageInvoice, messageLocation, messagePaidMedia, messagePhoto, messagePoll, messageSticker, messageStory, messageText (for link preview), messageVenue, messageVideo, messageVideoNote, or messageVoiceNote
// Media content of the message if the message was from another chat or topic; may be null for messages from the same chat and messages without media. Can be only one of the following types: messageAnimation, messageAudio, messageChecklist, messageContact, messageDice, messageDocument, messageGame, messageGiveaway, messageGiveawayWinners, messageInvoice, messageLocation, messagePaidMedia, messagePhoto, messagePoll, messageSticker, messageStory, messageText (for link preview), messageVenue, messageVideo, messageVideoNote, or messageVoiceNote
Content MessageContent `json:"content"`
}
@ -15766,31 +15935,31 @@ func (*MessageSourceOther) MessageSourceType() string {
return TypeMessageSourceOther
}
// Information about the sponsor of a message
type MessageSponsor struct {
// Information about the sponsor of an advertisement
type AdvertisementSponsor struct {
meta
// URL of the sponsor to be opened when the message is clicked
// URL of the sponsor to be opened when the advertisement is clicked
Url string `json:"url"`
// Photo of the sponsor; may be null if must not be shown
Photo *Photo `json:"photo"`
// Additional optional information about the sponsor to be shown along with the message
// Additional optional information about the sponsor to be shown along with the advertisement
Info string `json:"info"`
}
func (entity *MessageSponsor) MarshalJSON() ([]byte, error) {
func (entity *AdvertisementSponsor) MarshalJSON() ([]byte, error) {
entity.meta.Type = entity.GetType()
type stub MessageSponsor
type stub AdvertisementSponsor
return json.Marshal((*stub)(entity))
}
func (*MessageSponsor) GetClass() string {
return ClassMessageSponsor
func (*AdvertisementSponsor) GetClass() string {
return ClassAdvertisementSponsor
}
func (*MessageSponsor) GetType() string {
return TypeMessageSponsor
func (*AdvertisementSponsor) GetType() string {
return TypeAdvertisementSponsor
}
// Describes a sponsored message
@ -15805,7 +15974,7 @@ type SponsoredMessage struct {
// Content of the message. Currently, can be only of the types messageText, messageAnimation, messagePhoto, or messageVideo. Video messages can be viewed fullscreen
Content MessageContent `json:"content"`
// Information about the sponsor of the message
Sponsor *MessageSponsor `json:"sponsor"`
Sponsor *AdvertisementSponsor `json:"sponsor"`
// Title of the sponsored message
Title string `json:"title"`
// Text for the message action button
@ -15840,7 +16009,7 @@ func (sponsoredMessage *SponsoredMessage) UnmarshalJSON(data []byte) error {
IsRecommended bool `json:"is_recommended"`
CanBeReported bool `json:"can_be_reported"`
Content json.RawMessage `json:"content"`
Sponsor *MessageSponsor `json:"sponsor"`
Sponsor *AdvertisementSponsor `json:"sponsor"`
Title string `json:"title"`
ButtonText string `json:"button_text"`
AccentColorId int32 `json:"accent_color_id"`
@ -15946,6 +16115,70 @@ func (*SponsoredChats) GetType() string {
return TypeSponsoredChats
}
// Describes an advertisent to be shown while a video from a message is watched
type VideoMessageAdvertisement struct {
meta
// Unique identifier of this result
UniqueId int64 `json:"unique_id"`
// Text of the advertisement
Text string `json:"text"`
// The minimum amount of time the advertisement must be dispalyed before it can be hidden by the user, in seconds
MinDisplayDuration int32 `json:"min_display_duration"`
// The maximum amount of time the advertisement must be dispalyed before it must be automatically hidden, in seconds
MaxDisplayDuration int32 `json:"max_display_duration"`
// True, if the advertisement can be reported to Telegram moderators through reportVideoMessageAdvertisement
CanBeReported bool `json:"can_be_reported"`
// Information about the sponsor of the advertisement
Sponsor *AdvertisementSponsor `json:"sponsor"`
// Title of the sponsored message
Title string `json:"title"`
// If non-empty, additional information about the sponsored message to be shown along with the message
AdditionalInfo string `json:"additional_info"`
}
func (entity *VideoMessageAdvertisement) MarshalJSON() ([]byte, error) {
entity.meta.Type = entity.GetType()
type stub VideoMessageAdvertisement
return json.Marshal((*stub)(entity))
}
func (*VideoMessageAdvertisement) GetClass() string {
return ClassVideoMessageAdvertisement
}
func (*VideoMessageAdvertisement) GetType() string {
return TypeVideoMessageAdvertisement
}
// Contains a list of advertisements to be shown while a video from a message is watched
type VideoMessageAdvertisements struct {
meta
// List of advertisements
Advertisements []*VideoMessageAdvertisement `json:"advertisements"`
// Delay before the first advertisement is shown, in seconds
StartDelay int32 `json:"start_delay"`
// Delay between consecutive advertisements, in seconds
BetweenDelay int32 `json:"between_delay"`
}
func (entity *VideoMessageAdvertisements) MarshalJSON() ([]byte, error) {
entity.meta.Type = entity.GetType()
type stub VideoMessageAdvertisements
return json.Marshal((*stub)(entity))
}
func (*VideoMessageAdvertisements) GetClass() string {
return ClassVideoMessageAdvertisements
}
func (*VideoMessageAdvertisements) GetType() string {
return TypeVideoMessageAdvertisements
}
// Describes an option to report an entity to Telegram
type ReportOption struct {
meta
@ -19168,6 +19401,8 @@ type DirectMessagesChatTopic struct {
SenderId MessageSender `json:"sender_id"`
// A parameter used to determine order of the topic in the topic list. Topics must be sorted by the order in descending order
Order JsonInt64 `json:"order"`
// True, if the other party can send unpaid messages even if the chat has paid messages enabled
CanSendUnpaidMessages bool `json:"can_send_unpaid_messages"`
// True, if the forum topic is marked as unread
IsMarkedAsUnread bool `json:"is_marked_as_unread"`
// Number of unread messages in the chat
@ -19206,6 +19441,7 @@ func (directMessagesChatTopic *DirectMessagesChatTopic) UnmarshalJSON(data []byt
Id int64 `json:"id"`
SenderId json.RawMessage `json:"sender_id"`
Order JsonInt64 `json:"order"`
CanSendUnpaidMessages bool `json:"can_send_unpaid_messages"`
IsMarkedAsUnread bool `json:"is_marked_as_unread"`
UnreadCount int64 `json:"unread_count"`
LastReadInboxMessageId int64 `json:"last_read_inbox_message_id"`
@ -19223,6 +19459,7 @@ func (directMessagesChatTopic *DirectMessagesChatTopic) UnmarshalJSON(data []byt
directMessagesChatTopic.ChatId = tmp.ChatId
directMessagesChatTopic.Id = tmp.Id
directMessagesChatTopic.Order = tmp.Order
directMessagesChatTopic.CanSendUnpaidMessages = tmp.CanSendUnpaidMessages
directMessagesChatTopic.IsMarkedAsUnread = tmp.IsMarkedAsUnread
directMessagesChatTopic.UnreadCount = tmp.UnreadCount
directMessagesChatTopic.LastReadInboxMessageId = tmp.LastReadInboxMessageId
@ -26677,6 +26914,8 @@ type MessageVideo struct {
Video *Video `json:"video"`
// Alternative qualities of the video
AlternativeVideos []*AlternativeVideo `json:"alternative_videos"`
// Available storyboards for the video
Storyboards []*VideoStoryboard `json:"storyboards"`
// Cover of the video; may be null if none
Cover *Photo `json:"cover"`
// Timestamp from which the video playing must start, in seconds
@ -27138,6 +27377,33 @@ func (*MessageStory) MessageContentType() string {
return TypeMessageStory
}
// A message with a checklist
type MessageChecklist struct {
meta
// The checklist description
List *Checklist `json:"list"`
}
func (entity *MessageChecklist) MarshalJSON() ([]byte, error) {
entity.meta.Type = entity.GetType()
type stub MessageChecklist
return json.Marshal((*stub)(entity))
}
func (*MessageChecklist) GetClass() string {
return ClassMessageContent
}
func (*MessageChecklist) GetType() string {
return TypeMessageChecklist
}
func (*MessageChecklist) MessageContentType() string {
return TypeMessageChecklist
}
// A message with an invoice from a bot. Use getInternalLink with internalLinkTypeBotStart to share the invoice
type MessageInvoice struct {
meta
@ -28990,6 +29256,66 @@ func (*MessageDirectMessagePriceChanged) MessageContentType() string {
return TypeMessageDirectMessagePriceChanged
}
// Some tasks from a checklist were marked as done or not done
type MessageChecklistTasksDone struct {
meta
// Identifier of the message with the checklist; can be 0 if the message was deleted
ChecklistMessageId int64 `json:"checklist_message_id"`
// Identifiers of tasks that were marked as done
MarkedAsDoneTaskIds []int32 `json:"marked_as_done_task_ids"`
// Identifiers of tasks that were marked as not done
MarkedAsNotDoneTaskIds []int32 `json:"marked_as_not_done_task_ids"`
}
func (entity *MessageChecklistTasksDone) MarshalJSON() ([]byte, error) {
entity.meta.Type = entity.GetType()
type stub MessageChecklistTasksDone
return json.Marshal((*stub)(entity))
}
func (*MessageChecklistTasksDone) GetClass() string {
return ClassMessageContent
}
func (*MessageChecklistTasksDone) GetType() string {
return TypeMessageChecklistTasksDone
}
func (*MessageChecklistTasksDone) MessageContentType() string {
return TypeMessageChecklistTasksDone
}
// Some tasks were added to a checklist
type MessageChecklistTasksAdded struct {
meta
// Identifier of the message with the checklist; can be 0 if the message was deleted
ChecklistMessageId int64 `json:"checklist_message_id"`
// List of tasks added to the checklist
Tasks []*ChecklistTask `json:"tasks"`
}
func (entity *MessageChecklistTasksAdded) MarshalJSON() ([]byte, error) {
entity.meta.Type = entity.GetType()
type stub MessageChecklistTasksAdded
return json.Marshal((*stub)(entity))
}
func (*MessageChecklistTasksAdded) GetClass() string {
return ClassMessageContent
}
func (*MessageChecklistTasksAdded) GetType() string {
return TypeMessageChecklistTasksAdded
}
func (*MessageChecklistTasksAdded) MessageContentType() string {
return TypeMessageChecklistTasksAdded
}
// A contact has registered with Telegram
type MessageContactRegistered struct{
meta
@ -31227,6 +31553,33 @@ func (*InputMessageStory) InputMessageContentType() string {
return TypeInputMessageStory
}
// A message with a checklist. Checklists can't be sent to secret chats, channel chats and channel direct messages chats; for Telegram Premium users only
type InputMessageChecklist struct {
meta
// The checklist to send
Checklist *InputChecklist `json:"checklist"`
}
func (entity *InputMessageChecklist) MarshalJSON() ([]byte, error) {
entity.meta.Type = entity.GetType()
type stub InputMessageChecklist
return json.Marshal((*stub)(entity))
}
func (*InputMessageChecklist) GetClass() string {
return ClassInputMessageContent
}
func (*InputMessageChecklist) GetType() string {
return TypeInputMessageChecklist
}
func (*InputMessageChecklist) InputMessageContentType() string {
return TypeInputMessageChecklist
}
// A forwarded message
type InputMessageForwarded struct {
meta
@ -31267,6 +31620,8 @@ func (*InputMessageForwarded) InputMessageContentType() string {
// Contains properties of a message and describes actions that can be done with the message right now
type MessageProperties struct {
meta
// True, if tasks can be added to the message's checklist using addChecklistTasks if the current user has Telegram Premium subscription
CanAddTasks bool `json:"can_add_tasks"`
// True, if content of the message can be copied using inputMessageForwarded or forwardMessages with copy options
CanBeCopied bool `json:"can_be_copied"`
// True, if content of the message can be copied to a secret chat using inputMessageForwarded or forwardMessages with copy options
@ -31275,7 +31630,7 @@ type MessageProperties struct {
CanBeDeletedOnlyForSelf bool `json:"can_be_deleted_only_for_self"`
// True, if the message can be deleted for all users using the method deleteMessages with revoke == true
CanBeDeletedForAllUsers bool `json:"can_be_deleted_for_all_users"`
// True, if the message can be edited using the methods editMessageText, editMessageCaption, or editMessageReplyMarkup. For live location and poll messages this fields shows whether editMessageLiveLocation or stopPoll can be used with this message
// True, if the message can be edited using the methods editMessageText, editMessageCaption, or editMessageReplyMarkup. For live location, poll, and checklist messages this fields shows whether editMessageLiveLocation, stopPoll, or editMessageChecklist respectively can be used with this message
CanBeEdited bool `json:"can_be_edited"`
// True, if the message can be forwarded using inputMessageForwarded or forwardMessages without copy options
CanBeForwarded bool `json:"can_be_forwarded"`
@ -31309,8 +31664,12 @@ type MessageProperties struct {
CanGetReadDate bool `json:"can_get_read_date"`
// True, if message statistics are available through getMessageStatistics and message forwards can be received using getMessagePublicForwards
CanGetStatistics bool `json:"can_get_statistics"`
// True, if advertisements for video of the message can be received though getVideoMessageAdvertisements
CanGetVideoAdvertisements bool `json:"can_get_video_advertisements"`
// True, if chat members already viewed the message can be received through getMessageViewers
CanGetViewers bool `json:"can_get_viewers"`
// True, if tasks can be marked as done or not done in the message's checklist using markChecklistTasksAsDone if the current user has Telegram Premium subscription
CanMarkTasksAsDone bool `json:"can_mark_tasks_as_done"`
// True, if speech can be recognized for the message through recognizeSpeech
CanRecognizeSpeech bool `json:"can_recognize_speech"`
// True, if the message can be reported using reportChat
@ -42570,6 +42929,31 @@ func (*PremiumFeatureMessageEffects) PremiumFeatureType() string {
return TypePremiumFeatureMessageEffects
}
// The ability to create and use checklist messages
type PremiumFeatureChecklists struct{
meta
}
func (entity *PremiumFeatureChecklists) MarshalJSON() ([]byte, error) {
entity.meta.Type = entity.GetType()
type stub PremiumFeatureChecklists
return json.Marshal((*stub)(entity))
}
func (*PremiumFeatureChecklists) GetClass() string {
return ClassPremiumFeature
}
func (*PremiumFeatureChecklists) GetType() string {
return TypePremiumFeatureChecklists
}
func (*PremiumFeatureChecklists) PremiumFeatureType() string {
return TypePremiumFeatureChecklists
}
// The ability to set location
type BusinessFeatureLocation struct{
meta
@ -46085,6 +46469,35 @@ func (*PushMessageContentText) PushMessageContentType() string {
return TypePushMessageContentText
}
// A message with a checklist
type PushMessageContentChecklist struct {
meta
// Checklist title
Title string `json:"title"`
// True, if the message is a pinned message with the specified content
IsPinned bool `json:"is_pinned"`
}
func (entity *PushMessageContentChecklist) MarshalJSON() ([]byte, error) {
entity.meta.Type = entity.GetType()
type stub PushMessageContentChecklist
return json.Marshal((*stub)(entity))
}
func (*PushMessageContentChecklist) GetClass() string {
return ClassPushMessageContent
}
func (*PushMessageContentChecklist) GetType() string {
return TypePushMessageContentChecklist
}
func (*PushMessageContentChecklist) PushMessageContentType() string {
return TypePushMessageContentChecklist
}
// A video message
type PushMessageContentVideo struct {
meta
@ -46575,6 +46988,60 @@ func (*PushMessageContentProximityAlertTriggered) PushMessageContentType() strin
return TypePushMessageContentProximityAlertTriggered
}
// Some tasks were added to a checklist
type PushMessageContentChecklistTasksAdded struct {
meta
// Number of added tasks
TaskCount int32 `json:"task_count"`
}
func (entity *PushMessageContentChecklistTasksAdded) MarshalJSON() ([]byte, error) {
entity.meta.Type = entity.GetType()
type stub PushMessageContentChecklistTasksAdded
return json.Marshal((*stub)(entity))
}
func (*PushMessageContentChecklistTasksAdded) GetClass() string {
return ClassPushMessageContent
}
func (*PushMessageContentChecklistTasksAdded) GetType() string {
return TypePushMessageContentChecklistTasksAdded
}
func (*PushMessageContentChecklistTasksAdded) PushMessageContentType() string {
return TypePushMessageContentChecklistTasksAdded
}
// Some tasks from a checklist were marked as done or not done
type PushMessageContentChecklistTasksDone struct {
meta
// Number of changed tasks
TaskCount int32 `json:"task_count"`
}
func (entity *PushMessageContentChecklistTasksDone) MarshalJSON() ([]byte, error) {
entity.meta.Type = entity.GetType()
type stub PushMessageContentChecklistTasksDone
return json.Marshal((*stub)(entity))
}
func (*PushMessageContentChecklistTasksDone) GetClass() string {
return ClassPushMessageContent
}
func (*PushMessageContentChecklistTasksDone) GetType() string {
return TypePushMessageContentChecklistTasksDone
}
func (*PushMessageContentChecklistTasksDone) PushMessageContentType() string {
return TypePushMessageContentChecklistTasksDone
}
// A forwarded messages
type PushMessageContentMessageForwards struct {
meta

View file

@ -3507,6 +3507,9 @@ func UnmarshalMessageContent(data json.RawMessage) (MessageContent, error) {
case TypeMessageStory:
return UnmarshalMessageStory(data)
case TypeMessageChecklist:
return UnmarshalMessageChecklist(data)
case TypeMessageInvoice:
return UnmarshalMessageInvoice(data)
@ -3651,6 +3654,12 @@ func UnmarshalMessageContent(data json.RawMessage) (MessageContent, error) {
case TypeMessageDirectMessagePriceChanged:
return UnmarshalMessageDirectMessagePriceChanged(data)
case TypeMessageChecklistTasksDone:
return UnmarshalMessageChecklistTasksDone(data)
case TypeMessageChecklistTasksAdded:
return UnmarshalMessageChecklistTasksAdded(data)
case TypeMessageContactRegistered:
return UnmarshalMessageContactRegistered(data)
@ -3962,6 +3971,9 @@ func UnmarshalInputMessageContent(data json.RawMessage) (InputMessageContent, er
case TypeInputMessageStory:
return UnmarshalInputMessageStory(data)
case TypeInputMessageChecklist:
return UnmarshalInputMessageChecklist(data)
case TypeInputMessageForwarded:
return UnmarshalInputMessageForwarded(data)
@ -5803,6 +5815,9 @@ func UnmarshalPremiumFeature(data json.RawMessage) (PremiumFeature, error) {
case TypePremiumFeatureMessageEffects:
return UnmarshalPremiumFeatureMessageEffects(data)
case TypePremiumFeatureChecklists:
return UnmarshalPremiumFeatureChecklists(data)
default:
return nil, fmt.Errorf("Error unmarshaling. Unknown type: " + meta.Type)
}
@ -6603,6 +6618,9 @@ func UnmarshalPushMessageContent(data json.RawMessage) (PushMessageContent, erro
case TypePushMessageContentText:
return UnmarshalPushMessageContentText(data)
case TypePushMessageContentChecklist:
return UnmarshalPushMessageContentChecklist(data)
case TypePushMessageContentVideo:
return UnmarshalPushMessageContentVideo(data)
@ -6657,6 +6675,12 @@ func UnmarshalPushMessageContent(data json.RawMessage) (PushMessageContent, erro
case TypePushMessageContentProximityAlertTriggered:
return UnmarshalPushMessageContentProximityAlertTriggered(data)
case TypePushMessageContentChecklistTasksAdded:
return UnmarshalPushMessageContentChecklistTasksAdded(data)
case TypePushMessageContentChecklistTasksDone:
return UnmarshalPushMessageContentChecklistTasksDone(data)
case TypePushMessageContentMessageForwards:
return UnmarshalPushMessageContentMessageForwards(data)
@ -9429,6 +9453,38 @@ func UnmarshalPollTypeQuiz(data json.RawMessage) (*PollTypeQuiz, error) {
return &resp, err
}
func UnmarshalChecklistTask(data json.RawMessage) (*ChecklistTask, error) {
var resp ChecklistTask
err := json.Unmarshal(data, &resp)
return &resp, err
}
func UnmarshalInputChecklistTask(data json.RawMessage) (*InputChecklistTask, error) {
var resp InputChecklistTask
err := json.Unmarshal(data, &resp)
return &resp, err
}
func UnmarshalChecklist(data json.RawMessage) (*Checklist, error) {
var resp Checklist
err := json.Unmarshal(data, &resp)
return &resp, err
}
func UnmarshalInputChecklist(data json.RawMessage) (*InputChecklist, error) {
var resp InputChecklist
err := json.Unmarshal(data, &resp)
return &resp, err
}
func UnmarshalAnimation(data json.RawMessage) (*Animation, error) {
var resp Animation
@ -9557,6 +9613,14 @@ func UnmarshalAlternativeVideo(data json.RawMessage) (*AlternativeVideo, error)
return &resp, err
}
func UnmarshalVideoStoryboard(data json.RawMessage) (*VideoStoryboard, error) {
var resp VideoStoryboard
err := json.Unmarshal(data, &resp)
return &resp, err
}
func UnmarshalBackground(data json.RawMessage) (*Background, error) {
var resp Background
@ -11829,8 +11893,8 @@ func UnmarshalMessageSourceOther(data json.RawMessage) (*MessageSourceOther, err
return &resp, err
}
func UnmarshalMessageSponsor(data json.RawMessage) (*MessageSponsor, error) {
var resp MessageSponsor
func UnmarshalAdvertisementSponsor(data json.RawMessage) (*AdvertisementSponsor, error) {
var resp AdvertisementSponsor
err := json.Unmarshal(data, &resp)
@ -11869,6 +11933,22 @@ func UnmarshalSponsoredChats(data json.RawMessage) (*SponsoredChats, error) {
return &resp, err
}
func UnmarshalVideoMessageAdvertisement(data json.RawMessage) (*VideoMessageAdvertisement, error) {
var resp VideoMessageAdvertisement
err := json.Unmarshal(data, &resp)
return &resp, err
}
func UnmarshalVideoMessageAdvertisements(data json.RawMessage) (*VideoMessageAdvertisements, error) {
var resp VideoMessageAdvertisements
err := json.Unmarshal(data, &resp)
return &resp, err
}
func UnmarshalReportOption(data json.RawMessage) (*ReportOption, error) {
var resp ReportOption
@ -14549,6 +14629,14 @@ func UnmarshalMessageStory(data json.RawMessage) (*MessageStory, error) {
return &resp, err
}
func UnmarshalMessageChecklist(data json.RawMessage) (*MessageChecklist, error) {
var resp MessageChecklist
err := json.Unmarshal(data, &resp)
return &resp, err
}
func UnmarshalMessageInvoice(data json.RawMessage) (*MessageInvoice, error) {
var resp MessageInvoice
@ -14933,6 +15021,22 @@ func UnmarshalMessageDirectMessagePriceChanged(data json.RawMessage) (*MessageDi
return &resp, err
}
func UnmarshalMessageChecklistTasksDone(data json.RawMessage) (*MessageChecklistTasksDone, error) {
var resp MessageChecklistTasksDone
err := json.Unmarshal(data, &resp)
return &resp, err
}
func UnmarshalMessageChecklistTasksAdded(data json.RawMessage) (*MessageChecklistTasksAdded, error) {
var resp MessageChecklistTasksAdded
err := json.Unmarshal(data, &resp)
return &resp, err
}
func UnmarshalMessageContactRegistered(data json.RawMessage) (*MessageContactRegistered, error) {
var resp MessageContactRegistered
@ -15421,6 +15525,14 @@ func UnmarshalInputMessageStory(data json.RawMessage) (*InputMessageStory, error
return &resp, err
}
func UnmarshalInputMessageChecklist(data json.RawMessage) (*InputMessageChecklist, error) {
var resp InputMessageChecklist
err := json.Unmarshal(data, &resp)
return &resp, err
}
func UnmarshalInputMessageForwarded(data json.RawMessage) (*InputMessageForwarded, error) {
var resp InputMessageForwarded
@ -18197,6 +18309,14 @@ func UnmarshalPremiumFeatureMessageEffects(data json.RawMessage) (*PremiumFeatur
return &resp, err
}
func UnmarshalPremiumFeatureChecklists(data json.RawMessage) (*PremiumFeatureChecklists, error) {
var resp PremiumFeatureChecklists
err := json.Unmarshal(data, &resp)
return &resp, err
}
func UnmarshalBusinessFeatureLocation(data json.RawMessage) (*BusinessFeatureLocation, error) {
var resp BusinessFeatureLocation
@ -19149,6 +19269,14 @@ func UnmarshalPushMessageContentText(data json.RawMessage) (*PushMessageContentT
return &resp, err
}
func UnmarshalPushMessageContentChecklist(data json.RawMessage) (*PushMessageContentChecklist, error) {
var resp PushMessageContentChecklist
err := json.Unmarshal(data, &resp)
return &resp, err
}
func UnmarshalPushMessageContentVideo(data json.RawMessage) (*PushMessageContentVideo, error) {
var resp PushMessageContentVideo
@ -19293,6 +19421,22 @@ func UnmarshalPushMessageContentProximityAlertTriggered(data json.RawMessage) (*
return &resp, err
}
func UnmarshalPushMessageContentChecklistTasksAdded(data json.RawMessage) (*PushMessageContentChecklistTasksAdded, error) {
var resp PushMessageContentChecklistTasksAdded
err := json.Unmarshal(data, &resp)
return &resp, err
}
func UnmarshalPushMessageContentChecklistTasksDone(data json.RawMessage) (*PushMessageContentChecklistTasksDone, error) {
var resp PushMessageContentChecklistTasksDone
err := json.Unmarshal(data, &resp)
return &resp, err
}
func UnmarshalPushMessageContentMessageForwards(data json.RawMessage) (*PushMessageContentMessageForwards, error) {
var resp PushMessageContentMessageForwards
@ -23253,6 +23397,18 @@ func UnmarshalType(data json.RawMessage) (Type, error) {
case TypePollTypeQuiz:
return UnmarshalPollTypeQuiz(data)
case TypeChecklistTask:
return UnmarshalChecklistTask(data)
case TypeInputChecklistTask:
return UnmarshalInputChecklistTask(data)
case TypeChecklist:
return UnmarshalChecklist(data)
case TypeInputChecklist:
return UnmarshalInputChecklist(data)
case TypeAnimation:
return UnmarshalAnimation(data)
@ -23301,6 +23457,9 @@ func UnmarshalType(data json.RawMessage) (Type, error) {
case TypeAlternativeVideo:
return UnmarshalAlternativeVideo(data)
case TypeVideoStoryboard:
return UnmarshalVideoStoryboard(data)
case TypeBackground:
return UnmarshalBackground(data)
@ -24153,8 +24312,8 @@ func UnmarshalType(data json.RawMessage) (Type, error) {
case TypeMessageSourceOther:
return UnmarshalMessageSourceOther(data)
case TypeMessageSponsor:
return UnmarshalMessageSponsor(data)
case TypeAdvertisementSponsor:
return UnmarshalAdvertisementSponsor(data)
case TypeSponsoredMessage:
return UnmarshalSponsoredMessage(data)
@ -24168,6 +24327,12 @@ func UnmarshalType(data json.RawMessage) (Type, error) {
case TypeSponsoredChats:
return UnmarshalSponsoredChats(data)
case TypeVideoMessageAdvertisement:
return UnmarshalVideoMessageAdvertisement(data)
case TypeVideoMessageAdvertisements:
return UnmarshalVideoMessageAdvertisements(data)
case TypeReportOption:
return UnmarshalReportOption(data)
@ -25173,6 +25338,9 @@ func UnmarshalType(data json.RawMessage) (Type, error) {
case TypeMessageStory:
return UnmarshalMessageStory(data)
case TypeMessageChecklist:
return UnmarshalMessageChecklist(data)
case TypeMessageInvoice:
return UnmarshalMessageInvoice(data)
@ -25317,6 +25485,12 @@ func UnmarshalType(data json.RawMessage) (Type, error) {
case TypeMessageDirectMessagePriceChanged:
return UnmarshalMessageDirectMessagePriceChanged(data)
case TypeMessageChecklistTasksDone:
return UnmarshalMessageChecklistTasksDone(data)
case TypeMessageChecklistTasksAdded:
return UnmarshalMessageChecklistTasksAdded(data)
case TypeMessageContactRegistered:
return UnmarshalMessageContactRegistered(data)
@ -25500,6 +25674,9 @@ func UnmarshalType(data json.RawMessage) (Type, error) {
case TypeInputMessageStory:
return UnmarshalInputMessageStory(data)
case TypeInputMessageChecklist:
return UnmarshalInputMessageChecklist(data)
case TypeInputMessageForwarded:
return UnmarshalInputMessageForwarded(data)
@ -26541,6 +26718,9 @@ func UnmarshalType(data json.RawMessage) (Type, error) {
case TypePremiumFeatureMessageEffects:
return UnmarshalPremiumFeatureMessageEffects(data)
case TypePremiumFeatureChecklists:
return UnmarshalPremiumFeatureChecklists(data)
case TypeBusinessFeatureLocation:
return UnmarshalBusinessFeatureLocation(data)
@ -26898,6 +27078,9 @@ func UnmarshalType(data json.RawMessage) (Type, error) {
case TypePushMessageContentText:
return UnmarshalPushMessageContentText(data)
case TypePushMessageContentChecklist:
return UnmarshalPushMessageContentChecklist(data)
case TypePushMessageContentVideo:
return UnmarshalPushMessageContentVideo(data)
@ -26952,6 +27135,12 @@ func UnmarshalType(data json.RawMessage) (Type, error) {
case TypePushMessageContentProximityAlertTriggered:
return UnmarshalPushMessageContentProximityAlertTriggered(data)
case TypePushMessageContentChecklistTasksAdded:
return UnmarshalPushMessageContentChecklistTasksAdded(data)
case TypePushMessageContentChecklistTasksDone:
return UnmarshalPushMessageContentChecklistTasksDone(data)
case TypePushMessageContentMessageForwards:
return UnmarshalPushMessageContentMessageForwards(data)