mirror of
https://github.com/c0re100/gotdlib.git
synced 2026-02-21 20:20:17 +01:00
Update to TDLib 1.8.25
This commit is contained in:
parent
8f4de4d76e
commit
97ffe5213a
4 changed files with 887 additions and 470 deletions
|
|
@ -286,6 +286,8 @@ type RegisterUserRequest struct {
|
|||
FirstName string `json:"first_name"`
|
||||
// The last name of the user; 0-64 characters
|
||||
LastName string `json:"last_name"`
|
||||
// Pass true to disable notification about the current user joining Telegram for other users that added them to contact list
|
||||
DisableNotification bool `json:"disable_notification"`
|
||||
}
|
||||
|
||||
// Finishes user registration. Works only when the current authorization state is authorizationStateWaitRegistration
|
||||
|
|
@ -297,6 +299,7 @@ func (client *Client) RegisterUser(req *RegisterUserRequest) (*Ok, error) {
|
|||
Data: map[string]interface{}{
|
||||
"first_name": req.FirstName,
|
||||
"last_name": req.LastName,
|
||||
"disable_notification": req.DisableNotification,
|
||||
},
|
||||
})
|
||||
if err != nil {
|
||||
|
|
@ -2197,40 +2200,18 @@ func (client *Client) GetInactiveSupergroupChats() (*Chats, error) {
|
|||
return UnmarshalChats(result.Data)
|
||||
}
|
||||
|
||||
// Returns list of all pinned Saved Messages topics
|
||||
func (client *Client) GetPinnedSavedMessagesTopics() (*FoundSavedMessagesTopics, error) {
|
||||
result, err := client.Send(Request{
|
||||
meta: meta{
|
||||
Type: "getPinnedSavedMessagesTopics",
|
||||
},
|
||||
Data: map[string]interface{}{},
|
||||
})
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
if result.Type == "error" {
|
||||
return nil, buildResponseError(result.Data)
|
||||
}
|
||||
|
||||
return UnmarshalFoundSavedMessagesTopics(result.Data)
|
||||
}
|
||||
|
||||
type GetSavedMessagesTopicsRequest struct {
|
||||
// Offset of the first entry to return as received from the previous request; use empty string to get the first chunk of results
|
||||
Offset string `json:"offset"`
|
||||
// The maximum number of Saved Messages topics to be returned; up to 100
|
||||
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"`
|
||||
}
|
||||
|
||||
// Returns list of non-pinned Saved Messages topics from the specified offset
|
||||
func (client *Client) GetSavedMessagesTopics(req *GetSavedMessagesTopicsRequest) (*FoundSavedMessagesTopics, error) {
|
||||
// Loads more Saved Messages topics. The loaded topics will be sent through updateSavedMessagesTopic. Topics are sorted by their topic.order in descending order. Returns a 404 error if all topics have been loaded
|
||||
func (client *Client) LoadSavedMessagesTopics(req *LoadSavedMessagesTopicsRequest) (*Ok, error) {
|
||||
result, err := client.Send(Request{
|
||||
meta: meta{
|
||||
Type: "getSavedMessagesTopics",
|
||||
Type: "loadSavedMessagesTopics",
|
||||
},
|
||||
Data: map[string]interface{}{
|
||||
"offset": req.Offset,
|
||||
"limit": req.Limit,
|
||||
},
|
||||
})
|
||||
|
|
@ -2242,12 +2223,12 @@ func (client *Client) GetSavedMessagesTopics(req *GetSavedMessagesTopicsRequest)
|
|||
return nil, buildResponseError(result.Data)
|
||||
}
|
||||
|
||||
return UnmarshalFoundSavedMessagesTopics(result.Data)
|
||||
return UnmarshalOk(result.Data)
|
||||
}
|
||||
|
||||
type GetSavedMessagesTopicHistoryRequest struct {
|
||||
// Saved Messages topic which messages will be fetched
|
||||
SavedMessagesTopic SavedMessagesTopic `json:"saved_messages_topic"`
|
||||
// Identifier of Saved Messages topic which messages will be fetched
|
||||
SavedMessagesTopicId int64 `json:"saved_messages_topic_id"`
|
||||
// Identifier of the message starting from which messages must be fetched; use 0 to get results from the last message
|
||||
FromMessageId int64 `json:"from_message_id"`
|
||||
// Specify 0 to get results from exactly the message from_message_id or a negative offset up to 99 to get additionally some newer messages
|
||||
|
|
@ -2263,7 +2244,7 @@ func (client *Client) GetSavedMessagesTopicHistory(req *GetSavedMessagesTopicHis
|
|||
Type: "getSavedMessagesTopicHistory",
|
||||
},
|
||||
Data: map[string]interface{}{
|
||||
"saved_messages_topic": req.SavedMessagesTopic,
|
||||
"saved_messages_topic_id": req.SavedMessagesTopicId,
|
||||
"from_message_id": req.FromMessageId,
|
||||
"offset": req.Offset,
|
||||
"limit": req.Limit,
|
||||
|
|
@ -2281,8 +2262,8 @@ func (client *Client) GetSavedMessagesTopicHistory(req *GetSavedMessagesTopicHis
|
|||
}
|
||||
|
||||
type GetSavedMessagesTopicMessageByDateRequest struct {
|
||||
// Saved Messages topic which message will be returned
|
||||
SavedMessagesTopic SavedMessagesTopic `json:"saved_messages_topic"`
|
||||
// Identifier of Saved Messages topic which message will be returned
|
||||
SavedMessagesTopicId int64 `json:"saved_messages_topic_id"`
|
||||
// Point in time (Unix timestamp) relative to which to search for messages
|
||||
Date int32 `json:"date"`
|
||||
}
|
||||
|
|
@ -2294,7 +2275,7 @@ func (client *Client) GetSavedMessagesTopicMessageByDate(req *GetSavedMessagesTo
|
|||
Type: "getSavedMessagesTopicMessageByDate",
|
||||
},
|
||||
Data: map[string]interface{}{
|
||||
"saved_messages_topic": req.SavedMessagesTopic,
|
||||
"saved_messages_topic_id": req.SavedMessagesTopicId,
|
||||
"date": req.Date,
|
||||
},
|
||||
})
|
||||
|
|
@ -2310,8 +2291,8 @@ func (client *Client) GetSavedMessagesTopicMessageByDate(req *GetSavedMessagesTo
|
|||
}
|
||||
|
||||
type DeleteSavedMessagesTopicHistoryRequest struct {
|
||||
// Saved Messages topic which messages will be deleted
|
||||
SavedMessagesTopic SavedMessagesTopic `json:"saved_messages_topic"`
|
||||
// Identifier of Saved Messages topic which messages will be deleted
|
||||
SavedMessagesTopicId int64 `json:"saved_messages_topic_id"`
|
||||
}
|
||||
|
||||
// Deletes all messages in a Saved Messages topic
|
||||
|
|
@ -2321,7 +2302,7 @@ func (client *Client) DeleteSavedMessagesTopicHistory(req *DeleteSavedMessagesTo
|
|||
Type: "deleteSavedMessagesTopicHistory",
|
||||
},
|
||||
Data: map[string]interface{}{
|
||||
"saved_messages_topic": req.SavedMessagesTopic,
|
||||
"saved_messages_topic_id": req.SavedMessagesTopicId,
|
||||
},
|
||||
})
|
||||
if err != nil {
|
||||
|
|
@ -2336,8 +2317,8 @@ func (client *Client) DeleteSavedMessagesTopicHistory(req *DeleteSavedMessagesTo
|
|||
}
|
||||
|
||||
type DeleteSavedMessagesTopicMessagesByDateRequest struct {
|
||||
// Saved Messages topic which messages will be deleted
|
||||
SavedMessagesTopic SavedMessagesTopic `json:"saved_messages_topic"`
|
||||
// Identifier of Saved Messages topic which messages will be deleted
|
||||
SavedMessagesTopicId int64 `json:"saved_messages_topic_id"`
|
||||
// The minimum date of the messages to delete
|
||||
MinDate int32 `json:"min_date"`
|
||||
// The maximum date of the messages to delete
|
||||
|
|
@ -2351,7 +2332,7 @@ func (client *Client) DeleteSavedMessagesTopicMessagesByDate(req *DeleteSavedMes
|
|||
Type: "deleteSavedMessagesTopicMessagesByDate",
|
||||
},
|
||||
Data: map[string]interface{}{
|
||||
"saved_messages_topic": req.SavedMessagesTopic,
|
||||
"saved_messages_topic_id": req.SavedMessagesTopicId,
|
||||
"min_date": req.MinDate,
|
||||
"max_date": req.MaxDate,
|
||||
},
|
||||
|
|
@ -2368,8 +2349,8 @@ func (client *Client) DeleteSavedMessagesTopicMessagesByDate(req *DeleteSavedMes
|
|||
}
|
||||
|
||||
type ToggleSavedMessagesTopicIsPinnedRequest struct {
|
||||
// Saved Messages topic to pin or unpin
|
||||
SavedMessagesTopic SavedMessagesTopic `json:"saved_messages_topic"`
|
||||
// Identifier of Saved Messages topic to pin or unpin
|
||||
SavedMessagesTopicId int64 `json:"saved_messages_topic_id"`
|
||||
// Pass true to pin the topic; pass false to unpin it
|
||||
IsPinned bool `json:"is_pinned"`
|
||||
}
|
||||
|
|
@ -2381,7 +2362,7 @@ func (client *Client) ToggleSavedMessagesTopicIsPinned(req *ToggleSavedMessagesT
|
|||
Type: "toggleSavedMessagesTopicIsPinned",
|
||||
},
|
||||
Data: map[string]interface{}{
|
||||
"saved_messages_topic": req.SavedMessagesTopic,
|
||||
"saved_messages_topic_id": req.SavedMessagesTopicId,
|
||||
"is_pinned": req.IsPinned,
|
||||
},
|
||||
})
|
||||
|
|
@ -2397,8 +2378,8 @@ func (client *Client) ToggleSavedMessagesTopicIsPinned(req *ToggleSavedMessagesT
|
|||
}
|
||||
|
||||
type SetPinnedSavedMessagesTopicsRequest struct {
|
||||
// The new list of pinned Saved Messages topics
|
||||
SavedMessagesTopics []SavedMessagesTopic `json:"saved_messages_topics"`
|
||||
// Identifiers of the new pinned Saved Messages topics
|
||||
SavedMessagesTopicIds []int64 `json:"saved_messages_topic_ids"`
|
||||
}
|
||||
|
||||
// Changes the order of pinned Saved Messages topics
|
||||
|
|
@ -2408,7 +2389,7 @@ func (client *Client) SetPinnedSavedMessagesTopics(req *SetPinnedSavedMessagesTo
|
|||
Type: "setPinnedSavedMessagesTopics",
|
||||
},
|
||||
Data: map[string]interface{}{
|
||||
"saved_messages_topics": req.SavedMessagesTopics,
|
||||
"saved_messages_topic_ids": req.SavedMessagesTopicIds,
|
||||
},
|
||||
})
|
||||
if err != nil {
|
||||
|
|
@ -2605,8 +2586,8 @@ type SearchChatMessagesRequest struct {
|
|||
Filter SearchMessagesFilter `json:"filter"`
|
||||
// If not 0, only messages in the specified thread will be returned; supergroups only
|
||||
MessageThreadId int64 `json:"message_thread_id"`
|
||||
// If not null, only messages in the specified Saved Messages topic will be returned; pass null to return all messages, or for chats other than Saved Messages
|
||||
SavedMessagesTopic SavedMessagesTopic `json:"saved_messages_topic"`
|
||||
// If not 0, only messages in the specified Saved Messages topic will be returned; pass 0 to return all messages, or for chats other than Saved Messages
|
||||
SavedMessagesTopicId int64 `json:"saved_messages_topic_id"`
|
||||
}
|
||||
|
||||
// Searches for messages with given words in the chat. Returns the results in reverse chronological order, i.e. in order of decreasing message_id. Cannot be used in secret chats with a non-empty query (searchSecretMessages must be used instead), or without an enabled message database. For optimal performance, the number of returned messages is chosen by TDLib and can be smaller than the specified limit. A combination of query, sender_id, filter and message_thread_id search criteria is expected to be supported, only if it is required for Telegram official application implementation
|
||||
|
|
@ -2624,7 +2605,7 @@ func (client *Client) SearchChatMessages(req *SearchChatMessagesRequest) (*Found
|
|||
"limit": req.Limit,
|
||||
"filter": req.Filter,
|
||||
"message_thread_id": req.MessageThreadId,
|
||||
"saved_messages_topic": req.SavedMessagesTopic,
|
||||
"saved_messages_topic_id": req.SavedMessagesTopicId,
|
||||
},
|
||||
})
|
||||
if err != nil {
|
||||
|
|
@ -2721,6 +2702,8 @@ func (client *Client) SearchSecretMessages(req *SearchSecretMessagesRequest) (*F
|
|||
}
|
||||
|
||||
type SearchSavedMessagesRequest struct {
|
||||
// If not 0, only messages in the specified Saved Messages topic will be considered; pass 0 to consider all messages
|
||||
SavedMessagesTopicId int64 `json:"saved_messages_topic_id"`
|
||||
// Tag to search for; pass null to return all suitable messages
|
||||
Tag ReactionType `json:"tag"`
|
||||
// Query to search for
|
||||
|
|
@ -2740,6 +2723,7 @@ func (client *Client) SearchSavedMessages(req *SearchSavedMessagesRequest) (*Fou
|
|||
Type: "searchSavedMessages",
|
||||
},
|
||||
Data: map[string]interface{}{
|
||||
"saved_messages_topic_id": req.SavedMessagesTopicId,
|
||||
"tag": req.Tag,
|
||||
"query": req.Query,
|
||||
"from_message_id": req.FromMessageId,
|
||||
|
|
@ -2931,8 +2915,8 @@ type GetChatSparseMessagePositionsRequest struct {
|
|||
FromMessageId int64 `json:"from_message_id"`
|
||||
// The expected number of message positions to be returned; 50-2000. A smaller number of positions can be returned, if there are not enough appropriate messages
|
||||
Limit int32 `json:"limit"`
|
||||
// If not null, only messages in the specified Saved Messages topic will be considered; pass null to consider all messages, or for chats other than Saved Messages
|
||||
SavedMessagesTopic SavedMessagesTopic `json:"saved_messages_topic"`
|
||||
// If not 0, only messages in the specified Saved Messages topic will be considered; pass 0 to consider all messages, or for chats other than Saved Messages
|
||||
SavedMessagesTopicId int64 `json:"saved_messages_topic_id"`
|
||||
}
|
||||
|
||||
// Returns sparse positions of messages of the specified type in the chat to be used for shared media scroll implementation. Returns the results in reverse chronological order (i.e., in order of decreasing message_id). Cannot be used in secret chats or with searchMessagesFilterFailedToSend filter without an enabled message database
|
||||
|
|
@ -2946,7 +2930,7 @@ func (client *Client) GetChatSparseMessagePositions(req *GetChatSparseMessagePos
|
|||
"filter": req.Filter,
|
||||
"from_message_id": req.FromMessageId,
|
||||
"limit": req.Limit,
|
||||
"saved_messages_topic": req.SavedMessagesTopic,
|
||||
"saved_messages_topic_id": req.SavedMessagesTopicId,
|
||||
},
|
||||
})
|
||||
if err != nil {
|
||||
|
|
@ -2967,8 +2951,8 @@ type GetChatMessageCalendarRequest struct {
|
|||
Filter SearchMessagesFilter `json:"filter"`
|
||||
// The message identifier from which to return information about messages; use 0 to get results from the last message
|
||||
FromMessageId int64 `json:"from_message_id"`
|
||||
// If not null, only messages in the specified Saved Messages topic will be considered; pass null to consider all messages, or for chats other than Saved Messages
|
||||
SavedMessagesTopic SavedMessagesTopic `json:"saved_messages_topic"`
|
||||
// If not0, only messages in the specified Saved Messages topic will be considered; pass 0 to consider all messages, or for chats other than Saved Messages
|
||||
SavedMessagesTopicId int64 `json:"saved_messages_topic_id"`
|
||||
}
|
||||
|
||||
// Returns information about the next messages of the specified type in the chat split by days. Returns the results in reverse chronological order. Can return partial result for the last returned day. Behavior of this method depends on the value of the option "utc_time_offset"
|
||||
|
|
@ -2981,7 +2965,7 @@ func (client *Client) GetChatMessageCalendar(req *GetChatMessageCalendarRequest)
|
|||
"chat_id": req.ChatId,
|
||||
"filter": req.Filter,
|
||||
"from_message_id": req.FromMessageId,
|
||||
"saved_messages_topic": req.SavedMessagesTopic,
|
||||
"saved_messages_topic_id": req.SavedMessagesTopicId,
|
||||
},
|
||||
})
|
||||
if err != nil {
|
||||
|
|
@ -3000,8 +2984,8 @@ type GetChatMessageCountRequest struct {
|
|||
ChatId int64 `json:"chat_id"`
|
||||
// Filter for message content; searchMessagesFilterEmpty is unsupported in this function
|
||||
Filter SearchMessagesFilter `json:"filter"`
|
||||
// If not null, only messages in the specified Saved Messages topic will be counted; pass null to count all messages, or for chats other than Saved Messages
|
||||
SavedMessagesTopic SavedMessagesTopic `json:"saved_messages_topic"`
|
||||
// If not 0, only messages in the specified Saved Messages topic will be counted; pass 0 to count all messages, or for chats other than Saved Messages
|
||||
SavedMessagesTopicId int64 `json:"saved_messages_topic_id"`
|
||||
// Pass true to get the number of messages without sending network requests, or -1 if the number of messages is unknown locally
|
||||
ReturnLocal bool `json:"return_local"`
|
||||
}
|
||||
|
|
@ -3015,7 +2999,7 @@ func (client *Client) GetChatMessageCount(req *GetChatMessageCountRequest) (*Cou
|
|||
Data: map[string]interface{}{
|
||||
"chat_id": req.ChatId,
|
||||
"filter": req.Filter,
|
||||
"saved_messages_topic": req.SavedMessagesTopic,
|
||||
"saved_messages_topic_id": req.SavedMessagesTopicId,
|
||||
"return_local": req.ReturnLocal,
|
||||
},
|
||||
})
|
||||
|
|
@ -3039,8 +3023,8 @@ type GetChatMessagePositionRequest struct {
|
|||
Filter SearchMessagesFilter `json:"filter"`
|
||||
// If not 0, only messages in the specified thread will be considered; supergroups only
|
||||
MessageThreadId int64 `json:"message_thread_id"`
|
||||
// If not null, only messages in the specified Saved Messages topic will be considered; pass null to consider all relevant messages, or for chats other than Saved Messages
|
||||
SavedMessagesTopic SavedMessagesTopic `json:"saved_messages_topic"`
|
||||
// If not 0, only messages in the specified Saved Messages topic will be considered; pass 0 to consider all relevant messages, or for chats other than Saved Messages
|
||||
SavedMessagesTopicId int64 `json:"saved_messages_topic_id"`
|
||||
}
|
||||
|
||||
// Returns approximate 1-based position of a message among messages, which can be found by the specified filter in the chat. Cannot be used in secret chats
|
||||
|
|
@ -3054,7 +3038,7 @@ func (client *Client) GetChatMessagePosition(req *GetChatMessagePositionRequest)
|
|||
"message_id": req.MessageId,
|
||||
"filter": req.Filter,
|
||||
"message_thread_id": req.MessageThreadId,
|
||||
"saved_messages_topic": req.SavedMessagesTopic,
|
||||
"saved_messages_topic_id": req.SavedMessagesTopicId,
|
||||
},
|
||||
})
|
||||
if err != nil {
|
||||
|
|
@ -3483,7 +3467,7 @@ func (client *Client) SetChatMessageSender(req *SetChatMessageSenderRequest) (*O
|
|||
type SendMessageRequest struct {
|
||||
// Target chat
|
||||
ChatId int64 `json:"chat_id"`
|
||||
// If not 0, a message thread identifier in which the message will be sent
|
||||
// If not 0, the message thread identifier in which the message will be sent
|
||||
MessageThreadId int64 `json:"message_thread_id"`
|
||||
// Information about the message or story to be replied; pass null if none
|
||||
ReplyTo InputMessageReplyTo `json:"reply_to"`
|
||||
|
|
@ -3524,7 +3508,7 @@ func (client *Client) SendMessage(req *SendMessageRequest) (*Message, error) {
|
|||
type SendMessageAlbumRequest struct {
|
||||
// Target chat
|
||||
ChatId int64 `json:"chat_id"`
|
||||
// If not 0, a message thread identifier in which the messages will be sent
|
||||
// If not 0, the message thread identifier in which the messages will be sent
|
||||
MessageThreadId int64 `json:"message_thread_id"`
|
||||
// Information about the message or story to be replied; pass null if none
|
||||
ReplyTo InputMessageReplyTo `json:"reply_to"`
|
||||
|
|
@ -3568,7 +3552,7 @@ type SendBotStartMessageRequest struct {
|
|||
Parameter string `json:"parameter"`
|
||||
}
|
||||
|
||||
// Invites a bot to a chat (if it is not yet a member) and sends it the /start command. Bots can't be invited to a private chat other than the chat with the bot. Bots can't be invited to channels (although they can be added as admins) and secret chats. Returns the sent message
|
||||
// Invites a bot to a chat (if it is not yet a member) and sends it the /start command; requires can_invite_users member right. Bots can't be invited to a private chat other than the chat with the bot. Bots can't be invited to channels (although they can be added as admins) and secret chats. Returns the sent message
|
||||
func (client *Client) SendBotStartMessage(req *SendBotStartMessageRequest) (*Message, error) {
|
||||
result, err := client.Send(Request{
|
||||
meta: meta{
|
||||
|
|
@ -3594,7 +3578,7 @@ func (client *Client) SendBotStartMessage(req *SendBotStartMessageRequest) (*Mes
|
|||
type SendInlineQueryResultMessageRequest struct {
|
||||
// Target chat
|
||||
ChatId int64 `json:"chat_id"`
|
||||
// If not 0, a message thread identifier in which the message will be sent
|
||||
// If not 0, the message thread identifier in which the message will be sent
|
||||
MessageThreadId int64 `json:"message_thread_id"`
|
||||
// Information about the message or story to be replied; pass null if none
|
||||
ReplyTo InputMessageReplyTo `json:"reply_to"`
|
||||
|
|
@ -3638,7 +3622,7 @@ func (client *Client) SendInlineQueryResultMessage(req *SendInlineQueryResultMes
|
|||
type ForwardMessagesRequest struct {
|
||||
// Identifier of the chat to which to forward messages
|
||||
ChatId int64 `json:"chat_id"`
|
||||
// If not 0, a message thread identifier in which the message will be sent; for forum threads only
|
||||
// If not 0, the message thread identifier in which the message will be sent; for forum threads only
|
||||
MessageThreadId int64 `json:"message_thread_id"`
|
||||
// Identifier of the chat from which to forward messages
|
||||
FromChatId int64 `json:"from_chat_id"`
|
||||
|
|
@ -4272,7 +4256,7 @@ type CreateForumTopicRequest struct {
|
|||
Icon *ForumTopicIcon `json:"icon"`
|
||||
}
|
||||
|
||||
// Creates a topic in a forum supergroup chat; requires can_manage_topics or can_create_topics rights in the supergroup
|
||||
// Creates a topic in a forum supergroup chat; requires can_manage_topics administrator or can_create_topics member right in the supergroup
|
||||
func (client *Client) CreateForumTopic(req *CreateForumTopicRequest) (*ForumTopicInfo, error) {
|
||||
result, err := client.Send(Request{
|
||||
meta: meta{
|
||||
|
|
@ -4880,13 +4864,20 @@ func (client *Client) SetDefaultReactionType(req *SetDefaultReactionTypeRequest)
|
|||
return UnmarshalOk(result.Data)
|
||||
}
|
||||
|
||||
// Returns tags used in Saved Messages; for Telegram Premium users only
|
||||
func (client *Client) GetSavedMessagesTags() (*SavedMessagesTags, error) {
|
||||
type GetSavedMessagesTagsRequest struct {
|
||||
// Identifier of Saved Messages topic which tags will be returned; pass 0 to get all Saved Messages tags
|
||||
SavedMessagesTopicId int64 `json:"saved_messages_topic_id"`
|
||||
}
|
||||
|
||||
// Returns tags used in Saved Messages or a Saved Messages topic
|
||||
func (client *Client) GetSavedMessagesTags(req *GetSavedMessagesTagsRequest) (*SavedMessagesTags, error) {
|
||||
result, err := client.Send(Request{
|
||||
meta: meta{
|
||||
Type: "getSavedMessagesTags",
|
||||
},
|
||||
Data: map[string]interface{}{},
|
||||
Data: map[string]interface{}{
|
||||
"saved_messages_topic_id": req.SavedMessagesTopicId,
|
||||
},
|
||||
})
|
||||
if err != nil {
|
||||
return nil, err
|
||||
|
|
@ -5892,7 +5883,7 @@ type OpenWebAppRequest struct {
|
|||
Theme *ThemeParameters `json:"theme"`
|
||||
// Short name of the application; 0-64 English letters, digits, and underscores
|
||||
ApplicationName string `json:"application_name"`
|
||||
// If not 0, a message thread identifier in which the message will be sent
|
||||
// If not 0, the message thread identifier in which the message will be sent
|
||||
MessageThreadId int64 `json:"message_thread_id"`
|
||||
// Information about the message or story to be replied in the message sent by the Web App; pass null if none
|
||||
ReplyTo InputMessageReplyTo `json:"reply_to"`
|
||||
|
|
@ -6283,7 +6274,7 @@ func (client *Client) DeleteChatReplyMarkup(req *DeleteChatReplyMarkupRequest) (
|
|||
type SendChatActionRequest struct {
|
||||
// Chat identifier
|
||||
ChatId int64 `json:"chat_id"`
|
||||
// If not 0, a message thread identifier in which the action was performed
|
||||
// If not 0, the message thread identifier in which the action was performed
|
||||
MessageThreadId int64 `json:"message_thread_id"`
|
||||
// The action description; pass null to cancel the currently active action
|
||||
Action ChatAction `json:"action"`
|
||||
|
|
@ -7038,7 +7029,7 @@ type UpgradeBasicGroupChatToSupergroupChatRequest struct {
|
|||
ChatId int64 `json:"chat_id"`
|
||||
}
|
||||
|
||||
// Creates a new supergroup from an existing basic group and sends a corresponding messageChatUpgradeTo and messageChatUpgradeFrom; requires creator privileges. Deactivates the original basic group
|
||||
// Creates a new supergroup from an existing basic group and sends a corresponding messageChatUpgradeTo and messageChatUpgradeFrom; requires owner privileges. Deactivates the original basic group
|
||||
func (client *Client) UpgradeBasicGroupChatToSupergroupChat(req *UpgradeBasicGroupChatToSupergroupChatRequest) (*Chat, error) {
|
||||
result, err := client.Send(Request{
|
||||
meta: meta{
|
||||
|
|
@ -7665,7 +7656,7 @@ type SetChatTitleRequest struct {
|
|||
Title string `json:"title"`
|
||||
}
|
||||
|
||||
// Changes the chat title. Supported only for basic groups, supergroups and channels. Requires can_change_info administrator right
|
||||
// Changes the chat title. Supported only for basic groups, supergroups and channels. Requires can_change_info member right
|
||||
func (client *Client) SetChatTitle(req *SetChatTitleRequest) (*Ok, error) {
|
||||
result, err := client.Send(Request{
|
||||
meta: meta{
|
||||
|
|
@ -7694,7 +7685,7 @@ type SetChatPhotoRequest struct {
|
|||
Photo InputChatPhoto `json:"photo"`
|
||||
}
|
||||
|
||||
// Changes the photo of a chat. Supported only for basic groups, supergroups and channels. Requires can_change_info administrator right
|
||||
// Changes the photo of a chat. Supported only for basic groups, supergroups and channels. Requires can_change_info member right
|
||||
func (client *Client) SetChatPhoto(req *SetChatPhotoRequest) (*Ok, error) {
|
||||
result, err := client.Send(Request{
|
||||
meta: meta{
|
||||
|
|
@ -7719,13 +7710,13 @@ func (client *Client) SetChatPhoto(req *SetChatPhotoRequest) (*Ok, error) {
|
|||
type SetChatAccentColorRequest struct {
|
||||
// Chat identifier
|
||||
ChatId int64 `json:"chat_id"`
|
||||
// Identifier of the accent color to use. The chat must have at least accentColor.min_chat_boost_level boost level to pass the corresponding color
|
||||
// Identifier of the accent color to use. The chat must have at least accentColor.min_channel_chat_boost_level boost level to pass the corresponding color
|
||||
AccentColorId int32 `json:"accent_color_id"`
|
||||
// Identifier of a custom emoji to be shown on the reply header and link preview background; 0 if none. Use chatBoostLevelFeatures.can_set_background_custom_emoji to check whether a custom emoji can be set
|
||||
BackgroundCustomEmojiId JsonInt64 `json:"background_custom_emoji_id"`
|
||||
}
|
||||
|
||||
// Changes accent color and background custom emoji of a chat. Requires can_change_info administrator right
|
||||
// Changes accent color and background custom emoji of a channel chat. Requires can_change_info administrator right
|
||||
func (client *Client) SetChatAccentColor(req *SetChatAccentColorRequest) (*Ok, error) {
|
||||
result, err := client.Send(Request{
|
||||
meta: meta{
|
||||
|
|
@ -7751,13 +7742,13 @@ func (client *Client) SetChatAccentColor(req *SetChatAccentColorRequest) (*Ok, e
|
|||
type SetChatProfileAccentColorRequest struct {
|
||||
// Chat identifier
|
||||
ChatId int64 `json:"chat_id"`
|
||||
// Identifier of the accent color to use for profile; pass -1 if none. The chat must have at least profileAccentColor.min_chat_boost_level boost level to pass the corresponding color
|
||||
// Identifier of the accent color to use for profile; pass -1 if none. The chat must have at least profileAccentColor.min_supergroup_chat_boost_level for supergroups or profileAccentColor.min_channel_chat_boost_level for channels boost level to pass the corresponding color
|
||||
ProfileAccentColorId int32 `json:"profile_accent_color_id"`
|
||||
// Identifier of a custom emoji to be shown on the chat's profile photo background; 0 if none. Use chatBoostLevelFeatures.can_set_profile_background_custom_emoji to check whether a custom emoji can be set
|
||||
ProfileBackgroundCustomEmojiId JsonInt64 `json:"profile_background_custom_emoji_id"`
|
||||
}
|
||||
|
||||
// Changes accent color and background custom emoji for profile of a chat. Requires can_change_info administrator right
|
||||
// Changes accent color and background custom emoji for profile of a supergroup or channel chat. Requires can_change_info administrator right
|
||||
func (client *Client) SetChatProfileAccentColor(req *SetChatProfileAccentColorRequest) (*Ok, error) {
|
||||
result, err := client.Send(Request{
|
||||
meta: meta{
|
||||
|
|
@ -7966,9 +7957,9 @@ func (client *Client) SetChatTheme(req *SetChatThemeRequest) (*Ok, error) {
|
|||
type SetChatDraftMessageRequest struct {
|
||||
// Chat identifier
|
||||
ChatId int64 `json:"chat_id"`
|
||||
// If not 0, a message thread identifier in which the draft was changed
|
||||
// If not 0, the message thread identifier in which the draft was changed
|
||||
MessageThreadId int64 `json:"message_thread_id"`
|
||||
// New draft message; pass null to remove the draft
|
||||
// New draft message; pass null to remove the draft. All files in draft message content must be of the type inputFileLocal. Media thumbnails and captions are ignored
|
||||
DraftMessage *DraftMessage `json:"draft_message"`
|
||||
}
|
||||
|
||||
|
|
@ -8060,7 +8051,7 @@ type ToggleChatViewAsTopicsRequest struct {
|
|||
ViewAsTopics bool `json:"view_as_topics"`
|
||||
}
|
||||
|
||||
// Changes the view_as_topics setting of a forum chat
|
||||
// Changes the view_as_topics setting of a forum chat or Saved Messages
|
||||
func (client *Client) ToggleChatViewAsTopics(req *ToggleChatViewAsTopicsRequest) (*Ok, error) {
|
||||
result, err := client.Send(Request{
|
||||
meta: meta{
|
||||
|
|
@ -8172,11 +8163,11 @@ func (client *Client) ToggleChatDefaultDisableNotification(req *ToggleChatDefaul
|
|||
type SetChatAvailableReactionsRequest struct {
|
||||
// Identifier of the chat
|
||||
ChatId int64 `json:"chat_id"`
|
||||
// Reactions available in the chat. All explicitly specified emoji reactions must be active. Up to the chat's boost level custom emoji reactions can be explicitly specified
|
||||
// Reactions available in the chat. All explicitly specified emoji reactions must be active. In channel chats up to the chat's boost level custom emoji reactions can be explicitly specified
|
||||
AvailableReactions ChatAvailableReactions `json:"available_reactions"`
|
||||
}
|
||||
|
||||
// Changes reactions, available in a chat. Available for basic groups, supergroups, and channels. Requires can_change_info administrator right
|
||||
// Changes reactions, available in a chat. Available for basic groups, supergroups, and channels. Requires can_change_info member right
|
||||
func (client *Client) SetChatAvailableReactions(req *SetChatAvailableReactionsRequest) (*Ok, error) {
|
||||
result, err := client.Send(Request{
|
||||
meta: meta{
|
||||
|
|
@ -8234,7 +8225,7 @@ type SetChatDescriptionRequest struct {
|
|||
Description string `json:"description"`
|
||||
}
|
||||
|
||||
// Changes information about a chat. Available for basic groups, supergroups, and channels. Requires can_change_info administrator right
|
||||
// Changes information about a chat. Available for basic groups, supergroups, and channels. Requires can_change_info member right
|
||||
func (client *Client) SetChatDescription(req *SetChatDescriptionRequest) (*Ok, error) {
|
||||
result, err := client.Send(Request{
|
||||
meta: meta{
|
||||
|
|
@ -8257,7 +8248,7 @@ func (client *Client) SetChatDescription(req *SetChatDescriptionRequest) (*Ok, e
|
|||
}
|
||||
|
||||
type SetChatDiscussionGroupRequest struct {
|
||||
// Identifier of the channel chat. Pass 0 to remove a link from the supergroup passed in the second argument to a linked channel chat (requires can_pin_messages rights in the supergroup)
|
||||
// Identifier of the channel chat. Pass 0 to remove a link from the supergroup passed in the second argument to a linked channel chat (requires can_pin_messages member right in the supergroup)
|
||||
ChatId int64 `json:"chat_id"`
|
||||
// Identifier of a new channel's discussion group. Use 0 to remove the discussion group. Use the method getSuitableDiscussionChats to find all suitable groups. Basic group chats must be first upgraded to supergroup chats. If new chat members don't have access to old messages in the supergroup, then toggleSupergroupIsAllHistoryAvailable must be used first to change that
|
||||
DiscussionChatId int64 `json:"discussion_chat_id"`
|
||||
|
|
@ -8321,7 +8312,7 @@ type SetChatSlowModeDelayRequest struct {
|
|||
SlowModeDelay int32 `json:"slow_mode_delay"`
|
||||
}
|
||||
|
||||
// Changes the slow mode delay of a chat. Available only for supergroups; requires can_restrict_members rights
|
||||
// Changes the slow mode delay of a chat. Available only for supergroups; requires can_restrict_members right
|
||||
func (client *Client) SetChatSlowModeDelay(req *SetChatSlowModeDelayRequest) (*Ok, error) {
|
||||
result, err := client.Send(Request{
|
||||
meta: meta{
|
||||
|
|
@ -8354,7 +8345,7 @@ type PinChatMessageRequest struct {
|
|||
OnlyForSelf bool `json:"only_for_self"`
|
||||
}
|
||||
|
||||
// Pins a message in a chat; requires can_pin_messages rights or can_edit_messages rights in the channel
|
||||
// Pins a message in a chat; requires can_pin_messages member right if the chat is a basic group or supergroup, or can_edit_messages administrator right if the chat is a channel
|
||||
func (client *Client) PinChatMessage(req *PinChatMessageRequest) (*Ok, error) {
|
||||
result, err := client.Send(Request{
|
||||
meta: meta{
|
||||
|
|
@ -8385,7 +8376,7 @@ type UnpinChatMessageRequest struct {
|
|||
MessageId int64 `json:"message_id"`
|
||||
}
|
||||
|
||||
// Removes a pinned message from a chat; requires can_pin_messages rights in the group or can_edit_messages rights in the channel
|
||||
// Removes a pinned message from a chat; requires can_pin_messages member right if the chat is a basic group or supergroup, or can_edit_messages administrator right if the chat is a channel
|
||||
func (client *Client) UnpinChatMessage(req *UnpinChatMessageRequest) (*Ok, error) {
|
||||
result, err := client.Send(Request{
|
||||
meta: meta{
|
||||
|
|
@ -8412,7 +8403,7 @@ type UnpinAllChatMessagesRequest struct {
|
|||
ChatId int64 `json:"chat_id"`
|
||||
}
|
||||
|
||||
// Removes all pinned messages from a chat; requires can_pin_messages rights in the group or can_edit_messages rights in the channel
|
||||
// Removes all pinned messages from a chat; requires can_pin_messages member right if the chat is a basic group or supergroup, or can_edit_messages administrator right if the chat is a channel
|
||||
func (client *Client) UnpinAllChatMessages(req *UnpinAllChatMessagesRequest) (*Ok, error) {
|
||||
result, err := client.Send(Request{
|
||||
meta: meta{
|
||||
|
|
@ -8440,7 +8431,7 @@ type UnpinAllMessageThreadMessagesRequest struct {
|
|||
MessageThreadId int64 `json:"message_thread_id"`
|
||||
}
|
||||
|
||||
// Removes all pinned messages from a forum topic; requires can_pin_messages rights in the supergroup
|
||||
// Removes all pinned messages from a forum topic; requires can_pin_messages member right in the supergroup
|
||||
func (client *Client) UnpinAllMessageThreadMessages(req *UnpinAllMessageThreadMessagesRequest) (*Ok, error) {
|
||||
result, err := client.Send(Request{
|
||||
meta: meta{
|
||||
|
|
@ -8523,7 +8514,7 @@ type AddChatMemberRequest struct {
|
|||
ForwardLimit int32 `json:"forward_limit"`
|
||||
}
|
||||
|
||||
// Adds a new member to a chat. Members can't be added to private or secret chats
|
||||
// Adds a new member to a chat; requires can_invite_users member right. Members can't be added to private or secret chats
|
||||
func (client *Client) AddChatMember(req *AddChatMemberRequest) (*Ok, error) {
|
||||
result, err := client.Send(Request{
|
||||
meta: meta{
|
||||
|
|
@ -8553,7 +8544,7 @@ type AddChatMembersRequest struct {
|
|||
UserIds []int64 `json:"user_ids"`
|
||||
}
|
||||
|
||||
// Adds multiple new members to a chat. Currently, this method is only available for supergroups and channels. This method can't be used to join a chat. Members can't be added to a channel if it has more than 200 members
|
||||
// Adds multiple new members to a chat; requires can_invite_users member right. Currently, this method is only available for supergroups and channels. This method can't be used to join a chat. Members can't be added to a channel if it has more than 200 members
|
||||
func (client *Client) AddChatMembers(req *AddChatMembersRequest) (*Ok, error) {
|
||||
result, err := client.Send(Request{
|
||||
meta: meta{
|
||||
|
|
@ -8584,7 +8575,7 @@ type SetChatMemberStatusRequest struct {
|
|||
Status ChatMemberStatus `json:"status"`
|
||||
}
|
||||
|
||||
// Changes the status of a chat member, needs appropriate privileges. This function is currently not suitable for transferring chat ownership; use transferChatOwnership instead. Use addChatMember or banChatMember if some additional parameters needs to be passed
|
||||
// Changes the status of a chat member; requires can_invite_users member right to add a chat member, can_promote_members administrator right to change administrator rights of the member, and can_restrict_members administrator right to change restrictions of a user. This function is currently not suitable for transferring chat ownership; use transferChatOwnership instead. Use addChatMember or banChatMember if some additional parameters needs to be passed
|
||||
func (client *Client) SetChatMemberStatus(req *SetChatMemberStatusRequest) (*Ok, error) {
|
||||
result, err := client.Send(Request{
|
||||
meta: meta{
|
||||
|
|
@ -8618,7 +8609,7 @@ type BanChatMemberRequest struct {
|
|||
RevokeMessages bool `json:"revoke_messages"`
|
||||
}
|
||||
|
||||
// Bans a member in a chat. Members can't be banned in private or secret chats. In supergroups and channels, the user will not be able to return to the group on their own using invite links, etc., unless unbanned first
|
||||
// Bans a member in a chat; requires can_restrict_members administrator right. Members can't be banned in private or secret chats. In supergroups and channels, the user will not be able to return to the group on their own using invite links, etc., unless unbanned first
|
||||
func (client *Client) BanChatMember(req *BanChatMemberRequest) (*Ok, error) {
|
||||
result, err := client.Send(Request{
|
||||
meta: meta{
|
||||
|
|
@ -8685,7 +8676,7 @@ type TransferChatOwnershipRequest struct {
|
|||
Password string `json:"password"`
|
||||
}
|
||||
|
||||
// Changes the owner of a chat. The current user must be a current owner of the chat. Use the method canTransferOwnership to check whether the ownership can be transferred from the current session. Available only for supergroups and channel chats
|
||||
// Changes the owner of a chat; requires owner privileges in the chat. Use the method canTransferOwnership to check whether the ownership can be transferred from the current session. Available only for supergroups and channel chats
|
||||
func (client *Client) TransferChatOwnership(req *TransferChatOwnershipRequest) (*Ok, error) {
|
||||
result, err := client.Send(Request{
|
||||
meta: meta{
|
||||
|
|
@ -8748,7 +8739,7 @@ type SearchChatMembersRequest struct {
|
|||
Filter ChatMembersFilter `json:"filter"`
|
||||
}
|
||||
|
||||
// Searches for a specified query in the first name, last name and usernames of the members of a specified chat. Requires administrator rights in channels
|
||||
// Searches for a specified query in the first name, last name and usernames of the members of a specified chat. Requires administrator rights if the chat is a channel
|
||||
func (client *Client) SearchChatMembers(req *SearchChatMembersRequest) (*ChatMembers, error) {
|
||||
result, err := client.Send(Request{
|
||||
meta: meta{
|
||||
|
|
@ -9143,7 +9134,7 @@ func (client *Client) GetStory(req *GetStoryRequest) (*Story, error) {
|
|||
return UnmarshalStory(result.Data)
|
||||
}
|
||||
|
||||
// Returns channel chats in which the current user has the right to post stories. The chats must be rechecked with canSendStory before actually trying to post a story there
|
||||
// Returns supergroup and channel chats in which the current user has the right to post stories. The chats must be rechecked with canSendStory before actually trying to post a story there
|
||||
func (client *Client) GetChatsToSendStories() (*Chats, error) {
|
||||
result, err := client.Send(Request{
|
||||
meta: meta{
|
||||
|
|
@ -9167,7 +9158,7 @@ type CanSendStoryRequest struct {
|
|||
ChatId int64 `json:"chat_id"`
|
||||
}
|
||||
|
||||
// Checks whether the current user can send a story on behalf of a chat; requires can_post_stories rights for channel chats
|
||||
// Checks whether the current user can send a story on behalf of a chat; requires can_post_stories right for supergroup and channel chats
|
||||
func (client *Client) CanSendStory(req *CanSendStoryRequest) (CanSendStoryResult, error) {
|
||||
result, err := client.Send(Request{
|
||||
meta: meta{
|
||||
|
|
@ -9218,7 +9209,7 @@ type SendStoryRequest struct {
|
|||
Areas *InputStoryAreas `json:"areas"`
|
||||
// Story caption; pass null to use an empty caption; 0-getOption("story_caption_length_max") characters
|
||||
Caption *FormattedText `json:"caption"`
|
||||
// The privacy settings for the story
|
||||
// The privacy settings for the story; ignored for stories sent to supergroup and channel chats
|
||||
PrivacySettings StoryPrivacySettings `json:"privacy_settings"`
|
||||
// Period after which the story is moved to archive, in seconds; must be one of 6 * 3600, 12 * 3600, 86400, or 2 * 86400 for Telegram Premium users, and 86400 otherwise
|
||||
ActivePeriod int32 `json:"active_period"`
|
||||
|
|
@ -9230,7 +9221,7 @@ type SendStoryRequest struct {
|
|||
ProtectContent bool `json:"protect_content"`
|
||||
}
|
||||
|
||||
// Sends a new story to a chat; requires can_post_stories rights for channel chats. Returns a temporary story
|
||||
// Sends a new story to a chat; requires can_post_stories right for supergroup and channel chats. Returns a temporary story
|
||||
func (client *Client) SendStory(req *SendStoryRequest) (*Story, error) {
|
||||
result, err := client.Send(Request{
|
||||
meta: meta{
|
||||
|
|
@ -9298,22 +9289,19 @@ func (client *Client) EditStory(req *EditStoryRequest) (*Ok, error) {
|
|||
}
|
||||
|
||||
type SetStoryPrivacySettingsRequest struct {
|
||||
// Identifier of the chat that posted the story
|
||||
StorySenderChatId int64 `json:"story_sender_chat_id"`
|
||||
// Identifier of the story
|
||||
StoryId int32 `json:"story_id"`
|
||||
// The new privacy settigs for the story
|
||||
PrivacySettings StoryPrivacySettings `json:"privacy_settings"`
|
||||
}
|
||||
|
||||
// Changes privacy settings of a story. Can be called only if story.can_be_edited == true
|
||||
// Changes privacy settings of a story. The method can be called only for stories posted on behalf of the current user and if story.can_be_edited == true
|
||||
func (client *Client) SetStoryPrivacySettings(req *SetStoryPrivacySettingsRequest) (*Ok, error) {
|
||||
result, err := client.Send(Request{
|
||||
meta: meta{
|
||||
Type: "setStoryPrivacySettings",
|
||||
},
|
||||
Data: map[string]interface{}{
|
||||
"story_sender_chat_id": req.StorySenderChatId,
|
||||
"story_id": req.StoryId,
|
||||
"privacy_settings": req.PrivacySettings,
|
||||
},
|
||||
|
|
@ -9531,7 +9519,7 @@ type GetChatArchivedStoriesRequest struct {
|
|||
Limit int32 `json:"limit"`
|
||||
}
|
||||
|
||||
// Returns the list of all stories posted by the given chat; requires can_edit_stories rights for channel chats. The stories are returned in a reverse chronological order (i.e., in order of decreasing story_id). For optimal performance, the number of returned stories is chosen by TDLib
|
||||
// Returns the list of all stories posted by the given chat; requires can_edit_stories right in the chat. The stories are returned in a reverse chronological order (i.e., in order of decreasing story_id). For optimal performance, the number of returned stories is chosen by TDLib
|
||||
func (client *Client) GetChatArchivedStories(req *GetChatArchivedStoriesRequest) (*Stories, error) {
|
||||
result, err := client.Send(Request{
|
||||
meta: meta{
|
||||
|
|
@ -9649,7 +9637,7 @@ type SetStoryReactionRequest struct {
|
|||
UpdateRecentReactions bool `json:"update_recent_reactions"`
|
||||
}
|
||||
|
||||
// Changes chosen reaction on a story
|
||||
// Changes chosen reaction on a story that has already been sent
|
||||
func (client *Client) SetStoryReaction(req *SetStoryReactionRequest) (*Ok, error) {
|
||||
result, err := client.Send(Request{
|
||||
meta: meta{
|
||||
|
|
@ -9848,6 +9836,8 @@ func (client *Client) GetStoryPublicForwards(req *GetStoryPublicForwardsRequest)
|
|||
}
|
||||
|
||||
type GetChatBoostLevelFeaturesRequest struct {
|
||||
// Pass true to get the list of features for channels; pass false to get the list of features for supergroups
|
||||
IsChannel bool `json:"is_channel"`
|
||||
// Chat boost level
|
||||
Level int32 `json:"level"`
|
||||
}
|
||||
|
|
@ -9859,6 +9849,7 @@ func (client *Client) GetChatBoostLevelFeatures(req *GetChatBoostLevelFeaturesRe
|
|||
Type: "getChatBoostLevelFeatures",
|
||||
},
|
||||
Data: map[string]interface{}{
|
||||
"is_channel": req.IsChannel,
|
||||
"level": req.Level,
|
||||
},
|
||||
})
|
||||
|
|
@ -9873,13 +9864,20 @@ func (client *Client) GetChatBoostLevelFeatures(req *GetChatBoostLevelFeaturesRe
|
|||
return UnmarshalChatBoostLevelFeatures(result.Data)
|
||||
}
|
||||
|
||||
type GetChatBoostFeaturesRequest struct {
|
||||
// Pass true to get the list of features for channels; pass false to get the list of features for supergroups
|
||||
IsChannel bool `json:"is_channel"`
|
||||
}
|
||||
|
||||
// Returns list of features available on the first 10 chat boost levels; this is an offline request
|
||||
func (client *Client) GetChatBoostFeatures() (*ChatBoostFeatures, error) {
|
||||
func (client *Client) GetChatBoostFeatures(req *GetChatBoostFeaturesRequest) (*ChatBoostFeatures, error) {
|
||||
result, err := client.Send(Request{
|
||||
meta: meta{
|
||||
Type: "getChatBoostFeatures",
|
||||
},
|
||||
Data: map[string]interface{}{},
|
||||
Data: map[string]interface{}{
|
||||
"is_channel": req.IsChannel,
|
||||
},
|
||||
})
|
||||
if err != nil {
|
||||
return nil, err
|
||||
|
|
@ -9912,11 +9910,11 @@ func (client *Client) GetAvailableChatBoostSlots() (*ChatBoostSlots, error) {
|
|||
}
|
||||
|
||||
type GetChatBoostStatusRequest struct {
|
||||
// Identifier of the channel chat
|
||||
// Identifier of the chat
|
||||
ChatId int64 `json:"chat_id"`
|
||||
}
|
||||
|
||||
// Returns the current boost status for a channel chat
|
||||
// Returns the current boost status for a supergroup or a channel chat
|
||||
func (client *Client) GetChatBoostStatus(req *GetChatBoostStatusRequest) (*ChatBoostStatus, error) {
|
||||
result, err := client.Send(Request{
|
||||
meta: meta{
|
||||
|
|
@ -9971,7 +9969,7 @@ type GetChatBoostLinkRequest struct {
|
|||
ChatId int64 `json:"chat_id"`
|
||||
}
|
||||
|
||||
// Returns an HTTPS link to boost the specified channel chat
|
||||
// Returns an HTTPS link to boost the specified supergroup or channel chat
|
||||
func (client *Client) GetChatBoostLink(req *GetChatBoostLinkRequest) (*ChatBoostLink, error) {
|
||||
result, err := client.Send(Request{
|
||||
meta: meta{
|
||||
|
|
@ -10029,7 +10027,7 @@ type GetChatBoostsRequest struct {
|
|||
Limit int32 `json:"limit"`
|
||||
}
|
||||
|
||||
// Returns list of boosts applied to a chat; requires administrator rights in the channel chat
|
||||
// Returns list of boosts applied to a chat; requires administrator rights in the chat
|
||||
func (client *Client) GetChatBoosts(req *GetChatBoostsRequest) (*FoundChatBoosts, error) {
|
||||
result, err := client.Send(Request{
|
||||
meta: meta{
|
||||
|
|
@ -10060,7 +10058,7 @@ type GetUserChatBoostsRequest struct {
|
|||
UserId int64 `json:"user_id"`
|
||||
}
|
||||
|
||||
// Returns list of boosts applied to a chat by a given user; requires administrator rights in the channel chat; for bots only
|
||||
// Returns list of boosts applied to a chat by a given user; requires administrator rights in the chat; for bots only
|
||||
func (client *Client) GetUserChatBoosts(req *GetUserChatBoostsRequest) (*FoundChatBoosts, error) {
|
||||
result, err := client.Send(Request{
|
||||
meta: meta{
|
||||
|
|
@ -10835,7 +10833,7 @@ func (client *Client) GetMessageFileType(req *GetMessageFileTypeRequest) (Messag
|
|||
}
|
||||
|
||||
type GetMessageImportConfirmationTextRequest struct {
|
||||
// Identifier of a chat to which the messages will be imported. It must be an identifier of a private chat with a mutual contact or an identifier of a supergroup chat with can_change_info administrator right
|
||||
// Identifier of a chat to which the messages will be imported. It must be an identifier of a private chat with a mutual contact or an identifier of a supergroup chat with can_change_info member right
|
||||
ChatId int64 `json:"chat_id"`
|
||||
}
|
||||
|
||||
|
|
@ -10861,7 +10859,7 @@ func (client *Client) GetMessageImportConfirmationText(req *GetMessageImportConf
|
|||
}
|
||||
|
||||
type ImportMessagesRequest struct {
|
||||
// Identifier of a chat to which the messages will be imported. It must be an identifier of a private chat with a mutual contact or an identifier of a supergroup chat with can_change_info administrator right
|
||||
// Identifier of a chat to which the messages will be imported. It must be an identifier of a private chat with a mutual contact or an identifier of a supergroup chat with can_change_info member right
|
||||
ChatId int64 `json:"chat_id"`
|
||||
// File with messages to import. Only inputFileLocal and inputFileGenerated are supported. The file must not be previously uploaded
|
||||
MessageFile InputFile `json:"message_file"`
|
||||
|
|
@ -11652,11 +11650,11 @@ type CreateVideoChatRequest struct {
|
|||
Title string `json:"title"`
|
||||
// Point in time (Unix timestamp) when the group call is supposed to be started by an administrator; 0 to start the video chat immediately. The date must be at least 10 seconds and at most 8 days in the future
|
||||
StartDate int32 `json:"start_date"`
|
||||
// Pass true to create an RTMP stream instead of an ordinary video chat; requires creator privileges
|
||||
// Pass true to create an RTMP stream instead of an ordinary video chat; requires owner privileges
|
||||
IsRtmpStream bool `json:"is_rtmp_stream"`
|
||||
}
|
||||
|
||||
// Creates a video chat (a group call bound to a chat). Available only for basic groups, supergroups and channels; requires can_manage_video_chats rights
|
||||
// Creates a video chat (a group call bound to a chat). Available only for basic groups, supergroups and channels; requires can_manage_video_chats administrator right
|
||||
func (client *Client) CreateVideoChat(req *CreateVideoChatRequest) (*GroupCallId, error) {
|
||||
result, err := client.Send(Request{
|
||||
meta: meta{
|
||||
|
|
@ -11685,7 +11683,7 @@ type GetVideoChatRtmpUrlRequest struct {
|
|||
ChatId int64 `json:"chat_id"`
|
||||
}
|
||||
|
||||
// Returns RTMP URL for streaming to the chat; requires creator privileges
|
||||
// Returns RTMP URL for streaming to the chat; requires owner privileges
|
||||
func (client *Client) GetVideoChatRtmpUrl(req *GetVideoChatRtmpUrlRequest) (*RtmpUrl, error) {
|
||||
result, err := client.Send(Request{
|
||||
meta: meta{
|
||||
|
|
@ -11711,7 +11709,7 @@ type ReplaceVideoChatRtmpUrlRequest struct {
|
|||
ChatId int64 `json:"chat_id"`
|
||||
}
|
||||
|
||||
// Replaces the current RTMP URL for streaming to the chat; requires creator privileges
|
||||
// Replaces the current RTMP URL for streaming to the chat; requires owner privileges
|
||||
func (client *Client) ReplaceVideoChatRtmpUrl(req *ReplaceVideoChatRtmpUrlRequest) (*RtmpUrl, error) {
|
||||
result, err := client.Send(Request{
|
||||
meta: meta{
|
||||
|
|
@ -15384,6 +15382,64 @@ func (client *Client) SetSupergroupStickerSet(req *SetSupergroupStickerSetReques
|
|||
return UnmarshalOk(result.Data)
|
||||
}
|
||||
|
||||
type SetSupergroupCustomEmojiStickerSetRequest struct {
|
||||
// Identifier of the supergroup
|
||||
SupergroupId int64 `json:"supergroup_id"`
|
||||
// New value of the custom emoji sticker set identifier for the supergroup. Use 0 to remove the custom emoji sticker set in the supergroup
|
||||
CustomEmojiStickerSetId JsonInt64 `json:"custom_emoji_sticker_set_id"`
|
||||
}
|
||||
|
||||
// Changes the custom emoji sticker set of a supergroup; requires can_change_info administrator right. The chat must have at least chatBoostFeatures.min_custom_emoji_sticker_set_boost_level boost level to pass the corresponding color
|
||||
func (client *Client) SetSupergroupCustomEmojiStickerSet(req *SetSupergroupCustomEmojiStickerSetRequest) (*Ok, error) {
|
||||
result, err := client.Send(Request{
|
||||
meta: meta{
|
||||
Type: "setSupergroupCustomEmojiStickerSet",
|
||||
},
|
||||
Data: map[string]interface{}{
|
||||
"supergroup_id": req.SupergroupId,
|
||||
"custom_emoji_sticker_set_id": req.CustomEmojiStickerSetId,
|
||||
},
|
||||
})
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
if result.Type == "error" {
|
||||
return nil, buildResponseError(result.Data)
|
||||
}
|
||||
|
||||
return UnmarshalOk(result.Data)
|
||||
}
|
||||
|
||||
type SetSupergroupUnrestrictBoostCountRequest struct {
|
||||
// Identifier of the supergroup
|
||||
SupergroupId int64 `json:"supergroup_id"`
|
||||
// New value of the unrestrict_boost_count supergroup setting; 0-8. Use 0 to remove the setting
|
||||
UnrestrictBoostCount int32 `json:"unrestrict_boost_count"`
|
||||
}
|
||||
|
||||
// Changes the number of times the supergroup must be boosted by a user to ignore slow mode and chat permission restrictions; requires can_restrict_members administrator right
|
||||
func (client *Client) SetSupergroupUnrestrictBoostCount(req *SetSupergroupUnrestrictBoostCountRequest) (*Ok, error) {
|
||||
result, err := client.Send(Request{
|
||||
meta: meta{
|
||||
Type: "setSupergroupUnrestrictBoostCount",
|
||||
},
|
||||
Data: map[string]interface{}{
|
||||
"supergroup_id": req.SupergroupId,
|
||||
"unrestrict_boost_count": req.UnrestrictBoostCount,
|
||||
},
|
||||
})
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
if result.Type == "error" {
|
||||
return nil, buildResponseError(result.Data)
|
||||
}
|
||||
|
||||
return UnmarshalOk(result.Data)
|
||||
}
|
||||
|
||||
type ToggleSupergroupSignMessagesRequest struct {
|
||||
// Identifier of the channel
|
||||
SupergroupId int64 `json:"supergroup_id"`
|
||||
|
|
@ -15391,7 +15447,7 @@ type ToggleSupergroupSignMessagesRequest struct {
|
|||
SignMessages bool `json:"sign_messages"`
|
||||
}
|
||||
|
||||
// Toggles whether sender signature is added to sent messages in a channel; requires can_change_info administrator right
|
||||
// Toggles whether sender signature is added to sent messages in a channel; requires can_change_info member right
|
||||
func (client *Client) ToggleSupergroupSignMessages(req *ToggleSupergroupSignMessagesRequest) (*Ok, error) {
|
||||
result, err := client.Send(Request{
|
||||
meta: meta{
|
||||
|
|
@ -15478,7 +15534,7 @@ type ToggleSupergroupIsAllHistoryAvailableRequest struct {
|
|||
IsAllHistoryAvailable bool `json:"is_all_history_available"`
|
||||
}
|
||||
|
||||
// Toggles whether the message history of a supergroup is available to new members; requires can_change_info administrator right
|
||||
// Toggles whether the message history of a supergroup is available to new members; requires can_change_info member right
|
||||
func (client *Client) ToggleSupergroupIsAllHistoryAvailable(req *ToggleSupergroupIsAllHistoryAvailableRequest) (*Ok, error) {
|
||||
result, err := client.Send(Request{
|
||||
meta: meta{
|
||||
|
|
@ -18789,7 +18845,7 @@ func (client *Client) GetPremiumState() (*PremiumState, error) {
|
|||
}
|
||||
|
||||
type GetPremiumGiftCodePaymentOptionsRequest struct {
|
||||
// Identifier of the channel chat, which will be automatically boosted by receivers of the gift codes and which is administered by the user; 0 if none
|
||||
// Identifier of the supergroup or channel chat, which will be automatically boosted by receivers of the gift codes and which is administered by the user; 0 if none
|
||||
BoostedChatId int64 `json:"boosted_chat_id"`
|
||||
}
|
||||
|
||||
|
|
@ -18873,7 +18929,7 @@ type LaunchPrepaidPremiumGiveawayRequest struct {
|
|||
Parameters *PremiumGiveawayParameters `json:"parameters"`
|
||||
}
|
||||
|
||||
// Launches a prepaid Telegram Premium giveaway for subscribers of channel chats; requires can_post_messages rights in the channels
|
||||
// Launches a prepaid Telegram Premium giveaway
|
||||
func (client *Client) LaunchPrepaidPremiumGiveaway(req *LaunchPrepaidPremiumGiveawayRequest) (*Ok, error) {
|
||||
result, err := client.Send(Request{
|
||||
meta: meta{
|
||||
|
|
@ -20351,8 +20407,11 @@ func (client *Client) TestUseUpdate() (Update, error) {
|
|||
case TypeUpdateChatOnlineMemberCount:
|
||||
return UnmarshalUpdateChatOnlineMemberCount(result.Data)
|
||||
|
||||
case TypeUpdatePinnedSavedMessagesTopics:
|
||||
return UnmarshalUpdatePinnedSavedMessagesTopics(result.Data)
|
||||
case TypeUpdateSavedMessagesTopic:
|
||||
return UnmarshalUpdateSavedMessagesTopic(result.Data)
|
||||
|
||||
case TypeUpdateSavedMessagesTopicCount:
|
||||
return UnmarshalUpdateSavedMessagesTopicCount(result.Data)
|
||||
|
||||
case TypeUpdateForumTopicInfo:
|
||||
return UnmarshalUpdateForumTopicInfo(result.Data)
|
||||
|
|
|
|||
505
client/type.go
505
client/type.go
|
|
@ -48,7 +48,7 @@ const (
|
|||
ClassInlineKeyboardButtonType = "InlineKeyboardButtonType"
|
||||
ClassReplyMarkup = "ReplyMarkup"
|
||||
ClassLoginUrlInfo = "LoginUrlInfo"
|
||||
ClassSavedMessagesTopic = "SavedMessagesTopic"
|
||||
ClassSavedMessagesTopicType = "SavedMessagesTopicType"
|
||||
ClassRichText = "RichText"
|
||||
ClassPageBlockHorizontalAlignment = "PageBlockHorizontalAlignment"
|
||||
ClassPageBlockVerticalAlignment = "PageBlockVerticalAlignment"
|
||||
|
|
@ -282,8 +282,7 @@ const (
|
|||
ClassFoundWebApp = "FoundWebApp"
|
||||
ClassWebAppInfo = "WebAppInfo"
|
||||
ClassMessageThreadInfo = "MessageThreadInfo"
|
||||
ClassFoundSavedMessagesTopic = "FoundSavedMessagesTopic"
|
||||
ClassFoundSavedMessagesTopics = "FoundSavedMessagesTopics"
|
||||
ClassSavedMessagesTopic = "SavedMessagesTopic"
|
||||
ClassForumTopicIcon = "ForumTopicIcon"
|
||||
ClassForumTopicInfo = "ForumTopicInfo"
|
||||
ClassForumTopic = "ForumTopic"
|
||||
|
|
@ -791,11 +790,10 @@ const (
|
|||
TypeFoundWebApp = "foundWebApp"
|
||||
TypeWebAppInfo = "webAppInfo"
|
||||
TypeMessageThreadInfo = "messageThreadInfo"
|
||||
TypeSavedMessagesTopicMyNotes = "savedMessagesTopicMyNotes"
|
||||
TypeSavedMessagesTopicAuthorHidden = "savedMessagesTopicAuthorHidden"
|
||||
TypeSavedMessagesTopicSavedFromChat = "savedMessagesTopicSavedFromChat"
|
||||
TypeFoundSavedMessagesTopic = "foundSavedMessagesTopic"
|
||||
TypeFoundSavedMessagesTopics = "foundSavedMessagesTopics"
|
||||
TypeSavedMessagesTopicTypeMyNotes = "savedMessagesTopicTypeMyNotes"
|
||||
TypeSavedMessagesTopicTypeAuthorHidden = "savedMessagesTopicTypeAuthorHidden"
|
||||
TypeSavedMessagesTopicTypeSavedFromChat = "savedMessagesTopicTypeSavedFromChat"
|
||||
TypeSavedMessagesTopic = "savedMessagesTopic"
|
||||
TypeForumTopicIcon = "forumTopicIcon"
|
||||
TypeForumTopicInfo = "forumTopicInfo"
|
||||
TypeForumTopic = "forumTopic"
|
||||
|
|
@ -1007,6 +1005,7 @@ const (
|
|||
TypeMessageChatSetBackground = "messageChatSetBackground"
|
||||
TypeMessageChatSetTheme = "messageChatSetTheme"
|
||||
TypeMessageChatSetMessageAutoDeleteTime = "messageChatSetMessageAutoDeleteTime"
|
||||
TypeMessageChatBoost = "messageChatBoost"
|
||||
TypeMessageForumTopicCreated = "messageForumTopicCreated"
|
||||
TypeMessageForumTopicEdited = "messageForumTopicEdited"
|
||||
TypeMessageForumTopicIsClosedToggled = "messageForumTopicIsClosedToggled"
|
||||
|
|
@ -1300,6 +1299,7 @@ const (
|
|||
TypeChatEventPhotoChanged = "chatEventPhotoChanged"
|
||||
TypeChatEventSlowModeDelayChanged = "chatEventSlowModeDelayChanged"
|
||||
TypeChatEventStickerSetChanged = "chatEventStickerSetChanged"
|
||||
TypeChatEventCustomEmojiStickerSetChanged = "chatEventCustomEmojiStickerSetChanged"
|
||||
TypeChatEventTitleChanged = "chatEventTitleChanged"
|
||||
TypeChatEventUsernameChanged = "chatEventUsernameChanged"
|
||||
TypeChatEventActiveUsernamesChanged = "chatEventActiveUsernamesChanged"
|
||||
|
|
@ -1373,12 +1373,16 @@ const (
|
|||
TypePremiumFeatureChatBoost = "premiumFeatureChatBoost"
|
||||
TypePremiumFeatureAccentColor = "premiumFeatureAccentColor"
|
||||
TypePremiumFeatureBackgroundForBoth = "premiumFeatureBackgroundForBoth"
|
||||
TypePremiumFeatureSavedMessagesTags = "premiumFeatureSavedMessagesTags"
|
||||
TypePremiumFeatureMessagePrivacy = "premiumFeatureMessagePrivacy"
|
||||
TypePremiumFeatureLastSeenTimes = "premiumFeatureLastSeenTimes"
|
||||
TypePremiumStoryFeaturePriorityOrder = "premiumStoryFeaturePriorityOrder"
|
||||
TypePremiumStoryFeatureStealthMode = "premiumStoryFeatureStealthMode"
|
||||
TypePremiumStoryFeaturePermanentViewsHistory = "premiumStoryFeaturePermanentViewsHistory"
|
||||
TypePremiumStoryFeatureCustomExpirationDuration = "premiumStoryFeatureCustomExpirationDuration"
|
||||
TypePremiumStoryFeatureSaveStories = "premiumStoryFeatureSaveStories"
|
||||
TypePremiumStoryFeatureLinksAndFormatting = "premiumStoryFeatureLinksAndFormatting"
|
||||
TypePremiumStoryFeatureVideoQuality = "premiumStoryFeatureVideoQuality"
|
||||
TypePremiumLimit = "premiumLimit"
|
||||
TypePremiumFeatures = "premiumFeatures"
|
||||
TypePremiumSourceLimitExceeded = "premiumSourceLimitExceeded"
|
||||
|
|
@ -1771,7 +1775,8 @@ const (
|
|||
TypeUpdateChatHasScheduledMessages = "updateChatHasScheduledMessages"
|
||||
TypeUpdateChatFolders = "updateChatFolders"
|
||||
TypeUpdateChatOnlineMemberCount = "updateChatOnlineMemberCount"
|
||||
TypeUpdatePinnedSavedMessagesTopics = "updatePinnedSavedMessagesTopics"
|
||||
TypeUpdateSavedMessagesTopic = "updateSavedMessagesTopic"
|
||||
TypeUpdateSavedMessagesTopicCount = "updateSavedMessagesTopicCount"
|
||||
TypeUpdateForumTopicInfo = "updateForumTopicInfo"
|
||||
TypeUpdateScopeNotificationSettings = "updateScopeNotificationSettings"
|
||||
TypeUpdateNotification = "updateNotification"
|
||||
|
|
@ -2075,9 +2080,9 @@ type LoginUrlInfo interface {
|
|||
LoginUrlInfoType() string
|
||||
}
|
||||
|
||||
// Contains information about a Saved Messages topic
|
||||
type SavedMessagesTopic interface {
|
||||
SavedMessagesTopicType() string
|
||||
// Describes type of a Saved Messages topic
|
||||
type SavedMessagesTopicType interface {
|
||||
SavedMessagesTopicTypeType() string
|
||||
}
|
||||
|
||||
// Describes a text object inside an instant-view web page
|
||||
|
|
@ -6018,7 +6023,7 @@ func (*ChatPermissions) GetType() string {
|
|||
// Describes rights of the administrator
|
||||
type ChatAdministratorRights struct {
|
||||
meta
|
||||
// True, if the administrator can get chat event log, get chat boosts in channels, get channel members, report supergroup spam messages, see anonymous administrators in supergroups and ignore slow mode. Implied by any other privilege; applicable to supergroups and channels only
|
||||
// True, if the administrator can access the chat event log, get boost list, see hidden supergroup and channel members, report supergroup spam messages and ignore slow mode. Implied by any other privilege; applicable to supergroups and channels only
|
||||
CanManageChat bool `json:"can_manage_chat"`
|
||||
// True, if the administrator can change the chat title, photo, and other settings
|
||||
CanChangeInfo bool `json:"can_change_info"`
|
||||
|
|
@ -6040,11 +6045,11 @@ type ChatAdministratorRights struct {
|
|||
CanPromoteMembers bool `json:"can_promote_members"`
|
||||
// True, if the administrator can manage video chats
|
||||
CanManageVideoChats bool `json:"can_manage_video_chats"`
|
||||
// True, if the administrator can create new channel stories, or edit and delete posted stories; applicable to channels only
|
||||
// True, if the administrator can create new chat stories, or edit and delete posted stories; applicable to supergroups and channels only
|
||||
CanPostStories bool `json:"can_post_stories"`
|
||||
// True, if the administrator can edit stories posted by other users, pin stories and access story archive; applicable to channels only
|
||||
// True, if the administrator can edit stories posted by other users, pin stories and access story archive; applicable to supergroups and channels only
|
||||
CanEditStories bool `json:"can_edit_stories"`
|
||||
// True, if the administrator can delete stories posted by other users; applicable to channels only
|
||||
// True, if the administrator can delete stories posted by other users; applicable to supergroups and channels only
|
||||
CanDeleteStories bool `json:"can_delete_stories"`
|
||||
// True, if the administrator isn't shown in the chat member list and sends messages anonymously; applicable to supergroups only
|
||||
IsAnonymous bool `json:"is_anonymous"`
|
||||
|
|
@ -6506,8 +6511,8 @@ type AccentColor struct {
|
|||
LightThemeColors []int32 `json:"light_theme_colors"`
|
||||
// The list of 1-3 colors in RGB format, describing the accent color, as expected to be shown in dark themes
|
||||
DarkThemeColors []int32 `json:"dark_theme_colors"`
|
||||
// The minimum chat boost level required to use the color
|
||||
MinChatBoostLevel int32 `json:"min_chat_boost_level"`
|
||||
// The minimum chat boost level required to use the color in a channel chat
|
||||
MinChannelChatBoostLevel int32 `json:"min_channel_chat_boost_level"`
|
||||
}
|
||||
|
||||
func (entity *AccentColor) MarshalJSON() ([]byte, error) {
|
||||
|
|
@ -6562,8 +6567,10 @@ type ProfileAccentColor struct {
|
|||
LightThemeColors *ProfileAccentColors `json:"light_theme_colors"`
|
||||
// Accent colors expected to be used in dark themes
|
||||
DarkThemeColors *ProfileAccentColors `json:"dark_theme_colors"`
|
||||
// The minimum chat boost level required to use the color
|
||||
MinChatBoostLevel int32 `json:"min_chat_boost_level"`
|
||||
// The minimum chat boost level required to use the color in a supergroup chat
|
||||
MinSupergroupChatBoostLevel int32 `json:"min_supergroup_chat_boost_level"`
|
||||
// The minimum chat boost level required to use the color in a channel chat
|
||||
MinChannelChatBoostLevel int32 `json:"min_channel_chat_boost_level"`
|
||||
}
|
||||
|
||||
func (entity *ProfileAccentColor) MarshalJSON() ([]byte, error) {
|
||||
|
|
@ -8272,9 +8279,9 @@ type Supergroup struct {
|
|||
IsScam bool `json:"is_scam"`
|
||||
// True, if many users reported this supergroup or channel as a fake account
|
||||
IsFake bool `json:"is_fake"`
|
||||
// True, if the channel has non-expired stories available to the current user
|
||||
// True, if the supergroup or channel has non-expired stories available to the current user
|
||||
HasActiveStories bool `json:"has_active_stories"`
|
||||
// True, if the channel has unread non-expired stories available to the current user
|
||||
// True, if the supergroup or channel has unread non-expired stories available to the current user
|
||||
HasUnreadActiveStories bool `json:"has_unread_active_stories"`
|
||||
}
|
||||
|
||||
|
|
@ -8392,10 +8399,16 @@ type SupergroupFullInfo struct {
|
|||
IsAllHistoryAvailable bool `json:"is_all_history_available"`
|
||||
// True, if aggressive anti-spam checks are enabled in the supergroup. The value of this field is only available to chat administrators
|
||||
HasAggressiveAntiSpamEnabled bool `json:"has_aggressive_anti_spam_enabled"`
|
||||
// True, if the channel has pinned stories
|
||||
// True, if the supergroup or channel has pinned stories
|
||||
HasPinnedStories bool `json:"has_pinned_stories"`
|
||||
// Identifier of the supergroup sticker set; 0 if none
|
||||
// Number of times the current user boosted the supergroup or channel
|
||||
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"`
|
||||
// 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
|
||||
CustomEmojiStickerSetId JsonInt64 `json:"custom_emoji_sticker_set_id"`
|
||||
// Location to which the supergroup is connected; may be null if none
|
||||
Location *ChatLocation `json:"location"`
|
||||
// Primary invite link for the chat; may be null. For chat administrators with can_invite_users right only
|
||||
|
|
@ -9325,7 +9338,7 @@ type MessageReactions struct {
|
|||
meta
|
||||
// List of added reactions
|
||||
Reactions []*MessageReaction `json:"reactions"`
|
||||
// True, if the reactions are tags and Telegram Premium users can filter messages by them; currently, always false
|
||||
// True, if the reactions are tags and Telegram Premium users can filter messages by them
|
||||
AreTags bool `json:"are_tags"`
|
||||
}
|
||||
|
||||
|
|
@ -9669,7 +9682,7 @@ func (*InputMessageReplyToMessage) InputMessageReplyToType() string {
|
|||
// Describes a story to be replied
|
||||
type InputMessageReplyToStory struct {
|
||||
meta
|
||||
// The identifier of the sender of the story. Currently, stories can be replied only in the sender's chat
|
||||
// The identifier of the sender of the story. Currently, stories can be replied only in the sender's chat and channel stories can't be replied
|
||||
StorySenderChatId int64 `json:"story_sender_chat_id"`
|
||||
// The identifier of the story
|
||||
StoryId int32 `json:"story_id"`
|
||||
|
|
@ -9762,8 +9775,8 @@ type Message struct {
|
|||
ReplyTo MessageReplyTo `json:"reply_to"`
|
||||
// If non-zero, the identifier of the message thread the message belongs to; unique within the chat to which the message belongs
|
||||
MessageThreadId int64 `json:"message_thread_id"`
|
||||
// Information about topic of the message in the Saved Messages chat; may be null for messages not from Saved Messages
|
||||
SavedMessagesTopic SavedMessagesTopic `json:"saved_messages_topic"`
|
||||
// Identifier of the Saved Messages topic for the message; 0 for messages not from Saved Messages
|
||||
SavedMessagesTopicId int64 `json:"saved_messages_topic_id"`
|
||||
// The message's self-destruct type; may be null if none
|
||||
SelfDestructType MessageSelfDestructType `json:"self_destruct_type"`
|
||||
// Time left before the message self-destruct timer expires, in seconds; 0 if self-destruction isn't scheduled yet
|
||||
|
|
@ -9772,6 +9785,8 @@ type Message struct {
|
|||
AutoDeleteIn float64 `json:"auto_delete_in"`
|
||||
// If non-zero, the user identifier of the bot through which this message was sent
|
||||
ViaBotUserId int64 `json:"via_bot_user_id"`
|
||||
// Number of times the sender of the message boosted the supergroup at the time the message was sent; 0 if none or unknown. For messages sent by the current user, supergroupFullInfo.my_boost_count must be used instead
|
||||
SenderBoostCount int32 `json:"sender_boost_count"`
|
||||
// For channel posts and anonymous group messages, optional author signature
|
||||
AuthorSignature string `json:"author_signature"`
|
||||
// Unique identifier of an album this message belongs to. Only audios, documents, photos and videos can be grouped together in albums
|
||||
|
|
@ -9834,11 +9849,12 @@ func (message *Message) UnmarshalJSON(data []byte) error {
|
|||
UnreadReactions []*UnreadReaction `json:"unread_reactions"`
|
||||
ReplyTo json.RawMessage `json:"reply_to"`
|
||||
MessageThreadId int64 `json:"message_thread_id"`
|
||||
SavedMessagesTopic json.RawMessage `json:"saved_messages_topic"`
|
||||
SavedMessagesTopicId int64 `json:"saved_messages_topic_id"`
|
||||
SelfDestructType json.RawMessage `json:"self_destruct_type"`
|
||||
SelfDestructIn float64 `json:"self_destruct_in"`
|
||||
AutoDeleteIn float64 `json:"auto_delete_in"`
|
||||
ViaBotUserId int64 `json:"via_bot_user_id"`
|
||||
SenderBoostCount int32 `json:"sender_boost_count"`
|
||||
AuthorSignature string `json:"author_signature"`
|
||||
MediaAlbumId JsonInt64 `json:"media_album_id"`
|
||||
RestrictionReason string `json:"restriction_reason"`
|
||||
|
|
@ -9879,9 +9895,11 @@ func (message *Message) UnmarshalJSON(data []byte) error {
|
|||
message.InteractionInfo = tmp.InteractionInfo
|
||||
message.UnreadReactions = tmp.UnreadReactions
|
||||
message.MessageThreadId = tmp.MessageThreadId
|
||||
message.SavedMessagesTopicId = tmp.SavedMessagesTopicId
|
||||
message.SelfDestructIn = tmp.SelfDestructIn
|
||||
message.AutoDeleteIn = tmp.AutoDeleteIn
|
||||
message.ViaBotUserId = tmp.ViaBotUserId
|
||||
message.SenderBoostCount = tmp.SenderBoostCount
|
||||
message.AuthorSignature = tmp.AuthorSignature
|
||||
message.MediaAlbumId = tmp.MediaAlbumId
|
||||
message.RestrictionReason = tmp.RestrictionReason
|
||||
|
|
@ -9898,9 +9916,6 @@ func (message *Message) UnmarshalJSON(data []byte) error {
|
|||
fieldReplyTo, _ := UnmarshalMessageReplyTo(tmp.ReplyTo)
|
||||
message.ReplyTo = fieldReplyTo
|
||||
|
||||
fieldSavedMessagesTopic, _ := UnmarshalSavedMessagesTopic(tmp.SavedMessagesTopic)
|
||||
message.SavedMessagesTopic = fieldSavedMessagesTopic
|
||||
|
||||
fieldSelfDestructType, _ := UnmarshalMessageSelfDestructType(tmp.SelfDestructType)
|
||||
message.SelfDestructType = fieldSelfDestructType
|
||||
|
||||
|
|
@ -10938,7 +10953,7 @@ type DraftMessage struct {
|
|||
ReplyTo InputMessageReplyTo `json:"reply_to"`
|
||||
// Point in time (Unix timestamp) when the draft was created
|
||||
Date int32 `json:"date"`
|
||||
// Content of the message draft; must be of the type inputMessageText
|
||||
// Content of the message draft; must be of the type inputMessageText, inputMessageVideoNote, or inputMessageVoiceNote
|
||||
InputMessageText InputMessageContent `json:"input_message_text"`
|
||||
}
|
||||
|
||||
|
|
@ -11640,12 +11655,12 @@ func (chatAvailableReactionsSome *ChatAvailableReactionsSome) UnmarshalJSON(data
|
|||
return nil
|
||||
}
|
||||
|
||||
// Represents a tag used in Saved Messages
|
||||
// Represents a tag used in Saved Messages or a Saved Messages topic
|
||||
type SavedMessagesTag struct {
|
||||
meta
|
||||
// The tag
|
||||
Tag ReactionType `json:"tag"`
|
||||
// Label of the tag; 0-12 characters
|
||||
// Label of the tag; 0-12 characters. Always empty if the tag is returned for a Saved Messages topic
|
||||
Label string `json:"label"`
|
||||
// Number of times the tag was used; may be 0 if the tag has non-empty label
|
||||
Count int32 `json:"count"`
|
||||
|
|
@ -11794,7 +11809,7 @@ type Chat struct {
|
|||
IsTranslatable bool `json:"is_translatable"`
|
||||
// True, if the chat is marked as unread
|
||||
IsMarkedAsUnread bool `json:"is_marked_as_unread"`
|
||||
// True, if the chat is a forum supergroup that must be shown in the "View as topics" mode
|
||||
// True, if the chat is a forum supergroup that must be shown in the "View as topics" mode, or Saved Messages chat that must be shown in the "View as chats"
|
||||
ViewAsTopics bool `json:"view_as_topics"`
|
||||
// True, if the chat has scheduled messages
|
||||
HasScheduledMessages bool `json:"has_scheduled_messages"`
|
||||
|
|
@ -13104,111 +13119,123 @@ func (*MessageThreadInfo) GetType() string {
|
|||
}
|
||||
|
||||
// Topic containing messages sent by the current user of forwarded from an unknown chat
|
||||
type SavedMessagesTopicMyNotes struct{
|
||||
type SavedMessagesTopicTypeMyNotes struct{
|
||||
meta
|
||||
}
|
||||
|
||||
func (entity *SavedMessagesTopicMyNotes) MarshalJSON() ([]byte, error) {
|
||||
func (entity *SavedMessagesTopicTypeMyNotes) MarshalJSON() ([]byte, error) {
|
||||
entity.meta.Type = entity.GetType()
|
||||
|
||||
type stub SavedMessagesTopicMyNotes
|
||||
type stub SavedMessagesTopicTypeMyNotes
|
||||
|
||||
return json.Marshal((*stub)(entity))
|
||||
}
|
||||
|
||||
func (*SavedMessagesTopicMyNotes) GetClass() string {
|
||||
return ClassSavedMessagesTopic
|
||||
func (*SavedMessagesTopicTypeMyNotes) GetClass() string {
|
||||
return ClassSavedMessagesTopicType
|
||||
}
|
||||
|
||||
func (*SavedMessagesTopicMyNotes) GetType() string {
|
||||
return TypeSavedMessagesTopicMyNotes
|
||||
func (*SavedMessagesTopicTypeMyNotes) GetType() string {
|
||||
return TypeSavedMessagesTopicTypeMyNotes
|
||||
}
|
||||
|
||||
func (*SavedMessagesTopicMyNotes) SavedMessagesTopicType() string {
|
||||
return TypeSavedMessagesTopicMyNotes
|
||||
func (*SavedMessagesTopicTypeMyNotes) SavedMessagesTopicTypeType() string {
|
||||
return TypeSavedMessagesTopicTypeMyNotes
|
||||
}
|
||||
|
||||
// Topic containing messages forwarded from a user with hidden privacy
|
||||
type SavedMessagesTopicAuthorHidden struct{
|
||||
type SavedMessagesTopicTypeAuthorHidden struct{
|
||||
meta
|
||||
}
|
||||
|
||||
func (entity *SavedMessagesTopicAuthorHidden) MarshalJSON() ([]byte, error) {
|
||||
func (entity *SavedMessagesTopicTypeAuthorHidden) MarshalJSON() ([]byte, error) {
|
||||
entity.meta.Type = entity.GetType()
|
||||
|
||||
type stub SavedMessagesTopicAuthorHidden
|
||||
type stub SavedMessagesTopicTypeAuthorHidden
|
||||
|
||||
return json.Marshal((*stub)(entity))
|
||||
}
|
||||
|
||||
func (*SavedMessagesTopicAuthorHidden) GetClass() string {
|
||||
return ClassSavedMessagesTopic
|
||||
func (*SavedMessagesTopicTypeAuthorHidden) GetClass() string {
|
||||
return ClassSavedMessagesTopicType
|
||||
}
|
||||
|
||||
func (*SavedMessagesTopicAuthorHidden) GetType() string {
|
||||
return TypeSavedMessagesTopicAuthorHidden
|
||||
func (*SavedMessagesTopicTypeAuthorHidden) GetType() string {
|
||||
return TypeSavedMessagesTopicTypeAuthorHidden
|
||||
}
|
||||
|
||||
func (*SavedMessagesTopicAuthorHidden) SavedMessagesTopicType() string {
|
||||
return TypeSavedMessagesTopicAuthorHidden
|
||||
func (*SavedMessagesTopicTypeAuthorHidden) SavedMessagesTopicTypeType() string {
|
||||
return TypeSavedMessagesTopicTypeAuthorHidden
|
||||
}
|
||||
|
||||
// Topic containing messages forwarded from a specific chat
|
||||
type SavedMessagesTopicSavedFromChat struct {
|
||||
type SavedMessagesTopicTypeSavedFromChat struct {
|
||||
meta
|
||||
// Identifier of the chat
|
||||
ChatId int64 `json:"chat_id"`
|
||||
}
|
||||
|
||||
func (entity *SavedMessagesTopicSavedFromChat) MarshalJSON() ([]byte, error) {
|
||||
func (entity *SavedMessagesTopicTypeSavedFromChat) MarshalJSON() ([]byte, error) {
|
||||
entity.meta.Type = entity.GetType()
|
||||
|
||||
type stub SavedMessagesTopicSavedFromChat
|
||||
type stub SavedMessagesTopicTypeSavedFromChat
|
||||
|
||||
return json.Marshal((*stub)(entity))
|
||||
}
|
||||
|
||||
func (*SavedMessagesTopicSavedFromChat) GetClass() string {
|
||||
func (*SavedMessagesTopicTypeSavedFromChat) GetClass() string {
|
||||
return ClassSavedMessagesTopicType
|
||||
}
|
||||
|
||||
func (*SavedMessagesTopicTypeSavedFromChat) GetType() string {
|
||||
return TypeSavedMessagesTopicTypeSavedFromChat
|
||||
}
|
||||
|
||||
func (*SavedMessagesTopicTypeSavedFromChat) SavedMessagesTopicTypeType() string {
|
||||
return TypeSavedMessagesTopicTypeSavedFromChat
|
||||
}
|
||||
|
||||
// Contains information about a Saved Messages topic
|
||||
type SavedMessagesTopic struct {
|
||||
meta
|
||||
// Unique topic identifier
|
||||
Id int64 `json:"id"`
|
||||
// Type of the topic
|
||||
Type SavedMessagesTopicType `json:"type"`
|
||||
// True, if the topic is pinned
|
||||
IsPinned bool `json:"is_pinned"`
|
||||
// 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"`
|
||||
// Last message in the topic; may be null if none or unknown
|
||||
LastMessage *Message `json:"last_message"`
|
||||
// A draft of a message in the topic; may be null if none
|
||||
DraftMessage *DraftMessage `json:"draft_message"`
|
||||
}
|
||||
|
||||
func (entity *SavedMessagesTopic) MarshalJSON() ([]byte, error) {
|
||||
entity.meta.Type = entity.GetType()
|
||||
|
||||
type stub SavedMessagesTopic
|
||||
|
||||
return json.Marshal((*stub)(entity))
|
||||
}
|
||||
|
||||
func (*SavedMessagesTopic) GetClass() string {
|
||||
return ClassSavedMessagesTopic
|
||||
}
|
||||
|
||||
func (*SavedMessagesTopicSavedFromChat) GetType() string {
|
||||
return TypeSavedMessagesTopicSavedFromChat
|
||||
func (*SavedMessagesTopic) GetType() string {
|
||||
return TypeSavedMessagesTopic
|
||||
}
|
||||
|
||||
func (*SavedMessagesTopicSavedFromChat) SavedMessagesTopicType() string {
|
||||
return TypeSavedMessagesTopicSavedFromChat
|
||||
}
|
||||
|
||||
// Contains information about a found Saved Messages topic
|
||||
type FoundSavedMessagesTopic struct {
|
||||
meta
|
||||
// The topic
|
||||
Topic SavedMessagesTopic `json:"topic"`
|
||||
// Last message in the topic; may be null if none or unknown
|
||||
LastMessage *Message `json:"last_message"`
|
||||
}
|
||||
|
||||
func (entity *FoundSavedMessagesTopic) MarshalJSON() ([]byte, error) {
|
||||
entity.meta.Type = entity.GetType()
|
||||
|
||||
type stub FoundSavedMessagesTopic
|
||||
|
||||
return json.Marshal((*stub)(entity))
|
||||
}
|
||||
|
||||
func (*FoundSavedMessagesTopic) GetClass() string {
|
||||
return ClassFoundSavedMessagesTopic
|
||||
}
|
||||
|
||||
func (*FoundSavedMessagesTopic) GetType() string {
|
||||
return TypeFoundSavedMessagesTopic
|
||||
}
|
||||
|
||||
func (foundSavedMessagesTopic *FoundSavedMessagesTopic) UnmarshalJSON(data []byte) error {
|
||||
func (savedMessagesTopic *SavedMessagesTopic) UnmarshalJSON(data []byte) error {
|
||||
var tmp struct {
|
||||
Topic json.RawMessage `json:"topic"`
|
||||
Id int64 `json:"id"`
|
||||
Type json.RawMessage `json:"type"`
|
||||
IsPinned bool `json:"is_pinned"`
|
||||
Order JsonInt64 `json:"order"`
|
||||
LastMessage *Message `json:"last_message"`
|
||||
DraftMessage *DraftMessage `json:"draft_message"`
|
||||
}
|
||||
|
||||
err := json.Unmarshal(data, &tmp)
|
||||
|
|
@ -13216,41 +13243,18 @@ func (foundSavedMessagesTopic *FoundSavedMessagesTopic) UnmarshalJSON(data []byt
|
|||
return err
|
||||
}
|
||||
|
||||
foundSavedMessagesTopic.LastMessage = tmp.LastMessage
|
||||
savedMessagesTopic.Id = tmp.Id
|
||||
savedMessagesTopic.IsPinned = tmp.IsPinned
|
||||
savedMessagesTopic.Order = tmp.Order
|
||||
savedMessagesTopic.LastMessage = tmp.LastMessage
|
||||
savedMessagesTopic.DraftMessage = tmp.DraftMessage
|
||||
|
||||
fieldTopic, _ := UnmarshalSavedMessagesTopic(tmp.Topic)
|
||||
foundSavedMessagesTopic.Topic = fieldTopic
|
||||
fieldType, _ := UnmarshalSavedMessagesTopicType(tmp.Type)
|
||||
savedMessagesTopic.Type = fieldType
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// Contains a list of Saved Messages topics
|
||||
type FoundSavedMessagesTopics struct {
|
||||
meta
|
||||
// Total number of Saved Messages topics found
|
||||
TotalCount int32 `json:"total_count"`
|
||||
// List of Saved Messages topics
|
||||
Topics []*FoundSavedMessagesTopic `json:"topics"`
|
||||
// The offset for the next request. If empty, then there are no more results
|
||||
NextOffset string `json:"next_offset"`
|
||||
}
|
||||
|
||||
func (entity *FoundSavedMessagesTopics) MarshalJSON() ([]byte, error) {
|
||||
entity.meta.Type = entity.GetType()
|
||||
|
||||
type stub FoundSavedMessagesTopics
|
||||
|
||||
return json.Marshal((*stub)(entity))
|
||||
}
|
||||
|
||||
func (*FoundSavedMessagesTopics) GetClass() string {
|
||||
return ClassFoundSavedMessagesTopics
|
||||
}
|
||||
|
||||
func (*FoundSavedMessagesTopics) GetType() string {
|
||||
return TypeFoundSavedMessagesTopics
|
||||
}
|
||||
|
||||
// Describes a forum topic icon
|
||||
type ForumTopicIcon struct {
|
||||
meta
|
||||
|
|
@ -16840,9 +16844,9 @@ func (*MessageExtendedMediaUnsupported) MessageExtendedMediaType() string {
|
|||
// Describes parameters of a Telegram Premium giveaway
|
||||
type PremiumGiveawayParameters struct {
|
||||
meta
|
||||
// Identifier of the channel chat, which will be automatically boosted by the winners of the giveaway for duration of the Premium subscription
|
||||
// Identifier of the supergroup or channel chat, which will be automatically boosted by the winners of the giveaway for duration of the Premium subscription. If the chat is a channel, then can_post_messages right is required in the channel, otherwise, the user must be an administrator in the supergroup
|
||||
BoostedChatId int64 `json:"boosted_chat_id"`
|
||||
// Identifiers of other channel chats that must be subscribed by the users to be eligible for the giveaway. There can be up to getOption("giveaway_additional_chat_count_max") additional chats
|
||||
// Identifiers of other supergroup or channel chats that must be subscribed by the users to be eligible for the giveaway. There can be up to getOption("giveaway_additional_chat_count_max") additional chats
|
||||
AdditionalChatIds []int64 `json:"additional_chat_ids"`
|
||||
// Point in time (Unix timestamp) when the giveaway is expected to be performed; must be 60-getOption("giveaway_duration_max") seconds in the future in scheduled giveaways
|
||||
WinnersSelectionDate int32 `json:"winners_selection_date"`
|
||||
|
|
@ -20343,6 +20347,33 @@ func (*MessageChatSetMessageAutoDeleteTime) MessageContentType() string {
|
|||
return TypeMessageChatSetMessageAutoDeleteTime
|
||||
}
|
||||
|
||||
// The chat was boosted by the sender of the message
|
||||
type MessageChatBoost struct {
|
||||
meta
|
||||
// Number of times the chat was boosted
|
||||
BoostCount int32 `json:"boost_count"`
|
||||
}
|
||||
|
||||
func (entity *MessageChatBoost) MarshalJSON() ([]byte, error) {
|
||||
entity.meta.Type = entity.GetType()
|
||||
|
||||
type stub MessageChatBoost
|
||||
|
||||
return json.Marshal((*stub)(entity))
|
||||
}
|
||||
|
||||
func (*MessageChatBoost) GetClass() string {
|
||||
return ClassMessageContent
|
||||
}
|
||||
|
||||
func (*MessageChatBoost) GetType() string {
|
||||
return TypeMessageChatBoost
|
||||
}
|
||||
|
||||
func (*MessageChatBoost) MessageContentType() string {
|
||||
return TypeMessageChatBoost
|
||||
}
|
||||
|
||||
// A forum topic has been created
|
||||
type MessageForumTopicCreated struct {
|
||||
meta
|
||||
|
|
@ -21995,7 +22026,7 @@ type InputMessageText struct {
|
|||
meta
|
||||
// Formatted text to be sent; 0-getOption("message_text_length_max") characters. Only Bold, Italic, Underline, Strikethrough, Spoiler, CustomEmoji, BlockQuote, Code, Pre, PreCode, TextUrl and MentionName entities are allowed to be specified manually
|
||||
Text *FormattedText `json:"text"`
|
||||
// Options to be used for generation of a link preview; pass null to use default link preview options
|
||||
// Options to be used for generation of a link preview; may be null if none; pass null to use default link preview options
|
||||
LinkPreviewOptions *LinkPreviewOptions `json:"link_preview_options"`
|
||||
// True, if a chat message draft must be deleted
|
||||
ClearDraft bool `json:"clear_draft"`
|
||||
|
|
@ -22434,13 +22465,13 @@ type InputMessageVideoNote struct {
|
|||
meta
|
||||
// Video note to be sent
|
||||
VideoNote InputFile `json:"video_note"`
|
||||
// Video thumbnail; pass null to skip thumbnail uploading
|
||||
// Video thumbnail; may be null if empty; pass null to skip thumbnail uploading
|
||||
Thumbnail *InputThumbnail `json:"thumbnail"`
|
||||
// Duration of the video, in seconds
|
||||
Duration int32 `json:"duration"`
|
||||
// Video width and height; must be positive and not greater than 640
|
||||
Length int32 `json:"length"`
|
||||
// Video note self-destruct type; pass null if none; private chats only
|
||||
// Video note self-destruct type; may be null if none; pass null if none; private chats only
|
||||
SelfDestructType MessageSelfDestructType `json:"self_destruct_type"`
|
||||
}
|
||||
|
||||
|
|
@ -22500,9 +22531,9 @@ type InputMessageVoiceNote struct {
|
|||
Duration int32 `json:"duration"`
|
||||
// Waveform representation of the voice note in 5-bit format
|
||||
Waveform []byte `json:"waveform"`
|
||||
// Voice note caption; pass null to use an empty caption; 0-getOption("message_caption_length_max") characters
|
||||
// Voice note caption; may be null if empty; pass null to use an empty caption; 0-getOption("message_caption_length_max") characters
|
||||
Caption *FormattedText `json:"caption"`
|
||||
// Voice note self-destruct type; pass null if none; private chats only
|
||||
// Voice note self-destruct type; may be null if none; pass null if none; private chats only
|
||||
SelfDestructType MessageSelfDestructType `json:"self_destruct_type"`
|
||||
}
|
||||
|
||||
|
|
@ -25212,6 +25243,8 @@ type Story struct {
|
|||
Id int32 `json:"id"`
|
||||
// Identifier of the chat that posted the story
|
||||
SenderChatId int64 `json:"sender_chat_id"`
|
||||
// Identifier of the sender of the story; may be null if the story is posted on behalf of the sender_chat_id
|
||||
SenderId MessageSender `json:"sender_id"`
|
||||
// Point in time (Unix timestamp) when the story was published
|
||||
Date int32 `json:"date"`
|
||||
// True, if the story is being sent by the current user
|
||||
|
|
@ -25276,6 +25309,7 @@ func (story *Story) UnmarshalJSON(data []byte) error {
|
|||
var tmp struct {
|
||||
Id int32 `json:"id"`
|
||||
SenderChatId int64 `json:"sender_chat_id"`
|
||||
SenderId json.RawMessage `json:"sender_id"`
|
||||
Date int32 `json:"date"`
|
||||
IsBeingSent bool `json:"is_being_sent"`
|
||||
IsBeingEdited bool `json:"is_being_edited"`
|
||||
|
|
@ -25325,6 +25359,9 @@ func (story *Story) UnmarshalJSON(data []byte) error {
|
|||
story.Areas = tmp.Areas
|
||||
story.Caption = tmp.Caption
|
||||
|
||||
fieldSenderId, _ := UnmarshalMessageSender(tmp.SenderId)
|
||||
story.SenderId = fieldSenderId
|
||||
|
||||
fieldChosenReactionType, _ := UnmarshalReactionType(tmp.ChosenReactionType)
|
||||
story.ChosenReactionType = fieldChosenReactionType
|
||||
|
||||
|
|
@ -25781,6 +25818,10 @@ type ChatBoostLevelFeatures struct {
|
|||
ChatThemeBackgroundCount int32 `json:"chat_theme_background_count"`
|
||||
// True, if custom background can be set in the chat for all users
|
||||
CanSetCustomBackground bool `json:"can_set_custom_background"`
|
||||
// True, if custom emoji sticker set can be set for the chat
|
||||
CanSetCustomEmojiStickerSet bool `json:"can_set_custom_emoji_sticker_set"`
|
||||
// True, if speech recognition can be used for video note and voice note messages by all users
|
||||
CanRecognizeSpeech bool `json:"can_recognize_speech"`
|
||||
}
|
||||
|
||||
func (entity *ChatBoostLevelFeatures) MarshalJSON() ([]byte, error) {
|
||||
|
|
@ -25806,7 +25847,7 @@ type ChatBoostFeatures struct {
|
|||
Features []*ChatBoostLevelFeatures `json:"features"`
|
||||
// The minimum boost level required to set custom emoji for profile background
|
||||
MinProfileBackgroundCustomEmojiBoostLevel int32 `json:"min_profile_background_custom_emoji_boost_level"`
|
||||
// The minimum boost level required to set custom emoji for reply header and link preview background
|
||||
// The minimum boost level required to set custom emoji for reply header and link preview background; for channel chats only
|
||||
MinBackgroundCustomEmojiBoostLevel int32 `json:"min_background_custom_emoji_boost_level"`
|
||||
// The minimum boost level required to set emoji status
|
||||
MinEmojiStatusBoostLevel int32 `json:"min_emoji_status_boost_level"`
|
||||
|
|
@ -25814,6 +25855,10 @@ type ChatBoostFeatures struct {
|
|||
MinChatThemeBackgroundBoostLevel int32 `json:"min_chat_theme_background_boost_level"`
|
||||
// The minimum boost level required to set custom chat background
|
||||
MinCustomBackgroundBoostLevel int32 `json:"min_custom_background_boost_level"`
|
||||
// The minimum boost level required to set custom emoji sticker set for the chat; for supergroup chats only
|
||||
MinCustomEmojiStickerSetBoostLevel int32 `json:"min_custom_emoji_sticker_set_boost_level"`
|
||||
// The minimum boost level allowing to recognize speech in video note and voice note messages for non-Premium users; for supergroup chats only
|
||||
MinSpeechRecognitionBoostLevel int32 `json:"min_speech_recognition_boost_level"`
|
||||
}
|
||||
|
||||
func (entity *ChatBoostFeatures) MarshalJSON() ([]byte, error) {
|
||||
|
|
@ -27595,7 +27640,7 @@ type AvailableReactions struct {
|
|||
PopularReactions []*AvailableReaction `json:"popular_reactions"`
|
||||
// True, if any custom emoji reaction can be added by Telegram Premium subscribers
|
||||
AllowCustomEmoji bool `json:"allow_custom_emoji"`
|
||||
// True, if the reactions will be tags and the message can be found by them; currently, always false
|
||||
// True, if the reactions will be tags and the message can be found by them
|
||||
AreTags bool `json:"are_tags"`
|
||||
// The reason why the current user can't add reactions to the message, despite some other users can; may be null if none
|
||||
UnavailabilityReason ReactionUnavailabilityReason `json:"unavailability_reason"`
|
||||
|
|
@ -30539,6 +30584,35 @@ func (*ChatEventStickerSetChanged) ChatEventActionType() string {
|
|||
return TypeChatEventStickerSetChanged
|
||||
}
|
||||
|
||||
// The supergroup sticker set with allowed custom emoji was changed
|
||||
type ChatEventCustomEmojiStickerSetChanged struct {
|
||||
meta
|
||||
// Previous identifier of the chat sticker set; 0 if none
|
||||
OldStickerSetId JsonInt64 `json:"old_sticker_set_id"`
|
||||
// New identifier of the chat sticker set; 0 if none
|
||||
NewStickerSetId JsonInt64 `json:"new_sticker_set_id"`
|
||||
}
|
||||
|
||||
func (entity *ChatEventCustomEmojiStickerSetChanged) MarshalJSON() ([]byte, error) {
|
||||
entity.meta.Type = entity.GetType()
|
||||
|
||||
type stub ChatEventCustomEmojiStickerSetChanged
|
||||
|
||||
return json.Marshal((*stub)(entity))
|
||||
}
|
||||
|
||||
func (*ChatEventCustomEmojiStickerSetChanged) GetClass() string {
|
||||
return ClassChatEventAction
|
||||
}
|
||||
|
||||
func (*ChatEventCustomEmojiStickerSetChanged) GetType() string {
|
||||
return TypeChatEventCustomEmojiStickerSetChanged
|
||||
}
|
||||
|
||||
func (*ChatEventCustomEmojiStickerSetChanged) ChatEventActionType() string {
|
||||
return TypeChatEventCustomEmojiStickerSetChanged
|
||||
}
|
||||
|
||||
// The chat title was changed
|
||||
type ChatEventTitleChanged struct {
|
||||
meta
|
||||
|
|
@ -32580,7 +32654,82 @@ func (*PremiumFeatureBackgroundForBoth) PremiumFeatureType() string {
|
|||
return TypePremiumFeatureBackgroundForBoth
|
||||
}
|
||||
|
||||
// User stories are displayed before stories of non-premium contacts and channels
|
||||
// The ability to use tags in Saved Messages
|
||||
type PremiumFeatureSavedMessagesTags struct{
|
||||
meta
|
||||
}
|
||||
|
||||
func (entity *PremiumFeatureSavedMessagesTags) MarshalJSON() ([]byte, error) {
|
||||
entity.meta.Type = entity.GetType()
|
||||
|
||||
type stub PremiumFeatureSavedMessagesTags
|
||||
|
||||
return json.Marshal((*stub)(entity))
|
||||
}
|
||||
|
||||
func (*PremiumFeatureSavedMessagesTags) GetClass() string {
|
||||
return ClassPremiumFeature
|
||||
}
|
||||
|
||||
func (*PremiumFeatureSavedMessagesTags) GetType() string {
|
||||
return TypePremiumFeatureSavedMessagesTags
|
||||
}
|
||||
|
||||
func (*PremiumFeatureSavedMessagesTags) PremiumFeatureType() string {
|
||||
return TypePremiumFeatureSavedMessagesTags
|
||||
}
|
||||
|
||||
// The ability to disallow incoming voice and video note messages in private chats using setUserPrivacySettingRules with userPrivacySettingAllowPrivateVoiceAndVideoNoteMessages and to restrict incoming messages from non-contacts using setNewChatPrivacySettings
|
||||
type PremiumFeatureMessagePrivacy struct{
|
||||
meta
|
||||
}
|
||||
|
||||
func (entity *PremiumFeatureMessagePrivacy) MarshalJSON() ([]byte, error) {
|
||||
entity.meta.Type = entity.GetType()
|
||||
|
||||
type stub PremiumFeatureMessagePrivacy
|
||||
|
||||
return json.Marshal((*stub)(entity))
|
||||
}
|
||||
|
||||
func (*PremiumFeatureMessagePrivacy) GetClass() string {
|
||||
return ClassPremiumFeature
|
||||
}
|
||||
|
||||
func (*PremiumFeatureMessagePrivacy) GetType() string {
|
||||
return TypePremiumFeatureMessagePrivacy
|
||||
}
|
||||
|
||||
func (*PremiumFeatureMessagePrivacy) PremiumFeatureType() string {
|
||||
return TypePremiumFeatureMessagePrivacy
|
||||
}
|
||||
|
||||
// The ability to view last seen and read times of other users even they can't view last seen or read time for the current user
|
||||
type PremiumFeatureLastSeenTimes struct{
|
||||
meta
|
||||
}
|
||||
|
||||
func (entity *PremiumFeatureLastSeenTimes) MarshalJSON() ([]byte, error) {
|
||||
entity.meta.Type = entity.GetType()
|
||||
|
||||
type stub PremiumFeatureLastSeenTimes
|
||||
|
||||
return json.Marshal((*stub)(entity))
|
||||
}
|
||||
|
||||
func (*PremiumFeatureLastSeenTimes) GetClass() string {
|
||||
return ClassPremiumFeature
|
||||
}
|
||||
|
||||
func (*PremiumFeatureLastSeenTimes) GetType() string {
|
||||
return TypePremiumFeatureLastSeenTimes
|
||||
}
|
||||
|
||||
func (*PremiumFeatureLastSeenTimes) PremiumFeatureType() string {
|
||||
return TypePremiumFeatureLastSeenTimes
|
||||
}
|
||||
|
||||
// Stories of the current user are displayed before stories of non-Premium contacts, supergroups, and channels
|
||||
type PremiumStoryFeaturePriorityOrder struct{
|
||||
meta
|
||||
}
|
||||
|
|
@ -32730,6 +32879,31 @@ func (*PremiumStoryFeatureLinksAndFormatting) PremiumStoryFeatureType() string {
|
|||
return TypePremiumStoryFeatureLinksAndFormatting
|
||||
}
|
||||
|
||||
// The ability to choose better quality for viewed stories
|
||||
type PremiumStoryFeatureVideoQuality struct{
|
||||
meta
|
||||
}
|
||||
|
||||
func (entity *PremiumStoryFeatureVideoQuality) MarshalJSON() ([]byte, error) {
|
||||
entity.meta.Type = entity.GetType()
|
||||
|
||||
type stub PremiumStoryFeatureVideoQuality
|
||||
|
||||
return json.Marshal((*stub)(entity))
|
||||
}
|
||||
|
||||
func (*PremiumStoryFeatureVideoQuality) GetClass() string {
|
||||
return ClassPremiumStoryFeature
|
||||
}
|
||||
|
||||
func (*PremiumStoryFeatureVideoQuality) GetType() string {
|
||||
return TypePremiumStoryFeatureVideoQuality
|
||||
}
|
||||
|
||||
func (*PremiumStoryFeatureVideoQuality) PremiumStoryFeatureType() string {
|
||||
return TypePremiumStoryFeatureVideoQuality
|
||||
}
|
||||
|
||||
// Contains information about a limit, increased for Premium users
|
||||
type PremiumLimit struct {
|
||||
meta
|
||||
|
|
@ -33143,7 +33317,7 @@ func (*StorePaymentPurposeGiftedPremium) StorePaymentPurposeType() string {
|
|||
// The user creating Telegram Premium gift codes for other users
|
||||
type StorePaymentPurposePremiumGiftCodes struct {
|
||||
meta
|
||||
// Identifier of the channel chat, which will be automatically boosted by the users for duration of the Premium subscription and which is administered by the user; 0 if none
|
||||
// Identifier of the supergroup or channel chat, which will be automatically boosted by the users for duration of the Premium subscription and which is administered by the user; 0 if none
|
||||
BoostedChatId int64 `json:"boosted_chat_id"`
|
||||
// ISO 4217 currency code of the payment currency
|
||||
Currency string `json:"currency"`
|
||||
|
|
@ -33173,7 +33347,7 @@ func (*StorePaymentPurposePremiumGiftCodes) StorePaymentPurposeType() string {
|
|||
return TypeStorePaymentPurposePremiumGiftCodes
|
||||
}
|
||||
|
||||
// The user creating a Telegram Premium giveaway for subscribers of channel chats; requires can_post_messages rights in the channels
|
||||
// The user creating a Telegram Premium giveaway
|
||||
type StorePaymentPurposePremiumGiveaway struct {
|
||||
meta
|
||||
// Giveaway parameters
|
||||
|
|
@ -33207,7 +33381,7 @@ func (*StorePaymentPurposePremiumGiveaway) StorePaymentPurposeType() string {
|
|||
// The user creating Telegram Premium gift codes for other users
|
||||
type TelegramPaymentPurposePremiumGiftCodes struct {
|
||||
meta
|
||||
// Identifier of the channel chat, which will be automatically boosted by the users for duration of the Premium subscription and which is administered by the user; 0 if none
|
||||
// Identifier of the supergroup or channel chat, which will be automatically boosted by the users for duration of the Premium subscription and which is administered by the user; 0 if none
|
||||
BoostedChatId int64 `json:"boosted_chat_id"`
|
||||
// ISO 4217 currency code of the payment currency
|
||||
Currency string `json:"currency"`
|
||||
|
|
@ -33239,7 +33413,7 @@ func (*TelegramPaymentPurposePremiumGiftCodes) TelegramPaymentPurposeType() stri
|
|||
return TypeTelegramPaymentPurposePremiumGiftCodes
|
||||
}
|
||||
|
||||
// The user creating a Telegram Premium giveaway for subscribers of channel chats; requires can_post_messages rights in the channels
|
||||
// The user creating a Telegram Premium giveaway
|
||||
type TelegramPaymentPurposePremiumGiveaway struct {
|
||||
meta
|
||||
// Giveaway parameters
|
||||
|
|
@ -34128,7 +34302,7 @@ func (*CanSendStoryResultPremiumNeeded) CanSendStoryResultType() string {
|
|||
return TypeCanSendStoryResultPremiumNeeded
|
||||
}
|
||||
|
||||
// The channel chat must be boosted first by Telegram Premium subscribers to post more stories. Call getChatBoostStatus to get current boost status of the chat
|
||||
// The chat must be boosted first by Telegram Premium subscribers to post more stories. Call getChatBoostStatus to get current boost status of the chat
|
||||
type CanSendStoryResultBoostNeeded struct{
|
||||
meta
|
||||
}
|
||||
|
|
@ -37000,7 +37174,7 @@ func (*UserPrivacySettingAllowFindingByPhoneNumber) UserPrivacySettingType() str
|
|||
return TypeUserPrivacySettingAllowFindingByPhoneNumber
|
||||
}
|
||||
|
||||
// A privacy setting for managing whether the user can receive voice and video messages in private chats
|
||||
// A privacy setting for managing whether the user can receive voice and video messages in private chats; for Telegram Premium users only
|
||||
type UserPrivacySettingAllowPrivateVoiceAndVideoNoteMessages struct{
|
||||
meta
|
||||
}
|
||||
|
|
@ -43700,7 +43874,7 @@ type UpdateChatDraftMessage struct {
|
|||
meta
|
||||
// Chat identifier
|
||||
ChatId int64 `json:"chat_id"`
|
||||
// The new draft message; may be null
|
||||
// The new draft message; may be null if none
|
||||
DraftMessage *DraftMessage `json:"draft_message"`
|
||||
// The new chat positions in the chat lists
|
||||
Positions []*ChatPosition `json:"positions"`
|
||||
|
|
@ -44344,29 +44518,58 @@ func (*UpdateChatOnlineMemberCount) UpdateType() string {
|
|||
return TypeUpdateChatOnlineMemberCount
|
||||
}
|
||||
|
||||
// The list of pinned Saved Messages topics has changed. The app can call getPinnedSavedMessagesTopics to get the new list
|
||||
type UpdatePinnedSavedMessagesTopics struct{
|
||||
// Basic information about a Saved Messages topic has changed. This update is guaranteed to come before the topic identifier is returned to the application
|
||||
type UpdateSavedMessagesTopic struct {
|
||||
meta
|
||||
// New data about the topic
|
||||
Topic *SavedMessagesTopic `json:"topic"`
|
||||
}
|
||||
|
||||
func (entity *UpdatePinnedSavedMessagesTopics) MarshalJSON() ([]byte, error) {
|
||||
func (entity *UpdateSavedMessagesTopic) MarshalJSON() ([]byte, error) {
|
||||
entity.meta.Type = entity.GetType()
|
||||
|
||||
type stub UpdatePinnedSavedMessagesTopics
|
||||
type stub UpdateSavedMessagesTopic
|
||||
|
||||
return json.Marshal((*stub)(entity))
|
||||
}
|
||||
|
||||
func (*UpdatePinnedSavedMessagesTopics) GetClass() string {
|
||||
func (*UpdateSavedMessagesTopic) GetClass() string {
|
||||
return ClassUpdate
|
||||
}
|
||||
|
||||
func (*UpdatePinnedSavedMessagesTopics) GetType() string {
|
||||
return TypeUpdatePinnedSavedMessagesTopics
|
||||
func (*UpdateSavedMessagesTopic) GetType() string {
|
||||
return TypeUpdateSavedMessagesTopic
|
||||
}
|
||||
|
||||
func (*UpdatePinnedSavedMessagesTopics) UpdateType() string {
|
||||
return TypeUpdatePinnedSavedMessagesTopics
|
||||
func (*UpdateSavedMessagesTopic) UpdateType() string {
|
||||
return TypeUpdateSavedMessagesTopic
|
||||
}
|
||||
|
||||
// Number of Saved Messages topics has changed
|
||||
type UpdateSavedMessagesTopicCount struct {
|
||||
meta
|
||||
// Approximate total number of Saved Messages topics
|
||||
TopicCount int32 `json:"topic_count"`
|
||||
}
|
||||
|
||||
func (entity *UpdateSavedMessagesTopicCount) MarshalJSON() ([]byte, error) {
|
||||
entity.meta.Type = entity.GetType()
|
||||
|
||||
type stub UpdateSavedMessagesTopicCount
|
||||
|
||||
return json.Marshal((*stub)(entity))
|
||||
}
|
||||
|
||||
func (*UpdateSavedMessagesTopicCount) GetClass() string {
|
||||
return ClassUpdate
|
||||
}
|
||||
|
||||
func (*UpdateSavedMessagesTopicCount) GetType() string {
|
||||
return TypeUpdateSavedMessagesTopicCount
|
||||
}
|
||||
|
||||
func (*UpdateSavedMessagesTopicCount) UpdateType() string {
|
||||
return TypeUpdateSavedMessagesTopicCount
|
||||
}
|
||||
|
||||
// Basic information about a topic in a forum chat was changed
|
||||
|
|
@ -44641,7 +44844,7 @@ type UpdateChatAction struct {
|
|||
meta
|
||||
// Chat identifier
|
||||
ChatId int64 `json:"chat_id"`
|
||||
// If not 0, a message thread identifier in which the action was performed
|
||||
// If not 0, the message thread identifier in which the action was performed
|
||||
MessageThreadId int64 `json:"message_thread_id"`
|
||||
// Identifier of a message sender performing the action
|
||||
SenderId MessageSender `json:"sender_id"`
|
||||
|
|
@ -46387,10 +46590,12 @@ func (updateDefaultReactionType *UpdateDefaultReactionType) UnmarshalJSON(data [
|
|||
return nil
|
||||
}
|
||||
|
||||
// Used Saved Messages tags have changed
|
||||
// Tags used in Saved Messages or a Saved Messages topic have changed
|
||||
type UpdateSavedMessagesTags struct {
|
||||
meta
|
||||
// The new used tags
|
||||
// Identifier of Saved Messages topic which tags were changed; 0 if tags for the whole chat has changed
|
||||
SavedMessagesTopicId int64 `json:"saved_messages_topic_id"`
|
||||
// The new tags
|
||||
Tags *SavedMessagesTags `json:"tags"`
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1677,7 +1677,7 @@ func UnmarshalListOfLoginUrlInfo(dataList []json.RawMessage) ([]LoginUrlInfo, er
|
|||
return list, nil
|
||||
}
|
||||
|
||||
func UnmarshalSavedMessagesTopic(data json.RawMessage) (SavedMessagesTopic, error) {
|
||||
func UnmarshalSavedMessagesTopicType(data json.RawMessage) (SavedMessagesTopicType, error) {
|
||||
var meta meta
|
||||
|
||||
err := json.Unmarshal(data, &meta)
|
||||
|
|
@ -1686,25 +1686,25 @@ func UnmarshalSavedMessagesTopic(data json.RawMessage) (SavedMessagesTopic, erro
|
|||
}
|
||||
|
||||
switch meta.Type {
|
||||
case TypeSavedMessagesTopicMyNotes:
|
||||
return UnmarshalSavedMessagesTopicMyNotes(data)
|
||||
case TypeSavedMessagesTopicTypeMyNotes:
|
||||
return UnmarshalSavedMessagesTopicTypeMyNotes(data)
|
||||
|
||||
case TypeSavedMessagesTopicAuthorHidden:
|
||||
return UnmarshalSavedMessagesTopicAuthorHidden(data)
|
||||
case TypeSavedMessagesTopicTypeAuthorHidden:
|
||||
return UnmarshalSavedMessagesTopicTypeAuthorHidden(data)
|
||||
|
||||
case TypeSavedMessagesTopicSavedFromChat:
|
||||
return UnmarshalSavedMessagesTopicSavedFromChat(data)
|
||||
case TypeSavedMessagesTopicTypeSavedFromChat:
|
||||
return UnmarshalSavedMessagesTopicTypeSavedFromChat(data)
|
||||
|
||||
default:
|
||||
return nil, fmt.Errorf("Error unmarshaling. Unknown type: " + meta.Type)
|
||||
}
|
||||
}
|
||||
|
||||
func UnmarshalListOfSavedMessagesTopic(dataList []json.RawMessage) ([]SavedMessagesTopic, error) {
|
||||
list := []SavedMessagesTopic{}
|
||||
func UnmarshalListOfSavedMessagesTopicType(dataList []json.RawMessage) ([]SavedMessagesTopicType, error) {
|
||||
list := []SavedMessagesTopicType{}
|
||||
|
||||
for _, data := range dataList {
|
||||
entity, err := UnmarshalSavedMessagesTopic(data)
|
||||
entity, err := UnmarshalSavedMessagesTopicType(data)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
|
@ -2585,6 +2585,9 @@ func UnmarshalMessageContent(data json.RawMessage) (MessageContent, error) {
|
|||
case TypeMessageChatSetMessageAutoDeleteTime:
|
||||
return UnmarshalMessageChatSetMessageAutoDeleteTime(data)
|
||||
|
||||
case TypeMessageChatBoost:
|
||||
return UnmarshalMessageChatBoost(data)
|
||||
|
||||
case TypeMessageForumTopicCreated:
|
||||
return UnmarshalMessageForumTopicCreated(data)
|
||||
|
||||
|
|
@ -4156,6 +4159,9 @@ func UnmarshalChatEventAction(data json.RawMessage) (ChatEventAction, error) {
|
|||
case TypeChatEventStickerSetChanged:
|
||||
return UnmarshalChatEventStickerSetChanged(data)
|
||||
|
||||
case TypeChatEventCustomEmojiStickerSetChanged:
|
||||
return UnmarshalChatEventCustomEmojiStickerSetChanged(data)
|
||||
|
||||
case TypeChatEventTitleChanged:
|
||||
return UnmarshalChatEventTitleChanged(data)
|
||||
|
||||
|
|
@ -4438,6 +4444,15 @@ func UnmarshalPremiumFeature(data json.RawMessage) (PremiumFeature, error) {
|
|||
case TypePremiumFeatureBackgroundForBoth:
|
||||
return UnmarshalPremiumFeatureBackgroundForBoth(data)
|
||||
|
||||
case TypePremiumFeatureSavedMessagesTags:
|
||||
return UnmarshalPremiumFeatureSavedMessagesTags(data)
|
||||
|
||||
case TypePremiumFeatureMessagePrivacy:
|
||||
return UnmarshalPremiumFeatureMessagePrivacy(data)
|
||||
|
||||
case TypePremiumFeatureLastSeenTimes:
|
||||
return UnmarshalPremiumFeatureLastSeenTimes(data)
|
||||
|
||||
default:
|
||||
return nil, fmt.Errorf("Error unmarshaling. Unknown type: " + meta.Type)
|
||||
}
|
||||
|
|
@ -4484,6 +4499,9 @@ func UnmarshalPremiumStoryFeature(data json.RawMessage) (PremiumStoryFeature, er
|
|||
case TypePremiumStoryFeatureLinksAndFormatting:
|
||||
return UnmarshalPremiumStoryFeatureLinksAndFormatting(data)
|
||||
|
||||
case TypePremiumStoryFeatureVideoQuality:
|
||||
return UnmarshalPremiumStoryFeatureVideoQuality(data)
|
||||
|
||||
default:
|
||||
return nil, fmt.Errorf("Error unmarshaling. Unknown type: " + meta.Type)
|
||||
}
|
||||
|
|
@ -6684,8 +6702,11 @@ func UnmarshalUpdate(data json.RawMessage) (Update, error) {
|
|||
case TypeUpdateChatOnlineMemberCount:
|
||||
return UnmarshalUpdateChatOnlineMemberCount(data)
|
||||
|
||||
case TypeUpdatePinnedSavedMessagesTopics:
|
||||
return UnmarshalUpdatePinnedSavedMessagesTopics(data)
|
||||
case TypeUpdateSavedMessagesTopic:
|
||||
return UnmarshalUpdateSavedMessagesTopic(data)
|
||||
|
||||
case TypeUpdateSavedMessagesTopicCount:
|
||||
return UnmarshalUpdateSavedMessagesTopicCount(data)
|
||||
|
||||
case TypeUpdateForumTopicInfo:
|
||||
return UnmarshalUpdateForumTopicInfo(data)
|
||||
|
|
@ -9493,40 +9514,32 @@ func UnmarshalMessageThreadInfo(data json.RawMessage) (*MessageThreadInfo, error
|
|||
return &resp, err
|
||||
}
|
||||
|
||||
func UnmarshalSavedMessagesTopicMyNotes(data json.RawMessage) (*SavedMessagesTopicMyNotes, error) {
|
||||
var resp SavedMessagesTopicMyNotes
|
||||
func UnmarshalSavedMessagesTopicTypeMyNotes(data json.RawMessage) (*SavedMessagesTopicTypeMyNotes, error) {
|
||||
var resp SavedMessagesTopicTypeMyNotes
|
||||
|
||||
err := json.Unmarshal(data, &resp)
|
||||
|
||||
return &resp, err
|
||||
}
|
||||
|
||||
func UnmarshalSavedMessagesTopicAuthorHidden(data json.RawMessage) (*SavedMessagesTopicAuthorHidden, error) {
|
||||
var resp SavedMessagesTopicAuthorHidden
|
||||
func UnmarshalSavedMessagesTopicTypeAuthorHidden(data json.RawMessage) (*SavedMessagesTopicTypeAuthorHidden, error) {
|
||||
var resp SavedMessagesTopicTypeAuthorHidden
|
||||
|
||||
err := json.Unmarshal(data, &resp)
|
||||
|
||||
return &resp, err
|
||||
}
|
||||
|
||||
func UnmarshalSavedMessagesTopicSavedFromChat(data json.RawMessage) (*SavedMessagesTopicSavedFromChat, error) {
|
||||
var resp SavedMessagesTopicSavedFromChat
|
||||
func UnmarshalSavedMessagesTopicTypeSavedFromChat(data json.RawMessage) (*SavedMessagesTopicTypeSavedFromChat, error) {
|
||||
var resp SavedMessagesTopicTypeSavedFromChat
|
||||
|
||||
err := json.Unmarshal(data, &resp)
|
||||
|
||||
return &resp, err
|
||||
}
|
||||
|
||||
func UnmarshalFoundSavedMessagesTopic(data json.RawMessage) (*FoundSavedMessagesTopic, error) {
|
||||
var resp FoundSavedMessagesTopic
|
||||
|
||||
err := json.Unmarshal(data, &resp)
|
||||
|
||||
return &resp, err
|
||||
}
|
||||
|
||||
func UnmarshalFoundSavedMessagesTopics(data json.RawMessage) (*FoundSavedMessagesTopics, error) {
|
||||
var resp FoundSavedMessagesTopics
|
||||
func UnmarshalSavedMessagesTopic(data json.RawMessage) (*SavedMessagesTopic, error) {
|
||||
var resp SavedMessagesTopic
|
||||
|
||||
err := json.Unmarshal(data, &resp)
|
||||
|
||||
|
|
@ -11221,6 +11234,14 @@ func UnmarshalMessageChatSetMessageAutoDeleteTime(data json.RawMessage) (*Messag
|
|||
return &resp, err
|
||||
}
|
||||
|
||||
func UnmarshalMessageChatBoost(data json.RawMessage) (*MessageChatBoost, error) {
|
||||
var resp MessageChatBoost
|
||||
|
||||
err := json.Unmarshal(data, &resp)
|
||||
|
||||
return &resp, err
|
||||
}
|
||||
|
||||
func UnmarshalMessageForumTopicCreated(data json.RawMessage) (*MessageForumTopicCreated, error) {
|
||||
var resp MessageForumTopicCreated
|
||||
|
||||
|
|
@ -13565,6 +13586,14 @@ func UnmarshalChatEventStickerSetChanged(data json.RawMessage) (*ChatEventSticke
|
|||
return &resp, err
|
||||
}
|
||||
|
||||
func UnmarshalChatEventCustomEmojiStickerSetChanged(data json.RawMessage) (*ChatEventCustomEmojiStickerSetChanged, error) {
|
||||
var resp ChatEventCustomEmojiStickerSetChanged
|
||||
|
||||
err := json.Unmarshal(data, &resp)
|
||||
|
||||
return &resp, err
|
||||
}
|
||||
|
||||
func UnmarshalChatEventTitleChanged(data json.RawMessage) (*ChatEventTitleChanged, error) {
|
||||
var resp ChatEventTitleChanged
|
||||
|
||||
|
|
@ -14149,6 +14178,30 @@ func UnmarshalPremiumFeatureBackgroundForBoth(data json.RawMessage) (*PremiumFea
|
|||
return &resp, err
|
||||
}
|
||||
|
||||
func UnmarshalPremiumFeatureSavedMessagesTags(data json.RawMessage) (*PremiumFeatureSavedMessagesTags, error) {
|
||||
var resp PremiumFeatureSavedMessagesTags
|
||||
|
||||
err := json.Unmarshal(data, &resp)
|
||||
|
||||
return &resp, err
|
||||
}
|
||||
|
||||
func UnmarshalPremiumFeatureMessagePrivacy(data json.RawMessage) (*PremiumFeatureMessagePrivacy, error) {
|
||||
var resp PremiumFeatureMessagePrivacy
|
||||
|
||||
err := json.Unmarshal(data, &resp)
|
||||
|
||||
return &resp, err
|
||||
}
|
||||
|
||||
func UnmarshalPremiumFeatureLastSeenTimes(data json.RawMessage) (*PremiumFeatureLastSeenTimes, error) {
|
||||
var resp PremiumFeatureLastSeenTimes
|
||||
|
||||
err := json.Unmarshal(data, &resp)
|
||||
|
||||
return &resp, err
|
||||
}
|
||||
|
||||
func UnmarshalPremiumStoryFeaturePriorityOrder(data json.RawMessage) (*PremiumStoryFeaturePriorityOrder, error) {
|
||||
var resp PremiumStoryFeaturePriorityOrder
|
||||
|
||||
|
|
@ -14197,6 +14250,14 @@ func UnmarshalPremiumStoryFeatureLinksAndFormatting(data json.RawMessage) (*Prem
|
|||
return &resp, err
|
||||
}
|
||||
|
||||
func UnmarshalPremiumStoryFeatureVideoQuality(data json.RawMessage) (*PremiumStoryFeatureVideoQuality, error) {
|
||||
var resp PremiumStoryFeatureVideoQuality
|
||||
|
||||
err := json.Unmarshal(data, &resp)
|
||||
|
||||
return &resp, err
|
||||
}
|
||||
|
||||
func UnmarshalPremiumLimit(data json.RawMessage) (*PremiumLimit, error) {
|
||||
var resp PremiumLimit
|
||||
|
||||
|
|
@ -17333,8 +17394,16 @@ func UnmarshalUpdateChatOnlineMemberCount(data json.RawMessage) (*UpdateChatOnli
|
|||
return &resp, err
|
||||
}
|
||||
|
||||
func UnmarshalUpdatePinnedSavedMessagesTopics(data json.RawMessage) (*UpdatePinnedSavedMessagesTopics, error) {
|
||||
var resp UpdatePinnedSavedMessagesTopics
|
||||
func UnmarshalUpdateSavedMessagesTopic(data json.RawMessage) (*UpdateSavedMessagesTopic, error) {
|
||||
var resp UpdateSavedMessagesTopic
|
||||
|
||||
err := json.Unmarshal(data, &resp)
|
||||
|
||||
return &resp, err
|
||||
}
|
||||
|
||||
func UnmarshalUpdateSavedMessagesTopicCount(data json.RawMessage) (*UpdateSavedMessagesTopicCount, error) {
|
||||
var resp UpdateSavedMessagesTopicCount
|
||||
|
||||
err := json.Unmarshal(data, &resp)
|
||||
|
||||
|
|
@ -19057,20 +19126,17 @@ func UnmarshalType(data json.RawMessage) (Type, error) {
|
|||
case TypeMessageThreadInfo:
|
||||
return UnmarshalMessageThreadInfo(data)
|
||||
|
||||
case TypeSavedMessagesTopicMyNotes:
|
||||
return UnmarshalSavedMessagesTopicMyNotes(data)
|
||||
case TypeSavedMessagesTopicTypeMyNotes:
|
||||
return UnmarshalSavedMessagesTopicTypeMyNotes(data)
|
||||
|
||||
case TypeSavedMessagesTopicAuthorHidden:
|
||||
return UnmarshalSavedMessagesTopicAuthorHidden(data)
|
||||
case TypeSavedMessagesTopicTypeAuthorHidden:
|
||||
return UnmarshalSavedMessagesTopicTypeAuthorHidden(data)
|
||||
|
||||
case TypeSavedMessagesTopicSavedFromChat:
|
||||
return UnmarshalSavedMessagesTopicSavedFromChat(data)
|
||||
case TypeSavedMessagesTopicTypeSavedFromChat:
|
||||
return UnmarshalSavedMessagesTopicTypeSavedFromChat(data)
|
||||
|
||||
case TypeFoundSavedMessagesTopic:
|
||||
return UnmarshalFoundSavedMessagesTopic(data)
|
||||
|
||||
case TypeFoundSavedMessagesTopics:
|
||||
return UnmarshalFoundSavedMessagesTopics(data)
|
||||
case TypeSavedMessagesTopic:
|
||||
return UnmarshalSavedMessagesTopic(data)
|
||||
|
||||
case TypeForumTopicIcon:
|
||||
return UnmarshalForumTopicIcon(data)
|
||||
|
|
@ -19705,6 +19771,9 @@ func UnmarshalType(data json.RawMessage) (Type, error) {
|
|||
case TypeMessageChatSetMessageAutoDeleteTime:
|
||||
return UnmarshalMessageChatSetMessageAutoDeleteTime(data)
|
||||
|
||||
case TypeMessageChatBoost:
|
||||
return UnmarshalMessageChatBoost(data)
|
||||
|
||||
case TypeMessageForumTopicCreated:
|
||||
return UnmarshalMessageForumTopicCreated(data)
|
||||
|
||||
|
|
@ -20584,6 +20653,9 @@ func UnmarshalType(data json.RawMessage) (Type, error) {
|
|||
case TypeChatEventStickerSetChanged:
|
||||
return UnmarshalChatEventStickerSetChanged(data)
|
||||
|
||||
case TypeChatEventCustomEmojiStickerSetChanged:
|
||||
return UnmarshalChatEventCustomEmojiStickerSetChanged(data)
|
||||
|
||||
case TypeChatEventTitleChanged:
|
||||
return UnmarshalChatEventTitleChanged(data)
|
||||
|
||||
|
|
@ -20803,6 +20875,15 @@ func UnmarshalType(data json.RawMessage) (Type, error) {
|
|||
case TypePremiumFeatureBackgroundForBoth:
|
||||
return UnmarshalPremiumFeatureBackgroundForBoth(data)
|
||||
|
||||
case TypePremiumFeatureSavedMessagesTags:
|
||||
return UnmarshalPremiumFeatureSavedMessagesTags(data)
|
||||
|
||||
case TypePremiumFeatureMessagePrivacy:
|
||||
return UnmarshalPremiumFeatureMessagePrivacy(data)
|
||||
|
||||
case TypePremiumFeatureLastSeenTimes:
|
||||
return UnmarshalPremiumFeatureLastSeenTimes(data)
|
||||
|
||||
case TypePremiumStoryFeaturePriorityOrder:
|
||||
return UnmarshalPremiumStoryFeaturePriorityOrder(data)
|
||||
|
||||
|
|
@ -20821,6 +20902,9 @@ func UnmarshalType(data json.RawMessage) (Type, error) {
|
|||
case TypePremiumStoryFeatureLinksAndFormatting:
|
||||
return UnmarshalPremiumStoryFeatureLinksAndFormatting(data)
|
||||
|
||||
case TypePremiumStoryFeatureVideoQuality:
|
||||
return UnmarshalPremiumStoryFeatureVideoQuality(data)
|
||||
|
||||
case TypePremiumLimit:
|
||||
return UnmarshalPremiumLimit(data)
|
||||
|
||||
|
|
@ -21997,8 +22081,11 @@ func UnmarshalType(data json.RawMessage) (Type, error) {
|
|||
case TypeUpdateChatOnlineMemberCount:
|
||||
return UnmarshalUpdateChatOnlineMemberCount(data)
|
||||
|
||||
case TypeUpdatePinnedSavedMessagesTopics:
|
||||
return UnmarshalUpdatePinnedSavedMessagesTopics(data)
|
||||
case TypeUpdateSavedMessagesTopic:
|
||||
return UnmarshalUpdateSavedMessagesTopic(data)
|
||||
|
||||
case TypeUpdateSavedMessagesTopicCount:
|
||||
return UnmarshalUpdateSavedMessagesTopicCount(data)
|
||||
|
||||
case TypeUpdateForumTopicInfo:
|
||||
return UnmarshalUpdateForumTopicInfo(data)
|
||||
|
|
|
|||
368
data/td_api.tl
368
data/td_api.tl
|
|
@ -653,7 +653,7 @@ inputChatPhotoSticker sticker:chatPhotoSticker = InputChatPhoto;
|
|||
chatPermissions can_send_basic_messages:Bool can_send_audios:Bool can_send_documents:Bool can_send_photos:Bool can_send_videos:Bool can_send_video_notes:Bool can_send_voice_notes:Bool can_send_polls:Bool can_send_stickers:Bool can_send_animations:Bool can_send_games:Bool can_use_inline_bots:Bool can_add_web_page_previews:Bool can_change_info:Bool can_invite_users:Bool can_pin_messages:Bool can_create_topics:Bool = ChatPermissions;
|
||||
|
||||
//@description Describes rights of the administrator
|
||||
//@can_manage_chat True, if the administrator can get chat event log, get chat boosts in channels, get channel members, report supergroup spam messages, see anonymous administrators in supergroups and ignore slow mode. Implied by any other privilege; applicable to supergroups and channels only
|
||||
//@can_manage_chat True, if the administrator can access the chat event log, get boost list, see hidden supergroup and channel members, report supergroup spam messages and ignore slow mode. Implied by any other privilege; applicable to supergroups and channels only
|
||||
//@can_change_info True, if the administrator can change the chat title, photo, and other settings
|
||||
//@can_post_messages True, if the administrator can create channel posts or view channel statistics; applicable to channels only
|
||||
//@can_edit_messages True, if the administrator can edit messages of other users and pin messages; applicable to channels only
|
||||
|
|
@ -664,9 +664,9 @@ chatPermissions can_send_basic_messages:Bool can_send_audios:Bool can_send_docum
|
|||
//@can_manage_topics True, if the administrator can create, rename, close, reopen, hide, and unhide forum topics; applicable to forum supergroups only
|
||||
//@can_promote_members True, if the administrator can add new administrators with a subset of their own privileges or demote administrators that were directly or indirectly promoted by them
|
||||
//@can_manage_video_chats True, if the administrator can manage video chats
|
||||
//@can_post_stories True, if the administrator can create new channel stories, or edit and delete posted stories; applicable to channels only
|
||||
//@can_edit_stories True, if the administrator can edit stories posted by other users, pin stories and access story archive; applicable to channels only
|
||||
//@can_delete_stories True, if the administrator can delete stories posted by other users; applicable to channels only
|
||||
//@can_post_stories True, if the administrator can create new chat stories, or edit and delete posted stories; applicable to supergroups and channels only
|
||||
//@can_edit_stories True, if the administrator can edit stories posted by other users, pin stories and access story archive; applicable to supergroups and channels only
|
||||
//@can_delete_stories True, if the administrator can delete stories posted by other users; applicable to supergroups and channels only
|
||||
//@is_anonymous True, if the administrator isn't shown in the chat member list and sends messages anonymously; applicable to supergroups only
|
||||
chatAdministratorRights can_manage_chat:Bool can_change_info:Bool can_post_messages:Bool can_edit_messages:Bool can_delete_messages:Bool can_invite_users:Bool can_restrict_members:Bool can_pin_messages:Bool can_manage_topics:Bool can_promote_members:Bool can_manage_video_chats:Bool can_post_stories:Bool can_edit_stories:Bool can_delete_stories:Bool is_anonymous:Bool = ChatAdministratorRights;
|
||||
|
||||
|
|
@ -752,8 +752,8 @@ premiumGiveawayInfoCompleted creation_date:int32 actual_winners_selection_date:i
|
|||
//@built_in_accent_color_id Identifier of a built-in color to use in places, where only one color is needed; 0-6
|
||||
//@light_theme_colors The list of 1-3 colors in RGB format, describing the accent color, as expected to be shown in light themes
|
||||
//@dark_theme_colors The list of 1-3 colors in RGB format, describing the accent color, as expected to be shown in dark themes
|
||||
//@min_chat_boost_level The minimum chat boost level required to use the color
|
||||
accentColor id:int32 built_in_accent_color_id:int32 light_theme_colors:vector<int32> dark_theme_colors:vector<int32> min_chat_boost_level:int32 = AccentColor;
|
||||
//@min_channel_chat_boost_level The minimum chat boost level required to use the color in a channel chat
|
||||
accentColor id:int32 built_in_accent_color_id:int32 light_theme_colors:vector<int32> dark_theme_colors:vector<int32> min_channel_chat_boost_level:int32 = AccentColor;
|
||||
|
||||
//@description Contains information about supported accent colors for user profile photo background in RGB format
|
||||
//@palette_colors The list of 1-2 colors in RGB format, describing the colors, as expected to be shown in the color palette settings
|
||||
|
|
@ -765,8 +765,9 @@ profileAccentColors palette_colors:vector<int32> background_colors:vector<int32>
|
|||
//@id Profile accent color identifier
|
||||
//@light_theme_colors Accent colors expected to be used in light themes
|
||||
//@dark_theme_colors Accent colors expected to be used in dark themes
|
||||
//@min_chat_boost_level The minimum chat boost level required to use the color
|
||||
profileAccentColor id:int32 light_theme_colors:profileAccentColors dark_theme_colors:profileAccentColors min_chat_boost_level:int32 = ProfileAccentColor;
|
||||
//@min_supergroup_chat_boost_level The minimum chat boost level required to use the color in a supergroup chat
|
||||
//@min_channel_chat_boost_level The minimum chat boost level required to use the color in a channel chat
|
||||
profileAccentColor id:int32 light_theme_colors:profileAccentColors dark_theme_colors:profileAccentColors min_supergroup_chat_boost_level:int32 min_channel_chat_boost_level:int32 = ProfileAccentColor;
|
||||
|
||||
//@description Describes a custom emoji to be shown instead of the Telegram Premium badge
|
||||
//@custom_emoji_id Identifier of the custom emoji in stickerFormatTgs format
|
||||
|
|
@ -1084,8 +1085,8 @@ basicGroupFullInfo photo:chatPhoto description:string creator_user_id:int53 memb
|
|||
//@restriction_reason If non-empty, contains a human-readable description of the reason why access to this supergroup or channel must be restricted
|
||||
//@is_scam True, if many users reported this supergroup or channel as a scam
|
||||
//@is_fake True, if many users reported this supergroup or channel as a fake account
|
||||
//@has_active_stories True, if the channel has non-expired stories available to the current user
|
||||
//@has_unread_active_stories True, if the channel has unread non-expired stories available to the current user
|
||||
//@has_active_stories True, if the supergroup or channel has non-expired stories available to the current user
|
||||
//@has_unread_active_stories True, if the supergroup or channel has unread non-expired stories available to the current user
|
||||
supergroup id:int53 access_hash:int64 usernames:usernames date:int32 status:ChatMemberStatus member_count:int32 boost_level:int32 has_linked_chat:Bool has_location:Bool sign_messages:Bool join_to_send_messages:Bool join_by_request:Bool is_slow_mode_enabled:Bool is_channel:Bool is_broadcast_group:Bool is_forum:Bool is_verified:Bool restriction_reason:string is_scam:Bool is_fake:Bool has_active_stories:Bool has_unread_active_stories:Bool = Supergroup;
|
||||
|
||||
//@description Contains full information about a supergroup or channel
|
||||
|
|
@ -1108,14 +1109,17 @@ supergroup id:int53 access_hash:int64 usernames:usernames date:int32 status:Chat
|
|||
//@is_all_history_available True, if new chat members will have access to old messages. In public, discussion, of forum groups and all channels, old messages are always available,
|
||||
//-so this option affects only private non-forum supergroups without a linked chat. The value of this field is only available to chat administrators
|
||||
//@has_aggressive_anti_spam_enabled True, if aggressive anti-spam checks are enabled in the supergroup. The value of this field is only available to chat administrators
|
||||
//@has_pinned_stories True, if the channel has pinned stories
|
||||
//@sticker_set_id Identifier of the supergroup sticker set; 0 if none
|
||||
//@has_pinned_stories True, if the supergroup or channel has pinned stories
|
||||
//@my_boost_count Number of times the current user boosted the supergroup or channel
|
||||
//@unrestrict_boost_count Number of times the supergroup must be boosted by a user to ignore slow mode and chat permission restrictions; 0 if unspecified
|
||||
//@sticker_set_id Identifier of the supergroup sticker set that must be shown before user sticker sets; 0 if none
|
||||
//@custom_emoji_sticker_set_id Identifier of the custom emoji sticker set that can be used in the supergroup without Telegram Premium subscription; 0 if none
|
||||
//@location Location to which the supergroup is connected; may be null if none
|
||||
//@invite_link Primary invite link for the chat; may be null. For chat administrators with can_invite_users right only
|
||||
//@bot_commands List of commands of bots in the group
|
||||
//@upgraded_from_basic_group_id Identifier of the basic group from which supergroup was upgraded; 0 if none
|
||||
//@upgraded_from_max_message_id Identifier of the last message in the basic group from which supergroup was upgraded; 0 if none
|
||||
supergroupFullInfo photo:chatPhoto description:string member_count:int32 administrator_count:int32 restricted_count:int32 banned_count:int32 linked_chat_id:int53 slow_mode_delay:int32 slow_mode_delay_expires_in:double can_get_members:Bool has_hidden_members:Bool can_hide_members:Bool can_set_sticker_set:Bool can_set_location:Bool can_get_statistics:Bool can_toggle_aggressive_anti_spam:Bool is_all_history_available:Bool has_aggressive_anti_spam_enabled:Bool has_pinned_stories:Bool sticker_set_id:int64 location:chatLocation invite_link:chatInviteLink bot_commands:vector<botCommands> upgraded_from_basic_group_id:int53 upgraded_from_max_message_id:int53 = SupergroupFullInfo;
|
||||
supergroupFullInfo photo:chatPhoto description:string member_count:int32 administrator_count:int32 restricted_count:int32 banned_count:int32 linked_chat_id:int53 slow_mode_delay:int32 slow_mode_delay_expires_in:double can_get_members:Bool has_hidden_members:Bool can_hide_members:Bool can_set_sticker_set:Bool can_set_location:Bool can_get_statistics:Bool can_toggle_aggressive_anti_spam:Bool is_all_history_available:Bool has_aggressive_anti_spam_enabled:Bool has_pinned_stories:Bool my_boost_count:int32 unrestrict_boost_count:int32 sticker_set_id:int64 custom_emoji_sticker_set_id:int64 location:chatLocation invite_link:chatInviteLink bot_commands:vector<botCommands> upgraded_from_basic_group_id:int53 upgraded_from_max_message_id:int53 = SupergroupFullInfo;
|
||||
|
||||
|
||||
//@class SecretChatState @description Describes the current secret chat state
|
||||
|
|
@ -1254,7 +1258,7 @@ messageReplyInfo reply_count:int32 recent_replier_ids:vector<MessageSender> last
|
|||
//@recent_sender_ids Identifiers of at most 3 recent message senders, added the reaction; available in private, basic group and supergroup chats
|
||||
messageReaction type:ReactionType total_count:int32 is_chosen:Bool used_sender_id:MessageSender recent_sender_ids:vector<MessageSender> = MessageReaction;
|
||||
|
||||
//@description Contains a list of reactions added to a message @reactions List of added reactions @are_tags True, if the reactions are tags and Telegram Premium users can filter messages by them; currently, always false
|
||||
//@description Contains a list of reactions added to a message @reactions List of added reactions @are_tags True, if the reactions are tags and Telegram Premium users can filter messages by them
|
||||
messageReactions reactions:vector<messageReaction> are_tags:Bool = MessageReactions;
|
||||
|
||||
|
||||
|
|
@ -1325,7 +1329,9 @@ messageReplyToStory story_sender_chat_id:int53 story_id:int32 = MessageReplyTo;
|
|||
//@quote Quote from the message to be replied; pass null if none. Must always be null for replies in secret chats
|
||||
inputMessageReplyToMessage chat_id:int53 message_id:int53 quote:inputTextQuote = InputMessageReplyTo;
|
||||
|
||||
//@description Describes a story to be replied @story_sender_chat_id The identifier of the sender of the story. Currently, stories can be replied only in the sender's chat @story_id The identifier of the story
|
||||
//@description Describes a story to be replied
|
||||
//@story_sender_chat_id The identifier of the sender of the story. Currently, stories can be replied only in the sender's chat and channel stories can't be replied
|
||||
//@story_id The identifier of the story
|
||||
inputMessageReplyToStory story_sender_chat_id:int53 story_id:int32 = InputMessageReplyTo;
|
||||
|
||||
|
||||
|
|
@ -1362,17 +1368,18 @@ inputMessageReplyToStory story_sender_chat_id:int53 story_id:int32 = InputMessag
|
|||
//@unread_reactions Information about unread reactions added to the message
|
||||
//@reply_to Information about the message or the story this message is replying to; may be null if none
|
||||
//@message_thread_id If non-zero, the identifier of the message thread the message belongs to; unique within the chat to which the message belongs
|
||||
//@saved_messages_topic Information about topic of the message in the Saved Messages chat; may be null for messages not from Saved Messages
|
||||
//@saved_messages_topic_id Identifier of the Saved Messages topic for the message; 0 for messages not from Saved Messages
|
||||
//@self_destruct_type The message's self-destruct type; may be null if none
|
||||
//@self_destruct_in Time left before the message self-destruct timer expires, in seconds; 0 if self-destruction isn't scheduled yet
|
||||
//@auto_delete_in Time left before the message will be automatically deleted by message_auto_delete_time setting of the chat, in seconds; 0 if never
|
||||
//@via_bot_user_id If non-zero, the user identifier of the bot through which this message was sent
|
||||
//@sender_boost_count Number of times the sender of the message boosted the supergroup at the time the message was sent; 0 if none or unknown. For messages sent by the current user, supergroupFullInfo.my_boost_count must be used instead
|
||||
//@author_signature For channel posts and anonymous group messages, optional author signature
|
||||
//@media_album_id Unique identifier of an album this message belongs to. Only audios, documents, photos and videos can be grouped together in albums
|
||||
//@restriction_reason If non-empty, contains a human-readable description of the reason why access to this message must be restricted
|
||||
//@content Content of the message
|
||||
//@reply_markup Reply markup for the message; may be null if none
|
||||
message id:int53 sender_id:MessageSender chat_id:int53 sending_state:MessageSendingState scheduling_state:MessageSchedulingState is_outgoing:Bool is_pinned:Bool can_be_edited:Bool can_be_forwarded:Bool can_be_replied_in_another_chat:Bool can_be_saved:Bool can_be_deleted_only_for_self:Bool can_be_deleted_for_all_users:Bool can_get_added_reactions:Bool can_get_statistics:Bool can_get_message_thread:Bool can_get_read_date:Bool can_get_viewers:Bool can_get_media_timestamp_links:Bool can_report_reactions:Bool has_timestamped_media:Bool is_channel_post:Bool is_topic_message:Bool contains_unread_mention:Bool date:int32 edit_date:int32 forward_info:messageForwardInfo import_info:messageImportInfo interaction_info:messageInteractionInfo unread_reactions:vector<unreadReaction> reply_to:MessageReplyTo message_thread_id:int53 saved_messages_topic:SavedMessagesTopic self_destruct_type:MessageSelfDestructType self_destruct_in:double auto_delete_in:double via_bot_user_id:int53 author_signature:string media_album_id:int64 restriction_reason:string content:MessageContent reply_markup:ReplyMarkup = Message;
|
||||
message id:int53 sender_id:MessageSender chat_id:int53 sending_state:MessageSendingState scheduling_state:MessageSchedulingState is_outgoing:Bool is_pinned:Bool can_be_edited:Bool can_be_forwarded:Bool can_be_replied_in_another_chat:Bool can_be_saved:Bool can_be_deleted_only_for_self:Bool can_be_deleted_for_all_users:Bool can_get_added_reactions:Bool can_get_statistics:Bool can_get_message_thread:Bool can_get_read_date:Bool can_get_viewers:Bool can_get_media_timestamp_links:Bool can_report_reactions:Bool has_timestamped_media:Bool is_channel_post:Bool is_topic_message:Bool contains_unread_mention:Bool date:int32 edit_date:int32 forward_info:messageForwardInfo import_info:messageImportInfo interaction_info:messageInteractionInfo unread_reactions:vector<unreadReaction> reply_to:MessageReplyTo message_thread_id:int53 saved_messages_topic_id:int53 self_destruct_type:MessageSelfDestructType self_destruct_in:double auto_delete_in:double via_bot_user_id:int53 sender_boost_count:int32 author_signature:string media_album_id:int64 restriction_reason:string content:MessageContent reply_markup:ReplyMarkup = Message;
|
||||
|
||||
//@description Contains a list of messages @total_count Approximate total number of messages found @messages List of messages; messages may be null
|
||||
messages total_count:int32 messages:vector<message> = Messages;
|
||||
|
|
@ -1534,7 +1541,7 @@ scopeNotificationSettings mute_for:int32 sound_id:int64 show_preview:Bool use_de
|
|||
//@description Contains information about a message draft
|
||||
//@reply_to Information about the message to be replied; must be of the type inputMessageReplyToMessage; may be null if none
|
||||
//@date Point in time (Unix timestamp) when the draft was created
|
||||
//@input_message_text Content of the message draft; must be of the type inputMessageText
|
||||
//@input_message_text Content of the message draft; must be of the type inputMessageText, inputMessageVideoNote, or inputMessageVoiceNote
|
||||
draftMessage reply_to:InputMessageReplyTo date:int32 input_message_text:InputMessageContent = DraftMessage;
|
||||
|
||||
|
||||
|
|
@ -1651,7 +1658,10 @@ chatAvailableReactionsAll = ChatAvailableReactions;
|
|||
chatAvailableReactionsSome reactions:vector<ReactionType> = ChatAvailableReactions;
|
||||
|
||||
|
||||
//@description Represents a tag used in Saved Messages @tag The tag @label Label of the tag; 0-12 characters @count Number of times the tag was used; may be 0 if the tag has non-empty label
|
||||
//@description Represents a tag used in Saved Messages or a Saved Messages topic
|
||||
//@tag The tag
|
||||
//@label Label of the tag; 0-12 characters. Always empty if the tag is returned for a Saved Messages topic
|
||||
//@count Number of times the tag was used; may be 0 if the tag has non-empty label
|
||||
savedMessagesTag tag:ReactionType label:string count:int32 = SavedMessagesTag;
|
||||
|
||||
//@description Contains a list of tags used in Saved Messages @tags List of tags
|
||||
|
|
@ -1682,7 +1692,7 @@ videoChat group_call_id:int32 has_participants:Bool default_participant_id:Messa
|
|||
//@has_protected_content True, if chat content can't be saved locally, forwarded, or copied
|
||||
//@is_translatable True, if translation of all messages in the chat must be suggested to the user
|
||||
//@is_marked_as_unread True, if the chat is marked as unread
|
||||
//@view_as_topics True, if the chat is a forum supergroup that must be shown in the "View as topics" mode
|
||||
//@view_as_topics True, if the chat is a forum supergroup that must be shown in the "View as topics" mode, or Saved Messages chat that must be shown in the "View as chats"
|
||||
//@has_scheduled_messages True, if the chat has scheduled messages
|
||||
//@can_be_deleted_only_for_self True, if the chat messages can be deleted only for the current user while other users will continue to see the messages
|
||||
//@can_be_deleted_for_all_users True, if the chat messages can be deleted for all users
|
||||
|
|
@ -1894,26 +1904,26 @@ webAppInfo launch_id:int64 url:string = WebAppInfo;
|
|||
messageThreadInfo chat_id:int53 message_thread_id:int53 reply_info:messageReplyInfo unread_message_count:int32 messages:vector<message> draft_message:draftMessage = MessageThreadInfo;
|
||||
|
||||
|
||||
//@class SavedMessagesTopic @description Contains information about a Saved Messages topic
|
||||
//@class SavedMessagesTopicType @description Describes type of a Saved Messages topic
|
||||
|
||||
//@description Topic containing messages sent by the current user of forwarded from an unknown chat
|
||||
savedMessagesTopicMyNotes = SavedMessagesTopic;
|
||||
savedMessagesTopicTypeMyNotes = SavedMessagesTopicType;
|
||||
|
||||
//@description Topic containing messages forwarded from a user with hidden privacy
|
||||
savedMessagesTopicAuthorHidden = SavedMessagesTopic;
|
||||
savedMessagesTopicTypeAuthorHidden = SavedMessagesTopicType;
|
||||
|
||||
//@description Topic containing messages forwarded from a specific chat @chat_id Identifier of the chat
|
||||
savedMessagesTopicSavedFromChat chat_id:int53 = SavedMessagesTopic;
|
||||
savedMessagesTopicTypeSavedFromChat chat_id:int53 = SavedMessagesTopicType;
|
||||
|
||||
|
||||
//@description Contains information about a found Saved Messages topic @topic The topic @last_message Last message in the topic; may be null if none or unknown
|
||||
foundSavedMessagesTopic topic:SavedMessagesTopic last_message:message = FoundSavedMessagesTopic;
|
||||
|
||||
//@description Contains a list of Saved Messages topics
|
||||
//@total_count Total number of Saved Messages topics found
|
||||
//@topics List of Saved Messages topics
|
||||
//@next_offset The offset for the next request. If empty, then there are no more results
|
||||
foundSavedMessagesTopics total_count:int32 topics:vector<foundSavedMessagesTopic> next_offset:string = FoundSavedMessagesTopics;
|
||||
//@description Contains information about a Saved Messages topic
|
||||
//@id Unique topic identifier
|
||||
//@type Type of the topic
|
||||
//@is_pinned True, if the topic is pinned
|
||||
//@order A parameter used to determine order of the topic in the topic list. Topics must be sorted by the order in descending order
|
||||
//@last_message Last message in the topic; may be null if none or unknown
|
||||
//@draft_message A draft of a message in the topic; may be null if none
|
||||
savedMessagesTopic id:int53 type:SavedMessagesTopicType is_pinned:Bool order:int64 last_message:message draft_message:draftMessage = SavedMessagesTopic;
|
||||
|
||||
|
||||
//@description Describes a forum topic icon @color Color of the topic icon in RGB format @custom_emoji_id Unique identifier of the custom emoji shown on the topic icon; 0 if none
|
||||
|
|
@ -2447,8 +2457,9 @@ messageExtendedMediaUnsupported caption:formattedText = MessageExtendedMedia;
|
|||
|
||||
|
||||
//@description Describes parameters of a Telegram Premium giveaway
|
||||
//@boosted_chat_id Identifier of the channel chat, which will be automatically boosted by the winners of the giveaway for duration of the Premium subscription
|
||||
//@additional_chat_ids Identifiers of other channel chats that must be subscribed by the users to be eligible for the giveaway. There can be up to getOption("giveaway_additional_chat_count_max") additional chats
|
||||
//@boosted_chat_id Identifier of the supergroup or channel chat, which will be automatically boosted by the winners of the giveaway for duration of the Premium subscription.
|
||||
//-If the chat is a channel, then can_post_messages right is required in the channel, otherwise, the user must be an administrator in the supergroup
|
||||
//@additional_chat_ids Identifiers of other supergroup or channel chats that must be subscribed by the users to be eligible for the giveaway. There can be up to getOption("giveaway_additional_chat_count_max") additional chats
|
||||
//@winners_selection_date Point in time (Unix timestamp) when the giveaway is expected to be performed; must be 60-getOption("giveaway_duration_max") seconds in the future in scheduled giveaways
|
||||
//@only_new_members True, if only new members of the chats will be eligible for the giveaway
|
||||
//@has_public_winners True, if the list of winners of the giveaway will be available to everyone
|
||||
|
|
@ -2910,6 +2921,9 @@ messageChatSetTheme theme_name:string = MessageContent;
|
|||
//@description The auto-delete or self-destruct timer for messages in the chat has been changed @message_auto_delete_time New value auto-delete or self-destruct time, in seconds; 0 if disabled @from_user_id If not 0, a user identifier, which default setting was automatically applied
|
||||
messageChatSetMessageAutoDeleteTime message_auto_delete_time:int32 from_user_id:int53 = MessageContent;
|
||||
|
||||
//@description The chat was boosted by the sender of the message @boost_count Number of times the chat was boosted
|
||||
messageChatBoost boost_count:int32 = MessageContent;
|
||||
|
||||
//@description A forum topic has been created @name Name of the topic @icon Icon of the topic
|
||||
messageForumTopicCreated name:string icon:forumTopicIcon = MessageContent;
|
||||
|
||||
|
|
@ -3152,7 +3166,7 @@ messageCopyOptions send_copy:Bool replace_caption:Bool new_caption:formattedText
|
|||
|
||||
//@description A text message
|
||||
//@text Formatted text to be sent; 0-getOption("message_text_length_max") characters. Only Bold, Italic, Underline, Strikethrough, Spoiler, CustomEmoji, BlockQuote, Code, Pre, PreCode, TextUrl and MentionName entities are allowed to be specified manually
|
||||
//@link_preview_options Options to be used for generation of a link preview; pass null to use default link preview options
|
||||
//@link_preview_options Options to be used for generation of a link preview; may be null if none; pass null to use default link preview options
|
||||
//@clear_draft True, if a chat message draft must be deleted
|
||||
inputMessageText text:formattedText link_preview_options:linkPreviewOptions clear_draft:Bool = InputMessageContent;
|
||||
|
||||
|
|
@ -3217,18 +3231,18 @@ inputMessageVideo video:InputFile thumbnail:inputThumbnail added_sticker_file_id
|
|||
|
||||
//@description A video note message
|
||||
//@video_note Video note to be sent
|
||||
//@thumbnail Video thumbnail; pass null to skip thumbnail uploading
|
||||
//@thumbnail Video thumbnail; may be null if empty; pass null to skip thumbnail uploading
|
||||
//@duration Duration of the video, in seconds
|
||||
//@length Video width and height; must be positive and not greater than 640
|
||||
//@self_destruct_type Video note self-destruct type; pass null if none; private chats only
|
||||
//@self_destruct_type Video note self-destruct type; may be null if none; pass null if none; private chats only
|
||||
inputMessageVideoNote video_note:InputFile thumbnail:inputThumbnail duration:int32 length:int32 self_destruct_type:MessageSelfDestructType = InputMessageContent;
|
||||
|
||||
//@description A voice note message
|
||||
//@voice_note Voice note to be sent
|
||||
//@duration Duration of the voice note, in seconds
|
||||
//@waveform Waveform representation of the voice note in 5-bit format
|
||||
//@caption Voice note caption; pass null to use an empty caption; 0-getOption("message_caption_length_max") characters
|
||||
//@self_destruct_type Voice note self-destruct type; pass null if none; private chats only
|
||||
//@caption Voice note caption; may be null if empty; pass null to use an empty caption; 0-getOption("message_caption_length_max") characters
|
||||
//@self_destruct_type Voice note self-destruct type; may be null if none; pass null if none; private chats only
|
||||
inputMessageVoiceNote voice_note:InputFile duration:int32 waveform:bytes caption:formattedText self_destruct_type:MessageSelfDestructType = InputMessageContent;
|
||||
|
||||
//@description A message with a location
|
||||
|
|
@ -3629,6 +3643,7 @@ storyInteractionInfo view_count:int32 forward_count:int32 reaction_count:int32 r
|
|||
//@description Represents a story
|
||||
//@id Unique story identifier among stories of the given sender
|
||||
//@sender_chat_id Identifier of the chat that posted the story
|
||||
//@sender_id Identifier of the sender of the story; may be null if the story is posted on behalf of the sender_chat_id
|
||||
//@date Point in time (Unix timestamp) when the story was published
|
||||
//@is_being_sent True, if the story is being sent by the current user
|
||||
//@is_being_edited True, if the story is being edited by the current user
|
||||
|
|
@ -3650,7 +3665,7 @@ storyInteractionInfo view_count:int32 forward_count:int32 reaction_count:int32 r
|
|||
//@content Content of the story
|
||||
//@areas Clickable areas to be shown on the story content
|
||||
//@caption Caption of the story
|
||||
story id:int32 sender_chat_id:int53 date:int32 is_being_sent:Bool is_being_edited:Bool is_edited:Bool is_pinned:Bool is_visible_only_for_self:Bool can_be_deleted:Bool can_be_edited:Bool can_be_forwarded:Bool can_be_replied:Bool can_toggle_is_pinned:Bool can_get_statistics:Bool can_get_interactions:Bool has_expired_viewers:Bool repost_info:storyRepostInfo interaction_info:storyInteractionInfo chosen_reaction_type:ReactionType privacy_settings:StoryPrivacySettings content:StoryContent areas:vector<storyArea> caption:formattedText = Story;
|
||||
story id:int32 sender_chat_id:int53 sender_id:MessageSender date:int32 is_being_sent:Bool is_being_edited:Bool is_edited:Bool is_pinned:Bool is_visible_only_for_self:Bool can_be_deleted:Bool can_be_edited:Bool can_be_forwarded:Bool can_be_replied:Bool can_toggle_is_pinned:Bool can_get_statistics:Bool can_get_interactions:Bool has_expired_viewers:Bool repost_info:storyRepostInfo interaction_info:storyInteractionInfo chosen_reaction_type:ReactionType privacy_settings:StoryPrivacySettings content:StoryContent areas:vector<storyArea> caption:formattedText = Story;
|
||||
|
||||
//@description Represents a list of stories @total_count Approximate total number of stories found @stories The list of stories
|
||||
stories total_count:int32 stories:vector<story> = Stories;
|
||||
|
|
@ -3731,16 +3746,20 @@ publicForwards total_count:int32 forwards:vector<PublicForward> next_offset:stri
|
|||
//@can_set_emoji_status True, if emoji status can be set
|
||||
//@chat_theme_background_count Number of chat theme backgrounds that can be set as chat background
|
||||
//@can_set_custom_background True, if custom background can be set in the chat for all users
|
||||
chatBoostLevelFeatures level:int32 story_per_day_count:int32 custom_emoji_reaction_count:int32 title_color_count:int32 profile_accent_color_count:int32 can_set_profile_background_custom_emoji:Bool accent_color_count:int32 can_set_background_custom_emoji:Bool can_set_emoji_status:Bool chat_theme_background_count:int32 can_set_custom_background:Bool = ChatBoostLevelFeatures;
|
||||
//@can_set_custom_emoji_sticker_set True, if custom emoji sticker set can be set for the chat
|
||||
//@can_recognize_speech True, if speech recognition can be used for video note and voice note messages by all users
|
||||
chatBoostLevelFeatures level:int32 story_per_day_count:int32 custom_emoji_reaction_count:int32 title_color_count:int32 profile_accent_color_count:int32 can_set_profile_background_custom_emoji:Bool accent_color_count:int32 can_set_background_custom_emoji:Bool can_set_emoji_status:Bool chat_theme_background_count:int32 can_set_custom_background:Bool can_set_custom_emoji_sticker_set:Bool can_recognize_speech:Bool = ChatBoostLevelFeatures;
|
||||
|
||||
//@description Contains a list of features available on the first chat boost levels
|
||||
//@features The list of features
|
||||
//@min_profile_background_custom_emoji_boost_level The minimum boost level required to set custom emoji for profile background
|
||||
//@min_background_custom_emoji_boost_level The minimum boost level required to set custom emoji for reply header and link preview background
|
||||
//@min_background_custom_emoji_boost_level The minimum boost level required to set custom emoji for reply header and link preview background; for channel chats only
|
||||
//@min_emoji_status_boost_level The minimum boost level required to set emoji status
|
||||
//@min_chat_theme_background_boost_level The minimum boost level required to set a chat theme background as chat background
|
||||
//@min_custom_background_boost_level The minimum boost level required to set custom chat background
|
||||
chatBoostFeatures features:vector<chatBoostLevelFeatures> min_profile_background_custom_emoji_boost_level:int32 min_background_custom_emoji_boost_level:int32 min_emoji_status_boost_level:int32 min_chat_theme_background_boost_level:int32 min_custom_background_boost_level:int32 = ChatBoostFeatures;
|
||||
//@min_custom_emoji_sticker_set_boost_level The minimum boost level required to set custom emoji sticker set for the chat; for supergroup chats only
|
||||
//@min_speech_recognition_boost_level The minimum boost level allowing to recognize speech in video note and voice note messages for non-Premium users; for supergroup chats only
|
||||
chatBoostFeatures features:vector<chatBoostLevelFeatures> min_profile_background_custom_emoji_boost_level:int32 min_background_custom_emoji_boost_level:int32 min_emoji_status_boost_level:int32 min_chat_theme_background_boost_level:int32 min_custom_background_boost_level:int32 min_custom_emoji_sticker_set_boost_level:int32 min_speech_recognition_boost_level:int32 = ChatBoostFeatures;
|
||||
|
||||
|
||||
//@class ChatBoostSource @description Describes source of a chat boost
|
||||
|
|
@ -3790,7 +3809,10 @@ chatBoostStatus boost_url:string applied_slot_ids:vector<int32> level:int32 gift
|
|||
//@expiration_date Point in time (Unix timestamp) when the boost will expire
|
||||
chatBoost id:string count:int32 source:ChatBoostSource start_date:int32 expiration_date:int32 = ChatBoost;
|
||||
|
||||
//@description Contains a list of boosts applied to a chat @total_count Total number of boosts applied to the chat @boosts List of boosts @next_offset The offset for the next request. If empty, then there are no more results
|
||||
//@description Contains a list of boosts applied to a chat
|
||||
//@total_count Total number of boosts applied to the chat
|
||||
//@boosts List of boosts
|
||||
//@next_offset The offset for the next request. If empty, then there are no more results
|
||||
foundChatBoosts total_count:int32 boosts:vector<chatBoost> next_offset:string = FoundChatBoosts;
|
||||
|
||||
//@description Describes a slot for chat boost
|
||||
|
|
@ -4051,7 +4073,7 @@ availableReaction type:ReactionType needs_premium:Bool = AvailableReaction;
|
|||
//@recent_reactions List of recently used reactions
|
||||
//@popular_reactions List of popular reactions
|
||||
//@allow_custom_emoji True, if any custom emoji reaction can be added by Telegram Premium subscribers
|
||||
//@are_tags True, if the reactions will be tags and the message can be found by them; currently, always false
|
||||
//@are_tags True, if the reactions will be tags and the message can be found by them
|
||||
//@unavailability_reason The reason why the current user can't add reactions to the message, despite some other users can; may be null if none
|
||||
availableReactions top_reactions:vector<availableReaction> recent_reactions:vector<availableReaction> popular_reactions:vector<availableReaction> allow_custom_emoji:Bool are_tags:Bool unavailability_reason:ReactionUnavailabilityReason = AvailableReactions;
|
||||
|
||||
|
|
@ -4504,6 +4526,9 @@ chatEventSlowModeDelayChanged old_slow_mode_delay:int32 new_slow_mode_delay:int3
|
|||
//@description The supergroup sticker set was changed @old_sticker_set_id Previous identifier of the chat sticker set; 0 if none @new_sticker_set_id New identifier of the chat sticker set; 0 if none
|
||||
chatEventStickerSetChanged old_sticker_set_id:int64 new_sticker_set_id:int64 = ChatEventAction;
|
||||
|
||||
//@description The supergroup sticker set with allowed custom emoji was changed @old_sticker_set_id Previous identifier of the chat sticker set; 0 if none @new_sticker_set_id New identifier of the chat sticker set; 0 if none
|
||||
chatEventCustomEmojiStickerSetChanged old_sticker_set_id:int64 new_sticker_set_id:int64 = ChatEventAction;
|
||||
|
||||
//@description The chat title was changed @old_title Previous chat title @new_title New chat title
|
||||
chatEventTitleChanged old_title:string new_title:string = ChatEventAction;
|
||||
|
||||
|
|
@ -4777,10 +4802,20 @@ premiumFeatureAccentColor = PremiumFeature;
|
|||
//@description The ability to set private chat background for both users
|
||||
premiumFeatureBackgroundForBoth = PremiumFeature;
|
||||
|
||||
//@description The ability to use tags in Saved Messages
|
||||
premiumFeatureSavedMessagesTags = PremiumFeature;
|
||||
|
||||
//@description The ability to disallow incoming voice and video note messages in private chats using setUserPrivacySettingRules with userPrivacySettingAllowPrivateVoiceAndVideoNoteMessages
|
||||
//-and to restrict incoming messages from non-contacts using setNewChatPrivacySettings
|
||||
premiumFeatureMessagePrivacy = PremiumFeature;
|
||||
|
||||
//@description The ability to view last seen and read times of other users even they can't view last seen or read time for the current user
|
||||
premiumFeatureLastSeenTimes = PremiumFeature;
|
||||
|
||||
|
||||
//@class PremiumStoryFeature @description Describes a story feature available to Premium users
|
||||
|
||||
//@description User stories are displayed before stories of non-premium contacts and channels
|
||||
//@description Stories of the current user are displayed before stories of non-Premium contacts, supergroups, and channels
|
||||
premiumStoryFeaturePriorityOrder = PremiumStoryFeature;
|
||||
|
||||
//@description The ability to hide the fact that the user viewed other's stories
|
||||
|
|
@ -4798,6 +4833,9 @@ premiumStoryFeatureSaveStories = PremiumStoryFeature;
|
|||
//@description The ability to use links and formatting in story caption
|
||||
premiumStoryFeatureLinksAndFormatting = PremiumStoryFeature;
|
||||
|
||||
//@description The ability to choose better quality for viewed stories
|
||||
premiumStoryFeatureVideoQuality = PremiumStoryFeature;
|
||||
|
||||
|
||||
//@description Contains information about a limit, increased for Premium users @type The type of the limit @default_value Default value of the limit @premium_value Value of the limit for Premium users
|
||||
premiumLimit type:PremiumLimitType default_value:int32 premium_value:int32 = PremiumLimit;
|
||||
|
|
@ -4846,13 +4884,13 @@ storePaymentPurposePremiumSubscription is_restore:Bool is_upgrade:Bool = StorePa
|
|||
storePaymentPurposeGiftedPremium user_id:int53 currency:string amount:int53 = StorePaymentPurpose;
|
||||
|
||||
//@description The user creating Telegram Premium gift codes for other users
|
||||
//@boosted_chat_id Identifier of the channel chat, which will be automatically boosted by the users for duration of the Premium subscription and which is administered by the user; 0 if none
|
||||
//@boosted_chat_id Identifier of the supergroup or channel chat, which will be automatically boosted by the users for duration of the Premium subscription and which is administered by the user; 0 if none
|
||||
//@currency ISO 4217 currency code of the payment currency
|
||||
//@amount Paid amount, in the smallest units of the currency
|
||||
//@user_ids Identifiers of the users which can activate the gift codes
|
||||
storePaymentPurposePremiumGiftCodes boosted_chat_id:int53 currency:string amount:int53 user_ids:vector<int53> = StorePaymentPurpose;
|
||||
|
||||
//@description The user creating a Telegram Premium giveaway for subscribers of channel chats; requires can_post_messages rights in the channels
|
||||
//@description The user creating a Telegram Premium giveaway
|
||||
//@parameters Giveaway parameters
|
||||
//@currency ISO 4217 currency code of the payment currency
|
||||
//@amount Paid amount, in the smallest units of the currency
|
||||
|
|
@ -4862,14 +4900,14 @@ storePaymentPurposePremiumGiveaway parameters:premiumGiveawayParameters currency
|
|||
//@class TelegramPaymentPurpose @description Describes a purpose of a payment toward Telegram
|
||||
|
||||
//@description The user creating Telegram Premium gift codes for other users
|
||||
//@boosted_chat_id Identifier of the channel chat, which will be automatically boosted by the users for duration of the Premium subscription and which is administered by the user; 0 if none
|
||||
//@boosted_chat_id Identifier of the supergroup or channel chat, which will be automatically boosted by the users for duration of the Premium subscription and which is administered by the user; 0 if none
|
||||
//@currency ISO 4217 currency code of the payment currency
|
||||
//@amount Paid amount, in the smallest units of the currency
|
||||
//@user_ids Identifiers of the users which can activate the gift codes
|
||||
//@month_count Number of months the Telegram Premium subscription will be active for the users
|
||||
telegramPaymentPurposePremiumGiftCodes boosted_chat_id:int53 currency:string amount:int53 user_ids:vector<int53> month_count:int32 = TelegramPaymentPurpose;
|
||||
|
||||
//@description The user creating a Telegram Premium giveaway for subscribers of channel chats; requires can_post_messages rights in the channels
|
||||
//@description The user creating a Telegram Premium giveaway
|
||||
//@parameters Giveaway parameters
|
||||
//@currency ISO 4217 currency code of the payment currency
|
||||
//@amount Paid amount, in the smallest units of the currency
|
||||
|
|
@ -5001,7 +5039,7 @@ canSendStoryResultOk = CanSendStoryResult;
|
|||
//@description The user must subscribe to Telegram Premium to be able to post stories
|
||||
canSendStoryResultPremiumNeeded = CanSendStoryResult;
|
||||
|
||||
//@description The channel chat must be boosted first by Telegram Premium subscribers to post more stories. Call getChatBoostStatus to get current boost status of the chat
|
||||
//@description The chat must be boosted first by Telegram Premium subscribers to post more stories. Call getChatBoostStatus to get current boost status of the chat
|
||||
canSendStoryResultBoostNeeded = CanSendStoryResult;
|
||||
|
||||
//@description The limit for the number of active stories exceeded. The user can buy Telegram Premium, delete an active story, or wait for the oldest story to expire
|
||||
|
|
@ -5396,7 +5434,7 @@ userPrivacySettingAllowPeerToPeerCalls = UserPrivacySetting;
|
|||
//@description A privacy setting for managing whether the user can be found by their phone number. Checked only if the phone number is not known to the other user. Can be set only to "Allow contacts" or "Allow all"
|
||||
userPrivacySettingAllowFindingByPhoneNumber = UserPrivacySetting;
|
||||
|
||||
//@description A privacy setting for managing whether the user can receive voice and video messages in private chats
|
||||
//@description A privacy setting for managing whether the user can receive voice and video messages in private chats; for Telegram Premium users only
|
||||
userPrivacySettingAllowPrivateVoiceAndVideoNoteMessages = UserPrivacySetting;
|
||||
|
||||
|
||||
|
|
@ -6432,7 +6470,7 @@ updateChatAvailableReactions chat_id:int53 available_reactions:ChatAvailableReac
|
|||
|
||||
//@description A chat draft has changed. Be aware that the update may come in the currently opened chat but with old content of the draft. If the user has changed the content of the draft, this update mustn't be applied
|
||||
//@chat_id Chat identifier
|
||||
//@draft_message The new draft message; may be null
|
||||
//@draft_message The new draft message; may be null if none
|
||||
//@positions The new chat positions in the chat lists
|
||||
updateChatDraftMessage chat_id:int53 draft_message:draftMessage positions:vector<chatPosition> = Update;
|
||||
|
||||
|
|
@ -6503,8 +6541,12 @@ updateChatFolders chat_folders:vector<chatFolderInfo> main_chat_list_position:in
|
|||
//@online_member_count New number of online members in the chat, or 0 if unknown
|
||||
updateChatOnlineMemberCount chat_id:int53 online_member_count:int32 = Update;
|
||||
|
||||
//@description The list of pinned Saved Messages topics has changed. The app can call getPinnedSavedMessagesTopics to get the new list
|
||||
updatePinnedSavedMessagesTopics = Update;
|
||||
//@description Basic information about a Saved Messages topic has changed. This update is guaranteed to come before the topic identifier is returned to the application
|
||||
//@topic New data about the topic
|
||||
updateSavedMessagesTopic topic:savedMessagesTopic = Update;
|
||||
|
||||
//@description Number of Saved Messages topics has changed @topic_count Approximate total number of Saved Messages topics
|
||||
updateSavedMessagesTopicCount topic_count:int32 = Update;
|
||||
|
||||
//@description Basic information about a topic in a forum chat was changed @chat_id Chat identifier @info New information about the topic
|
||||
updateForumTopicInfo chat_id:int53 info:forumTopicInfo = Update;
|
||||
|
|
@ -6543,7 +6585,7 @@ updateDeleteMessages chat_id:int53 message_ids:vector<int53> is_permanent:Bool f
|
|||
|
||||
//@description A message sender activity in the chat has changed
|
||||
//@chat_id Chat identifier
|
||||
//@message_thread_id If not 0, a message thread identifier in which the action was performed
|
||||
//@message_thread_id If not 0, the message thread identifier in which the action was performed
|
||||
//@sender_id Identifier of a message sender performing the action
|
||||
//@action The action
|
||||
updateChatAction chat_id:int53 message_thread_id:int53 sender_id:MessageSender action:ChatAction = Update;
|
||||
|
|
@ -6736,8 +6778,10 @@ updateActiveEmojiReactions emojis:vector<string> = Update;
|
|||
//@description The type of default reaction has changed @reaction_type The new type of the default reaction
|
||||
updateDefaultReactionType reaction_type:ReactionType = Update;
|
||||
|
||||
//@description Used Saved Messages tags have changed @tags The new used tags
|
||||
updateSavedMessagesTags tags:savedMessagesTags = Update;
|
||||
//@description Tags used in Saved Messages or a Saved Messages topic have changed
|
||||
//@saved_messages_topic_id Identifier of Saved Messages topic which tags were changed; 0 if tags for the whole chat has changed
|
||||
//@tags The new tags
|
||||
updateSavedMessagesTags saved_messages_topic_id:int53 tags:savedMessagesTags = Update;
|
||||
|
||||
//@description The parameters of speech recognition without Telegram Premium subscription has changed
|
||||
//@max_media_duration The maximum allowed duration of media for speech recognition without Telegram Premium subscription
|
||||
|
|
@ -6967,7 +7011,8 @@ requestQrCodeAuthentication other_user_ids:vector<int53> = Ok;
|
|||
//@description Finishes user registration. Works only when the current authorization state is authorizationStateWaitRegistration
|
||||
//@first_name The first name of the user; 1-64 characters
|
||||
//@last_name The last name of the user; 0-64 characters
|
||||
registerUser first_name:string last_name:string = Ok;
|
||||
//@disable_notification Pass true to disable notification about the current user joining Telegram for other users that added them to contact list
|
||||
registerUser first_name:string last_name:string disable_notification:Bool = Ok;
|
||||
|
||||
//@description Resets the login email address. May return an error with a message "TASK_ALREADY_EXISTS" if reset is still pending.
|
||||
//-Works only when the current authorization state is authorizationStateWaitEmailCode and authorization_state.can_reset_email_address == true
|
||||
|
|
@ -7238,43 +7283,39 @@ getSuitableDiscussionChats = Chats;
|
|||
getInactiveSupergroupChats = Chats;
|
||||
|
||||
|
||||
//@description Returns list of all pinned Saved Messages topics
|
||||
getPinnedSavedMessagesTopics = FoundSavedMessagesTopics;
|
||||
|
||||
//@description Returns list of non-pinned Saved Messages topics from the specified offset
|
||||
//@offset Offset of the first entry to return as received from the previous request; use empty string to get the first chunk of results
|
||||
//@limit The maximum number of Saved Messages topics to be returned; up to 100
|
||||
getSavedMessagesTopics offset:string limit:int32 = FoundSavedMessagesTopics;
|
||||
//@description Loads more Saved Messages topics. The loaded topics will be sent through updateSavedMessagesTopic. Topics are sorted by their topic.order in descending order. Returns a 404 error if all topics have been loaded
|
||||
//@limit 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
|
||||
loadSavedMessagesTopics limit:int32 = Ok;
|
||||
|
||||
//@description Returns messages in a Saved Messages topic. The messages are returned in a reverse chronological order (i.e., in order of decreasing message_id)
|
||||
//@saved_messages_topic Saved Messages topic which messages will be fetched
|
||||
//@saved_messages_topic_id Identifier of Saved Messages topic which messages will be fetched
|
||||
//@from_message_id Identifier of the message starting from which messages must be fetched; use 0 to get results from the last message
|
||||
//@offset Specify 0 to get results from exactly the message from_message_id or a negative offset up to 99 to get additionally some newer messages
|
||||
//@limit The maximum number of messages to be returned; must be positive and can't be greater than 100. If the offset is negative, the limit must be greater than or equal to -offset.
|
||||
//-For optimal performance, the number of returned messages is chosen by TDLib and can be smaller than the specified limit
|
||||
getSavedMessagesTopicHistory saved_messages_topic:SavedMessagesTopic from_message_id:int53 offset:int32 limit:int32 = Messages;
|
||||
getSavedMessagesTopicHistory saved_messages_topic_id:int53 from_message_id:int53 offset:int32 limit:int32 = Messages;
|
||||
|
||||
//@description Returns the last message sent in a Saved Messages topic no later than the specified date
|
||||
//@saved_messages_topic Saved Messages topic which message will be returned
|
||||
//@saved_messages_topic_id Identifier of Saved Messages topic which message will be returned
|
||||
//@date Point in time (Unix timestamp) relative to which to search for messages
|
||||
getSavedMessagesTopicMessageByDate saved_messages_topic:SavedMessagesTopic date:int32 = Message;
|
||||
getSavedMessagesTopicMessageByDate saved_messages_topic_id:int53 date:int32 = Message;
|
||||
|
||||
//@description Deletes all messages in a Saved Messages topic @saved_messages_topic Saved Messages topic which messages will be deleted
|
||||
deleteSavedMessagesTopicHistory saved_messages_topic:SavedMessagesTopic = Ok;
|
||||
//@description Deletes all messages in a Saved Messages topic @saved_messages_topic_id Identifier of Saved Messages topic which messages will be deleted
|
||||
deleteSavedMessagesTopicHistory saved_messages_topic_id:int53 = Ok;
|
||||
|
||||
//@description Deletes all messages between the specified dates in a Saved Messages topic. Messages sent in the last 30 seconds will not be deleted
|
||||
//@saved_messages_topic Saved Messages topic which messages will be deleted
|
||||
//@saved_messages_topic_id Identifier of Saved Messages topic which messages will be deleted
|
||||
//@min_date The minimum date of the messages to delete
|
||||
//@max_date The maximum date of the messages to delete
|
||||
deleteSavedMessagesTopicMessagesByDate saved_messages_topic:SavedMessagesTopic min_date:int32 max_date:int32 = Ok;
|
||||
deleteSavedMessagesTopicMessagesByDate saved_messages_topic_id:int53 min_date:int32 max_date:int32 = Ok;
|
||||
|
||||
//@description Changes the pinned state of a Saved Messages topic. There can be up to getOption("pinned_saved_messages_topic_count_max") pinned topics. The limit can be increased with Telegram Premium
|
||||
//@saved_messages_topic Saved Messages topic to pin or unpin
|
||||
//@saved_messages_topic_id Identifier of Saved Messages topic to pin or unpin
|
||||
//@is_pinned Pass true to pin the topic; pass false to unpin it
|
||||
toggleSavedMessagesTopicIsPinned saved_messages_topic:SavedMessagesTopic is_pinned:Bool = Ok;
|
||||
toggleSavedMessagesTopicIsPinned saved_messages_topic_id:int53 is_pinned:Bool = Ok;
|
||||
|
||||
//@description Changes the order of pinned Saved Messages topics @saved_messages_topics The new list of pinned Saved Messages topics
|
||||
setPinnedSavedMessagesTopics saved_messages_topics:vector<SavedMessagesTopic> = Ok;
|
||||
//@description Changes the order of pinned Saved Messages topics @saved_messages_topic_ids Identifiers of the new pinned Saved Messages topics
|
||||
setPinnedSavedMessagesTopics saved_messages_topic_ids:vector<int53> = Ok;
|
||||
|
||||
|
||||
//@description Returns a list of common group chats with a given user. Chats are sorted by their type and creation date
|
||||
|
|
@ -7327,8 +7368,8 @@ deleteChat chat_id:int53 = Ok;
|
|||
//-For optimal performance, the number of returned messages is chosen by TDLib and can be smaller than the specified limit
|
||||
//@filter Additional filter for messages to search; pass null to search for all messages
|
||||
//@message_thread_id If not 0, only messages in the specified thread will be returned; supergroups only
|
||||
//@saved_messages_topic If not null, only messages in the specified Saved Messages topic will be returned; pass null to return all messages, or for chats other than Saved Messages
|
||||
searchChatMessages chat_id:int53 query:string sender_id:MessageSender from_message_id:int53 offset:int32 limit:int32 filter:SearchMessagesFilter message_thread_id:int53 saved_messages_topic:SavedMessagesTopic = FoundChatMessages;
|
||||
//@saved_messages_topic_id If not 0, only messages in the specified Saved Messages topic will be returned; pass 0 to return all messages, or for chats other than Saved Messages
|
||||
searchChatMessages chat_id:int53 query:string sender_id:MessageSender from_message_id:int53 offset:int32 limit:int32 filter:SearchMessagesFilter message_thread_id:int53 saved_messages_topic_id:int53 = FoundChatMessages;
|
||||
|
||||
//@description Searches for messages in all chats except secret chats. Returns the results in reverse chronological order (i.e., in order of decreasing (date, chat_id, message_id)).
|
||||
//-For optimal performance, the number of returned messages is chosen by TDLib and can be smaller than the specified limit
|
||||
|
|
@ -7352,13 +7393,14 @@ searchSecretMessages chat_id:int53 query:string offset:string limit:int32 filter
|
|||
//@description Searches for messages tagged by the given reaction and with the given words in the Saved Messages chat; for Telegram Premium users only.
|
||||
//-Returns the results in reverse chronological order, i.e. in order of decreasing message_id
|
||||
//-For optimal performance, the number of returned messages is chosen by TDLib and can be smaller than the specified limit
|
||||
//@saved_messages_topic_id If not 0, only messages in the specified Saved Messages topic will be considered; pass 0 to consider all messages
|
||||
//@tag Tag to search for; pass null to return all suitable messages
|
||||
//@query Query to search for
|
||||
//@from_message_id Identifier of the message starting from which messages must be fetched; use 0 to get results from the last message
|
||||
//@offset Specify 0 to get results from exactly the message from_message_id or a negative offset to get the specified message and some newer messages
|
||||
//@limit The maximum number of messages to be returned; must be positive and can't be greater than 100. If the offset is negative, the limit must be greater than -offset.
|
||||
//-For optimal performance, the number of returned messages is chosen by TDLib and can be smaller than the specified limit
|
||||
searchSavedMessages tag:ReactionType query:string from_message_id:int53 offset:int32 limit:int32 = FoundChatMessages;
|
||||
searchSavedMessages saved_messages_topic_id:int53 tag:ReactionType query:string from_message_id:int53 offset:int32 limit:int32 = FoundChatMessages;
|
||||
|
||||
//@description Searches for call messages. Returns the results in reverse chronological order (i.e., in order of decreasing message_id). For optimal performance, the number of returned messages is chosen by TDLib
|
||||
//@offset Offset of the first entry to return as received from the previous request; use empty string to get the first chunk of results
|
||||
|
|
@ -7389,30 +7431,30 @@ getChatMessageByDate chat_id:int53 date:int32 = Message;
|
|||
//@filter Filter for message content. Filters searchMessagesFilterEmpty, searchMessagesFilterMention, searchMessagesFilterUnreadMention, and searchMessagesFilterUnreadReaction are unsupported in this function
|
||||
//@from_message_id The message identifier from which to return information about message positions
|
||||
//@limit The expected number of message positions to be returned; 50-2000. A smaller number of positions can be returned, if there are not enough appropriate messages
|
||||
//@saved_messages_topic If not null, only messages in the specified Saved Messages topic will be considered; pass null to consider all messages, or for chats other than Saved Messages
|
||||
getChatSparseMessagePositions chat_id:int53 filter:SearchMessagesFilter from_message_id:int53 limit:int32 saved_messages_topic:SavedMessagesTopic = MessagePositions;
|
||||
//@saved_messages_topic_id If not 0, only messages in the specified Saved Messages topic will be considered; pass 0 to consider all messages, or for chats other than Saved Messages
|
||||
getChatSparseMessagePositions chat_id:int53 filter:SearchMessagesFilter from_message_id:int53 limit:int32 saved_messages_topic_id:int53 = MessagePositions;
|
||||
|
||||
//@description Returns information about the next messages of the specified type in the chat split by days. Returns the results in reverse chronological order. Can return partial result for the last returned day. Behavior of this method depends on the value of the option "utc_time_offset"
|
||||
//@chat_id Identifier of the chat in which to return information about messages
|
||||
//@filter Filter for message content. Filters searchMessagesFilterEmpty, searchMessagesFilterMention, searchMessagesFilterUnreadMention, and searchMessagesFilterUnreadReaction are unsupported in this function
|
||||
//@from_message_id The message identifier from which to return information about messages; use 0 to get results from the last message
|
||||
//@saved_messages_topic If not null, only messages in the specified Saved Messages topic will be considered; pass null to consider all messages, or for chats other than Saved Messages
|
||||
getChatMessageCalendar chat_id:int53 filter:SearchMessagesFilter from_message_id:int53 saved_messages_topic:SavedMessagesTopic = MessageCalendar;
|
||||
//@saved_messages_topic_id If not0, only messages in the specified Saved Messages topic will be considered; pass 0 to consider all messages, or for chats other than Saved Messages
|
||||
getChatMessageCalendar chat_id:int53 filter:SearchMessagesFilter from_message_id:int53 saved_messages_topic_id:int53 = MessageCalendar;
|
||||
|
||||
//@description Returns approximate number of messages of the specified type in the chat
|
||||
//@chat_id Identifier of the chat in which to count messages
|
||||
//@filter Filter for message content; searchMessagesFilterEmpty is unsupported in this function
|
||||
//@saved_messages_topic If not null, only messages in the specified Saved Messages topic will be counted; pass null to count all messages, or for chats other than Saved Messages
|
||||
//@saved_messages_topic_id If not 0, only messages in the specified Saved Messages topic will be counted; pass 0 to count all messages, or for chats other than Saved Messages
|
||||
//@return_local Pass true to get the number of messages without sending network requests, or -1 if the number of messages is unknown locally
|
||||
getChatMessageCount chat_id:int53 filter:SearchMessagesFilter saved_messages_topic:SavedMessagesTopic return_local:Bool = Count;
|
||||
getChatMessageCount chat_id:int53 filter:SearchMessagesFilter saved_messages_topic_id:int53 return_local:Bool = Count;
|
||||
|
||||
//@description Returns approximate 1-based position of a message among messages, which can be found by the specified filter in the chat. Cannot be used in secret chats
|
||||
//@chat_id Identifier of the chat in which to find message position
|
||||
//@message_id Message identifier
|
||||
//@filter Filter for message content; searchMessagesFilterEmpty, searchMessagesFilterUnreadMention, searchMessagesFilterUnreadReaction, and searchMessagesFilterFailedToSend are unsupported in this function
|
||||
//@message_thread_id If not 0, only messages in the specified thread will be considered; supergroups only
|
||||
//@saved_messages_topic If not null, only messages in the specified Saved Messages topic will be considered; pass null to consider all relevant messages, or for chats other than Saved Messages
|
||||
getChatMessagePosition chat_id:int53 message_id:int53 filter:SearchMessagesFilter message_thread_id:int53 saved_messages_topic:SavedMessagesTopic = Count;
|
||||
//@saved_messages_topic_id If not 0, only messages in the specified Saved Messages topic will be considered; pass 0 to consider all relevant messages, or for chats other than Saved Messages
|
||||
getChatMessagePosition chat_id:int53 message_id:int53 filter:SearchMessagesFilter message_thread_id:int53 saved_messages_topic_id:int53 = Count;
|
||||
|
||||
//@description Returns all scheduled messages in a chat. The messages are returned in a reverse chronological order (i.e., in order of decreasing message_id) @chat_id Chat identifier
|
||||
getChatScheduledMessages chat_id:int53 = Messages;
|
||||
|
|
@ -7487,7 +7529,7 @@ setChatMessageSender chat_id:int53 message_sender_id:MessageSender = Ok;
|
|||
|
||||
//@description Sends a message. Returns the sent message
|
||||
//@chat_id Target chat
|
||||
//@message_thread_id If not 0, a message thread identifier in which the message will be sent
|
||||
//@message_thread_id If not 0, the message thread identifier in which the message will be sent
|
||||
//@reply_to Information about the message or story to be replied; pass null if none
|
||||
//@options Options to be used to send the message; pass null to use default options
|
||||
//@reply_markup Markup for replying to the message; pass null if none; for bots only
|
||||
|
|
@ -7496,13 +7538,14 @@ sendMessage chat_id:int53 message_thread_id:int53 reply_to:InputMessageReplyTo o
|
|||
|
||||
//@description Sends 2-10 messages grouped together into an album. Currently, only audio, document, photo and video messages can be grouped into an album. Documents and audio files can be only grouped in an album with messages of the same type. Returns sent messages
|
||||
//@chat_id Target chat
|
||||
//@message_thread_id If not 0, a message thread identifier in which the messages will be sent
|
||||
//@message_thread_id If not 0, the message thread identifier in which the messages will be sent
|
||||
//@reply_to Information about the message or story to be replied; pass null if none
|
||||
//@options Options to be used to send the messages; pass null to use default options
|
||||
//@input_message_contents Contents of messages to be sent. At most 10 messages can be added to an album
|
||||
sendMessageAlbum chat_id:int53 message_thread_id:int53 reply_to:InputMessageReplyTo options:messageSendOptions input_message_contents:vector<InputMessageContent> = Messages;
|
||||
|
||||
//@description Invites a bot to a chat (if it is not yet a member) and sends it the /start command. Bots can't be invited to a private chat other than the chat with the bot. Bots can't be invited to channels (although they can be added as admins) and secret chats. Returns the sent message
|
||||
//@description Invites a bot to a chat (if it is not yet a member) and sends it the /start command; requires can_invite_users member right. Bots can't be invited to a private chat other than the chat with the bot.
|
||||
//-Bots can't be invited to channels (although they can be added as admins) and secret chats. Returns the sent message
|
||||
//@bot_user_id Identifier of the bot
|
||||
//@chat_id Identifier of the target chat
|
||||
//@parameter A hidden parameter sent to the bot for deep linking purposes (https://core.telegram.org/bots#deep-linking)
|
||||
|
|
@ -7510,7 +7553,7 @@ sendBotStartMessage bot_user_id:int53 chat_id:int53 parameter:string = Message;
|
|||
|
||||
//@description Sends the result of an inline query as a message. Returns the sent message. Always clears a chat draft message
|
||||
//@chat_id Target chat
|
||||
//@message_thread_id If not 0, a message thread identifier in which the message will be sent
|
||||
//@message_thread_id If not 0, the message thread identifier in which the message will be sent
|
||||
//@reply_to Information about the message or story to be replied; pass null if none
|
||||
//@options Options to be used to send the message; pass null to use default options
|
||||
//@query_id Identifier of the inline query
|
||||
|
|
@ -7520,7 +7563,7 @@ sendInlineQueryResultMessage chat_id:int53 message_thread_id:int53 reply_to:Inpu
|
|||
|
||||
//@description Forwards previously sent messages. Returns the forwarded messages in the same order as the message identifiers passed in message_ids. If a message can't be forwarded, null will be returned instead of the message
|
||||
//@chat_id Identifier of the chat to which to forward messages
|
||||
//@message_thread_id If not 0, a message thread identifier in which the message will be sent; for forum threads only
|
||||
//@message_thread_id If not 0, the message thread identifier in which the message will be sent; for forum threads only
|
||||
//@from_chat_id Identifier of the chat from which to forward messages
|
||||
//@message_ids Identifiers of the messages to forward. Message identifiers must be in a strictly increasing order. At most 100 messages can be forwarded simultaneously. A message can be forwarded only if message.can_be_forwarded
|
||||
//@options Options to be used to send the messages; pass null to use default options
|
||||
|
|
@ -7638,7 +7681,7 @@ editMessageSchedulingState chat_id:int53 message_id:int53 scheduling_state:Messa
|
|||
//@description Returns list of custom emojis, which can be used as forum topic icon by all users
|
||||
getForumTopicDefaultIcons = Stickers;
|
||||
|
||||
//@description Creates a topic in a forum supergroup chat; requires can_manage_topics or can_create_topics rights in the supergroup
|
||||
//@description Creates a topic in a forum supergroup chat; requires can_manage_topics administrator or can_create_topics member right in the supergroup
|
||||
//@chat_id Identifier of the chat
|
||||
//@name Name of the topic; 1-128 characters
|
||||
//@icon Icon of the topic. Icon color must be one of 0x6FB9F0, 0xFFD67E, 0xCB86DB, 0x8EEE98, 0xFF93B2, or 0xFB6F5F. Telegram Premium users can use any custom emoji as topic icon, other users can use only a custom emoji returned by getForumTopicDefaultIcons
|
||||
|
|
@ -7746,8 +7789,9 @@ getMessageAddedReactions chat_id:int53 message_id:int53 reaction_type:ReactionTy
|
|||
//@description Changes type of default reaction for the current user @reaction_type New type of the default reaction
|
||||
setDefaultReactionType reaction_type:ReactionType = Ok;
|
||||
|
||||
//@description Returns tags used in Saved Messages; for Telegram Premium users only
|
||||
getSavedMessagesTags = SavedMessagesTags;
|
||||
//@description Returns tags used in Saved Messages or a Saved Messages topic
|
||||
//@saved_messages_topic_id Identifier of Saved Messages topic which tags will be returned; pass 0 to get all Saved Messages tags
|
||||
getSavedMessagesTags saved_messages_topic_id:int53 = SavedMessagesTags;
|
||||
|
||||
//@description Changes label of a Saved Messages tag; for Telegram Premium users only @tag The tag which label will be changed @label New label for the tag; 0-12 characters
|
||||
setSavedMessagesTagLabel tag:ReactionType label:string = Ok;
|
||||
|
|
@ -7913,7 +7957,7 @@ sendWebAppData bot_user_id:int53 button_text:string data:string = Ok;
|
|||
//@url The URL from an inlineKeyboardButtonTypeWebApp button, a botMenuButton button, an internalLinkTypeAttachmentMenuBot link, or an empty string otherwise
|
||||
//@theme Preferred Web App theme; pass null to use the default theme
|
||||
//@application_name Short name of the application; 0-64 English letters, digits, and underscores
|
||||
//@message_thread_id If not 0, a message thread identifier in which the message will be sent
|
||||
//@message_thread_id If not 0, the message thread identifier in which the message will be sent
|
||||
//@reply_to Information about the message or story to be replied in the message sent by the Web App; pass null if none
|
||||
openWebApp chat_id:int53 bot_user_id:int53 url:string theme:themeParameters application_name:string message_thread_id:int53 reply_to:InputMessageReplyTo = WebAppInfo;
|
||||
|
||||
|
|
@ -7978,7 +8022,7 @@ getInlineGameHighScores inline_message_id:string user_id:int53 = GameHighScores;
|
|||
deleteChatReplyMarkup chat_id:int53 message_id:int53 = Ok;
|
||||
|
||||
|
||||
//@description Sends a notification about user activity in a chat @chat_id Chat identifier @message_thread_id If not 0, a message thread identifier in which the action was performed @action The action description; pass null to cancel the currently active action
|
||||
//@description Sends a notification about user activity in a chat @chat_id Chat identifier @message_thread_id If not 0, the message thread identifier in which the action was performed @action The action description; pass null to cancel the currently active action
|
||||
sendChatAction chat_id:int53 message_thread_id:int53 action:ChatAction = Ok;
|
||||
|
||||
|
||||
|
|
@ -8064,7 +8108,7 @@ createNewSupergroupChat title:string is_forum:Bool is_channel:Bool description:s
|
|||
//@description Creates a new secret chat. Returns the newly created chat @user_id Identifier of the target user
|
||||
createNewSecretChat user_id:int53 = Chat;
|
||||
|
||||
//@description Creates a new supergroup from an existing basic group and sends a corresponding messageChatUpgradeTo and messageChatUpgradeFrom; requires creator privileges. Deactivates the original basic group @chat_id Identifier of the chat to upgrade
|
||||
//@description Creates a new supergroup from an existing basic group and sends a corresponding messageChatUpgradeTo and messageChatUpgradeFrom; requires owner privileges. Deactivates the original basic group @chat_id Identifier of the chat to upgrade
|
||||
upgradeBasicGroupChatToSupergroupChat chat_id:int53 = Chat;
|
||||
|
||||
|
||||
|
|
@ -8146,25 +8190,26 @@ getArchiveChatListSettings = ArchiveChatListSettings;
|
|||
setArchiveChatListSettings settings:archiveChatListSettings = Ok;
|
||||
|
||||
|
||||
//@description Changes the chat title. Supported only for basic groups, supergroups and channels. Requires can_change_info administrator right
|
||||
//@description Changes the chat title. Supported only for basic groups, supergroups and channels. Requires can_change_info member right
|
||||
//@chat_id Chat identifier
|
||||
//@title New title of the chat; 1-128 characters
|
||||
setChatTitle chat_id:int53 title:string = Ok;
|
||||
|
||||
//@description Changes the photo of a chat. Supported only for basic groups, supergroups and channels. Requires can_change_info administrator right
|
||||
//@description Changes the photo of a chat. Supported only for basic groups, supergroups and channels. Requires can_change_info member right
|
||||
//@chat_id Chat identifier
|
||||
//@photo New chat photo; pass null to delete the chat photo
|
||||
setChatPhoto chat_id:int53 photo:InputChatPhoto = Ok;
|
||||
|
||||
//@description Changes accent color and background custom emoji of a chat. Requires can_change_info administrator right
|
||||
//@description Changes accent color and background custom emoji of a channel chat. Requires can_change_info administrator right
|
||||
//@chat_id Chat identifier
|
||||
//@accent_color_id Identifier of the accent color to use. The chat must have at least accentColor.min_chat_boost_level boost level to pass the corresponding color
|
||||
//@accent_color_id Identifier of the accent color to use. The chat must have at least accentColor.min_channel_chat_boost_level boost level to pass the corresponding color
|
||||
//@background_custom_emoji_id Identifier of a custom emoji to be shown on the reply header and link preview background; 0 if none. Use chatBoostLevelFeatures.can_set_background_custom_emoji to check whether a custom emoji can be set
|
||||
setChatAccentColor chat_id:int53 accent_color_id:int32 background_custom_emoji_id:int64 = Ok;
|
||||
|
||||
//@description Changes accent color and background custom emoji for profile of a chat. Requires can_change_info administrator right
|
||||
//@description Changes accent color and background custom emoji for profile of a supergroup or channel chat. Requires can_change_info administrator right
|
||||
//@chat_id Chat identifier
|
||||
//@profile_accent_color_id Identifier of the accent color to use for profile; pass -1 if none. The chat must have at least profileAccentColor.min_chat_boost_level boost level to pass the corresponding color
|
||||
//@profile_accent_color_id Identifier of the accent color to use for profile; pass -1 if none. The chat must have at least profileAccentColor.min_supergroup_chat_boost_level for supergroups
|
||||
//-or profileAccentColor.min_channel_chat_boost_level for channels boost level to pass the corresponding color
|
||||
//@profile_background_custom_emoji_id Identifier of a custom emoji to be shown on the chat's profile photo background; 0 if none. Use chatBoostLevelFeatures.can_set_profile_background_custom_emoji to check whether a custom emoji can be set
|
||||
setChatProfileAccentColor chat_id:int53 profile_accent_color_id:int32 profile_background_custom_emoji_id:int64 = Ok;
|
||||
|
||||
|
|
@ -8202,7 +8247,10 @@ deleteChatBackground chat_id:int53 restore_previous:Bool = Ok;
|
|||
//@description Changes the chat theme. Supported only in private and secret chats @chat_id Chat identifier @theme_name Name of the new chat theme; pass an empty string to return the default theme
|
||||
setChatTheme chat_id:int53 theme_name:string = Ok;
|
||||
|
||||
//@description Changes the draft message in a chat @chat_id Chat identifier @message_thread_id If not 0, a message thread identifier in which the draft was changed @draft_message New draft message; pass null to remove the draft
|
||||
//@description Changes the draft message in a chat
|
||||
//@chat_id Chat identifier
|
||||
//@message_thread_id If not 0, the message thread identifier in which the draft was changed
|
||||
//@draft_message New draft message; pass null to remove the draft. All files in draft message content must be of the type inputFileLocal. Media thumbnails and captions are ignored
|
||||
setChatDraftMessage chat_id:int53 message_thread_id:int53 draft_message:draftMessage = Ok;
|
||||
|
||||
//@description Changes the notification settings of a chat. Notification settings of a chat with the current user (Saved Messages) can't be changed
|
||||
|
|
@ -8215,7 +8263,7 @@ setChatNotificationSettings chat_id:int53 notification_settings:chatNotification
|
|||
//@has_protected_content New value of has_protected_content
|
||||
toggleChatHasProtectedContent chat_id:int53 has_protected_content:Bool = Ok;
|
||||
|
||||
//@description Changes the view_as_topics setting of a forum chat @chat_id Chat identifier @view_as_topics New value of view_as_topics
|
||||
//@description Changes the view_as_topics setting of a forum chat or Saved Messages @chat_id Chat identifier @view_as_topics New value of view_as_topics
|
||||
toggleChatViewAsTopics chat_id:int53 view_as_topics:Bool = Ok;
|
||||
|
||||
//@description Changes the translatable state of a chat @chat_id Chat identifier @is_translatable New value of is_translatable
|
||||
|
|
@ -8227,19 +8275,19 @@ toggleChatIsMarkedAsUnread chat_id:int53 is_marked_as_unread:Bool = Ok;
|
|||
//@description Changes the value of the default disable_notification parameter, used when a message is sent to a chat @chat_id Chat identifier @default_disable_notification New value of default_disable_notification
|
||||
toggleChatDefaultDisableNotification chat_id:int53 default_disable_notification:Bool = Ok;
|
||||
|
||||
//@description Changes reactions, available in a chat. Available for basic groups, supergroups, and channels. Requires can_change_info administrator right
|
||||
//@description Changes reactions, available in a chat. Available for basic groups, supergroups, and channels. Requires can_change_info member right
|
||||
//@chat_id Identifier of the chat
|
||||
//@available_reactions Reactions available in the chat. All explicitly specified emoji reactions must be active. Up to the chat's boost level custom emoji reactions can be explicitly specified
|
||||
//@available_reactions Reactions available in the chat. All explicitly specified emoji reactions must be active. In channel chats up to the chat's boost level custom emoji reactions can be explicitly specified
|
||||
setChatAvailableReactions chat_id:int53 available_reactions:ChatAvailableReactions = Ok;
|
||||
|
||||
//@description Changes application-specific data associated with a chat @chat_id Chat identifier @client_data New value of client_data
|
||||
setChatClientData chat_id:int53 client_data:string = Ok;
|
||||
|
||||
//@description Changes information about a chat. Available for basic groups, supergroups, and channels. Requires can_change_info administrator right @chat_id Identifier of the chat @param_description New chat description; 0-255 characters
|
||||
//@description Changes information about a chat. Available for basic groups, supergroups, and channels. Requires can_change_info member right @chat_id Identifier of the chat @param_description New chat description; 0-255 characters
|
||||
setChatDescription chat_id:int53 description:string = Ok;
|
||||
|
||||
//@description Changes the discussion group of a channel chat; requires can_change_info administrator right in the channel if it is specified
|
||||
//@chat_id Identifier of the channel chat. Pass 0 to remove a link from the supergroup passed in the second argument to a linked channel chat (requires can_pin_messages rights in the supergroup)
|
||||
//@chat_id Identifier of the channel chat. Pass 0 to remove a link from the supergroup passed in the second argument to a linked channel chat (requires can_pin_messages member right in the supergroup)
|
||||
//@discussion_chat_id Identifier of a new channel's discussion group. Use 0 to remove the discussion group. Use the method getSuitableDiscussionChats to find all suitable groups.
|
||||
//-Basic group chats must be first upgraded to supergroup chats. If new chat members don't have access to old messages in the supergroup, then toggleSupergroupIsAllHistoryAvailable must be used first to change that
|
||||
setChatDiscussionGroup chat_id:int53 discussion_chat_id:int53 = Ok;
|
||||
|
|
@ -8247,23 +8295,23 @@ setChatDiscussionGroup chat_id:int53 discussion_chat_id:int53 = Ok;
|
|||
//@description Changes the location of a chat. Available only for some location-based supergroups, use supergroupFullInfo.can_set_location to check whether the method is allowed to use @chat_id Chat identifier @location New location for the chat; must be valid and not null
|
||||
setChatLocation chat_id:int53 location:chatLocation = Ok;
|
||||
|
||||
//@description Changes the slow mode delay of a chat. Available only for supergroups; requires can_restrict_members rights @chat_id Chat identifier @slow_mode_delay New slow mode delay for the chat, in seconds; must be one of 0, 10, 30, 60, 300, 900, 3600
|
||||
//@description Changes the slow mode delay of a chat. Available only for supergroups; requires can_restrict_members right @chat_id Chat identifier @slow_mode_delay New slow mode delay for the chat, in seconds; must be one of 0, 10, 30, 60, 300, 900, 3600
|
||||
setChatSlowModeDelay chat_id:int53 slow_mode_delay:int32 = Ok;
|
||||
|
||||
//@description Pins a message in a chat; requires can_pin_messages rights or can_edit_messages rights in the channel
|
||||
//@description Pins a message in a chat; requires can_pin_messages member right if the chat is a basic group or supergroup, or can_edit_messages administrator right if the chat is a channel
|
||||
//@chat_id Identifier of the chat
|
||||
//@message_id Identifier of the new pinned message
|
||||
//@disable_notification Pass true to disable notification about the pinned message. Notifications are always disabled in channels and private chats
|
||||
//@only_for_self Pass true to pin the message only for self; private chats only
|
||||
pinChatMessage chat_id:int53 message_id:int53 disable_notification:Bool only_for_self:Bool = Ok;
|
||||
|
||||
//@description Removes a pinned message from a chat; requires can_pin_messages rights in the group or can_edit_messages rights in the channel @chat_id Identifier of the chat @message_id Identifier of the removed pinned message
|
||||
//@description Removes a pinned message from a chat; requires can_pin_messages member right if the chat is a basic group or supergroup, or can_edit_messages administrator right if the chat is a channel @chat_id Identifier of the chat @message_id Identifier of the removed pinned message
|
||||
unpinChatMessage chat_id:int53 message_id:int53 = Ok;
|
||||
|
||||
//@description Removes all pinned messages from a chat; requires can_pin_messages rights in the group or can_edit_messages rights in the channel @chat_id Identifier of the chat
|
||||
//@description Removes all pinned messages from a chat; requires can_pin_messages member right if the chat is a basic group or supergroup, or can_edit_messages administrator right if the chat is a channel @chat_id Identifier of the chat
|
||||
unpinAllChatMessages chat_id:int53 = Ok;
|
||||
|
||||
//@description Removes all pinned messages from a forum topic; requires can_pin_messages rights in the supergroup
|
||||
//@description Removes all pinned messages from a forum topic; requires can_pin_messages member right in the supergroup
|
||||
//@chat_id Identifier of the chat
|
||||
//@message_thread_id Message thread identifier in which messages will be unpinned
|
||||
unpinAllMessageThreadMessages chat_id:int53 message_thread_id:int53 = Ok;
|
||||
|
|
@ -8275,24 +8323,26 @@ joinChat chat_id:int53 = Ok;
|
|||
//@description Removes the current user from chat members. Private and secret chats can't be left using this method @chat_id Chat identifier
|
||||
leaveChat chat_id:int53 = Ok;
|
||||
|
||||
//@description Adds a new member to a chat. Members can't be added to private or secret chats
|
||||
//@description Adds a new member to a chat; requires can_invite_users member right. Members can't be added to private or secret chats
|
||||
//@chat_id Chat identifier
|
||||
//@user_id Identifier of the user
|
||||
//@forward_limit The number of earlier messages from the chat to be forwarded to the new member; up to 100. Ignored for supergroups and channels, or if the added user is a bot
|
||||
addChatMember chat_id:int53 user_id:int53 forward_limit:int32 = Ok;
|
||||
|
||||
//@description Adds multiple new members to a chat. Currently, this method is only available for supergroups and channels. This method can't be used to join a chat. Members can't be added to a channel if it has more than 200 members
|
||||
//@description Adds multiple new members to a chat; requires can_invite_users member right. Currently, this method is only available for supergroups and channels. This method can't be used to join a chat. Members can't be added to a channel if it has more than 200 members
|
||||
//@chat_id Chat identifier
|
||||
//@user_ids Identifiers of the users to be added to the chat. The maximum number of added users is 20 for supergroups and 100 for channels
|
||||
addChatMembers chat_id:int53 user_ids:vector<int53> = Ok;
|
||||
|
||||
//@description Changes the status of a chat member, needs appropriate privileges. This function is currently not suitable for transferring chat ownership; use transferChatOwnership instead. Use addChatMember or banChatMember if some additional parameters needs to be passed
|
||||
//@description Changes the status of a chat member; requires can_invite_users member right to add a chat member, can_promote_members administrator right to change administrator rights of the member,
|
||||
//-and can_restrict_members administrator right to change restrictions of a user. This function is currently not suitable for transferring chat ownership; use transferChatOwnership instead.
|
||||
//-Use addChatMember or banChatMember if some additional parameters needs to be passed
|
||||
//@chat_id Chat identifier
|
||||
//@member_id Member identifier. Chats can be only banned and unbanned in supergroups and channels
|
||||
//@status The new status of the member in the chat
|
||||
setChatMemberStatus chat_id:int53 member_id:MessageSender status:ChatMemberStatus = Ok;
|
||||
|
||||
//@description Bans a member in a chat. Members can't be banned in private or secret chats. In supergroups and channels, the user will not be able to return to the group on their own using invite links, etc., unless unbanned first
|
||||
//@description Bans a member in a chat; requires can_restrict_members administrator right. Members can't be banned in private or secret chats. In supergroups and channels, the user will not be able to return to the group on their own using invite links, etc., unless unbanned first
|
||||
//@chat_id Chat identifier
|
||||
//@member_id Member identifier
|
||||
//@banned_until_date Point in time (Unix timestamp) when the user will be unbanned; 0 if never. If the user is banned for more than 366 days or for less than 30 seconds from the current time, the user is considered to be banned forever. Ignored in basic groups and if a chat is banned
|
||||
|
|
@ -8302,7 +8352,7 @@ banChatMember chat_id:int53 member_id:MessageSender banned_until_date:int32 revo
|
|||
//@description Checks whether the current session can be used to transfer a chat ownership to another user
|
||||
canTransferOwnership = CanTransferOwnershipResult;
|
||||
|
||||
//@description Changes the owner of a chat. The current user must be a current owner of the chat. Use the method canTransferOwnership to check whether the ownership can be transferred from the current session. Available only for supergroups and channel chats
|
||||
//@description Changes the owner of a chat; requires owner privileges in the chat. Use the method canTransferOwnership to check whether the ownership can be transferred from the current session. Available only for supergroups and channel chats
|
||||
//@chat_id Chat identifier
|
||||
//@user_id Identifier of the user to which transfer the ownership. The ownership can't be transferred to a bot or to a deleted user
|
||||
//@password The 2-step verification password of the current user
|
||||
|
|
@ -8311,7 +8361,7 @@ transferChatOwnership chat_id:int53 user_id:int53 password:string = Ok;
|
|||
//@description Returns information about a single member of a chat @chat_id Chat identifier @member_id Member identifier
|
||||
getChatMember chat_id:int53 member_id:MessageSender = ChatMember;
|
||||
|
||||
//@description Searches for a specified query in the first name, last name and usernames of the members of a specified chat. Requires administrator rights in channels
|
||||
//@description Searches for a specified query in the first name, last name and usernames of the members of a specified chat. Requires administrator rights if the chat is a channel
|
||||
//@chat_id Chat identifier
|
||||
//@query Query to search for
|
||||
//@limit The maximum number of users to be returned; up to 200
|
||||
|
|
@ -8373,18 +8423,18 @@ readChatList chat_list:ChatList = Ok;
|
|||
//@only_local Pass true to get only locally available information without sending network requests
|
||||
getStory story_sender_chat_id:int53 story_id:int32 only_local:Bool = Story;
|
||||
|
||||
//@description Returns channel chats in which the current user has the right to post stories. The chats must be rechecked with canSendStory before actually trying to post a story there
|
||||
//@description Returns supergroup and channel chats in which the current user has the right to post stories. The chats must be rechecked with canSendStory before actually trying to post a story there
|
||||
getChatsToSendStories = Chats;
|
||||
|
||||
//@description Checks whether the current user can send a story on behalf of a chat; requires can_post_stories rights for channel chats @chat_id Chat identifier
|
||||
//@description Checks whether the current user can send a story on behalf of a chat; requires can_post_stories right for supergroup and channel chats @chat_id Chat identifier
|
||||
canSendStory chat_id:int53 = CanSendStoryResult;
|
||||
|
||||
//@description Sends a new story to a chat; requires can_post_stories rights for channel chats. Returns a temporary story
|
||||
//@description Sends a new story to a chat; requires can_post_stories right for supergroup and channel chats. Returns a temporary story
|
||||
//@chat_id Identifier of the chat that will post the story
|
||||
//@content Content of the story
|
||||
//@areas Clickable rectangle areas to be shown on the story media; pass null if none
|
||||
//@caption Story caption; pass null to use an empty caption; 0-getOption("story_caption_length_max") characters
|
||||
//@privacy_settings The privacy settings for the story
|
||||
//@privacy_settings The privacy settings for the story; ignored for stories sent to supergroup and channel chats
|
||||
//@active_period Period after which the story is moved to archive, in seconds; must be one of 6 * 3600, 12 * 3600, 86400, or 2 * 86400 for Telegram Premium users, and 86400 otherwise
|
||||
//@from_story_full_id Full identifier of the original story, which content was used to create the story
|
||||
//@is_pinned Pass true to keep the story accessible after expiration
|
||||
|
|
@ -8399,11 +8449,10 @@ sendStory chat_id:int53 content:InputStoryContent areas:inputStoryAreas caption:
|
|||
//@caption New story caption; pass null to keep the current caption
|
||||
editStory story_sender_chat_id:int53 story_id:int32 content:InputStoryContent areas:inputStoryAreas caption:formattedText = Ok;
|
||||
|
||||
//@description Changes privacy settings of a story. Can be called only if story.can_be_edited == true
|
||||
//@story_sender_chat_id Identifier of the chat that posted the story
|
||||
//@description Changes privacy settings of a story. The method can be called only for stories posted on behalf of the current user and if story.can_be_edited == true
|
||||
//@story_id Identifier of the story
|
||||
//@privacy_settings The new privacy settigs for the story
|
||||
setStoryPrivacySettings story_sender_chat_id:int53 story_id:int32 privacy_settings:StoryPrivacySettings = Ok;
|
||||
setStoryPrivacySettings story_id:int32 privacy_settings:StoryPrivacySettings = Ok;
|
||||
|
||||
//@description Toggles whether a story is accessible after expiration. Can be called only if story.can_toggle_is_pinned == true
|
||||
//@story_sender_chat_id Identifier of the chat that posted the story
|
||||
|
|
@ -8438,7 +8487,7 @@ getChatActiveStories chat_id:int53 = ChatActiveStories;
|
|||
//-For optimal performance, the number of returned stories is chosen by TDLib and can be smaller than the specified limit
|
||||
getChatPinnedStories chat_id:int53 from_story_id:int32 limit:int32 = Stories;
|
||||
|
||||
//@description Returns the list of all stories posted by the given chat; requires can_edit_stories rights for channel chats.
|
||||
//@description Returns the list of all stories posted by the given chat; requires can_edit_stories right in the chat.
|
||||
//-The stories are returned in a reverse chronological order (i.e., in order of decreasing story_id). For optimal performance, the number of returned stories is chosen by TDLib
|
||||
//@chat_id Chat identifier
|
||||
//@from_story_id Identifier of the story starting from which stories must be returned; use 0 to get results from the last story
|
||||
|
|
@ -8459,7 +8508,7 @@ closeStory story_sender_chat_id:int53 story_id:int32 = Ok;
|
|||
//@description Returns reactions, which can be chosen for a story @row_size Number of reaction per row, 5-25
|
||||
getStoryAvailableReactions row_size:int32 = AvailableReactions;
|
||||
|
||||
//@description Changes chosen reaction on a story
|
||||
//@description Changes chosen reaction on a story that has already been sent
|
||||
//@story_sender_chat_id The identifier of the sender of the story
|
||||
//@story_id The identifier of the story
|
||||
//@reaction_type Type of the reaction to set; pass null to remove the reaction. `reactionTypeCustomEmoji` reactions can be used only by Telegram Premium users
|
||||
|
|
@ -8505,35 +8554,40 @@ activateStoryStealthMode = Ok;
|
|||
getStoryPublicForwards story_sender_chat_id:int53 story_id:int32 offset:string limit:int32 = PublicForwards;
|
||||
|
||||
|
||||
//@description Returns list of features available on the specific chat boost level; this is an offline request @level Chat boost level
|
||||
getChatBoostLevelFeatures level:int32 = ChatBoostLevelFeatures;
|
||||
//@description Returns list of features available on the specific chat boost level; this is an offline request
|
||||
//@is_channel Pass true to get the list of features for channels; pass false to get the list of features for supergroups
|
||||
//@level Chat boost level
|
||||
getChatBoostLevelFeatures is_channel:Bool level:int32 = ChatBoostLevelFeatures;
|
||||
|
||||
//@description Returns list of features available on the first 10 chat boost levels; this is an offline request
|
||||
getChatBoostFeatures = ChatBoostFeatures;
|
||||
//@is_channel Pass true to get the list of features for channels; pass false to get the list of features for supergroups
|
||||
getChatBoostFeatures is_channel:Bool = ChatBoostFeatures;
|
||||
|
||||
//@description Returns the list of available chat boost slots for the current user
|
||||
getAvailableChatBoostSlots = ChatBoostSlots;
|
||||
|
||||
//@description Returns the current boost status for a channel chat @chat_id Identifier of the channel chat
|
||||
//@description Returns the current boost status for a supergroup or a channel chat @chat_id Identifier of the chat
|
||||
getChatBoostStatus chat_id:int53 = ChatBoostStatus;
|
||||
|
||||
//@description Boosts a chat and returns the list of available chat boost slots for the current user after the boost @chat_id Identifier of the chat @slot_ids Identifiers of boost slots of the current user from which to apply boosts to the chat
|
||||
//@description Boosts a chat and returns the list of available chat boost slots for the current user after the boost
|
||||
//@chat_id Identifier of the chat
|
||||
//@slot_ids Identifiers of boost slots of the current user from which to apply boosts to the chat
|
||||
boostChat chat_id:int53 slot_ids:vector<int32> = ChatBoostSlots;
|
||||
|
||||
//@description Returns an HTTPS link to boost the specified channel chat @chat_id Identifier of the chat
|
||||
//@description Returns an HTTPS link to boost the specified supergroup or channel chat @chat_id Identifier of the chat
|
||||
getChatBoostLink chat_id:int53 = ChatBoostLink;
|
||||
|
||||
//@description Returns information about a link to boost a chat. Can be called for any internal link of the type internalLinkTypeChatBoost @url The link to boost a chat
|
||||
getChatBoostLinkInfo url:string = ChatBoostLinkInfo;
|
||||
|
||||
//@description Returns list of boosts applied to a chat; requires administrator rights in the channel chat
|
||||
//@description Returns list of boosts applied to a chat; requires administrator rights in the chat
|
||||
//@chat_id Identifier of the chat
|
||||
//@only_gift_codes Pass true to receive only boosts received from gift codes and giveaways created by the chat
|
||||
//@offset Offset of the first entry to return as received from the previous request; use empty string to get the first chunk of results
|
||||
//@limit The maximum number of boosts to be returned; up to 100. For optimal performance, the number of returned boosts can be smaller than the specified limit
|
||||
getChatBoosts chat_id:int53 only_gift_codes:Bool offset:string limit:int32 = FoundChatBoosts;
|
||||
|
||||
//@description Returns list of boosts applied to a chat by a given user; requires administrator rights in the channel chat; for bots only
|
||||
//@description Returns list of boosts applied to a chat by a given user; requires administrator rights in the chat; for bots only
|
||||
//@chat_id Identifier of the chat
|
||||
//@user_id Identifier of the user
|
||||
getUserChatBoosts chat_id:int53 user_id:int53 = FoundChatBoosts;
|
||||
|
|
@ -8663,11 +8717,11 @@ searchFileDownloads query:string only_active:Bool only_completed:Bool offset:str
|
|||
getMessageFileType message_file_head:string = MessageFileType;
|
||||
|
||||
//@description Returns a confirmation text to be shown to the user before starting message import
|
||||
//@chat_id Identifier of a chat to which the messages will be imported. It must be an identifier of a private chat with a mutual contact or an identifier of a supergroup chat with can_change_info administrator right
|
||||
//@chat_id Identifier of a chat to which the messages will be imported. It must be an identifier of a private chat with a mutual contact or an identifier of a supergroup chat with can_change_info member right
|
||||
getMessageImportConfirmationText chat_id:int53 = Text;
|
||||
|
||||
//@description Imports messages exported from another app
|
||||
//@chat_id Identifier of a chat to which the messages will be imported. It must be an identifier of a private chat with a mutual contact or an identifier of a supergroup chat with can_change_info administrator right
|
||||
//@chat_id Identifier of a chat to which the messages will be imported. It must be an identifier of a private chat with a mutual contact or an identifier of a supergroup chat with can_change_info member right
|
||||
//@message_file File with messages to import. Only inputFileLocal and inputFileGenerated are supported. The file must not be previously uploaded
|
||||
//@attached_files Files used in the imported messages. Only inputFileLocal and inputFileGenerated are supported. The files must not be previously uploaded
|
||||
importMessages chat_id:int53 message_file:InputFile attached_files:vector<InputFile> = Ok;
|
||||
|
|
@ -8792,17 +8846,17 @@ getVideoChatAvailableParticipants chat_id:int53 = MessageSenders;
|
|||
//@description Changes default participant identifier, on whose behalf a video chat in the chat will be joined @chat_id Chat identifier @default_participant_id Default group call participant identifier to join the video chats
|
||||
setVideoChatDefaultParticipant chat_id:int53 default_participant_id:MessageSender = Ok;
|
||||
|
||||
//@description Creates a video chat (a group call bound to a chat). Available only for basic groups, supergroups and channels; requires can_manage_video_chats rights
|
||||
//@description Creates a video chat (a group call bound to a chat). Available only for basic groups, supergroups and channels; requires can_manage_video_chats administrator right
|
||||
//@chat_id Identifier of a chat in which the video chat will be created
|
||||
//@title Group call title; if empty, chat title will be used
|
||||
//@start_date Point in time (Unix timestamp) when the group call is supposed to be started by an administrator; 0 to start the video chat immediately. The date must be at least 10 seconds and at most 8 days in the future
|
||||
//@is_rtmp_stream Pass true to create an RTMP stream instead of an ordinary video chat; requires creator privileges
|
||||
//@is_rtmp_stream Pass true to create an RTMP stream instead of an ordinary video chat; requires owner privileges
|
||||
createVideoChat chat_id:int53 title:string start_date:int32 is_rtmp_stream:Bool = GroupCallId;
|
||||
|
||||
//@description Returns RTMP URL for streaming to the chat; requires creator privileges @chat_id Chat identifier
|
||||
//@description Returns RTMP URL for streaming to the chat; requires owner privileges @chat_id Chat identifier
|
||||
getVideoChatRtmpUrl chat_id:int53 = RtmpUrl;
|
||||
|
||||
//@description Replaces the current RTMP URL for streaming to the chat; requires creator privileges @chat_id Chat identifier
|
||||
//@description Replaces the current RTMP URL for streaming to the chat; requires owner privileges @chat_id Chat identifier
|
||||
replaceVideoChatRtmpUrl chat_id:int53 = RtmpUrl;
|
||||
|
||||
//@description Returns information about a group call @group_call_id Group call identifier
|
||||
|
|
@ -9347,13 +9401,25 @@ toggleSupergroupUsernameIsActive supergroup_id:int53 username:string is_active:B
|
|||
//@description Disables all active non-editable usernames of a supergroup or channel, requires owner privileges in the supergroup or channel @supergroup_id Identifier of the supergroup or channel
|
||||
disableAllSupergroupUsernames supergroup_id:int53 = Ok;
|
||||
|
||||
//@description Changes order of active usernames of a supergroup or channel, requires owner privileges in the supergroup or channel @supergroup_id Identifier of the supergroup or channel @usernames The new order of active usernames. All currently active usernames must be specified
|
||||
//@description Changes order of active usernames of a supergroup or channel, requires owner privileges in the supergroup or channel
|
||||
//@supergroup_id Identifier of the supergroup or channel
|
||||
//@usernames The new order of active usernames. All currently active usernames must be specified
|
||||
reorderSupergroupActiveUsernames supergroup_id:int53 usernames:vector<string> = Ok;
|
||||
|
||||
//@description Changes the sticker set of a supergroup; requires can_change_info administrator right @supergroup_id Identifier of the supergroup @sticker_set_id New value of the supergroup sticker set identifier. Use 0 to remove the supergroup sticker set
|
||||
setSupergroupStickerSet supergroup_id:int53 sticker_set_id:int64 = Ok;
|
||||
|
||||
//@description Toggles whether sender signature is added to sent messages in a channel; requires can_change_info administrator right @supergroup_id Identifier of the channel @sign_messages New value of sign_messages
|
||||
//@description Changes the custom emoji sticker set of a supergroup; requires can_change_info administrator right. The chat must have at least chatBoostFeatures.min_custom_emoji_sticker_set_boost_level boost level to pass the corresponding color
|
||||
//@supergroup_id Identifier of the supergroup
|
||||
//@custom_emoji_sticker_set_id New value of the custom emoji sticker set identifier for the supergroup. Use 0 to remove the custom emoji sticker set in the supergroup
|
||||
setSupergroupCustomEmojiStickerSet supergroup_id:int53 custom_emoji_sticker_set_id:int64 = Ok;
|
||||
|
||||
//@description Changes the number of times the supergroup must be boosted by a user to ignore slow mode and chat permission restrictions; requires can_restrict_members administrator right
|
||||
//@supergroup_id Identifier of the supergroup
|
||||
//@unrestrict_boost_count New value of the unrestrict_boost_count supergroup setting; 0-8. Use 0 to remove the setting
|
||||
setSupergroupUnrestrictBoostCount supergroup_id:int53 unrestrict_boost_count:int32 = Ok;
|
||||
|
||||
//@description Toggles whether sender signature is added to sent messages in a channel; requires can_change_info member right @supergroup_id Identifier of the channel @sign_messages New value of sign_messages
|
||||
toggleSupergroupSignMessages supergroup_id:int53 sign_messages:Bool = Ok;
|
||||
|
||||
//@description Toggles whether joining is mandatory to send messages to a discussion supergroup; requires can_restrict_members administrator right @supergroup_id Identifier of the supergroup @join_to_send_messages New value of join_to_send_messages
|
||||
|
|
@ -9362,7 +9428,7 @@ toggleSupergroupJoinToSendMessages supergroup_id:int53 join_to_send_messages:Boo
|
|||
//@description Toggles whether all users directly joining the supergroup need to be approved by supergroup administrators; requires can_restrict_members administrator right @supergroup_id Identifier of the channel @join_by_request New value of join_by_request
|
||||
toggleSupergroupJoinByRequest supergroup_id:int53 join_by_request:Bool = Ok;
|
||||
|
||||
//@description Toggles whether the message history of a supergroup is available to new members; requires can_change_info administrator right @supergroup_id The identifier of the supergroup @is_all_history_available The new value of is_all_history_available
|
||||
//@description Toggles whether the message history of a supergroup is available to new members; requires can_change_info member right @supergroup_id The identifier of the supergroup @is_all_history_available The new value of is_all_history_available
|
||||
toggleSupergroupIsAllHistoryAvailable supergroup_id:int53 is_all_history_available:Bool = Ok;
|
||||
|
||||
//@description Toggles whether non-administrators can receive only administrators and bots using getSupergroupMembers or searchChatMembers. Can be called only if supergroupFullInfo.can_hide_members == true
|
||||
|
|
@ -9864,7 +9930,7 @@ clickPremiumSubscriptionButton = Ok;
|
|||
getPremiumState = PremiumState;
|
||||
|
||||
//@description Returns available options for Telegram Premium gift code or giveaway creation
|
||||
//@boosted_chat_id Identifier of the channel chat, which will be automatically boosted by receivers of the gift codes and which is administered by the user; 0 if none
|
||||
//@boosted_chat_id Identifier of the supergroup or channel chat, which will be automatically boosted by receivers of the gift codes and which is administered by the user; 0 if none
|
||||
getPremiumGiftCodePaymentOptions boosted_chat_id:int53 = PremiumGiftCodePaymentOptions;
|
||||
|
||||
//@description Return information about a Telegram Premium gift code @code The code to check
|
||||
|
|
@ -9873,7 +9939,7 @@ checkPremiumGiftCode code:string = PremiumGiftCodeInfo;
|
|||
//@description Applies a Telegram Premium gift code @code The code to apply
|
||||
applyPremiumGiftCode code:string = Ok;
|
||||
|
||||
//@description Launches a prepaid Telegram Premium giveaway for subscribers of channel chats; requires can_post_messages rights in the channels
|
||||
//@description Launches a prepaid Telegram Premium giveaway
|
||||
//@giveaway_id Unique identifier of the prepaid giveaway
|
||||
//@parameters Giveaway parameters
|
||||
launchPrepaidPremiumGiveaway giveaway_id:int64 parameters:premiumGiveawayParameters = Ok;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue