mirror of
https://github.com/c0re100/gotdlib.git
synced 2026-02-21 20:20:17 +01:00
Update to TDLib 1.8.24
This commit is contained in:
parent
e30af65ec7
commit
8f4de4d76e
9 changed files with 2472 additions and 282 deletions
|
|
@ -93,10 +93,6 @@ type SetTdlibParametersRequest struct {
|
|||
SystemVersion string `json:"system_version"`
|
||||
// Application version; must be non-empty
|
||||
ApplicationVersion string `json:"application_version"`
|
||||
// Pass true to automatically delete old files in background
|
||||
EnableStorageOptimizer bool `json:"enable_storage_optimizer"`
|
||||
// Pass true to ignore original file names for downloaded files. Otherwise, downloaded files are saved under names as close as possible to the original name
|
||||
IgnoreFileNames bool `json:"ignore_file_names"`
|
||||
}
|
||||
|
||||
// Sets the parameters for TDLib initialization. Works only when the current authorization state is authorizationStateWaitTdlibParameters
|
||||
|
|
@ -120,8 +116,6 @@ func (client *Client) SetTdlibParameters(req *SetTdlibParametersRequest) (*Ok, e
|
|||
"device_model": req.DeviceModel,
|
||||
"system_version": req.SystemVersion,
|
||||
"application_version": req.ApplicationVersion,
|
||||
"enable_storage_optimizer": req.EnableStorageOptimizer,
|
||||
"ignore_file_names": req.IgnoreFileNames,
|
||||
},
|
||||
})
|
||||
if err != nil {
|
||||
|
|
@ -846,6 +840,25 @@ func (client *Client) ResendRecoveryEmailAddressCode() (*PasswordState, error) {
|
|||
return UnmarshalPasswordState(result.Data)
|
||||
}
|
||||
|
||||
// Cancels verification of the 2-step verification recovery email address
|
||||
func (client *Client) CancelRecoveryEmailAddressVerification() (*PasswordState, error) {
|
||||
result, err := client.Send(Request{
|
||||
meta: meta{
|
||||
Type: "cancelRecoveryEmailAddressVerification",
|
||||
},
|
||||
Data: map[string]interface{}{},
|
||||
})
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
if result.Type == "error" {
|
||||
return nil, buildResponseError(result.Data)
|
||||
}
|
||||
|
||||
return UnmarshalPasswordState(result.Data)
|
||||
}
|
||||
|
||||
// Requests to send a 2-step verification password recovery code to an email address that was previously set up
|
||||
func (client *Client) RequestPasswordRecovery() (*EmailAddressAuthenticationCodeInfo, error) {
|
||||
result, err := client.Send(Request{
|
||||
|
|
@ -1451,6 +1464,53 @@ func (client *Client) GetMessageThread(req *GetMessageThreadRequest) (*MessageTh
|
|||
return UnmarshalMessageThreadInfo(result.Data)
|
||||
}
|
||||
|
||||
type GetMessageReadDateRequest struct {
|
||||
// Chat identifier
|
||||
ChatId int64 `json:"chat_id"`
|
||||
// Identifier of the message
|
||||
MessageId int64 `json:"message_id"`
|
||||
}
|
||||
|
||||
// Returns read date of a recent outgoing message in a private chat. The method can be called if message.can_get_read_date == true and the message is read
|
||||
func (client *Client) GetMessageReadDate(req *GetMessageReadDateRequest) (MessageReadDate, error) {
|
||||
result, err := client.Send(Request{
|
||||
meta: meta{
|
||||
Type: "getMessageReadDate",
|
||||
},
|
||||
Data: map[string]interface{}{
|
||||
"chat_id": req.ChatId,
|
||||
"message_id": req.MessageId,
|
||||
},
|
||||
})
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
if result.Type == "error" {
|
||||
return nil, buildResponseError(result.Data)
|
||||
}
|
||||
|
||||
switch result.Type {
|
||||
case TypeMessageReadDateRead:
|
||||
return UnmarshalMessageReadDateRead(result.Data)
|
||||
|
||||
case TypeMessageReadDateUnread:
|
||||
return UnmarshalMessageReadDateUnread(result.Data)
|
||||
|
||||
case TypeMessageReadDateTooOld:
|
||||
return UnmarshalMessageReadDateTooOld(result.Data)
|
||||
|
||||
case TypeMessageReadDateUserPrivacyRestricted:
|
||||
return UnmarshalMessageReadDateUserPrivacyRestricted(result.Data)
|
||||
|
||||
case TypeMessageReadDateMyPrivacyRestricted:
|
||||
return UnmarshalMessageReadDateMyPrivacyRestricted(result.Data)
|
||||
|
||||
default:
|
||||
return nil, errors.New("invalid type")
|
||||
}
|
||||
}
|
||||
|
||||
type GetMessageViewersRequest struct {
|
||||
// Chat identifier
|
||||
ChatId int64 `json:"chat_id"`
|
||||
|
|
@ -2137,6 +2197,231 @@ 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
|
||||
Limit int32 `json:"limit"`
|
||||
}
|
||||
|
||||
// Returns list of non-pinned Saved Messages topics from the specified offset
|
||||
func (client *Client) GetSavedMessagesTopics(req *GetSavedMessagesTopicsRequest) (*FoundSavedMessagesTopics, error) {
|
||||
result, err := client.Send(Request{
|
||||
meta: meta{
|
||||
Type: "getSavedMessagesTopics",
|
||||
},
|
||||
Data: map[string]interface{}{
|
||||
"offset": req.Offset,
|
||||
"limit": req.Limit,
|
||||
},
|
||||
})
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
if result.Type == "error" {
|
||||
return nil, buildResponseError(result.Data)
|
||||
}
|
||||
|
||||
return UnmarshalFoundSavedMessagesTopics(result.Data)
|
||||
}
|
||||
|
||||
type GetSavedMessagesTopicHistoryRequest struct {
|
||||
// Saved Messages topic which messages will be fetched
|
||||
SavedMessagesTopic SavedMessagesTopic `json:"saved_messages_topic"`
|
||||
// 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
|
||||
Offset int32 `json:"offset"`
|
||||
// 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
|
||||
Limit int32 `json:"limit"`
|
||||
}
|
||||
|
||||
// Returns messages in a Saved Messages topic. The messages are returned in a reverse chronological order (i.e., in order of decreasing message_id)
|
||||
func (client *Client) GetSavedMessagesTopicHistory(req *GetSavedMessagesTopicHistoryRequest) (*Messages, error) {
|
||||
result, err := client.Send(Request{
|
||||
meta: meta{
|
||||
Type: "getSavedMessagesTopicHistory",
|
||||
},
|
||||
Data: map[string]interface{}{
|
||||
"saved_messages_topic": req.SavedMessagesTopic,
|
||||
"from_message_id": req.FromMessageId,
|
||||
"offset": req.Offset,
|
||||
"limit": req.Limit,
|
||||
},
|
||||
})
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
if result.Type == "error" {
|
||||
return nil, buildResponseError(result.Data)
|
||||
}
|
||||
|
||||
return UnmarshalMessages(result.Data)
|
||||
}
|
||||
|
||||
type GetSavedMessagesTopicMessageByDateRequest struct {
|
||||
// Saved Messages topic which message will be returned
|
||||
SavedMessagesTopic SavedMessagesTopic `json:"saved_messages_topic"`
|
||||
// Point in time (Unix timestamp) relative to which to search for messages
|
||||
Date int32 `json:"date"`
|
||||
}
|
||||
|
||||
// Returns the last message sent in a Saved Messages topic no later than the specified date
|
||||
func (client *Client) GetSavedMessagesTopicMessageByDate(req *GetSavedMessagesTopicMessageByDateRequest) (*Message, error) {
|
||||
result, err := client.Send(Request{
|
||||
meta: meta{
|
||||
Type: "getSavedMessagesTopicMessageByDate",
|
||||
},
|
||||
Data: map[string]interface{}{
|
||||
"saved_messages_topic": req.SavedMessagesTopic,
|
||||
"date": req.Date,
|
||||
},
|
||||
})
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
if result.Type == "error" {
|
||||
return nil, buildResponseError(result.Data)
|
||||
}
|
||||
|
||||
return UnmarshalMessage(result.Data)
|
||||
}
|
||||
|
||||
type DeleteSavedMessagesTopicHistoryRequest struct {
|
||||
// Saved Messages topic which messages will be deleted
|
||||
SavedMessagesTopic SavedMessagesTopic `json:"saved_messages_topic"`
|
||||
}
|
||||
|
||||
// Deletes all messages in a Saved Messages topic
|
||||
func (client *Client) DeleteSavedMessagesTopicHistory(req *DeleteSavedMessagesTopicHistoryRequest) (*Ok, error) {
|
||||
result, err := client.Send(Request{
|
||||
meta: meta{
|
||||
Type: "deleteSavedMessagesTopicHistory",
|
||||
},
|
||||
Data: map[string]interface{}{
|
||||
"saved_messages_topic": req.SavedMessagesTopic,
|
||||
},
|
||||
})
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
if result.Type == "error" {
|
||||
return nil, buildResponseError(result.Data)
|
||||
}
|
||||
|
||||
return UnmarshalOk(result.Data)
|
||||
}
|
||||
|
||||
type DeleteSavedMessagesTopicMessagesByDateRequest struct {
|
||||
// Saved Messages topic which messages will be deleted
|
||||
SavedMessagesTopic SavedMessagesTopic `json:"saved_messages_topic"`
|
||||
// The minimum date of the messages to delete
|
||||
MinDate int32 `json:"min_date"`
|
||||
// The maximum date of the messages to delete
|
||||
MaxDate int32 `json:"max_date"`
|
||||
}
|
||||
|
||||
// Deletes all messages between the specified dates in a Saved Messages topic. Messages sent in the last 30 seconds will not be deleted
|
||||
func (client *Client) DeleteSavedMessagesTopicMessagesByDate(req *DeleteSavedMessagesTopicMessagesByDateRequest) (*Ok, error) {
|
||||
result, err := client.Send(Request{
|
||||
meta: meta{
|
||||
Type: "deleteSavedMessagesTopicMessagesByDate",
|
||||
},
|
||||
Data: map[string]interface{}{
|
||||
"saved_messages_topic": req.SavedMessagesTopic,
|
||||
"min_date": req.MinDate,
|
||||
"max_date": req.MaxDate,
|
||||
},
|
||||
})
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
if result.Type == "error" {
|
||||
return nil, buildResponseError(result.Data)
|
||||
}
|
||||
|
||||
return UnmarshalOk(result.Data)
|
||||
}
|
||||
|
||||
type ToggleSavedMessagesTopicIsPinnedRequest struct {
|
||||
// Saved Messages topic to pin or unpin
|
||||
SavedMessagesTopic SavedMessagesTopic `json:"saved_messages_topic"`
|
||||
// Pass true to pin the topic; pass false to unpin it
|
||||
IsPinned bool `json:"is_pinned"`
|
||||
}
|
||||
|
||||
// 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
|
||||
func (client *Client) ToggleSavedMessagesTopicIsPinned(req *ToggleSavedMessagesTopicIsPinnedRequest) (*Ok, error) {
|
||||
result, err := client.Send(Request{
|
||||
meta: meta{
|
||||
Type: "toggleSavedMessagesTopicIsPinned",
|
||||
},
|
||||
Data: map[string]interface{}{
|
||||
"saved_messages_topic": req.SavedMessagesTopic,
|
||||
"is_pinned": req.IsPinned,
|
||||
},
|
||||
})
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
if result.Type == "error" {
|
||||
return nil, buildResponseError(result.Data)
|
||||
}
|
||||
|
||||
return UnmarshalOk(result.Data)
|
||||
}
|
||||
|
||||
type SetPinnedSavedMessagesTopicsRequest struct {
|
||||
// The new list of pinned Saved Messages topics
|
||||
SavedMessagesTopics []SavedMessagesTopic `json:"saved_messages_topics"`
|
||||
}
|
||||
|
||||
// Changes the order of pinned Saved Messages topics
|
||||
func (client *Client) SetPinnedSavedMessagesTopics(req *SetPinnedSavedMessagesTopicsRequest) (*Ok, error) {
|
||||
result, err := client.Send(Request{
|
||||
meta: meta{
|
||||
Type: "setPinnedSavedMessagesTopics",
|
||||
},
|
||||
Data: map[string]interface{}{
|
||||
"saved_messages_topics": req.SavedMessagesTopics,
|
||||
},
|
||||
})
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
if result.Type == "error" {
|
||||
return nil, buildResponseError(result.Data)
|
||||
}
|
||||
|
||||
return UnmarshalOk(result.Data)
|
||||
}
|
||||
|
||||
type GetGroupsInCommonRequest struct {
|
||||
// User identifier
|
||||
UserId int64 `json:"user_id"`
|
||||
|
|
@ -2174,7 +2459,7 @@ type GetChatHistoryRequest struct {
|
|||
ChatId int64 `json:"chat_id"`
|
||||
// Identifier of the message starting from which history 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 from_message_id or a negative offset up to 99 to get additionally some newer messages
|
||||
// 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
|
||||
Offset int32 `json:"offset"`
|
||||
// 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
|
||||
Limit int32 `json:"limit"`
|
||||
|
|
@ -2214,7 +2499,7 @@ type GetMessageThreadHistoryRequest struct {
|
|||
MessageId int64 `json:"message_id"`
|
||||
// Identifier of the message starting from which history 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 from_message_id or a negative offset up to 99 to get additionally some newer messages
|
||||
// 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
|
||||
Offset int32 `json:"offset"`
|
||||
// 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
|
||||
Limit int32 `json:"limit"`
|
||||
|
|
@ -2312,7 +2597,7 @@ type SearchChatMessagesRequest struct {
|
|||
SenderId MessageSender `json:"sender_id"`
|
||||
// Identifier of the message starting from which history 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 from_message_id or a negative offset to get the specified message and some newer messages
|
||||
// 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
|
||||
Offset int32 `json:"offset"`
|
||||
// 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
|
||||
Limit int32 `json:"limit"`
|
||||
|
|
@ -2320,6 +2605,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"`
|
||||
}
|
||||
|
||||
// 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
|
||||
|
|
@ -2337,6 +2624,7 @@ func (client *Client) SearchChatMessages(req *SearchChatMessagesRequest) (*Found
|
|||
"limit": req.Limit,
|
||||
"filter": req.Filter,
|
||||
"message_thread_id": req.MessageThreadId,
|
||||
"saved_messages_topic": req.SavedMessagesTopic,
|
||||
},
|
||||
})
|
||||
if err != nil {
|
||||
|
|
@ -2432,6 +2720,44 @@ func (client *Client) SearchSecretMessages(req *SearchSecretMessagesRequest) (*F
|
|||
return UnmarshalFoundMessages(result.Data)
|
||||
}
|
||||
|
||||
type SearchSavedMessagesRequest struct {
|
||||
// Tag to search for; pass null to return all suitable messages
|
||||
Tag ReactionType `json:"tag"`
|
||||
// Query to search for
|
||||
Query string `json:"query"`
|
||||
// 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 to get the specified message and some newer messages
|
||||
Offset int32 `json:"offset"`
|
||||
// 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
|
||||
Limit int32 `json:"limit"`
|
||||
}
|
||||
|
||||
// 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
|
||||
func (client *Client) SearchSavedMessages(req *SearchSavedMessagesRequest) (*FoundChatMessages, error) {
|
||||
result, err := client.Send(Request{
|
||||
meta: meta{
|
||||
Type: "searchSavedMessages",
|
||||
},
|
||||
Data: map[string]interface{}{
|
||||
"tag": req.Tag,
|
||||
"query": req.Query,
|
||||
"from_message_id": req.FromMessageId,
|
||||
"offset": req.Offset,
|
||||
"limit": req.Limit,
|
||||
},
|
||||
})
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
if result.Type == "error" {
|
||||
return nil, buildResponseError(result.Data)
|
||||
}
|
||||
|
||||
return UnmarshalFoundChatMessages(result.Data)
|
||||
}
|
||||
|
||||
type SearchCallMessagesRequest 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"`
|
||||
|
|
@ -2605,6 +2931,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"`
|
||||
}
|
||||
|
||||
// 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
|
||||
|
|
@ -2618,6 +2946,7 @@ func (client *Client) GetChatSparseMessagePositions(req *GetChatSparseMessagePos
|
|||
"filter": req.Filter,
|
||||
"from_message_id": req.FromMessageId,
|
||||
"limit": req.Limit,
|
||||
"saved_messages_topic": req.SavedMessagesTopic,
|
||||
},
|
||||
})
|
||||
if err != nil {
|
||||
|
|
@ -2638,6 +2967,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"`
|
||||
}
|
||||
|
||||
// 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"
|
||||
|
|
@ -2650,6 +2981,7 @@ func (client *Client) GetChatMessageCalendar(req *GetChatMessageCalendarRequest)
|
|||
"chat_id": req.ChatId,
|
||||
"filter": req.Filter,
|
||||
"from_message_id": req.FromMessageId,
|
||||
"saved_messages_topic": req.SavedMessagesTopic,
|
||||
},
|
||||
})
|
||||
if err != nil {
|
||||
|
|
@ -2668,6 +3000,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"`
|
||||
// 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"`
|
||||
}
|
||||
|
|
@ -2681,6 +3015,7 @@ func (client *Client) GetChatMessageCount(req *GetChatMessageCountRequest) (*Cou
|
|||
Data: map[string]interface{}{
|
||||
"chat_id": req.ChatId,
|
||||
"filter": req.Filter,
|
||||
"saved_messages_topic": req.SavedMessagesTopic,
|
||||
"return_local": req.ReturnLocal,
|
||||
},
|
||||
})
|
||||
|
|
@ -2704,6 +3039,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"`
|
||||
}
|
||||
|
||||
// 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
|
||||
|
|
@ -2717,6 +3054,7 @@ func (client *Client) GetChatMessagePosition(req *GetChatMessagePositionRequest)
|
|||
"message_id": req.MessageId,
|
||||
"filter": req.Filter,
|
||||
"message_thread_id": req.MessageThreadId,
|
||||
"saved_messages_topic": req.SavedMessagesTopic,
|
||||
},
|
||||
})
|
||||
if err != nil {
|
||||
|
|
@ -3934,7 +4272,7 @@ type CreateForumTopicRequest struct {
|
|||
Icon *ForumTopicIcon `json:"icon"`
|
||||
}
|
||||
|
||||
// Creates a topic in a forum supergroup chat; requires can_manage_topics rights in the supergroup
|
||||
// Creates a topic in a forum supergroup chat; requires can_manage_topics or can_create_topics rights in the supergroup
|
||||
func (client *Client) CreateForumTopic(req *CreateForumTopicRequest) (*ForumTopicInfo, error) {
|
||||
result, err := client.Send(Request{
|
||||
meta: meta{
|
||||
|
|
@ -3970,7 +4308,7 @@ type EditForumTopicRequest struct {
|
|||
IconCustomEmojiId JsonInt64 `json:"icon_custom_emoji_id"`
|
||||
}
|
||||
|
||||
// Edits title and icon of a topic in a forum supergroup chat; requires can_manage_topics administrator right in the supergroup unless the user is creator of the topic
|
||||
// Edits title and icon of a topic in a forum supergroup chat; requires can_manage_topics right in the supergroup unless the user is creator of the topic
|
||||
func (client *Client) EditForumTopic(req *EditForumTopicRequest) (*Ok, error) {
|
||||
result, err := client.Send(Request{
|
||||
meta: meta{
|
||||
|
|
@ -4135,7 +4473,7 @@ type ToggleForumTopicIsClosedRequest struct {
|
|||
IsClosed bool `json:"is_closed"`
|
||||
}
|
||||
|
||||
// Toggles whether a topic is closed in a forum supergroup chat; requires can_manage_topics administrator right in the supergroup unless the user is creator of the topic
|
||||
// Toggles whether a topic is closed in a forum supergroup chat; requires can_manage_topics right in the supergroup unless the user is creator of the topic
|
||||
func (client *Client) ToggleForumTopicIsClosed(req *ToggleForumTopicIsClosedRequest) (*Ok, error) {
|
||||
result, err := client.Send(Request{
|
||||
meta: meta{
|
||||
|
|
@ -4165,7 +4503,7 @@ type ToggleGeneralForumTopicIsHiddenRequest struct {
|
|||
IsHidden bool `json:"is_hidden"`
|
||||
}
|
||||
|
||||
// Toggles whether a General topic is hidden in a forum supergroup chat; requires can_manage_topics administrator right in the supergroup
|
||||
// Toggles whether a General topic is hidden in a forum supergroup chat; requires can_manage_topics right in the supergroup
|
||||
func (client *Client) ToggleGeneralForumTopicIsHidden(req *ToggleGeneralForumTopicIsHiddenRequest) (*Ok, error) {
|
||||
result, err := client.Send(Request{
|
||||
meta: meta{
|
||||
|
|
@ -4196,7 +4534,7 @@ type ToggleForumTopicIsPinnedRequest struct {
|
|||
IsPinned bool `json:"is_pinned"`
|
||||
}
|
||||
|
||||
// Changes the pinned state of a forum topic; requires can_manage_topics administrator right in the supergroup. There can be up to getOption("pinned_forum_topic_count_max") pinned forum topics
|
||||
// Changes the pinned state of a forum topic; requires can_manage_topics right in the supergroup. There can be up to getOption("pinned_forum_topic_count_max") pinned forum topics
|
||||
func (client *Client) ToggleForumTopicIsPinned(req *ToggleForumTopicIsPinnedRequest) (*Ok, error) {
|
||||
result, err := client.Send(Request{
|
||||
meta: meta{
|
||||
|
|
@ -4226,7 +4564,7 @@ type SetPinnedForumTopicsRequest struct {
|
|||
MessageThreadIds []int64 `json:"message_thread_ids"`
|
||||
}
|
||||
|
||||
// Changes the order of pinned forum topics
|
||||
// Changes the order of pinned forum topics; requires can_manage_topics right in the supergroup
|
||||
func (client *Client) SetPinnedForumTopics(req *SetPinnedForumTopicsRequest) (*Ok, error) {
|
||||
result, err := client.Send(Request{
|
||||
meta: meta{
|
||||
|
|
@ -4282,7 +4620,7 @@ type GetEmojiReactionRequest struct {
|
|||
Emoji string `json:"emoji"`
|
||||
}
|
||||
|
||||
// Returns information about a emoji reaction. Returns a 404 error if the reaction is not found
|
||||
// Returns information about an emoji reaction. Returns a 404 error if the reaction is not found
|
||||
func (client *Client) GetEmojiReaction(req *GetEmojiReactionRequest) (*EmojiReaction, error) {
|
||||
result, err := client.Send(Request{
|
||||
meta: meta{
|
||||
|
|
@ -4382,11 +4720,11 @@ type AddMessageReactionRequest struct {
|
|||
ReactionType ReactionType `json:"reaction_type"`
|
||||
// Pass true if the reaction is added with a big animation
|
||||
IsBig bool `json:"is_big"`
|
||||
// Pass true if the reaction needs to be added to recent reactions
|
||||
// Pass true if the reaction needs to be added to recent reactions; tags are never added to the list of recent reactions
|
||||
UpdateRecentReactions bool `json:"update_recent_reactions"`
|
||||
}
|
||||
|
||||
// Adds a reaction to a message. Use getMessageAvailableReactions to receive the list of available reactions for the message
|
||||
// Adds a reaction or a tag to a message. Use getMessageAvailableReactions to receive the list of available reactions for the message
|
||||
func (client *Client) AddMessageReaction(req *AddMessageReactionRequest) (*Ok, error) {
|
||||
result, err := client.Send(Request{
|
||||
meta: meta{
|
||||
|
|
@ -4542,6 +4880,54 @@ 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) {
|
||||
result, err := client.Send(Request{
|
||||
meta: meta{
|
||||
Type: "getSavedMessagesTags",
|
||||
},
|
||||
Data: map[string]interface{}{},
|
||||
})
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
if result.Type == "error" {
|
||||
return nil, buildResponseError(result.Data)
|
||||
}
|
||||
|
||||
return UnmarshalSavedMessagesTags(result.Data)
|
||||
}
|
||||
|
||||
type SetSavedMessagesTagLabelRequest struct {
|
||||
// The tag which label will be changed
|
||||
Tag ReactionType `json:"tag"`
|
||||
// New label for the tag; 0-12 characters
|
||||
Label string `json:"label"`
|
||||
}
|
||||
|
||||
// Changes label of a Saved Messages tag; for Telegram Premium users only
|
||||
func (client *Client) SetSavedMessagesTagLabel(req *SetSavedMessagesTagLabelRequest) (*Ok, error) {
|
||||
result, err := client.Send(Request{
|
||||
meta: meta{
|
||||
Type: "setSavedMessagesTagLabel",
|
||||
},
|
||||
Data: map[string]interface{}{
|
||||
"tag": req.Tag,
|
||||
"label": req.Label,
|
||||
},
|
||||
})
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
if result.Type == "error" {
|
||||
return nil, buildResponseError(result.Data)
|
||||
}
|
||||
|
||||
return UnmarshalOk(result.Data)
|
||||
}
|
||||
|
||||
type SearchQuoteRequest struct {
|
||||
// Text in which to search for the quote
|
||||
Text *FormattedText `json:"text"`
|
||||
|
|
@ -4706,6 +5092,37 @@ func GetMarkdownText(req *GetMarkdownTextRequest) (*FormattedText, error) {
|
|||
func (client *Client) GetMarkdownText(req *GetMarkdownTextRequest) (*FormattedText, error) {
|
||||
return GetMarkdownText(req)}
|
||||
|
||||
type GetCountryFlagEmojiRequest struct {
|
||||
// A two-letter ISO 3166-1 alpha-2 country code as received from getCountries
|
||||
CountryCode string `json:"country_code"`
|
||||
}
|
||||
|
||||
// Returns an emoji for the given country. Returns an empty string on failure. Can be called synchronously
|
||||
func GetCountryFlagEmoji(req *GetCountryFlagEmojiRequest) (*Text, error) {
|
||||
result, err := Execute(Request{
|
||||
meta: meta{
|
||||
Type: "getCountryFlagEmoji",
|
||||
},
|
||||
Data: map[string]interface{}{
|
||||
"country_code": req.CountryCode,
|
||||
},
|
||||
})
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
if result.Type == "error" {
|
||||
return nil, buildResponseError(result.Data)
|
||||
}
|
||||
|
||||
return UnmarshalText(result.Data)
|
||||
}
|
||||
|
||||
// deprecated
|
||||
// Returns an emoji for the given country. Returns an empty string on failure. Can be called synchronously
|
||||
func (client *Client) GetCountryFlagEmoji(req *GetCountryFlagEmojiRequest) (*Text, error) {
|
||||
return GetCountryFlagEmoji(req)}
|
||||
|
||||
type GetFileMimeTypeRequest struct {
|
||||
// The name of the file or path to the file
|
||||
FileName string `json:"file_name"`
|
||||
|
|
@ -13191,21 +13608,47 @@ func (client *Client) GetStickerEmojis(req *GetStickerEmojisRequest) (*Emojis, e
|
|||
type SearchEmojisRequest struct {
|
||||
// Text to search for
|
||||
Text string `json:"text"`
|
||||
// Pass true if only emojis, which exactly match the text, needs to be returned
|
||||
ExactMatch bool `json:"exact_match"`
|
||||
// List of possible IETF language tags of the user's input language; may be empty if unknown
|
||||
InputLanguageCodes []string `json:"input_language_codes"`
|
||||
}
|
||||
|
||||
// Searches for emojis by keywords. Supported only if the file database is enabled
|
||||
func (client *Client) SearchEmojis(req *SearchEmojisRequest) (*Emojis, error) {
|
||||
// Searches for emojis by keywords. Supported only if the file database is enabled. Order of results is unspecified
|
||||
func (client *Client) SearchEmojis(req *SearchEmojisRequest) (*EmojiKeywords, error) {
|
||||
result, err := client.Send(Request{
|
||||
meta: meta{
|
||||
Type: "searchEmojis",
|
||||
},
|
||||
Data: map[string]interface{}{
|
||||
"text": req.Text,
|
||||
"exact_match": req.ExactMatch,
|
||||
"input_language_codes": req.InputLanguageCodes,
|
||||
},
|
||||
})
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
if result.Type == "error" {
|
||||
return nil, buildResponseError(result.Data)
|
||||
}
|
||||
|
||||
return UnmarshalEmojiKeywords(result.Data)
|
||||
}
|
||||
|
||||
type GetKeywordEmojisRequest struct {
|
||||
// Text to search for
|
||||
Text string `json:"text"`
|
||||
// List of possible IETF language tags of the user's input language; may be empty if unknown
|
||||
InputLanguageCodes []string `json:"input_language_codes"`
|
||||
}
|
||||
|
||||
// Return emojis matching the keyword. Supported only if the file database is enabled. Order of results is unspecified
|
||||
func (client *Client) GetKeywordEmojis(req *GetKeywordEmojisRequest) (*Emojis, error) {
|
||||
result, err := client.Send(Request{
|
||||
meta: meta{
|
||||
Type: "getKeywordEmojis",
|
||||
},
|
||||
Data: map[string]interface{}{
|
||||
"text": req.Text,
|
||||
"input_language_codes": req.InputLanguageCodes,
|
||||
},
|
||||
})
|
||||
|
|
@ -16157,6 +16600,137 @@ func (client *Client) GetUserPrivacySettingRules(req *GetUserPrivacySettingRules
|
|||
return UnmarshalUserPrivacySettingRules(result.Data)
|
||||
}
|
||||
|
||||
type SetReadDatePrivacySettingsRequest struct {
|
||||
// New settings
|
||||
Settings *ReadDatePrivacySettings `json:"settings"`
|
||||
}
|
||||
|
||||
// Changes privacy settings for message read date
|
||||
func (client *Client) SetReadDatePrivacySettings(req *SetReadDatePrivacySettingsRequest) (*Ok, error) {
|
||||
result, err := client.Send(Request{
|
||||
meta: meta{
|
||||
Type: "setReadDatePrivacySettings",
|
||||
},
|
||||
Data: map[string]interface{}{
|
||||
"settings": req.Settings,
|
||||
},
|
||||
})
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
if result.Type == "error" {
|
||||
return nil, buildResponseError(result.Data)
|
||||
}
|
||||
|
||||
return UnmarshalOk(result.Data)
|
||||
}
|
||||
|
||||
// Returns privacy settings for message read date
|
||||
func (client *Client) GetReadDatePrivacySettings() (*ReadDatePrivacySettings, error) {
|
||||
result, err := client.Send(Request{
|
||||
meta: meta{
|
||||
Type: "getReadDatePrivacySettings",
|
||||
},
|
||||
Data: map[string]interface{}{},
|
||||
})
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
if result.Type == "error" {
|
||||
return nil, buildResponseError(result.Data)
|
||||
}
|
||||
|
||||
return UnmarshalReadDatePrivacySettings(result.Data)
|
||||
}
|
||||
|
||||
type SetNewChatPrivacySettingsRequest struct {
|
||||
// New settings
|
||||
Settings *NewChatPrivacySettings `json:"settings"`
|
||||
}
|
||||
|
||||
// Changes privacy settings for new chat creation; for Telegram Premium users only
|
||||
func (client *Client) SetNewChatPrivacySettings(req *SetNewChatPrivacySettingsRequest) (*Ok, error) {
|
||||
result, err := client.Send(Request{
|
||||
meta: meta{
|
||||
Type: "setNewChatPrivacySettings",
|
||||
},
|
||||
Data: map[string]interface{}{
|
||||
"settings": req.Settings,
|
||||
},
|
||||
})
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
if result.Type == "error" {
|
||||
return nil, buildResponseError(result.Data)
|
||||
}
|
||||
|
||||
return UnmarshalOk(result.Data)
|
||||
}
|
||||
|
||||
// Returns privacy settings for new chat creation
|
||||
func (client *Client) GetNewChatPrivacySettings() (*NewChatPrivacySettings, error) {
|
||||
result, err := client.Send(Request{
|
||||
meta: meta{
|
||||
Type: "getNewChatPrivacySettings",
|
||||
},
|
||||
Data: map[string]interface{}{},
|
||||
})
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
if result.Type == "error" {
|
||||
return nil, buildResponseError(result.Data)
|
||||
}
|
||||
|
||||
return UnmarshalNewChatPrivacySettings(result.Data)
|
||||
}
|
||||
|
||||
type CanSendMessageToUserRequest struct {
|
||||
// Identifier of the other user
|
||||
UserId int64 `json:"user_id"`
|
||||
// Pass true to get only locally available information without sending network requests
|
||||
OnlyLocal bool `json:"only_local"`
|
||||
}
|
||||
|
||||
// Check whether the current user can message another user or try to create a chat with them
|
||||
func (client *Client) CanSendMessageToUser(req *CanSendMessageToUserRequest) (CanSendMessageToUserResult, error) {
|
||||
result, err := client.Send(Request{
|
||||
meta: meta{
|
||||
Type: "canSendMessageToUser",
|
||||
},
|
||||
Data: map[string]interface{}{
|
||||
"user_id": req.UserId,
|
||||
"only_local": req.OnlyLocal,
|
||||
},
|
||||
})
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
if result.Type == "error" {
|
||||
return nil, buildResponseError(result.Data)
|
||||
}
|
||||
|
||||
switch result.Type {
|
||||
case TypeCanSendMessageToUserResultOk:
|
||||
return UnmarshalCanSendMessageToUserResultOk(result.Data)
|
||||
|
||||
case TypeCanSendMessageToUserResultUserIsDeleted:
|
||||
return UnmarshalCanSendMessageToUserResultUserIsDeleted(result.Data)
|
||||
|
||||
case TypeCanSendMessageToUserResultUserRestrictsNewChats:
|
||||
return UnmarshalCanSendMessageToUserResultUserRestrictsNewChats(result.Data)
|
||||
|
||||
default:
|
||||
return nil, errors.New("invalid type")
|
||||
}
|
||||
}
|
||||
|
||||
type GetOptionRequest struct {
|
||||
// The name of the option
|
||||
Name string `json:"name"`
|
||||
|
|
@ -19777,6 +20351,9 @@ func (client *Client) TestUseUpdate() (Update, error) {
|
|||
case TypeUpdateChatOnlineMemberCount:
|
||||
return UnmarshalUpdateChatOnlineMemberCount(result.Data)
|
||||
|
||||
case TypeUpdatePinnedSavedMessagesTopics:
|
||||
return UnmarshalUpdatePinnedSavedMessagesTopics(result.Data)
|
||||
|
||||
case TypeUpdateForumTopicInfo:
|
||||
return UnmarshalUpdateForumTopicInfo(result.Data)
|
||||
|
||||
|
|
@ -19954,6 +20531,9 @@ func (client *Client) TestUseUpdate() (Update, error) {
|
|||
case TypeUpdateDefaultReactionType:
|
||||
return UnmarshalUpdateDefaultReactionType(result.Data)
|
||||
|
||||
case TypeUpdateSavedMessagesTags:
|
||||
return UnmarshalUpdateSavedMessagesTags(result.Data)
|
||||
|
||||
case TypeUpdateSpeechRecognitionTrial:
|
||||
return UnmarshalUpdateSpeechRecognitionTrial(result.Data)
|
||||
|
||||
|
|
|
|||
1078
client/type.go
1078
client/type.go
File diff suppressed because it is too large
Load diff
|
|
@ -914,6 +914,49 @@ func UnmarshalListOfMessageSender(dataList []json.RawMessage) ([]MessageSender,
|
|||
return list, nil
|
||||
}
|
||||
|
||||
func UnmarshalMessageReadDate(data json.RawMessage) (MessageReadDate, error) {
|
||||
var meta meta
|
||||
|
||||
err := json.Unmarshal(data, &meta)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
switch meta.Type {
|
||||
case TypeMessageReadDateRead:
|
||||
return UnmarshalMessageReadDateRead(data)
|
||||
|
||||
case TypeMessageReadDateUnread:
|
||||
return UnmarshalMessageReadDateUnread(data)
|
||||
|
||||
case TypeMessageReadDateTooOld:
|
||||
return UnmarshalMessageReadDateTooOld(data)
|
||||
|
||||
case TypeMessageReadDateUserPrivacyRestricted:
|
||||
return UnmarshalMessageReadDateUserPrivacyRestricted(data)
|
||||
|
||||
case TypeMessageReadDateMyPrivacyRestricted:
|
||||
return UnmarshalMessageReadDateMyPrivacyRestricted(data)
|
||||
|
||||
default:
|
||||
return nil, fmt.Errorf("Error unmarshaling. Unknown type: " + meta.Type)
|
||||
}
|
||||
}
|
||||
|
||||
func UnmarshalListOfMessageReadDate(dataList []json.RawMessage) ([]MessageReadDate, error) {
|
||||
list := []MessageReadDate{}
|
||||
|
||||
for _, data := range dataList {
|
||||
entity, err := UnmarshalMessageReadDate(data)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
list = append(list, entity)
|
||||
}
|
||||
|
||||
return list, nil
|
||||
}
|
||||
|
||||
func UnmarshalMessageOrigin(data json.RawMessage) (MessageOrigin, error) {
|
||||
var meta meta
|
||||
|
||||
|
|
@ -1634,6 +1677,43 @@ func UnmarshalListOfLoginUrlInfo(dataList []json.RawMessage) ([]LoginUrlInfo, er
|
|||
return list, nil
|
||||
}
|
||||
|
||||
func UnmarshalSavedMessagesTopic(data json.RawMessage) (SavedMessagesTopic, error) {
|
||||
var meta meta
|
||||
|
||||
err := json.Unmarshal(data, &meta)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
switch meta.Type {
|
||||
case TypeSavedMessagesTopicMyNotes:
|
||||
return UnmarshalSavedMessagesTopicMyNotes(data)
|
||||
|
||||
case TypeSavedMessagesTopicAuthorHidden:
|
||||
return UnmarshalSavedMessagesTopicAuthorHidden(data)
|
||||
|
||||
case TypeSavedMessagesTopicSavedFromChat:
|
||||
return UnmarshalSavedMessagesTopicSavedFromChat(data)
|
||||
|
||||
default:
|
||||
return nil, fmt.Errorf("Error unmarshaling. Unknown type: " + meta.Type)
|
||||
}
|
||||
}
|
||||
|
||||
func UnmarshalListOfSavedMessagesTopic(dataList []json.RawMessage) ([]SavedMessagesTopic, error) {
|
||||
list := []SavedMessagesTopic{}
|
||||
|
||||
for _, data := range dataList {
|
||||
entity, err := UnmarshalSavedMessagesTopic(data)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
list = append(list, entity)
|
||||
}
|
||||
|
||||
return list, nil
|
||||
}
|
||||
|
||||
func UnmarshalRichText(data json.RawMessage) (RichText, error) {
|
||||
var meta meta
|
||||
|
||||
|
|
@ -2391,24 +2471,30 @@ func UnmarshalMessageContent(data json.RawMessage) (MessageContent, error) {
|
|||
case TypeMessagePhoto:
|
||||
return UnmarshalMessagePhoto(data)
|
||||
|
||||
case TypeMessageExpiredPhoto:
|
||||
return UnmarshalMessageExpiredPhoto(data)
|
||||
|
||||
case TypeMessageSticker:
|
||||
return UnmarshalMessageSticker(data)
|
||||
|
||||
case TypeMessageVideo:
|
||||
return UnmarshalMessageVideo(data)
|
||||
|
||||
case TypeMessageExpiredVideo:
|
||||
return UnmarshalMessageExpiredVideo(data)
|
||||
|
||||
case TypeMessageVideoNote:
|
||||
return UnmarshalMessageVideoNote(data)
|
||||
|
||||
case TypeMessageVoiceNote:
|
||||
return UnmarshalMessageVoiceNote(data)
|
||||
|
||||
case TypeMessageExpiredPhoto:
|
||||
return UnmarshalMessageExpiredPhoto(data)
|
||||
|
||||
case TypeMessageExpiredVideo:
|
||||
return UnmarshalMessageExpiredVideo(data)
|
||||
|
||||
case TypeMessageExpiredVideoNote:
|
||||
return UnmarshalMessageExpiredVideoNote(data)
|
||||
|
||||
case TypeMessageExpiredVoiceNote:
|
||||
return UnmarshalMessageExpiredVoiceNote(data)
|
||||
|
||||
case TypeMessageLocation:
|
||||
return UnmarshalMessageLocation(data)
|
||||
|
||||
|
|
@ -3648,6 +3734,40 @@ func UnmarshalListOfFirebaseAuthenticationSettings(dataList []json.RawMessage) (
|
|||
return list, nil
|
||||
}
|
||||
|
||||
func UnmarshalReactionUnavailabilityReason(data json.RawMessage) (ReactionUnavailabilityReason, error) {
|
||||
var meta meta
|
||||
|
||||
err := json.Unmarshal(data, &meta)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
switch meta.Type {
|
||||
case TypeReactionUnavailabilityReasonAnonymousAdministrator:
|
||||
return UnmarshalReactionUnavailabilityReasonAnonymousAdministrator(data)
|
||||
|
||||
case TypeReactionUnavailabilityReasonGuest:
|
||||
return UnmarshalReactionUnavailabilityReasonGuest(data)
|
||||
|
||||
default:
|
||||
return nil, fmt.Errorf("Error unmarshaling. Unknown type: " + meta.Type)
|
||||
}
|
||||
}
|
||||
|
||||
func UnmarshalListOfReactionUnavailabilityReason(dataList []json.RawMessage) ([]ReactionUnavailabilityReason, error) {
|
||||
list := []ReactionUnavailabilityReason{}
|
||||
|
||||
for _, data := range dataList {
|
||||
entity, err := UnmarshalReactionUnavailabilityReason(data)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
list = append(list, entity)
|
||||
}
|
||||
|
||||
return list, nil
|
||||
}
|
||||
|
||||
func UnmarshalDiceStickers(data json.RawMessage) (DiceStickers, error) {
|
||||
var meta meta
|
||||
|
||||
|
|
@ -4200,6 +4320,9 @@ func UnmarshalPremiumLimitType(data json.RawMessage) (PremiumLimitType, error) {
|
|||
case TypePremiumLimitTypePinnedArchivedChatCount:
|
||||
return UnmarshalPremiumLimitTypePinnedArchivedChatCount(data)
|
||||
|
||||
case TypePremiumLimitTypePinnedSavedMessagesTopicCount:
|
||||
return UnmarshalPremiumLimitTypePinnedSavedMessagesTopicCount(data)
|
||||
|
||||
case TypePremiumLimitTypeCaptionLength:
|
||||
return UnmarshalPremiumLimitTypeCaptionLength(data)
|
||||
|
||||
|
|
@ -5364,6 +5487,43 @@ func UnmarshalListOfUserPrivacySetting(dataList []json.RawMessage) ([]UserPrivac
|
|||
return list, nil
|
||||
}
|
||||
|
||||
func UnmarshalCanSendMessageToUserResult(data json.RawMessage) (CanSendMessageToUserResult, error) {
|
||||
var meta meta
|
||||
|
||||
err := json.Unmarshal(data, &meta)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
switch meta.Type {
|
||||
case TypeCanSendMessageToUserResultOk:
|
||||
return UnmarshalCanSendMessageToUserResultOk(data)
|
||||
|
||||
case TypeCanSendMessageToUserResultUserIsDeleted:
|
||||
return UnmarshalCanSendMessageToUserResultUserIsDeleted(data)
|
||||
|
||||
case TypeCanSendMessageToUserResultUserRestrictsNewChats:
|
||||
return UnmarshalCanSendMessageToUserResultUserRestrictsNewChats(data)
|
||||
|
||||
default:
|
||||
return nil, fmt.Errorf("Error unmarshaling. Unknown type: " + meta.Type)
|
||||
}
|
||||
}
|
||||
|
||||
func UnmarshalListOfCanSendMessageToUserResult(dataList []json.RawMessage) ([]CanSendMessageToUserResult, error) {
|
||||
list := []CanSendMessageToUserResult{}
|
||||
|
||||
for _, data := range dataList {
|
||||
entity, err := UnmarshalCanSendMessageToUserResult(data)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
list = append(list, entity)
|
||||
}
|
||||
|
||||
return list, nil
|
||||
}
|
||||
|
||||
func UnmarshalSessionType(data json.RawMessage) (SessionType, error) {
|
||||
var meta meta
|
||||
|
||||
|
|
@ -6524,6 +6684,9 @@ func UnmarshalUpdate(data json.RawMessage) (Update, error) {
|
|||
case TypeUpdateChatOnlineMemberCount:
|
||||
return UnmarshalUpdateChatOnlineMemberCount(data)
|
||||
|
||||
case TypeUpdatePinnedSavedMessagesTopics:
|
||||
return UnmarshalUpdatePinnedSavedMessagesTopics(data)
|
||||
|
||||
case TypeUpdateForumTopicInfo:
|
||||
return UnmarshalUpdateForumTopicInfo(data)
|
||||
|
||||
|
|
@ -6701,6 +6864,9 @@ func UnmarshalUpdate(data json.RawMessage) (Update, error) {
|
|||
case TypeUpdateDefaultReactionType:
|
||||
return UnmarshalUpdateDefaultReactionType(data)
|
||||
|
||||
case TypeUpdateSavedMessagesTags:
|
||||
return UnmarshalUpdateSavedMessagesTags(data)
|
||||
|
||||
case TypeUpdateSpeechRecognitionTrial:
|
||||
return UnmarshalUpdateSpeechRecognitionTrial(data)
|
||||
|
||||
|
|
@ -8295,6 +8461,46 @@ func UnmarshalChatMessageSenders(data json.RawMessage) (*ChatMessageSenders, err
|
|||
return &resp, err
|
||||
}
|
||||
|
||||
func UnmarshalMessageReadDateRead(data json.RawMessage) (*MessageReadDateRead, error) {
|
||||
var resp MessageReadDateRead
|
||||
|
||||
err := json.Unmarshal(data, &resp)
|
||||
|
||||
return &resp, err
|
||||
}
|
||||
|
||||
func UnmarshalMessageReadDateUnread(data json.RawMessage) (*MessageReadDateUnread, error) {
|
||||
var resp MessageReadDateUnread
|
||||
|
||||
err := json.Unmarshal(data, &resp)
|
||||
|
||||
return &resp, err
|
||||
}
|
||||
|
||||
func UnmarshalMessageReadDateTooOld(data json.RawMessage) (*MessageReadDateTooOld, error) {
|
||||
var resp MessageReadDateTooOld
|
||||
|
||||
err := json.Unmarshal(data, &resp)
|
||||
|
||||
return &resp, err
|
||||
}
|
||||
|
||||
func UnmarshalMessageReadDateUserPrivacyRestricted(data json.RawMessage) (*MessageReadDateUserPrivacyRestricted, error) {
|
||||
var resp MessageReadDateUserPrivacyRestricted
|
||||
|
||||
err := json.Unmarshal(data, &resp)
|
||||
|
||||
return &resp, err
|
||||
}
|
||||
|
||||
func UnmarshalMessageReadDateMyPrivacyRestricted(data json.RawMessage) (*MessageReadDateMyPrivacyRestricted, error) {
|
||||
var resp MessageReadDateMyPrivacyRestricted
|
||||
|
||||
err := json.Unmarshal(data, &resp)
|
||||
|
||||
return &resp, err
|
||||
}
|
||||
|
||||
func UnmarshalMessageViewer(data json.RawMessage) (*MessageViewer, error) {
|
||||
var resp MessageViewer
|
||||
|
||||
|
|
@ -8343,6 +8549,14 @@ func UnmarshalMessageOriginChannel(data json.RawMessage) (*MessageOriginChannel,
|
|||
return &resp, err
|
||||
}
|
||||
|
||||
func UnmarshalForwardSource(data json.RawMessage) (*ForwardSource, error) {
|
||||
var resp ForwardSource
|
||||
|
||||
err := json.Unmarshal(data, &resp)
|
||||
|
||||
return &resp, err
|
||||
}
|
||||
|
||||
func UnmarshalReactionTypeEmoji(data json.RawMessage) (*ReactionTypeEmoji, error) {
|
||||
var resp ReactionTypeEmoji
|
||||
|
||||
|
|
@ -8391,6 +8605,14 @@ func UnmarshalMessageReaction(data json.RawMessage) (*MessageReaction, error) {
|
|||
return &resp, err
|
||||
}
|
||||
|
||||
func UnmarshalMessageReactions(data json.RawMessage) (*MessageReactions, error) {
|
||||
var resp MessageReactions
|
||||
|
||||
err := json.Unmarshal(data, &resp)
|
||||
|
||||
return &resp, err
|
||||
}
|
||||
|
||||
func UnmarshalMessageInteractionInfo(data json.RawMessage) (*MessageInteractionInfo, error) {
|
||||
var resp MessageInteractionInfo
|
||||
|
||||
|
|
@ -8927,6 +9149,22 @@ func UnmarshalChatAvailableReactionsSome(data json.RawMessage) (*ChatAvailableRe
|
|||
return &resp, err
|
||||
}
|
||||
|
||||
func UnmarshalSavedMessagesTag(data json.RawMessage) (*SavedMessagesTag, error) {
|
||||
var resp SavedMessagesTag
|
||||
|
||||
err := json.Unmarshal(data, &resp)
|
||||
|
||||
return &resp, err
|
||||
}
|
||||
|
||||
func UnmarshalSavedMessagesTags(data json.RawMessage) (*SavedMessagesTags, error) {
|
||||
var resp SavedMessagesTags
|
||||
|
||||
err := json.Unmarshal(data, &resp)
|
||||
|
||||
return &resp, err
|
||||
}
|
||||
|
||||
func UnmarshalVideoChat(data json.RawMessage) (*VideoChat, error) {
|
||||
var resp VideoChat
|
||||
|
||||
|
|
@ -9255,6 +9493,46 @@ func UnmarshalMessageThreadInfo(data json.RawMessage) (*MessageThreadInfo, error
|
|||
return &resp, err
|
||||
}
|
||||
|
||||
func UnmarshalSavedMessagesTopicMyNotes(data json.RawMessage) (*SavedMessagesTopicMyNotes, error) {
|
||||
var resp SavedMessagesTopicMyNotes
|
||||
|
||||
err := json.Unmarshal(data, &resp)
|
||||
|
||||
return &resp, err
|
||||
}
|
||||
|
||||
func UnmarshalSavedMessagesTopicAuthorHidden(data json.RawMessage) (*SavedMessagesTopicAuthorHidden, error) {
|
||||
var resp SavedMessagesTopicAuthorHidden
|
||||
|
||||
err := json.Unmarshal(data, &resp)
|
||||
|
||||
return &resp, err
|
||||
}
|
||||
|
||||
func UnmarshalSavedMessagesTopicSavedFromChat(data json.RawMessage) (*SavedMessagesTopicSavedFromChat, error) {
|
||||
var resp SavedMessagesTopicSavedFromChat
|
||||
|
||||
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
|
||||
|
||||
err := json.Unmarshal(data, &resp)
|
||||
|
||||
return &resp, err
|
||||
}
|
||||
|
||||
func UnmarshalForumTopicIcon(data json.RawMessage) (*ForumTopicIcon, error) {
|
||||
var resp ForumTopicIcon
|
||||
|
||||
|
|
@ -10639,14 +10917,6 @@ func UnmarshalMessagePhoto(data json.RawMessage) (*MessagePhoto, error) {
|
|||
return &resp, err
|
||||
}
|
||||
|
||||
func UnmarshalMessageExpiredPhoto(data json.RawMessage) (*MessageExpiredPhoto, error) {
|
||||
var resp MessageExpiredPhoto
|
||||
|
||||
err := json.Unmarshal(data, &resp)
|
||||
|
||||
return &resp, err
|
||||
}
|
||||
|
||||
func UnmarshalMessageSticker(data json.RawMessage) (*MessageSticker, error) {
|
||||
var resp MessageSticker
|
||||
|
||||
|
|
@ -10663,14 +10933,6 @@ func UnmarshalMessageVideo(data json.RawMessage) (*MessageVideo, error) {
|
|||
return &resp, err
|
||||
}
|
||||
|
||||
func UnmarshalMessageExpiredVideo(data json.RawMessage) (*MessageExpiredVideo, error) {
|
||||
var resp MessageExpiredVideo
|
||||
|
||||
err := json.Unmarshal(data, &resp)
|
||||
|
||||
return &resp, err
|
||||
}
|
||||
|
||||
func UnmarshalMessageVideoNote(data json.RawMessage) (*MessageVideoNote, error) {
|
||||
var resp MessageVideoNote
|
||||
|
||||
|
|
@ -10687,6 +10949,38 @@ func UnmarshalMessageVoiceNote(data json.RawMessage) (*MessageVoiceNote, error)
|
|||
return &resp, err
|
||||
}
|
||||
|
||||
func UnmarshalMessageExpiredPhoto(data json.RawMessage) (*MessageExpiredPhoto, error) {
|
||||
var resp MessageExpiredPhoto
|
||||
|
||||
err := json.Unmarshal(data, &resp)
|
||||
|
||||
return &resp, err
|
||||
}
|
||||
|
||||
func UnmarshalMessageExpiredVideo(data json.RawMessage) (*MessageExpiredVideo, error) {
|
||||
var resp MessageExpiredVideo
|
||||
|
||||
err := json.Unmarshal(data, &resp)
|
||||
|
||||
return &resp, err
|
||||
}
|
||||
|
||||
func UnmarshalMessageExpiredVideoNote(data json.RawMessage) (*MessageExpiredVideoNote, error) {
|
||||
var resp MessageExpiredVideoNote
|
||||
|
||||
err := json.Unmarshal(data, &resp)
|
||||
|
||||
return &resp, err
|
||||
}
|
||||
|
||||
func UnmarshalMessageExpiredVoiceNote(data json.RawMessage) (*MessageExpiredVoiceNote, error) {
|
||||
var resp MessageExpiredVoiceNote
|
||||
|
||||
err := json.Unmarshal(data, &resp)
|
||||
|
||||
return &resp, err
|
||||
}
|
||||
|
||||
func UnmarshalMessageLocation(data json.RawMessage) (*MessageLocation, error) {
|
||||
var resp MessageLocation
|
||||
|
||||
|
|
@ -11799,6 +12093,22 @@ func UnmarshalUserStatusLastMonth(data json.RawMessage) (*UserStatusLastMonth, e
|
|||
return &resp, err
|
||||
}
|
||||
|
||||
func UnmarshalEmojiKeyword(data json.RawMessage) (*EmojiKeyword, error) {
|
||||
var resp EmojiKeyword
|
||||
|
||||
err := json.Unmarshal(data, &resp)
|
||||
|
||||
return &resp, err
|
||||
}
|
||||
|
||||
func UnmarshalEmojiKeywords(data json.RawMessage) (*EmojiKeywords, error) {
|
||||
var resp EmojiKeywords
|
||||
|
||||
err := json.Unmarshal(data, &resp)
|
||||
|
||||
return &resp, err
|
||||
}
|
||||
|
||||
func UnmarshalStickers(data json.RawMessage) (*Stickers, error) {
|
||||
var resp Stickers
|
||||
|
||||
|
|
@ -12647,6 +12957,22 @@ func UnmarshalEmojiReaction(data json.RawMessage) (*EmojiReaction, error) {
|
|||
return &resp, err
|
||||
}
|
||||
|
||||
func UnmarshalReactionUnavailabilityReasonAnonymousAdministrator(data json.RawMessage) (*ReactionUnavailabilityReasonAnonymousAdministrator, error) {
|
||||
var resp ReactionUnavailabilityReasonAnonymousAdministrator
|
||||
|
||||
err := json.Unmarshal(data, &resp)
|
||||
|
||||
return &resp, err
|
||||
}
|
||||
|
||||
func UnmarshalReactionUnavailabilityReasonGuest(data json.RawMessage) (*ReactionUnavailabilityReasonGuest, error) {
|
||||
var resp ReactionUnavailabilityReasonGuest
|
||||
|
||||
err := json.Unmarshal(data, &resp)
|
||||
|
||||
return &resp, err
|
||||
}
|
||||
|
||||
func UnmarshalAnimations(data json.RawMessage) (*Animations, error) {
|
||||
var resp Animations
|
||||
|
||||
|
|
@ -13583,6 +13909,14 @@ func UnmarshalPremiumLimitTypePinnedArchivedChatCount(data json.RawMessage) (*Pr
|
|||
return &resp, err
|
||||
}
|
||||
|
||||
func UnmarshalPremiumLimitTypePinnedSavedMessagesTopicCount(data json.RawMessage) (*PremiumLimitTypePinnedSavedMessagesTopicCount, error) {
|
||||
var resp PremiumLimitTypePinnedSavedMessagesTopicCount
|
||||
|
||||
err := json.Unmarshal(data, &resp)
|
||||
|
||||
return &resp, err
|
||||
}
|
||||
|
||||
func UnmarshalPremiumLimitTypeCaptionLength(data json.RawMessage) (*PremiumLimitTypeCaptionLength, error) {
|
||||
var resp PremiumLimitTypeCaptionLength
|
||||
|
||||
|
|
@ -15031,6 +15365,46 @@ func UnmarshalUserPrivacySettingAllowPrivateVoiceAndVideoNoteMessages(data json.
|
|||
return &resp, err
|
||||
}
|
||||
|
||||
func UnmarshalReadDatePrivacySettings(data json.RawMessage) (*ReadDatePrivacySettings, error) {
|
||||
var resp ReadDatePrivacySettings
|
||||
|
||||
err := json.Unmarshal(data, &resp)
|
||||
|
||||
return &resp, err
|
||||
}
|
||||
|
||||
func UnmarshalNewChatPrivacySettings(data json.RawMessage) (*NewChatPrivacySettings, error) {
|
||||
var resp NewChatPrivacySettings
|
||||
|
||||
err := json.Unmarshal(data, &resp)
|
||||
|
||||
return &resp, err
|
||||
}
|
||||
|
||||
func UnmarshalCanSendMessageToUserResultOk(data json.RawMessage) (*CanSendMessageToUserResultOk, error) {
|
||||
var resp CanSendMessageToUserResultOk
|
||||
|
||||
err := json.Unmarshal(data, &resp)
|
||||
|
||||
return &resp, err
|
||||
}
|
||||
|
||||
func UnmarshalCanSendMessageToUserResultUserIsDeleted(data json.RawMessage) (*CanSendMessageToUserResultUserIsDeleted, error) {
|
||||
var resp CanSendMessageToUserResultUserIsDeleted
|
||||
|
||||
err := json.Unmarshal(data, &resp)
|
||||
|
||||
return &resp, err
|
||||
}
|
||||
|
||||
func UnmarshalCanSendMessageToUserResultUserRestrictsNewChats(data json.RawMessage) (*CanSendMessageToUserResultUserRestrictsNewChats, error) {
|
||||
var resp CanSendMessageToUserResultUserRestrictsNewChats
|
||||
|
||||
err := json.Unmarshal(data, &resp)
|
||||
|
||||
return &resp, err
|
||||
}
|
||||
|
||||
func UnmarshalAccountTtl(data json.RawMessage) (*AccountTtl, error) {
|
||||
var resp AccountTtl
|
||||
|
||||
|
|
@ -16959,6 +17333,14 @@ func UnmarshalUpdateChatOnlineMemberCount(data json.RawMessage) (*UpdateChatOnli
|
|||
return &resp, err
|
||||
}
|
||||
|
||||
func UnmarshalUpdatePinnedSavedMessagesTopics(data json.RawMessage) (*UpdatePinnedSavedMessagesTopics, error) {
|
||||
var resp UpdatePinnedSavedMessagesTopics
|
||||
|
||||
err := json.Unmarshal(data, &resp)
|
||||
|
||||
return &resp, err
|
||||
}
|
||||
|
||||
func UnmarshalUpdateForumTopicInfo(data json.RawMessage) (*UpdateForumTopicInfo, error) {
|
||||
var resp UpdateForumTopicInfo
|
||||
|
||||
|
|
@ -17431,6 +17813,14 @@ func UnmarshalUpdateDefaultReactionType(data json.RawMessage) (*UpdateDefaultRea
|
|||
return &resp, err
|
||||
}
|
||||
|
||||
func UnmarshalUpdateSavedMessagesTags(data json.RawMessage) (*UpdateSavedMessagesTags, error) {
|
||||
var resp UpdateSavedMessagesTags
|
||||
|
||||
err := json.Unmarshal(data, &resp)
|
||||
|
||||
return &resp, err
|
||||
}
|
||||
|
||||
func UnmarshalUpdateSpeechRecognitionTrial(data json.RawMessage) (*UpdateSpeechRecognitionTrial, error) {
|
||||
var resp UpdateSpeechRecognitionTrial
|
||||
|
||||
|
|
@ -18280,6 +18670,21 @@ func UnmarshalType(data json.RawMessage) (Type, error) {
|
|||
case TypeChatMessageSenders:
|
||||
return UnmarshalChatMessageSenders(data)
|
||||
|
||||
case TypeMessageReadDateRead:
|
||||
return UnmarshalMessageReadDateRead(data)
|
||||
|
||||
case TypeMessageReadDateUnread:
|
||||
return UnmarshalMessageReadDateUnread(data)
|
||||
|
||||
case TypeMessageReadDateTooOld:
|
||||
return UnmarshalMessageReadDateTooOld(data)
|
||||
|
||||
case TypeMessageReadDateUserPrivacyRestricted:
|
||||
return UnmarshalMessageReadDateUserPrivacyRestricted(data)
|
||||
|
||||
case TypeMessageReadDateMyPrivacyRestricted:
|
||||
return UnmarshalMessageReadDateMyPrivacyRestricted(data)
|
||||
|
||||
case TypeMessageViewer:
|
||||
return UnmarshalMessageViewer(data)
|
||||
|
||||
|
|
@ -18298,6 +18703,9 @@ func UnmarshalType(data json.RawMessage) (Type, error) {
|
|||
case TypeMessageOriginChannel:
|
||||
return UnmarshalMessageOriginChannel(data)
|
||||
|
||||
case TypeForwardSource:
|
||||
return UnmarshalForwardSource(data)
|
||||
|
||||
case TypeReactionTypeEmoji:
|
||||
return UnmarshalReactionTypeEmoji(data)
|
||||
|
||||
|
|
@ -18316,6 +18724,9 @@ func UnmarshalType(data json.RawMessage) (Type, error) {
|
|||
case TypeMessageReaction:
|
||||
return UnmarshalMessageReaction(data)
|
||||
|
||||
case TypeMessageReactions:
|
||||
return UnmarshalMessageReactions(data)
|
||||
|
||||
case TypeMessageInteractionInfo:
|
||||
return UnmarshalMessageInteractionInfo(data)
|
||||
|
||||
|
|
@ -18517,6 +18928,12 @@ func UnmarshalType(data json.RawMessage) (Type, error) {
|
|||
case TypeChatAvailableReactionsSome:
|
||||
return UnmarshalChatAvailableReactionsSome(data)
|
||||
|
||||
case TypeSavedMessagesTag:
|
||||
return UnmarshalSavedMessagesTag(data)
|
||||
|
||||
case TypeSavedMessagesTags:
|
||||
return UnmarshalSavedMessagesTags(data)
|
||||
|
||||
case TypeVideoChat:
|
||||
return UnmarshalVideoChat(data)
|
||||
|
||||
|
|
@ -18640,6 +19057,21 @@ func UnmarshalType(data json.RawMessage) (Type, error) {
|
|||
case TypeMessageThreadInfo:
|
||||
return UnmarshalMessageThreadInfo(data)
|
||||
|
||||
case TypeSavedMessagesTopicMyNotes:
|
||||
return UnmarshalSavedMessagesTopicMyNotes(data)
|
||||
|
||||
case TypeSavedMessagesTopicAuthorHidden:
|
||||
return UnmarshalSavedMessagesTopicAuthorHidden(data)
|
||||
|
||||
case TypeSavedMessagesTopicSavedFromChat:
|
||||
return UnmarshalSavedMessagesTopicSavedFromChat(data)
|
||||
|
||||
case TypeFoundSavedMessagesTopic:
|
||||
return UnmarshalFoundSavedMessagesTopic(data)
|
||||
|
||||
case TypeFoundSavedMessagesTopics:
|
||||
return UnmarshalFoundSavedMessagesTopics(data)
|
||||
|
||||
case TypeForumTopicIcon:
|
||||
return UnmarshalForumTopicIcon(data)
|
||||
|
||||
|
|
@ -19159,24 +19591,30 @@ func UnmarshalType(data json.RawMessage) (Type, error) {
|
|||
case TypeMessagePhoto:
|
||||
return UnmarshalMessagePhoto(data)
|
||||
|
||||
case TypeMessageExpiredPhoto:
|
||||
return UnmarshalMessageExpiredPhoto(data)
|
||||
|
||||
case TypeMessageSticker:
|
||||
return UnmarshalMessageSticker(data)
|
||||
|
||||
case TypeMessageVideo:
|
||||
return UnmarshalMessageVideo(data)
|
||||
|
||||
case TypeMessageExpiredVideo:
|
||||
return UnmarshalMessageExpiredVideo(data)
|
||||
|
||||
case TypeMessageVideoNote:
|
||||
return UnmarshalMessageVideoNote(data)
|
||||
|
||||
case TypeMessageVoiceNote:
|
||||
return UnmarshalMessageVoiceNote(data)
|
||||
|
||||
case TypeMessageExpiredPhoto:
|
||||
return UnmarshalMessageExpiredPhoto(data)
|
||||
|
||||
case TypeMessageExpiredVideo:
|
||||
return UnmarshalMessageExpiredVideo(data)
|
||||
|
||||
case TypeMessageExpiredVideoNote:
|
||||
return UnmarshalMessageExpiredVideoNote(data)
|
||||
|
||||
case TypeMessageExpiredVoiceNote:
|
||||
return UnmarshalMessageExpiredVoiceNote(data)
|
||||
|
||||
case TypeMessageLocation:
|
||||
return UnmarshalMessageLocation(data)
|
||||
|
||||
|
|
@ -19594,6 +20032,12 @@ func UnmarshalType(data json.RawMessage) (Type, error) {
|
|||
case TypeUserStatusLastMonth:
|
||||
return UnmarshalUserStatusLastMonth(data)
|
||||
|
||||
case TypeEmojiKeyword:
|
||||
return UnmarshalEmojiKeyword(data)
|
||||
|
||||
case TypeEmojiKeywords:
|
||||
return UnmarshalEmojiKeywords(data)
|
||||
|
||||
case TypeStickers:
|
||||
return UnmarshalStickers(data)
|
||||
|
||||
|
|
@ -19912,6 +20356,12 @@ func UnmarshalType(data json.RawMessage) (Type, error) {
|
|||
case TypeEmojiReaction:
|
||||
return UnmarshalEmojiReaction(data)
|
||||
|
||||
case TypeReactionUnavailabilityReasonAnonymousAdministrator:
|
||||
return UnmarshalReactionUnavailabilityReasonAnonymousAdministrator(data)
|
||||
|
||||
case TypeReactionUnavailabilityReasonGuest:
|
||||
return UnmarshalReactionUnavailabilityReasonGuest(data)
|
||||
|
||||
case TypeAnimations:
|
||||
return UnmarshalAnimations(data)
|
||||
|
||||
|
|
@ -20263,6 +20713,9 @@ func UnmarshalType(data json.RawMessage) (Type, error) {
|
|||
case TypePremiumLimitTypePinnedArchivedChatCount:
|
||||
return UnmarshalPremiumLimitTypePinnedArchivedChatCount(data)
|
||||
|
||||
case TypePremiumLimitTypePinnedSavedMessagesTopicCount:
|
||||
return UnmarshalPremiumLimitTypePinnedSavedMessagesTopicCount(data)
|
||||
|
||||
case TypePremiumLimitTypeCaptionLength:
|
||||
return UnmarshalPremiumLimitTypeCaptionLength(data)
|
||||
|
||||
|
|
@ -20806,6 +21259,21 @@ func UnmarshalType(data json.RawMessage) (Type, error) {
|
|||
case TypeUserPrivacySettingAllowPrivateVoiceAndVideoNoteMessages:
|
||||
return UnmarshalUserPrivacySettingAllowPrivateVoiceAndVideoNoteMessages(data)
|
||||
|
||||
case TypeReadDatePrivacySettings:
|
||||
return UnmarshalReadDatePrivacySettings(data)
|
||||
|
||||
case TypeNewChatPrivacySettings:
|
||||
return UnmarshalNewChatPrivacySettings(data)
|
||||
|
||||
case TypeCanSendMessageToUserResultOk:
|
||||
return UnmarshalCanSendMessageToUserResultOk(data)
|
||||
|
||||
case TypeCanSendMessageToUserResultUserIsDeleted:
|
||||
return UnmarshalCanSendMessageToUserResultUserIsDeleted(data)
|
||||
|
||||
case TypeCanSendMessageToUserResultUserRestrictsNewChats:
|
||||
return UnmarshalCanSendMessageToUserResultUserRestrictsNewChats(data)
|
||||
|
||||
case TypeAccountTtl:
|
||||
return UnmarshalAccountTtl(data)
|
||||
|
||||
|
|
@ -21529,6 +21997,9 @@ func UnmarshalType(data json.RawMessage) (Type, error) {
|
|||
case TypeUpdateChatOnlineMemberCount:
|
||||
return UnmarshalUpdateChatOnlineMemberCount(data)
|
||||
|
||||
case TypeUpdatePinnedSavedMessagesTopics:
|
||||
return UnmarshalUpdatePinnedSavedMessagesTopics(data)
|
||||
|
||||
case TypeUpdateForumTopicInfo:
|
||||
return UnmarshalUpdateForumTopicInfo(data)
|
||||
|
||||
|
|
@ -21706,6 +22177,9 @@ func UnmarshalType(data json.RawMessage) (Type, error) {
|
|||
case TypeUpdateDefaultReactionType:
|
||||
return UnmarshalUpdateDefaultReactionType(data)
|
||||
|
||||
case TypeUpdateSavedMessagesTags:
|
||||
return UnmarshalUpdateSavedMessagesTags(data)
|
||||
|
||||
case TypeUpdateSpeechRecognitionTrial:
|
||||
return UnmarshalUpdateSpeechRecognitionTrial(data)
|
||||
|
||||
|
|
|
|||
380
data/td_api.tl
380
data/td_api.tl
|
|
@ -649,8 +649,8 @@ inputChatPhotoSticker sticker:chatPhotoSticker = InputChatPhoto;
|
|||
//@can_change_info True, if the user can change the chat title, photo, and other settings
|
||||
//@can_invite_users True, if the user can invite new users to the chat
|
||||
//@can_pin_messages True, if the user can pin messages
|
||||
//@can_manage_topics True, if the user can manage topics
|
||||
chatPermissions can_send_basic_messages:Bool can_send_audios:Bool can_send_documents:Bool can_send_photos:Bool can_send_videos:Bool can_send_video_notes:Bool can_send_voice_notes:Bool can_send_polls:Bool can_send_stickers:Bool can_send_animations:Bool can_send_games:Bool can_use_inline_bots:Bool can_add_web_page_previews:Bool can_change_info:Bool can_invite_users:Bool can_pin_messages:Bool can_manage_topics:Bool = ChatPermissions;
|
||||
//@can_create_topics True, if the user can create topics
|
||||
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
|
||||
|
|
@ -661,7 +661,7 @@ chatPermissions can_send_basic_messages:Bool can_send_audios:Bool can_send_docum
|
|||
//@can_invite_users True, if the administrator can invite new users to the chat
|
||||
//@can_restrict_members True, if the administrator can restrict, ban, or unban chat members or view supergroup statistics; always true for channels
|
||||
//@can_pin_messages True, if the administrator can pin messages; applicable to basic groups and supergroups only
|
||||
//@can_manage_topics True, if the administrator can manage topics; applicable to forum supergroups only
|
||||
//@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
|
||||
|
|
@ -809,11 +809,12 @@ usernames active_usernames:vector<string> disabled_usernames:vector<string> edit
|
|||
//@is_fake True, if many users reported this user as a fake account
|
||||
//@has_active_stories True, if the user has non-expired stories available to the current user
|
||||
//@has_unread_active_stories True, if the user has unread non-expired stories available to the current user
|
||||
//@restricts_new_chats True, if the user may restrict new chats with non-contacts. Use canSendMessageToUser to check whether the current user can message the user or try to create a chat with them
|
||||
//@have_access If false, the user is inaccessible, and the only information known about the user is inside this class. Identifier of the user can't be passed to any method
|
||||
//@type Type of the user
|
||||
//@language_code IETF language tag of the user's language; only available to bots
|
||||
//@added_to_attachment_menu True, if the user added the current bot to attachment menu; only available to bots
|
||||
user id:int53 access_hash:int64 first_name:string last_name:string usernames:usernames phone_number:string status:UserStatus profile_photo:profilePhoto accent_color_id:int32 background_custom_emoji_id:int64 profile_accent_color_id:int32 profile_background_custom_emoji_id:int64 emoji_status:emojiStatus is_contact:Bool is_mutual_contact:Bool is_close_friend:Bool is_verified:Bool is_premium:Bool is_support:Bool restriction_reason:string is_scam:Bool is_fake:Bool has_active_stories:Bool has_unread_active_stories:Bool have_access:Bool type:UserType language_code:string added_to_attachment_menu:Bool = User;
|
||||
user id:int53 access_hash:int64 first_name:string last_name:string usernames:usernames phone_number:string status:UserStatus profile_photo:profilePhoto accent_color_id:int32 background_custom_emoji_id:int64 profile_accent_color_id:int32 profile_background_custom_emoji_id:int64 emoji_status:emojiStatus is_contact:Bool is_mutual_contact:Bool is_close_friend:Bool is_verified:Bool is_premium:Bool is_support:Bool restriction_reason:string is_scam:Bool is_fake:Bool has_active_stories:Bool has_unread_active_stories:Bool restricts_new_chats:Bool have_access:Bool type:UserType language_code:string added_to_attachment_menu:Bool = User;
|
||||
|
||||
|
||||
//@description Contains information about a bot
|
||||
|
|
@ -1161,6 +1162,24 @@ chatMessageSender sender:MessageSender needs_premium:Bool = ChatMessageSender;
|
|||
chatMessageSenders senders:vector<chatMessageSender> = ChatMessageSenders;
|
||||
|
||||
|
||||
//@class MessageReadDate @description Describes read date of a recent outgoing message in a private chat
|
||||
|
||||
//@description Contains read date of the message @read_date Point in time (Unix timestamp) when the message was read by the other user
|
||||
messageReadDateRead read_date:int32 = MessageReadDate;
|
||||
|
||||
//@description The message is unread yet
|
||||
messageReadDateUnread = MessageReadDate;
|
||||
|
||||
//@description The message is too old to get read date
|
||||
messageReadDateTooOld = MessageReadDate;
|
||||
|
||||
//@description The read date is unknown due to privacy settings of the other user
|
||||
messageReadDateUserPrivacyRestricted = MessageReadDate;
|
||||
|
||||
//@description The read date is unknown due to privacy settings of the current user, but will be known if the user subscribes to Telegram Premium
|
||||
messageReadDateMyPrivacyRestricted = MessageReadDate;
|
||||
|
||||
|
||||
//@description Represents a viewer of a message @user_id User identifier of the viewer @view_date Approximate point in time (Unix timestamp) when the message was viewed
|
||||
messageViewer user_id:int53 view_date:int32 = MessageViewer;
|
||||
|
||||
|
|
@ -1188,6 +1207,16 @@ messageOriginChat sender_chat_id:int53 author_signature:string = MessageOrigin;
|
|||
messageOriginChannel chat_id:int53 message_id:int53 author_signature:string = MessageOrigin;
|
||||
|
||||
|
||||
//@description Contains information about the last message from which a new message was forwarded last time
|
||||
//@chat_id Identifier of the chat to which the message that was forwarded belonged; may be 0 if unknown
|
||||
//@message_id Identifier of the message; may be 0 if unknown
|
||||
//@sender_id Identifier of the sender of the message; may be null if unknown or the new message was forwarded not to Saved Messages
|
||||
//@sender_name Name of the sender of the message if the sender is hidden by their privacy settings
|
||||
//@date Point in time (Unix timestamp) when the message is sent; 0 if unknown
|
||||
//@is_outgoing True, if the message that was forwarded is outgoing; always false if sender is unknown
|
||||
forwardSource chat_id:int53 message_id:int53 sender_id:MessageSender sender_name:string date:int32 is_outgoing:Bool = ForwardSource;
|
||||
|
||||
|
||||
//@class ReactionType @description Describes type of message reaction
|
||||
|
||||
//@description A reaction with an emoji @emoji Text representation of the reaction
|
||||
|
|
@ -1200,10 +1229,9 @@ reactionTypeCustomEmoji custom_emoji_id:int64 = ReactionType;
|
|||
//@description Contains information about a forwarded message
|
||||
//@origin Origin of the forwarded message
|
||||
//@date Point in time (Unix timestamp) when the message was originally sent
|
||||
//@source For messages forwarded to the chat with the current user (Saved Messages), to the Replies bot chat, or to the channel's discussion group, information about the source message from which the message was forwarded last time; may be null for other forwards or if unknown
|
||||
//@public_service_announcement_type The type of a public service announcement for the forwarded message
|
||||
//@from_chat_id For messages forwarded to the chat with the current user (Saved Messages), to the Replies bot chat, or to the channel's discussion group, the identifier of the chat from which the message was forwarded last time; 0 if unknown
|
||||
//@from_message_id For messages forwarded to the chat with the current user (Saved Messages), to the Replies bot chat, or to the channel's discussion group, the identifier of the original message from which the new message was forwarded last time; 0 if unknown
|
||||
messageForwardInfo origin:MessageOrigin date:int32 public_service_announcement_type:string from_chat_id:int53 from_message_id:int53 = MessageForwardInfo;
|
||||
messageForwardInfo origin:MessageOrigin date:int32 source:forwardSource public_service_announcement_type:string = MessageForwardInfo;
|
||||
|
||||
//@description Contains information about a message created with importMessages
|
||||
//@sender_name Name of the original sender
|
||||
|
|
@ -1226,13 +1254,16 @@ 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
|
||||
messageReactions reactions:vector<messageReaction> are_tags:Bool = MessageReactions;
|
||||
|
||||
|
||||
//@description Contains information about interactions with a message
|
||||
//@view_count Number of times the message was viewed
|
||||
//@forward_count Number of times the message was forwarded
|
||||
//@reply_info Information about direct or indirect replies to the message; may be null. Currently, available only in channels with a discussion supergroup and discussion supergroups for messages, which are not replies itself
|
||||
//@reactions The list of reactions added to the message
|
||||
messageInteractionInfo view_count:int32 forward_count:int32 reply_info:messageReplyInfo reactions:vector<messageReaction> = MessageInteractionInfo;
|
||||
//@reactions The list of reactions or tags added to the message; may be null
|
||||
messageInteractionInfo view_count:int32 forward_count:int32 reply_info:messageReplyInfo reactions:messageReactions = MessageInteractionInfo;
|
||||
|
||||
//@description Contains information about an unread reaction to a message
|
||||
//@type Type of the reaction
|
||||
|
|
@ -1315,6 +1346,7 @@ inputMessageReplyToStory story_sender_chat_id:int53 story_id:int32 = InputMessag
|
|||
//@can_get_added_reactions True, if the list of added reactions is available through getMessageAddedReactions
|
||||
//@can_get_statistics True, if the message statistics are available through getMessageStatistics
|
||||
//@can_get_message_thread True, if information about the message thread is available through getMessageThread and getMessageThreadHistory
|
||||
//@can_get_read_date True, if read date of the message can be received through getMessageReadDate
|
||||
//@can_get_viewers True, if chat members already viewed the message can be received through getMessageViewers
|
||||
//@can_get_media_timestamp_links True, if media timestamp links can be generated for media timestamp entities in the message text, caption or web page description through getMessageLink
|
||||
//@can_report_reactions True, if reactions on the message can be reported through reportMessageReactions
|
||||
|
|
@ -1330,6 +1362,7 @@ 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
|
||||
//@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
|
||||
|
|
@ -1339,7 +1372,7 @@ inputMessageReplyToStory story_sender_chat_id:int53 story_id:int32 = InputMessag
|
|||
//@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_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 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: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;
|
||||
|
||||
//@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;
|
||||
|
|
@ -1618,6 +1651,13 @@ 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
|
||||
savedMessagesTag tag:ReactionType label:string count:int32 = SavedMessagesTag;
|
||||
|
||||
//@description Contains a list of tags used in Saved Messages @tags List of tags
|
||||
savedMessagesTags tags:vector<savedMessagesTag> = SavedMessagesTags;
|
||||
|
||||
|
||||
//@description Describes a video chat
|
||||
//@group_call_id Group call identifier of an active video chat; 0 if none. Full information about the video chat can be received through the method getGroupCall
|
||||
//@has_participants True, if the video chat has participants
|
||||
|
|
@ -1854,6 +1894,28 @@ 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
|
||||
|
||||
//@description Topic containing messages sent by the current user of forwarded from an unknown chat
|
||||
savedMessagesTopicMyNotes = SavedMessagesTopic;
|
||||
|
||||
//@description Topic containing messages forwarded from a user with hidden privacy
|
||||
savedMessagesTopicAuthorHidden = SavedMessagesTopic;
|
||||
|
||||
//@description Topic containing messages forwarded from a specific chat @chat_id Identifier of the chat
|
||||
savedMessagesTopicSavedFromChat chat_id:int53 = SavedMessagesTopic;
|
||||
|
||||
|
||||
//@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 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
|
||||
forumTopicIcon color:int32 custom_emoji_id:int64 = ForumTopicIcon;
|
||||
|
||||
|
|
@ -2704,9 +2766,6 @@ messageDocument document:document caption:formattedText = MessageContent;
|
|||
//@is_secret True, if the photo must be blurred and must be shown only while tapped
|
||||
messagePhoto photo:photo caption:formattedText has_spoiler:Bool is_secret:Bool = MessageContent;
|
||||
|
||||
//@description A self-destructed photo message
|
||||
messageExpiredPhoto = MessageContent;
|
||||
|
||||
//@description A sticker message @sticker The sticker description @is_premium True, if premium animation of the sticker must be played
|
||||
messageSticker sticker:sticker is_premium:Bool = MessageContent;
|
||||
|
||||
|
|
@ -2717,15 +2776,24 @@ messageSticker sticker:sticker is_premium:Bool = MessageContent;
|
|||
//@is_secret True, if the video thumbnail must be blurred and the video must be shown only while tapped
|
||||
messageVideo video:video caption:formattedText has_spoiler:Bool is_secret:Bool = MessageContent;
|
||||
|
||||
//@description A self-destructed video message
|
||||
messageExpiredVideo = MessageContent;
|
||||
|
||||
//@description A video note message @video_note The video note description @is_viewed True, if at least one of the recipients has viewed the video note @is_secret True, if the video note thumbnail must be blurred and the video note must be shown only while tapped
|
||||
messageVideoNote video_note:videoNote is_viewed:Bool is_secret:Bool = MessageContent;
|
||||
|
||||
//@description A voice note message @voice_note The voice note description @caption Voice note caption @is_listened True, if at least one of the recipients has listened to the voice note
|
||||
messageVoiceNote voice_note:voiceNote caption:formattedText is_listened:Bool = MessageContent;
|
||||
|
||||
//@description A self-destructed photo message
|
||||
messageExpiredPhoto = MessageContent;
|
||||
|
||||
//@description A self-destructed video message
|
||||
messageExpiredVideo = MessageContent;
|
||||
|
||||
//@description A self-destructed video note message
|
||||
messageExpiredVideoNote = MessageContent;
|
||||
|
||||
//@description A self-destructed voice note message
|
||||
messageExpiredVoiceNote = MessageContent;
|
||||
|
||||
//@description A message with a location
|
||||
//@location The location description
|
||||
//@live_period Time relative to the message send date, for which the location can be updated, in seconds
|
||||
|
|
@ -3126,7 +3194,6 @@ inputMessageDocument document:InputFile thumbnail:inputThumbnail disable_content
|
|||
//@has_spoiler True, if the photo preview must be covered by a spoiler animation; not supported in secret chats
|
||||
inputMessagePhoto photo:InputFile thumbnail:inputThumbnail added_sticker_file_ids:vector<int32> width:int32 height:int32 caption:formattedText self_destruct_type:MessageSelfDestructType has_spoiler:Bool = InputMessageContent;
|
||||
|
||||
|
||||
//@description A sticker message
|
||||
//@sticker Sticker to be sent
|
||||
//@thumbnail Sticker thumbnail; pass null to skip thumbnail uploading
|
||||
|
|
@ -3153,14 +3220,16 @@ inputMessageVideo video:InputFile thumbnail:inputThumbnail added_sticker_file_id
|
|||
//@thumbnail Video thumbnail; 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
|
||||
inputMessageVideoNote video_note:InputFile thumbnail:inputThumbnail duration:int32 length:int32 = InputMessageContent;
|
||||
//@self_destruct_type Video note self-destruct type; 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
|
||||
inputMessageVoiceNote voice_note:InputFile duration:int32 waveform:bytes caption:formattedText = InputMessageContent;
|
||||
//@self_destruct_type Voice note self-destruct type; 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
|
||||
//@location Location to be sent
|
||||
|
|
@ -3323,7 +3392,7 @@ chatActionCancel = ChatAction;
|
|||
|
||||
//@class UserStatus @description Describes the last time the user was online
|
||||
|
||||
//@description The user status was never changed
|
||||
//@description The user's status has never been changed
|
||||
userStatusEmpty = UserStatus;
|
||||
|
||||
//@description The user is online @expires Point in time (Unix timestamp) when the user's online status will expire
|
||||
|
|
@ -3332,16 +3401,22 @@ userStatusOnline expires:int32 = UserStatus;
|
|||
//@description The user is offline @was_online Point in time (Unix timestamp) when the user was last online
|
||||
userStatusOffline was_online:int32 = UserStatus;
|
||||
|
||||
//@description The user was online recently
|
||||
userStatusRecently = UserStatus;
|
||||
//@description The user was online recently @by_my_privacy_settings Exact user's status is hidden because the current user enabled userPrivacySettingShowStatus privacy setting for the user and has no Telegram Premium
|
||||
userStatusRecently by_my_privacy_settings:Bool = UserStatus;
|
||||
|
||||
//@description The user is offline, but was online last week
|
||||
userStatusLastWeek = UserStatus;
|
||||
//@description The user is offline, but was online last week @by_my_privacy_settings Exact user's status is hidden because the current user enabled userPrivacySettingShowStatus privacy setting for the user and has no Telegram Premium
|
||||
userStatusLastWeek by_my_privacy_settings:Bool = UserStatus;
|
||||
|
||||
//@description The user is offline, but was online last month
|
||||
userStatusLastMonth = UserStatus;
|
||||
//@description The user is offline, but was online last month @by_my_privacy_settings Exact user's status is hidden because the current user enabled userPrivacySettingShowStatus privacy setting for the user and has no Telegram Premium
|
||||
userStatusLastMonth by_my_privacy_settings:Bool = UserStatus;
|
||||
|
||||
|
||||
//@description Represents an emoji with its keyword @emoji The emoji @keyword The keyword
|
||||
emojiKeyword emoji:string keyword:string = EmojiKeyword;
|
||||
|
||||
//@description Represents a list of emoji with their keywords @emoji_keywords List of emoji with their keywords
|
||||
emojiKeywords emoji_keywords:vector<emojiKeyword> = EmojiKeywords;
|
||||
|
||||
//@description Represents a list of stickers @stickers List of stickers
|
||||
stickers stickers:vector<sticker> = Stickers;
|
||||
|
||||
|
|
@ -3658,8 +3733,14 @@ publicForwards total_count:int32 forwards:vector<PublicForward> next_offset:stri
|
|||
//@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;
|
||||
|
||||
//@description Contains a list of features available on the first chat boost levels @features The list of features
|
||||
chatBoostFeatures features:vector<chatBoostLevelFeatures> = ChatBoostFeatures;
|
||||
//@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_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;
|
||||
|
||||
|
||||
//@class ChatBoostSource @description Describes source of a chat boost
|
||||
|
|
@ -3970,9 +4051,11 @@ 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
|
||||
availableReactions top_reactions:vector<availableReaction> recent_reactions:vector<availableReaction> popular_reactions:vector<availableReaction> allow_custom_emoji:Bool = AvailableReactions;
|
||||
//@are_tags True, if the reactions will be tags and the message can be found by them; currently, always false
|
||||
//@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;
|
||||
|
||||
//@description Contains information about a emoji reaction
|
||||
//@description Contains information about an emoji reaction
|
||||
//@emoji Text representation of the reaction
|
||||
//@title Reaction title
|
||||
//@is_active True, if the reaction can be added to new messages and enabled in chats
|
||||
|
|
@ -3986,6 +4069,15 @@ availableReactions top_reactions:vector<availableReaction> recent_reactions:vect
|
|||
emojiReaction emoji:string title:string is_active:Bool static_icon:sticker appear_animation:sticker select_animation:sticker activate_animation:sticker effect_animation:sticker around_animation:sticker center_animation:sticker = EmojiReaction;
|
||||
|
||||
|
||||
//@class ReactionUnavailabilityReason @description Describes why the current user can't add reactions to the message, despite some other users can
|
||||
|
||||
//@description The user is an anonymous administrator in the supergroup, but isn't a creator of it, so they can't vote on behalf of the supergroup
|
||||
reactionUnavailabilityReasonAnonymousAdministrator = ReactionUnavailabilityReason;
|
||||
|
||||
//@description The user isn't a member of the supergroup and can't send messages and reactions there without joining
|
||||
reactionUnavailabilityReasonGuest = ReactionUnavailabilityReason;
|
||||
|
||||
|
||||
//@description Represents a list of animations @animations List of animations
|
||||
animations animations:vector<animation> = Animations;
|
||||
|
||||
|
|
@ -4592,6 +4684,9 @@ premiumLimitTypeChatFolderChosenChatCount = PremiumLimitType;
|
|||
//@description The maximum number of pinned chats in the archive chat list
|
||||
premiumLimitTypePinnedArchivedChatCount = PremiumLimitType;
|
||||
|
||||
//@description The maximum number of pinned Saved Messages topics
|
||||
premiumLimitTypePinnedSavedMessagesTopicCount = PremiumLimitType;
|
||||
|
||||
//@description The maximum length of sent media caption
|
||||
premiumLimitTypeCaptionLength = PremiumLimitType;
|
||||
|
||||
|
|
@ -5305,6 +5400,27 @@ userPrivacySettingAllowFindingByPhoneNumber = UserPrivacySetting;
|
|||
userPrivacySettingAllowPrivateVoiceAndVideoNoteMessages = UserPrivacySetting;
|
||||
|
||||
|
||||
//@description Contains privacy settings for message read date in private chats. Read dates are always shown to the users that can see online status of the current user regardless of this setting
|
||||
//@show_read_date True, if message read date is shown to other users in private chats. If false and the current user isn't a Telegram Premium user, then they will not be able to see other's message read date.
|
||||
readDatePrivacySettings show_read_date:Bool = ReadDatePrivacySettings;
|
||||
|
||||
//@description Contains privacy settings for new chats with non-contacts
|
||||
//@allow_new_chats_from_unknown_users True, if non-contacts users are able to write first to the current user. Telegram Premium subscribers are able to write first regardless of this setting
|
||||
newChatPrivacySettings allow_new_chats_from_unknown_users:Bool = NewChatPrivacySettings;
|
||||
|
||||
|
||||
//@class CanSendMessageToUserResult @description Describes result of canSendMessageToUser
|
||||
|
||||
//@description The user can be messaged
|
||||
canSendMessageToUserResultOk = CanSendMessageToUserResult;
|
||||
|
||||
//@description The user can't be messaged, because they are deleted or unknown
|
||||
canSendMessageToUserResultUserIsDeleted = CanSendMessageToUserResult;
|
||||
|
||||
//@description The user can't be messaged, because they restrict new chats with non-contacts
|
||||
canSendMessageToUserResultUserRestrictsNewChats = CanSendMessageToUserResult;
|
||||
|
||||
|
||||
//@description Contains information about the period of inactivity after which the current user's account will automatically be deleted @days Number of days of inactivity before the account will be flagged for deletion; 30-366 days
|
||||
accountTtl days:int32 = AccountTtl;
|
||||
|
||||
|
|
@ -5466,7 +5582,7 @@ targetChatInternalLink link:InternalLinkType = TargetChat;
|
|||
|
||||
//@class InternalLinkType @description Describes an internal https://t.me or tg: link, which must be processed by the application in a special way
|
||||
|
||||
//@description The link is a link to the active sessions section of the application. Use getActiveSessions to handle the link
|
||||
//@description The link is a link to the Devices section of the application. Use getActiveSessions to get the list of active sessions and show them to the user
|
||||
internalLinkTypeActiveSessions = InternalLinkType;
|
||||
|
||||
//@description The link is a link to an attachment menu bot to be opened in the specified or a chosen chat. Process given target_chat to open the chat.
|
||||
|
|
@ -5482,7 +5598,9 @@ internalLinkTypeAttachmentMenuBot target_chat:TargetChat bot_username:string url
|
|||
//@description The link contains an authentication code. Call checkAuthenticationCode with the code if the current authorization state is authorizationStateWaitCode @code The authentication code
|
||||
internalLinkTypeAuthenticationCode code:string = InternalLinkType;
|
||||
|
||||
//@description The link is a link to a background. Call searchBackground with the given background name to process the link @background_name Name of the background
|
||||
//@description The link is a link to a background. Call searchBackground with the given background name to process the link
|
||||
//-If background is found and the user wants to apply it, then call setDefaultBackground
|
||||
//@background_name Name of the background
|
||||
internalLinkTypeBackground background_name:string = InternalLinkType;
|
||||
|
||||
//@description The link is a link to a Telegram bot, which is supposed to be added to a channel chat as an administrator. Call searchPublicChat with the given bot username and check that the user is a bot,
|
||||
|
|
@ -5519,13 +5637,17 @@ internalLinkTypeChangePhoneNumber = InternalLinkType;
|
|||
//@url URL to be passed to getChatBoostLinkInfo
|
||||
internalLinkTypeChatBoost url:string = InternalLinkType;
|
||||
|
||||
//@description The link is an invite link to a chat folder. Call checkChatFolderInviteLink with the given invite link to process the link @invite_link Internal representation of the invite link
|
||||
//@description The link is an invite link to a chat folder. Call checkChatFolderInviteLink with the given invite link to process the link.
|
||||
//-If the link is valid and the user wants to join the chat folder, then call addChatFolderByInviteLink
|
||||
//@invite_link Internal representation of the invite link
|
||||
internalLinkTypeChatFolderInvite invite_link:string = InternalLinkType;
|
||||
|
||||
//@description The link is a link to the folder section of the app settings
|
||||
internalLinkTypeChatFolderSettings = InternalLinkType;
|
||||
|
||||
//@description The link is a chat invite link. Call checkChatInviteLink with the given invite link to process the link @invite_link Internal representation of the invite link
|
||||
//@description The link is a chat invite link. Call checkChatInviteLink with the given invite link to process the link.
|
||||
//-If the link is valid and the user wants to join the chat, then call joinChatByInviteLink
|
||||
//@invite_link Internal representation of the invite link
|
||||
internalLinkTypeChatInvite invite_link:string = InternalLinkType;
|
||||
|
||||
//@description The link is a link to the default message auto-delete timer settings section of the app settings
|
||||
|
|
@ -5534,24 +5656,32 @@ internalLinkTypeDefaultMessageAutoDeleteTimerSettings = InternalLinkType;
|
|||
//@description The link is a link to the edit profile section of the app settings
|
||||
internalLinkTypeEditProfileSettings = InternalLinkType;
|
||||
|
||||
//@description The link is a link to a game. Call searchPublicChat with the given bot username, check that the user is a bot, ask the current user to select a chat to send the game, and then call sendMessage with inputMessageGame
|
||||
//@description The link is a link to a game. Call searchPublicChat with the given bot username, check that the user is a bot,
|
||||
//-ask the current user to select a chat to send the game, and then call sendMessage with inputMessageGame
|
||||
//@bot_username Username of the bot that owns the game
|
||||
//@game_short_name Short name of the game
|
||||
internalLinkTypeGame bot_username:string game_short_name:string = InternalLinkType;
|
||||
|
||||
//@description The link must be opened in an Instant View. Call getWebPageInstantView with the given URL to process the link @url URL to be passed to getWebPageInstantView @fallback_url An URL to open if getWebPageInstantView fails
|
||||
//@description The link must be opened in an Instant View. Call getWebPageInstantView with the given URL to process the link.
|
||||
//-If Instant View is found, then show it, otherwise, open the fallback URL in an external browser
|
||||
//@url URL to be passed to getWebPageInstantView
|
||||
//@fallback_url An URL to open if getWebPageInstantView fails
|
||||
internalLinkTypeInstantView url:string fallback_url:string = InternalLinkType;
|
||||
|
||||
//@description The link is a link to an invoice. Call getPaymentForm with the given invoice name to process the link @invoice_name Name of the invoice
|
||||
internalLinkTypeInvoice invoice_name:string = InternalLinkType;
|
||||
|
||||
//@description The link is a link to a language pack. Call getLanguagePackInfo with the given language pack identifier to process the link @language_pack_id Language pack identifier
|
||||
//@description The link is a link to a language pack. Call getLanguagePackInfo with the given language pack identifier to process the link.
|
||||
//-If the language pack is found and the user wants to apply it, then call setOption for the option "language_pack_id"
|
||||
//@language_pack_id Language pack identifier
|
||||
internalLinkTypeLanguagePack language_pack_id:string = InternalLinkType;
|
||||
|
||||
//@description The link is a link to the language section of the app settings
|
||||
internalLinkTypeLanguageSettings = InternalLinkType;
|
||||
|
||||
//@description The link is a link to a Telegram message or a forum topic. Call getMessageLinkInfo with the given URL to process the link @url URL to be passed to getMessageLinkInfo
|
||||
//@description The link is a link to a Telegram message or a forum topic. Call getMessageLinkInfo with the given URL to process the link,
|
||||
//-and then open received forum topic or chat and show the message there
|
||||
//@url URL to be passed to getMessageLinkInfo
|
||||
internalLinkTypeMessage url:string = InternalLinkType;
|
||||
|
||||
//@description The link contains a message draft text. A share screen needs to be shown to the user, then the chosen chat must be opened and the text is added to the input field
|
||||
|
|
@ -5568,18 +5698,21 @@ internalLinkTypeMessageDraft text:formattedText contains_link:Bool = InternalLin
|
|||
//-If empty, then onActivityResult method must be used to return response on Android, or the link tgbot{bot_user_id}://passport/success or tgbot{bot_user_id}://passport/cancel must be opened otherwise
|
||||
internalLinkTypePassportDataRequest bot_user_id:int53 scope:string public_key:string nonce:string callback_url:string = InternalLinkType;
|
||||
|
||||
//@description The link can be used to confirm ownership of a phone number to prevent account deletion. Call sendPhoneNumberConfirmationCode with the given hash and phone number to process the link
|
||||
//@description The link can be used to confirm ownership of a phone number to prevent account deletion. Call sendPhoneNumberConfirmationCode with the given hash and phone number to process the link.
|
||||
//-If succeeded, call checkPhoneNumberConfirmationCode to check entered by the user code, or resendPhoneNumberConfirmationCode to resend it
|
||||
//@hash Hash value from the link
|
||||
//@phone_number Phone number value from the link
|
||||
internalLinkTypePhoneNumberConfirmation hash:string phone_number:string = InternalLinkType;
|
||||
|
||||
//@description The link is a link to the Premium features screen of the application from which the user can subscribe to Telegram Premium. Call getPremiumFeatures with the given referrer to process the link @referrer Referrer specified in the link
|
||||
//@description The link is a link to the Premium features screen of the application from which the user can subscribe to Telegram Premium. Call getPremiumFeatures with the given referrer to process the link
|
||||
//@referrer Referrer specified in the link
|
||||
internalLinkTypePremiumFeatures referrer:string = InternalLinkType;
|
||||
|
||||
//@description The link is a link to the screen for gifting Telegram Premium subscriptions to friends @referrer Referrer specified in the link
|
||||
//@description The link is a link to the screen for gifting Telegram Premium subscriptions to friends via inputInvoiceTelegram payments or in-store purchases @referrer Referrer specified in the link
|
||||
internalLinkTypePremiumGift referrer:string = InternalLinkType;
|
||||
|
||||
//@description The link is a link with a Telegram Premium gift code. Call checkPremiumGiftCode with the given code to process the link. If the code is valid and the user wants to apply it, then call applyPremiumGiftCode
|
||||
//@description The link is a link with a Telegram Premium gift code. Call checkPremiumGiftCode with the given code to process the link.
|
||||
//-If the code is valid and the user wants to apply it, then call applyPremiumGiftCode
|
||||
//@code The Telegram Premium gift code
|
||||
internalLinkTypePremiumGiftCode code:string = InternalLinkType;
|
||||
|
||||
|
|
@ -5592,7 +5725,9 @@ internalLinkTypePrivacyAndSecuritySettings = InternalLinkType;
|
|||
//@type Type of the proxy
|
||||
internalLinkTypeProxy server:string port:int32 type:ProxyType = InternalLinkType;
|
||||
|
||||
//@description The link is a link to a chat by its username. Call searchPublicChat with the given chat username to process the link @chat_username Username of the chat
|
||||
//@description The link is a link to a chat by its username. Call searchPublicChat with the given chat username to process the link
|
||||
//-If the chat is found, open its profile information screen or the chat itself
|
||||
//@chat_username Username of the chat
|
||||
internalLinkTypePublicChat chat_username:string = InternalLinkType;
|
||||
|
||||
//@description The link can be used to login the current user on another device, but it must be scanned from QR-code using in-app camera. An alert similar to
|
||||
|
|
@ -5608,17 +5743,18 @@ internalLinkTypeSettings = InternalLinkType;
|
|||
//@description The link is a link to a bot, which can be installed to the side menu. Call searchPublicChat with the given bot username, check that the user is a bot and can be added to attachment menu.
|
||||
//-Then, use getAttachmentMenuBot to receive information about the bot. If the bot isn't added to side menu, then show a disclaimer about Mini Apps being a third-party apps,
|
||||
//-ask the user to accept their Terms of service and confirm adding the bot to side and attachment menu. If the user accept the terms and confirms adding, then use toggleBotIsAddedToAttachmentMenu to add the bot.
|
||||
//-If the bot is added to side menu, then use getWebAppUrl with the given URL
|
||||
//-If the bot is added to side menu, then use getWebAppUrl with the given URL and open the returned URL as a Web App
|
||||
//@bot_username Username of the bot
|
||||
//@url URL to be passed to getWebAppUrl
|
||||
internalLinkTypeSideMenuBot bot_username:string url:string = InternalLinkType;
|
||||
|
||||
//@description The link is a link to a sticker set. Call searchStickerSet with the given sticker set name to process the link and show the sticker set
|
||||
//@description The link is a link to a sticker set. Call searchStickerSet with the given sticker set name to process the link and show the sticker set.
|
||||
//-If the sticker set is found and the user wants to add it, then call changeStickerSet
|
||||
//@sticker_set_name Name of the sticker set
|
||||
//@expect_custom_emoji True, if the sticker set is expected to contain custom emoji
|
||||
internalLinkTypeStickerSet sticker_set_name:string expect_custom_emoji:Bool = InternalLinkType;
|
||||
|
||||
//@description The link is a link to a story. Call searchPublicChat with the given sender username, then call getStory with the received chat identifier and the given story identifier
|
||||
//@description The link is a link to a story. Call searchPublicChat with the given sender username, then call getStory with the received chat identifier and the given story identifier, then show the story if received
|
||||
//@story_sender_username Username of the sender of the story
|
||||
//@story_id Story identifier
|
||||
internalLinkTypeStory story_sender_username:string story_id:int32 = InternalLinkType;
|
||||
|
|
@ -5635,10 +5771,14 @@ internalLinkTypeUnknownDeepLink link:string = InternalLinkType;
|
|||
//@description The link is a link to an unsupported proxy. An alert can be shown to the user
|
||||
internalLinkTypeUnsupportedProxy = InternalLinkType;
|
||||
|
||||
//@description The link is a link to a user by its phone number. Call searchUserByPhoneNumber with the given phone number to process the link @phone_number Phone number of the user
|
||||
//@description The link is a link to a user by its phone number. Call searchUserByPhoneNumber with the given phone number to process the link.
|
||||
//-If the user is found, then call createPrivateChat and open the chat
|
||||
//@phone_number Phone number of the user
|
||||
internalLinkTypeUserPhoneNumber phone_number:string = InternalLinkType;
|
||||
|
||||
//@description The link is a link to a user by a temporary token. Call searchUserByToken with the given token to process the link @token The token
|
||||
//@description The link is a link to a user by a temporary token. Call searchUserByToken with the given token to process the link.
|
||||
//-If the user is found, then call createPrivateChat and open the chat
|
||||
//@token The token
|
||||
internalLinkTypeUserToken token:string = InternalLinkType;
|
||||
|
||||
//@description The link is a link to a video chat. Call searchPublicChat with the given chat username, and then joinGroupCall with the given invite hash to process the link
|
||||
|
|
@ -6363,6 +6503,9 @@ 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 topic in a forum chat was changed @chat_id Chat identifier @info New information about the topic
|
||||
updateForumTopicInfo chat_id:int53 info:forumTopicInfo = Update;
|
||||
|
||||
|
|
@ -6593,6 +6736,9 @@ 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 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
|
||||
//@weekly_count The total number of allowed speech recognitions per week; 0 if none
|
||||
|
|
@ -6792,9 +6938,7 @@ getAuthorizationState = AuthorizationState;
|
|||
//@device_model Model of the device the application is being run on; must be non-empty
|
||||
//@system_version Version of the operating system the application is being run on. If empty, the version is automatically detected by TDLib
|
||||
//@application_version Application version; must be non-empty
|
||||
//@enable_storage_optimizer Pass true to automatically delete old files in background
|
||||
//@ignore_file_names Pass true to ignore original file names for downloaded files. Otherwise, downloaded files are saved under names as close as possible to the original name
|
||||
setTdlibParameters use_test_dc:Bool database_directory:string files_directory:string database_encryption_key:bytes use_file_database:Bool use_chat_info_database:Bool use_message_database:Bool use_secret_chats:Bool api_id:int32 api_hash:string system_language_code:string device_model:string system_version:string application_version:string enable_storage_optimizer:Bool ignore_file_names:Bool = Ok;
|
||||
setTdlibParameters use_test_dc:Bool database_directory:string files_directory:string database_encryption_key:bytes use_file_database:Bool use_chat_info_database:Bool use_message_database:Bool use_secret_chats:Bool api_id:int32 api_hash:string system_language_code:string device_model:string system_version:string application_version:string = Ok;
|
||||
|
||||
//@description Sets the phone number of the user and sends an authentication code to the user. Works only when the current authorization state is authorizationStateWaitPhoneNumber,
|
||||
//-or if there is no pending authentication query and the current authorization state is authorizationStateWaitEmailAddress, authorizationStateWaitEmailCode, authorizationStateWaitCode, authorizationStateWaitRegistration, or authorizationStateWaitPassword
|
||||
|
|
@ -6911,6 +7055,9 @@ checkRecoveryEmailAddressCode code:string = PasswordState;
|
|||
//@description Resends the 2-step verification recovery email address verification code
|
||||
resendRecoveryEmailAddressCode = PasswordState;
|
||||
|
||||
//@description Cancels verification of the 2-step verification recovery email address
|
||||
cancelRecoveryEmailAddressVerification = PasswordState;
|
||||
|
||||
//@description Requests to send a 2-step verification password recovery code to an email address that was previously set up
|
||||
requestPasswordRecovery = EmailAddressAuthenticationCodeInfo;
|
||||
|
||||
|
|
@ -6988,6 +7135,11 @@ getMessages chat_id:int53 message_ids:vector<int53> = Messages;
|
|||
//@description Returns information about a message thread. Can be used only if message.can_get_message_thread == true @chat_id Chat identifier @message_id Identifier of the message
|
||||
getMessageThread chat_id:int53 message_id:int53 = MessageThreadInfo;
|
||||
|
||||
//@description Returns read date of a recent outgoing message in a private chat. The method can be called if message.can_get_read_date == true and the message is read
|
||||
//@chat_id Chat identifier
|
||||
//@message_id Identifier of the message
|
||||
getMessageReadDate chat_id:int53 message_id:int53 = MessageReadDate;
|
||||
|
||||
//@description Returns viewers of a recent outgoing message in a basic group or a supergroup chat. For video notes and voice notes only users, opened content of the message, are returned. The method can be called if message.can_get_viewers == true
|
||||
//@chat_id Chat identifier
|
||||
//@message_id Identifier of the message
|
||||
|
|
@ -7086,6 +7238,45 @@ 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 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
|
||||
//@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;
|
||||
|
||||
//@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
|
||||
//@date Point in time (Unix timestamp) relative to which to search for messages
|
||||
getSavedMessagesTopicMessageByDate saved_messages_topic:SavedMessagesTopic 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 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
|
||||
//@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;
|
||||
|
||||
//@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
|
||||
//@is_pinned Pass true to pin the topic; pass false to unpin it
|
||||
toggleSavedMessagesTopicIsPinned saved_messages_topic:SavedMessagesTopic 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 Returns a list of common group chats with a given user. Chats are sorted by their type and creation date
|
||||
//@user_id User identifier
|
||||
//@offset_chat_id Chat identifier starting from which to return chats; use 0 for the first request
|
||||
|
|
@ -7097,7 +7288,7 @@ getGroupsInCommon user_id:int53 offset_chat_id:int53 limit:int32 = Chats;
|
|||
//-For optimal performance, the number of returned messages is chosen by TDLib. This is an offline request if only_local is true
|
||||
//@chat_id Chat identifier
|
||||
//@from_message_id Identifier of the message starting from which history must be fetched; use 0 to get results from the last message
|
||||
//@offset Specify 0 to get results from exactly the from_message_id or a negative offset up to 99 to get additionally some newer messages
|
||||
//@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
|
||||
//@only_local Pass true to get only messages that are available without sending network requests
|
||||
|
|
@ -7108,7 +7299,7 @@ getChatHistory chat_id:int53 from_message_id:int53 offset:int32 limit:int32 only
|
|||
//@chat_id Chat identifier
|
||||
//@message_id Message identifier, which thread history needs to be returned
|
||||
//@from_message_id Identifier of the message starting from which history must be fetched; use 0 to get results from the last message
|
||||
//@offset Specify 0 to get results from exactly the from_message_id or a negative offset up to 99 to get additionally some newer messages
|
||||
//@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
|
||||
getMessageThreadHistory chat_id:int53 message_id:int53 from_message_id:int53 offset:int32 limit:int32 = Messages;
|
||||
|
|
@ -7131,12 +7322,13 @@ deleteChat chat_id:int53 = Ok;
|
|||
//@query Query to search for
|
||||
//@sender_id Identifier of the sender of messages to search for; pass null to search for messages from any sender. Not supported in secret chats
|
||||
//@from_message_id Identifier of the message starting from which history must be fetched; use 0 to get results from the last message
|
||||
//@offset Specify 0 to get results from exactly the from_message_id or a negative offset to get the specified message and some newer messages
|
||||
//@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
|
||||
//@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
|
||||
searchChatMessages chat_id:int53 query:string sender_id:MessageSender from_message_id:int53 offset:int32 limit:int32 filter:SearchMessagesFilter message_thread_id:int53 = FoundChatMessages;
|
||||
//@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;
|
||||
|
||||
//@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
|
||||
|
|
@ -7157,6 +7349,17 @@ searchMessages chat_list:ChatList query:string offset:string limit:int32 filter:
|
|||
//@filter Additional filter for messages to search; pass null to search for all messages
|
||||
searchSecretMessages chat_id:int53 query:string offset:string limit:int32 filter:SearchMessagesFilter = FoundMessages;
|
||||
|
||||
//@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
|
||||
//@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;
|
||||
|
||||
//@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
|
||||
//@limit The maximum number of messages to be returned; up to 100. For optimal performance, the number of returned messages is chosen by TDLib and can be smaller than the specified limit
|
||||
|
|
@ -7186,26 +7389,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
|
||||
getChatSparseMessagePositions chat_id:int53 filter:SearchMessagesFilter from_message_id:int53 limit:int32 = MessagePositions;
|
||||
//@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;
|
||||
|
||||
//@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
|
||||
getChatMessageCalendar chat_id:int53 filter:SearchMessagesFilter from_message_id:int53 = MessageCalendar;
|
||||
//@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;
|
||||
|
||||
//@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
|
||||
//@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 return_local:Bool = Count;
|
||||
getChatMessageCount chat_id:int53 filter:SearchMessagesFilter saved_messages_topic:SavedMessagesTopic 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
|
||||
getChatMessagePosition chat_id:int53 message_id:int53 filter:SearchMessagesFilter message_thread_id:int53 = Count;
|
||||
//@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;
|
||||
|
||||
//@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;
|
||||
|
|
@ -7431,13 +7638,13 @@ 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 rights in the supergroup
|
||||
//@description Creates a topic in a forum supergroup chat; requires can_manage_topics or can_create_topics rights 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
|
||||
createForumTopic chat_id:int53 name:string icon:forumTopicIcon = ForumTopicInfo;
|
||||
|
||||
//@description Edits title and icon of a topic in a forum supergroup chat; requires can_manage_topics administrator right in the supergroup unless the user is creator of the topic
|
||||
//@description Edits title and icon of a topic in a forum supergroup chat; requires can_manage_topics right in the supergroup unless the user is creator of the topic
|
||||
//@chat_id Identifier of the chat
|
||||
//@message_thread_id Message thread identifier of the forum topic
|
||||
//@name New name of the topic; 0-128 characters. If empty, the previous topic name is kept
|
||||
|
|
@ -7466,24 +7673,24 @@ getForumTopics chat_id:int53 query:string offset_date:int32 offset_message_id:in
|
|||
//@notification_settings New notification settings for the forum topic. If the topic is muted for more than 366 days, it is considered to be muted forever
|
||||
setForumTopicNotificationSettings chat_id:int53 message_thread_id:int53 notification_settings:chatNotificationSettings = Ok;
|
||||
|
||||
//@description Toggles whether a topic is closed in a forum supergroup chat; requires can_manage_topics administrator right in the supergroup unless the user is creator of the topic
|
||||
//@description Toggles whether a topic is closed in a forum supergroup chat; requires can_manage_topics right in the supergroup unless the user is creator of the topic
|
||||
//@chat_id Identifier of the chat
|
||||
//@message_thread_id Message thread identifier of the forum topic
|
||||
//@is_closed Pass true to close the topic; pass false to reopen it
|
||||
toggleForumTopicIsClosed chat_id:int53 message_thread_id:int53 is_closed:Bool = Ok;
|
||||
|
||||
//@description Toggles whether a General topic is hidden in a forum supergroup chat; requires can_manage_topics administrator right in the supergroup
|
||||
//@description Toggles whether a General topic is hidden in a forum supergroup chat; requires can_manage_topics right in the supergroup
|
||||
//@chat_id Identifier of the chat
|
||||
//@is_hidden Pass true to hide and close the General topic; pass false to unhide it
|
||||
toggleGeneralForumTopicIsHidden chat_id:int53 is_hidden:Bool = Ok;
|
||||
|
||||
//@description Changes the pinned state of a forum topic; requires can_manage_topics administrator right in the supergroup. There can be up to getOption("pinned_forum_topic_count_max") pinned forum topics
|
||||
//@description Changes the pinned state of a forum topic; requires can_manage_topics right in the supergroup. There can be up to getOption("pinned_forum_topic_count_max") pinned forum topics
|
||||
//@chat_id Chat identifier
|
||||
//@message_thread_id Message thread identifier of the forum topic
|
||||
//@is_pinned Pass true to pin the topic; pass false to unpin it
|
||||
toggleForumTopicIsPinned chat_id:int53 message_thread_id:int53 is_pinned:Bool = Ok;
|
||||
|
||||
//@description Changes the order of pinned forum topics @chat_id Chat identifier @message_thread_ids The new list of pinned forum topics
|
||||
//@description Changes the order of pinned forum topics; requires can_manage_topics right in the supergroup @chat_id Chat identifier @message_thread_ids The new list of pinned forum topics
|
||||
setPinnedForumTopics chat_id:int53 message_thread_ids:vector<int53> = Ok;
|
||||
|
||||
//@description Deletes all messages in a forum topic; requires can_delete_messages administrator right in the supergroup unless the user is creator of the topic, the topic has no messages from other users and has at most 11 messages
|
||||
|
|
@ -7492,7 +7699,7 @@ setPinnedForumTopics chat_id:int53 message_thread_ids:vector<int53> = Ok;
|
|||
deleteForumTopic chat_id:int53 message_thread_id:int53 = Ok;
|
||||
|
||||
|
||||
//@description Returns information about a emoji reaction. Returns a 404 error if the reaction is not found @emoji Text representation of the reaction
|
||||
//@description Returns information about an emoji reaction. Returns a 404 error if the reaction is not found @emoji Text representation of the reaction
|
||||
getEmojiReaction emoji:string = EmojiReaction;
|
||||
|
||||
//@description Returns TGS stickers with generic animations for custom emoji reactions
|
||||
|
|
@ -7507,12 +7714,12 @@ getMessageAvailableReactions chat_id:int53 message_id:int53 row_size:int32 = Ava
|
|||
//@description Clears the list of recently used reactions
|
||||
clearRecentReactions = Ok;
|
||||
|
||||
//@description Adds a reaction to a message. Use getMessageAvailableReactions to receive the list of available reactions for the message
|
||||
//@description Adds a reaction or a tag to a message. Use getMessageAvailableReactions to receive the list of available reactions for the message
|
||||
//@chat_id Identifier of the chat to which the message belongs
|
||||
//@message_id Identifier of the message
|
||||
//@reaction_type Type of the reaction to add
|
||||
//@is_big Pass true if the reaction is added with a big animation
|
||||
//@update_recent_reactions Pass true if the reaction needs to be added to recent reactions
|
||||
//@update_recent_reactions Pass true if the reaction needs to be added to recent reactions; tags are never added to the list of recent reactions
|
||||
addMessageReaction chat_id:int53 message_id:int53 reaction_type:ReactionType is_big:Bool update_recent_reactions:Bool = Ok;
|
||||
|
||||
//@description Removes a reaction from a message. A chosen reaction can always be removed
|
||||
|
|
@ -7539,6 +7746,12 @@ 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 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;
|
||||
|
||||
|
||||
//@description Searches for a given quote in a text. Returns found quote start position in UTF-16 code units. Returns a 404 error if the quote is not found. Can be called synchronously
|
||||
//@text Text in which to search for the quote
|
||||
|
|
@ -7559,6 +7772,9 @@ parseMarkdown text:formattedText = FormattedText;
|
|||
//@description Replaces text entities with Markdown formatting in a human-friendly format. Entities that can't be represented in Markdown unambiguously are kept as is. Can be called synchronously @text The text
|
||||
getMarkdownText text:formattedText = FormattedText;
|
||||
|
||||
//@description Returns an emoji for the given country. Returns an empty string on failure. Can be called synchronously @country_code A two-letter ISO 3166-1 alpha-2 country code as received from getCountries
|
||||
getCountryFlagEmoji country_code:string = Text;
|
||||
|
||||
//@description Returns the MIME type of a file, guessed by its extension. Returns an empty string on failure. Can be called synchronously @file_name The name of the file or path to the file
|
||||
getFileMimeType file_name:string = Text;
|
||||
|
||||
|
|
@ -8870,11 +9086,15 @@ removeFavoriteSticker sticker:InputFile = Ok;
|
|||
//@description Returns emoji corresponding to a sticker. The list is only for informational purposes, because a sticker is always sent with a fixed emoji from the corresponding Sticker object @sticker Sticker file identifier
|
||||
getStickerEmojis sticker:InputFile = Emojis;
|
||||
|
||||
//@description Searches for emojis by keywords. Supported only if the file database is enabled
|
||||
//@description Searches for emojis by keywords. Supported only if the file database is enabled. Order of results is unspecified
|
||||
//@text Text to search for
|
||||
//@exact_match Pass true if only emojis, which exactly match the text, needs to be returned
|
||||
//@input_language_codes List of possible IETF language tags of the user's input language; may be empty if unknown
|
||||
searchEmojis text:string exact_match:Bool input_language_codes:vector<string> = Emojis;
|
||||
searchEmojis text:string input_language_codes:vector<string> = EmojiKeywords;
|
||||
|
||||
//@description Return emojis matching the keyword. Supported only if the file database is enabled. Order of results is unspecified
|
||||
//@text Text to search for
|
||||
//@input_language_codes List of possible IETF language tags of the user's input language; may be empty if unknown
|
||||
getKeywordEmojis text:string input_language_codes:vector<string> = Emojis;
|
||||
|
||||
//@description Returns available emojis categories @type Type of emoji categories to return; pass null to get default emoji categories
|
||||
getEmojiCategories type:EmojiCategoryType = EmojiCategories;
|
||||
|
|
@ -9314,6 +9534,24 @@ setUserPrivacySettingRules setting:UserPrivacySetting rules:userPrivacySettingRu
|
|||
//@description Returns the current privacy settings @setting The privacy setting
|
||||
getUserPrivacySettingRules setting:UserPrivacySetting = UserPrivacySettingRules;
|
||||
|
||||
//@description Changes privacy settings for message read date @settings New settings
|
||||
setReadDatePrivacySettings settings:readDatePrivacySettings = Ok;
|
||||
|
||||
//@description Returns privacy settings for message read date
|
||||
getReadDatePrivacySettings = ReadDatePrivacySettings;
|
||||
|
||||
//@description Changes privacy settings for new chat creation; for Telegram Premium users only @settings New settings
|
||||
setNewChatPrivacySettings settings:newChatPrivacySettings = Ok;
|
||||
|
||||
//@description Returns privacy settings for new chat creation
|
||||
getNewChatPrivacySettings = NewChatPrivacySettings;
|
||||
|
||||
|
||||
//@description Check whether the current user can message another user or try to create a chat with them
|
||||
//@user_id Identifier of the other user
|
||||
//@only_local Pass true to get only locally available information without sending network requests
|
||||
canSendMessageToUser user_id:int53 only_local:Bool = CanSendMessageToUserResult;
|
||||
|
||||
|
||||
//@description Returns the value of an option by its name. (Check the list of available options on https://core.telegram.org/tdlib/options.) Can be called before authorization. Can be called synchronously for options "version" and "commit_hash"
|
||||
//@name The name of the option
|
||||
|
|
|
|||
|
|
@ -24,8 +24,6 @@ func GetTdParameters() *tdlib.SetTdlibParametersRequest {
|
|||
DeviceModel: "HuskyNG",
|
||||
SystemVersion: "3.0",
|
||||
ApplicationVersion: "3.0",
|
||||
EnableStorageOptimizer: true,
|
||||
IgnoreFileNames: false,
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -32,8 +32,6 @@ func GetTdParameters() *tdlib.SetTdlibParametersRequest {
|
|||
DeviceModel: "HuskyNG",
|
||||
SystemVersion: "3.0",
|
||||
ApplicationVersion: "3.0",
|
||||
EnableStorageOptimizer: true,
|
||||
IgnoreFileNames: false,
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -32,8 +32,6 @@ func GetTdParameters() *tdlib.SetTdlibParametersRequest {
|
|||
DeviceModel: "HuskyNG",
|
||||
SystemVersion: "3.0",
|
||||
ApplicationVersion: "3.0",
|
||||
EnableStorageOptimizer: true,
|
||||
IgnoreFileNames: false,
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -24,8 +24,6 @@ func GetTdParameters() *tdlib.SetTdlibParametersRequest {
|
|||
DeviceModel: "HuskyNG",
|
||||
SystemVersion: "3.0",
|
||||
ApplicationVersion: "3.0",
|
||||
EnableStorageOptimizer: true,
|
||||
IgnoreFileNames: false,
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -32,8 +32,6 @@ func GetTdParameters() *tdlib.SetTdlibParametersRequest {
|
|||
DeviceModel: "HuskyNG",
|
||||
SystemVersion: "3.0",
|
||||
ApplicationVersion: "3.0",
|
||||
EnableStorageOptimizer: true,
|
||||
IgnoreFileNames: false,
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue