mirror of
https://github.com/c0re100/gotdlib.git
synced 2026-02-21 20:20:17 +01:00
Update to TDLib 1.8.50
This commit is contained in:
parent
969ddb4746
commit
bc2b5f5823
4 changed files with 1133 additions and 109 deletions
|
|
@ -1672,6 +1672,35 @@ func (client *Client) GetMessageViewers(req *GetMessageViewersRequest) (*Message
|
||||||
return UnmarshalMessageViewers(result.Data)
|
return UnmarshalMessageViewers(result.Data)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
type GetMessageAuthorRequest struct {
|
||||||
|
// Chat identifier
|
||||||
|
ChatId int64 `json:"chat_id"`
|
||||||
|
// Identifier of the message
|
||||||
|
MessageId int64 `json:"message_id"`
|
||||||
|
}
|
||||||
|
|
||||||
|
// Returns information about actual author of a message sent on behalf of a channel. The method can be called if messageProperties.can_get_author == true
|
||||||
|
func (client *Client) GetMessageAuthor(req *GetMessageAuthorRequest) (*User, error) {
|
||||||
|
result, err := client.Send(Request{
|
||||||
|
meta: meta{
|
||||||
|
Type: "getMessageAuthor",
|
||||||
|
},
|
||||||
|
Data: map[string]interface{}{
|
||||||
|
"chat_id": req.ChatId,
|
||||||
|
"message_id": req.MessageId,
|
||||||
|
},
|
||||||
|
})
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
if result.Type == "error" {
|
||||||
|
return nil, buildResponseError(result.Data)
|
||||||
|
}
|
||||||
|
|
||||||
|
return UnmarshalUser(result.Data)
|
||||||
|
}
|
||||||
|
|
||||||
type GetFileRequest struct {
|
type GetFileRequest struct {
|
||||||
// Identifier of the file to get
|
// Identifier of the file to get
|
||||||
FileId int32 `json:"file_id"`
|
FileId int32 `json:"file_id"`
|
||||||
|
|
@ -2387,7 +2416,7 @@ func (client *Client) GetSuitableDiscussionChats() (*Chats, error) {
|
||||||
return UnmarshalChats(result.Data)
|
return UnmarshalChats(result.Data)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Returns a list of recently inactive supergroups and channels. Can be used when user reaches limit on the number of joined supergroups and channels and receives CHANNELS_TOO_MUCH error. Also, the limit can be increased with Telegram Premium
|
// Returns a list of recently inactive supergroups and channels. Can be used when user reaches limit on the number of joined supergroups and channels and receives the error "CHANNELS_TOO_MUCH". Also, the limit can be increased with Telegram Premium
|
||||||
func (client *Client) GetInactiveSupergroupChats() (*Chats, error) {
|
func (client *Client) GetInactiveSupergroupChats() (*Chats, error) {
|
||||||
result, err := client.Send(Request{
|
result, err := client.Send(Request{
|
||||||
meta: meta{
|
meta: meta{
|
||||||
|
|
@ -2425,6 +2454,320 @@ func (client *Client) GetSuitablePersonalChats() (*Chats, error) {
|
||||||
return UnmarshalChats(result.Data)
|
return UnmarshalChats(result.Data)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
type LoadDirectMessagesChatTopicsRequest struct {
|
||||||
|
// Chat identifier of the channel direct messages chat
|
||||||
|
ChatId int64 `json:"chat_id"`
|
||||||
|
// The maximum number of topics to be loaded. For optimal performance, the number of loaded topics is chosen by TDLib and can be smaller than the specified limit, even if the end of the list is not reached
|
||||||
|
Limit int32 `json:"limit"`
|
||||||
|
}
|
||||||
|
|
||||||
|
// Loads more topics in a channel direct messages chat administered by the current user. The loaded topics will be sent through updateDirectMessagesChatTopic. Topics are sorted by their topic.order in descending order. Returns a 404 error if all topics have been loaded
|
||||||
|
func (client *Client) LoadDirectMessagesChatTopics(req *LoadDirectMessagesChatTopicsRequest) (*Ok, error) {
|
||||||
|
result, err := client.Send(Request{
|
||||||
|
meta: meta{
|
||||||
|
Type: "loadDirectMessagesChatTopics",
|
||||||
|
},
|
||||||
|
Data: map[string]interface{}{
|
||||||
|
"chat_id": req.ChatId,
|
||||||
|
"limit": req.Limit,
|
||||||
|
},
|
||||||
|
})
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
if result.Type == "error" {
|
||||||
|
return nil, buildResponseError(result.Data)
|
||||||
|
}
|
||||||
|
|
||||||
|
return UnmarshalOk(result.Data)
|
||||||
|
}
|
||||||
|
|
||||||
|
type GetDirectMessagesChatTopicRequest struct {
|
||||||
|
// Chat identifier of the channel direct messages chat
|
||||||
|
ChatId int64 `json:"chat_id"`
|
||||||
|
// Identifier of the topic to get
|
||||||
|
TopicId int64 `json:"topic_id"`
|
||||||
|
}
|
||||||
|
|
||||||
|
// Returns information about the topic in a channel direct messages chat administered by the current user
|
||||||
|
func (client *Client) GetDirectMessagesChatTopic(req *GetDirectMessagesChatTopicRequest) (*DirectMessagesChatTopic, error) {
|
||||||
|
result, err := client.Send(Request{
|
||||||
|
meta: meta{
|
||||||
|
Type: "getDirectMessagesChatTopic",
|
||||||
|
},
|
||||||
|
Data: map[string]interface{}{
|
||||||
|
"chat_id": req.ChatId,
|
||||||
|
"topic_id": req.TopicId,
|
||||||
|
},
|
||||||
|
})
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
if result.Type == "error" {
|
||||||
|
return nil, buildResponseError(result.Data)
|
||||||
|
}
|
||||||
|
|
||||||
|
return UnmarshalDirectMessagesChatTopic(result.Data)
|
||||||
|
}
|
||||||
|
|
||||||
|
type GetDirectMessagesChatTopicHistoryRequest struct {
|
||||||
|
// Chat identifier of the channel direct messages chat
|
||||||
|
ChatId int64 `json:"chat_id"`
|
||||||
|
// Identifier of the topic which messages will be fetched
|
||||||
|
TopicId int64 `json:"topic_id"`
|
||||||
|
// Identifier of the message starting from which messages must be fetched; use 0 to get results from the last message
|
||||||
|
FromMessageId int64 `json:"from_message_id"`
|
||||||
|
// Specify 0 to get results from exactly the message from_message_id or a negative offset up to 99 to get additionally some newer messages
|
||||||
|
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 the topic in a channel direct messages chat administered by the current user. The messages are returned in reverse chronological order (i.e., in order of decreasing message_id)
|
||||||
|
func (client *Client) GetDirectMessagesChatTopicHistory(req *GetDirectMessagesChatTopicHistoryRequest) (*Messages, error) {
|
||||||
|
result, err := client.Send(Request{
|
||||||
|
meta: meta{
|
||||||
|
Type: "getDirectMessagesChatTopicHistory",
|
||||||
|
},
|
||||||
|
Data: map[string]interface{}{
|
||||||
|
"chat_id": req.ChatId,
|
||||||
|
"topic_id": req.TopicId,
|
||||||
|
"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 GetDirectMessagesChatTopicMessageByDateRequest struct {
|
||||||
|
// Chat identifier of the channel direct messages chat
|
||||||
|
ChatId int64 `json:"chat_id"`
|
||||||
|
// Identifier of the topic which messages will be fetched
|
||||||
|
TopicId int64 `json:"topic_id"`
|
||||||
|
// Point in time (Unix timestamp) relative to which to search for messages
|
||||||
|
Date int32 `json:"date"`
|
||||||
|
}
|
||||||
|
|
||||||
|
// Returns the last message sent in the topic in a channel direct messages chat administered by the current user no later than the specified date
|
||||||
|
func (client *Client) GetDirectMessagesChatTopicMessageByDate(req *GetDirectMessagesChatTopicMessageByDateRequest) (*Message, error) {
|
||||||
|
result, err := client.Send(Request{
|
||||||
|
meta: meta{
|
||||||
|
Type: "getDirectMessagesChatTopicMessageByDate",
|
||||||
|
},
|
||||||
|
Data: map[string]interface{}{
|
||||||
|
"chat_id": req.ChatId,
|
||||||
|
"topic_id": req.TopicId,
|
||||||
|
"date": req.Date,
|
||||||
|
},
|
||||||
|
})
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
if result.Type == "error" {
|
||||||
|
return nil, buildResponseError(result.Data)
|
||||||
|
}
|
||||||
|
|
||||||
|
return UnmarshalMessage(result.Data)
|
||||||
|
}
|
||||||
|
|
||||||
|
type DeleteDirectMessagesChatTopicHistoryRequest struct {
|
||||||
|
// Chat identifier of the channel direct messages chat
|
||||||
|
ChatId int64 `json:"chat_id"`
|
||||||
|
// Identifier of the topic which messages will be deleted
|
||||||
|
TopicId int64 `json:"topic_id"`
|
||||||
|
}
|
||||||
|
|
||||||
|
// Deletes all messages in the topic in a channel direct messages chat administered by the current user
|
||||||
|
func (client *Client) DeleteDirectMessagesChatTopicHistory(req *DeleteDirectMessagesChatTopicHistoryRequest) (*Ok, error) {
|
||||||
|
result, err := client.Send(Request{
|
||||||
|
meta: meta{
|
||||||
|
Type: "deleteDirectMessagesChatTopicHistory",
|
||||||
|
},
|
||||||
|
Data: map[string]interface{}{
|
||||||
|
"chat_id": req.ChatId,
|
||||||
|
"topic_id": req.TopicId,
|
||||||
|
},
|
||||||
|
})
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
if result.Type == "error" {
|
||||||
|
return nil, buildResponseError(result.Data)
|
||||||
|
}
|
||||||
|
|
||||||
|
return UnmarshalOk(result.Data)
|
||||||
|
}
|
||||||
|
|
||||||
|
type DeleteDirectMessagesChatTopicMessagesByDateRequest struct {
|
||||||
|
// Chat identifier of the channel direct messages chat
|
||||||
|
ChatId int64 `json:"chat_id"`
|
||||||
|
// Identifier of the topic which messages will be deleted
|
||||||
|
TopicId int64 `json:"topic_id"`
|
||||||
|
// 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 the topic in a channel direct messages chat administered by the current user. Messages sent in the last 30 seconds will not be deleted
|
||||||
|
func (client *Client) DeleteDirectMessagesChatTopicMessagesByDate(req *DeleteDirectMessagesChatTopicMessagesByDateRequest) (*Ok, error) {
|
||||||
|
result, err := client.Send(Request{
|
||||||
|
meta: meta{
|
||||||
|
Type: "deleteDirectMessagesChatTopicMessagesByDate",
|
||||||
|
},
|
||||||
|
Data: map[string]interface{}{
|
||||||
|
"chat_id": req.ChatId,
|
||||||
|
"topic_id": req.TopicId,
|
||||||
|
"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 SetDirectMessagesChatTopicIsMarkedAsUnreadRequest struct {
|
||||||
|
// Chat identifier of the channel direct messages chat
|
||||||
|
ChatId int64 `json:"chat_id"`
|
||||||
|
// Topic identifier
|
||||||
|
TopicId int64 `json:"topic_id"`
|
||||||
|
// New value of is_marked_as_unread
|
||||||
|
IsMarkedAsUnread bool `json:"is_marked_as_unread"`
|
||||||
|
}
|
||||||
|
|
||||||
|
// Changes the marked as unread state of the topic in a channel direct messages chat administered by the current user
|
||||||
|
func (client *Client) SetDirectMessagesChatTopicIsMarkedAsUnread(req *SetDirectMessagesChatTopicIsMarkedAsUnreadRequest) (*Ok, error) {
|
||||||
|
result, err := client.Send(Request{
|
||||||
|
meta: meta{
|
||||||
|
Type: "setDirectMessagesChatTopicIsMarkedAsUnread",
|
||||||
|
},
|
||||||
|
Data: map[string]interface{}{
|
||||||
|
"chat_id": req.ChatId,
|
||||||
|
"topic_id": req.TopicId,
|
||||||
|
"is_marked_as_unread": req.IsMarkedAsUnread,
|
||||||
|
},
|
||||||
|
})
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
if result.Type == "error" {
|
||||||
|
return nil, buildResponseError(result.Data)
|
||||||
|
}
|
||||||
|
|
||||||
|
return UnmarshalOk(result.Data)
|
||||||
|
}
|
||||||
|
|
||||||
|
type SetDirectMessagesChatTopicDraftMessageRequest struct {
|
||||||
|
// Chat identifier
|
||||||
|
ChatId int64 `json:"chat_id"`
|
||||||
|
// Topic identifier
|
||||||
|
TopicId int64 `json:"topic_id"`
|
||||||
|
// New draft message; pass null to remove the draft. All files in draft message content must be of the type inputFileLocal. Media thumbnails and captions are ignored
|
||||||
|
DraftMessage *DraftMessage `json:"draft_message"`
|
||||||
|
}
|
||||||
|
|
||||||
|
// Changes the draft message in the topic in a channel direct messages chat administered by the current user
|
||||||
|
func (client *Client) SetDirectMessagesChatTopicDraftMessage(req *SetDirectMessagesChatTopicDraftMessageRequest) (*Ok, error) {
|
||||||
|
result, err := client.Send(Request{
|
||||||
|
meta: meta{
|
||||||
|
Type: "setDirectMessagesChatTopicDraftMessage",
|
||||||
|
},
|
||||||
|
Data: map[string]interface{}{
|
||||||
|
"chat_id": req.ChatId,
|
||||||
|
"topic_id": req.TopicId,
|
||||||
|
"draft_message": req.DraftMessage,
|
||||||
|
},
|
||||||
|
})
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
if result.Type == "error" {
|
||||||
|
return nil, buildResponseError(result.Data)
|
||||||
|
}
|
||||||
|
|
||||||
|
return UnmarshalOk(result.Data)
|
||||||
|
}
|
||||||
|
|
||||||
|
type UnpinAllDirectMessagesChatTopicMessagesRequest struct {
|
||||||
|
// Identifier of the chat
|
||||||
|
ChatId int64 `json:"chat_id"`
|
||||||
|
// Topic identifier
|
||||||
|
TopicId int64 `json:"topic_id"`
|
||||||
|
}
|
||||||
|
|
||||||
|
// Removes all pinned messages from the topic in a channel direct messages chat administered by the current user
|
||||||
|
func (client *Client) UnpinAllDirectMessagesChatTopicMessages(req *UnpinAllDirectMessagesChatTopicMessagesRequest) (*Ok, error) {
|
||||||
|
result, err := client.Send(Request{
|
||||||
|
meta: meta{
|
||||||
|
Type: "unpinAllDirectMessagesChatTopicMessages",
|
||||||
|
},
|
||||||
|
Data: map[string]interface{}{
|
||||||
|
"chat_id": req.ChatId,
|
||||||
|
"topic_id": req.TopicId,
|
||||||
|
},
|
||||||
|
})
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
if result.Type == "error" {
|
||||||
|
return nil, buildResponseError(result.Data)
|
||||||
|
}
|
||||||
|
|
||||||
|
return UnmarshalOk(result.Data)
|
||||||
|
}
|
||||||
|
|
||||||
|
type ReadAllDirectMessagesChatTopicReactionsRequest struct {
|
||||||
|
// Identifier of the chat
|
||||||
|
ChatId int64 `json:"chat_id"`
|
||||||
|
// Topic identifier
|
||||||
|
TopicId int64 `json:"topic_id"`
|
||||||
|
}
|
||||||
|
|
||||||
|
// Removes all unread reactions in the topic in a channel direct messages chat administered by the current user
|
||||||
|
func (client *Client) ReadAllDirectMessagesChatTopicReactions(req *ReadAllDirectMessagesChatTopicReactionsRequest) (*Ok, error) {
|
||||||
|
result, err := client.Send(Request{
|
||||||
|
meta: meta{
|
||||||
|
Type: "readAllDirectMessagesChatTopicReactions",
|
||||||
|
},
|
||||||
|
Data: map[string]interface{}{
|
||||||
|
"chat_id": req.ChatId,
|
||||||
|
"topic_id": req.TopicId,
|
||||||
|
},
|
||||||
|
})
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
if result.Type == "error" {
|
||||||
|
return nil, buildResponseError(result.Data)
|
||||||
|
}
|
||||||
|
|
||||||
|
return UnmarshalOk(result.Data)
|
||||||
|
}
|
||||||
|
|
||||||
type LoadSavedMessagesTopicsRequest struct {
|
type LoadSavedMessagesTopicsRequest struct {
|
||||||
// The maximum number of topics to be loaded. For optimal performance, the number of loaded topics is chosen by TDLib and can be smaller than the specified limit, even if the end of the list is not reached
|
// The maximum number of topics to be loaded. For optimal performance, the number of loaded topics is chosen by TDLib and can be smaller than the specified limit, even if the end of the list is not reached
|
||||||
Limit int32 `json:"limit"`
|
Limit int32 `json:"limit"`
|
||||||
|
|
@ -2797,6 +3140,8 @@ func (client *Client) DeleteChat(req *DeleteChatRequest) (*Ok, error) {
|
||||||
type SearchChatMessagesRequest struct {
|
type SearchChatMessagesRequest struct {
|
||||||
// Identifier of the chat in which to search messages
|
// Identifier of the chat in which to search messages
|
||||||
ChatId int64 `json:"chat_id"`
|
ChatId int64 `json:"chat_id"`
|
||||||
|
// Pass topic identifier to search messages only in specific topic; pass null to search for messages in all topics
|
||||||
|
TopicId MessageTopic `json:"topic_id"`
|
||||||
// Query to search for
|
// Query to search for
|
||||||
Query string `json:"query"`
|
Query string `json:"query"`
|
||||||
// Identifier of the sender of messages to search for; pass null to search for messages from any sender. Not supported in secret chats
|
// Identifier of the sender of messages to search for; pass null to search for messages from any sender. Not supported in secret chats
|
||||||
|
|
@ -2809,13 +3154,9 @@ type SearchChatMessagesRequest struct {
|
||||||
Limit int32 `json:"limit"`
|
Limit int32 `json:"limit"`
|
||||||
// Additional filter for messages to search; pass null to search for all messages
|
// Additional filter for messages to search; pass null to search for all messages
|
||||||
Filter SearchMessagesFilter `json:"filter"`
|
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 0, only messages in the specified Saved Messages topic will be returned; pass 0 to return all messages, or for chats other than Saved Messages
|
|
||||||
SavedMessagesTopicId int64 `json:"saved_messages_topic_id"`
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Searches for messages with given words in the chat. Returns the results in reverse chronological order, i.e. in order of decreasing message_id. Cannot be used in secret chats with a non-empty query (searchSecretMessages must be used instead), or without an enabled message database. For optimal performance, the number of returned messages is chosen by TDLib and can be smaller than the specified limit. A combination of query, sender_id, filter and message_thread_id search criteria is expected to be supported, only if it is required for Telegram official application implementation
|
// 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 topic_id search criteria is expected to be supported, only if it is required for Telegram official application implementation
|
||||||
func (client *Client) SearchChatMessages(req *SearchChatMessagesRequest) (*FoundChatMessages, error) {
|
func (client *Client) SearchChatMessages(req *SearchChatMessagesRequest) (*FoundChatMessages, error) {
|
||||||
result, err := client.Send(Request{
|
result, err := client.Send(Request{
|
||||||
meta: meta{
|
meta: meta{
|
||||||
|
|
@ -2823,14 +3164,13 @@ func (client *Client) SearchChatMessages(req *SearchChatMessagesRequest) (*Found
|
||||||
},
|
},
|
||||||
Data: map[string]interface{}{
|
Data: map[string]interface{}{
|
||||||
"chat_id": req.ChatId,
|
"chat_id": req.ChatId,
|
||||||
|
"topic_id": req.TopicId,
|
||||||
"query": req.Query,
|
"query": req.Query,
|
||||||
"sender_id": req.SenderId,
|
"sender_id": req.SenderId,
|
||||||
"from_message_id": req.FromMessageId,
|
"from_message_id": req.FromMessageId,
|
||||||
"offset": req.Offset,
|
"offset": req.Offset,
|
||||||
"limit": req.Limit,
|
"limit": req.Limit,
|
||||||
"filter": req.Filter,
|
"filter": req.Filter,
|
||||||
"message_thread_id": req.MessageThreadId,
|
|
||||||
"saved_messages_topic_id": req.SavedMessagesTopicId,
|
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
@ -3371,12 +3711,12 @@ func (client *Client) GetChatSparseMessagePositions(req *GetChatSparseMessagePos
|
||||||
type GetChatMessageCalendarRequest struct {
|
type GetChatMessageCalendarRequest struct {
|
||||||
// Identifier of the chat in which to return information about messages
|
// Identifier of the chat in which to return information about messages
|
||||||
ChatId int64 `json:"chat_id"`
|
ChatId int64 `json:"chat_id"`
|
||||||
|
// Pass topic identifier to get the result only in specific topic; pass null to get the result in all topics; forum topics aren't supported
|
||||||
|
TopicId MessageTopic `json:"topic_id"`
|
||||||
// Filter for message content. Filters searchMessagesFilterEmpty, searchMessagesFilterMention, searchMessagesFilterUnreadMention, and searchMessagesFilterUnreadReaction are unsupported in this function
|
// Filter for message content. Filters searchMessagesFilterEmpty, searchMessagesFilterMention, searchMessagesFilterUnreadMention, and searchMessagesFilterUnreadReaction are unsupported in this function
|
||||||
Filter SearchMessagesFilter `json:"filter"`
|
Filter SearchMessagesFilter `json:"filter"`
|
||||||
// The message identifier from which to return information about messages; use 0 to get results from the last message
|
// 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"`
|
FromMessageId int64 `json:"from_message_id"`
|
||||||
// If not0, only messages in the specified Saved Messages topic will be considered; pass 0 to consider all messages, or for chats other than Saved Messages
|
|
||||||
SavedMessagesTopicId int64 `json:"saved_messages_topic_id"`
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Returns information about the next messages of the specified type in the chat split by days. Returns the results in reverse chronological order. Can return partial result for the last returned day. Behavior of this method depends on the value of the option "utc_time_offset"
|
// 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"
|
||||||
|
|
@ -3387,9 +3727,9 @@ func (client *Client) GetChatMessageCalendar(req *GetChatMessageCalendarRequest)
|
||||||
},
|
},
|
||||||
Data: map[string]interface{}{
|
Data: map[string]interface{}{
|
||||||
"chat_id": req.ChatId,
|
"chat_id": req.ChatId,
|
||||||
|
"topic_id": req.TopicId,
|
||||||
"filter": req.Filter,
|
"filter": req.Filter,
|
||||||
"from_message_id": req.FromMessageId,
|
"from_message_id": req.FromMessageId,
|
||||||
"saved_messages_topic_id": req.SavedMessagesTopicId,
|
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
@ -3406,15 +3746,15 @@ func (client *Client) GetChatMessageCalendar(req *GetChatMessageCalendarRequest)
|
||||||
type GetChatMessageCountRequest struct {
|
type GetChatMessageCountRequest struct {
|
||||||
// Identifier of the chat in which to count messages
|
// Identifier of the chat in which to count messages
|
||||||
ChatId int64 `json:"chat_id"`
|
ChatId int64 `json:"chat_id"`
|
||||||
|
// Pass topic identifier to get number of messages only in specific topic; pass null to get number of messages in all topics
|
||||||
|
TopicId MessageTopic `json:"topic_id"`
|
||||||
// Filter for message content; searchMessagesFilterEmpty is unsupported in this function
|
// Filter for message content; searchMessagesFilterEmpty is unsupported in this function
|
||||||
Filter SearchMessagesFilter `json:"filter"`
|
Filter SearchMessagesFilter `json:"filter"`
|
||||||
// If not 0, only messages in the specified Saved Messages topic will be counted; pass 0 to count all messages, or for chats other than Saved Messages
|
|
||||||
SavedMessagesTopicId int64 `json:"saved_messages_topic_id"`
|
|
||||||
// Pass true to get the number of messages without sending network requests, or -1 if the number of messages is unknown locally
|
// 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"`
|
ReturnLocal bool `json:"return_local"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// Returns approximate number of messages of the specified type in the chat
|
// Returns approximate number of messages of the specified type in the chat or its topic
|
||||||
func (client *Client) GetChatMessageCount(req *GetChatMessageCountRequest) (*Count, error) {
|
func (client *Client) GetChatMessageCount(req *GetChatMessageCountRequest) (*Count, error) {
|
||||||
result, err := client.Send(Request{
|
result, err := client.Send(Request{
|
||||||
meta: meta{
|
meta: meta{
|
||||||
|
|
@ -3422,8 +3762,8 @@ func (client *Client) GetChatMessageCount(req *GetChatMessageCountRequest) (*Cou
|
||||||
},
|
},
|
||||||
Data: map[string]interface{}{
|
Data: map[string]interface{}{
|
||||||
"chat_id": req.ChatId,
|
"chat_id": req.ChatId,
|
||||||
|
"topic_id": req.TopicId,
|
||||||
"filter": req.Filter,
|
"filter": req.Filter,
|
||||||
"saved_messages_topic_id": req.SavedMessagesTopicId,
|
|
||||||
"return_local": req.ReturnLocal,
|
"return_local": req.ReturnLocal,
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
@ -3441,17 +3781,15 @@ func (client *Client) GetChatMessageCount(req *GetChatMessageCountRequest) (*Cou
|
||||||
type GetChatMessagePositionRequest struct {
|
type GetChatMessagePositionRequest struct {
|
||||||
// Identifier of the chat in which to find message position
|
// Identifier of the chat in which to find message position
|
||||||
ChatId int64 `json:"chat_id"`
|
ChatId int64 `json:"chat_id"`
|
||||||
// Message identifier
|
// Pass topic identifier to get position among messages only in specific topic; pass null to get position among all chat messages
|
||||||
MessageId int64 `json:"message_id"`
|
TopicId MessageTopic `json:"topic_id"`
|
||||||
// Filter for message content; searchMessagesFilterEmpty, searchMessagesFilterUnreadMention, searchMessagesFilterUnreadReaction, and searchMessagesFilterFailedToSend are unsupported in this function
|
// Filter for message content; searchMessagesFilterEmpty, searchMessagesFilterUnreadMention, searchMessagesFilterUnreadReaction, and searchMessagesFilterFailedToSend are unsupported in this function
|
||||||
Filter SearchMessagesFilter `json:"filter"`
|
Filter SearchMessagesFilter `json:"filter"`
|
||||||
// If not 0, only messages in the specified thread will be considered; supergroups only
|
// Message identifier
|
||||||
MessageThreadId int64 `json:"message_thread_id"`
|
MessageId int64 `json:"message_id"`
|
||||||
// If not 0, only messages in the specified Saved Messages topic will be considered; pass 0 to consider all relevant messages, or for chats other than Saved Messages
|
|
||||||
SavedMessagesTopicId int64 `json:"saved_messages_topic_id"`
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Returns approximate 1-based position of a message among messages, which can be found by the specified filter in the chat. Cannot be used in secret chats
|
// Returns approximate 1-based position of a message among messages, which can be found by the specified filter in the chat and topic. Cannot be used in secret chats
|
||||||
func (client *Client) GetChatMessagePosition(req *GetChatMessagePositionRequest) (*Count, error) {
|
func (client *Client) GetChatMessagePosition(req *GetChatMessagePositionRequest) (*Count, error) {
|
||||||
result, err := client.Send(Request{
|
result, err := client.Send(Request{
|
||||||
meta: meta{
|
meta: meta{
|
||||||
|
|
@ -3459,10 +3797,9 @@ func (client *Client) GetChatMessagePosition(req *GetChatMessagePositionRequest)
|
||||||
},
|
},
|
||||||
Data: map[string]interface{}{
|
Data: map[string]interface{}{
|
||||||
"chat_id": req.ChatId,
|
"chat_id": req.ChatId,
|
||||||
"message_id": req.MessageId,
|
"topic_id": req.TopicId,
|
||||||
"filter": req.Filter,
|
"filter": req.Filter,
|
||||||
"message_thread_id": req.MessageThreadId,
|
"message_id": req.MessageId,
|
||||||
"saved_messages_topic_id": req.SavedMessagesTopicId,
|
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
@ -4235,7 +4572,7 @@ type ForwardMessagesRequest struct {
|
||||||
MessageIds []int64 `json:"message_ids"`
|
MessageIds []int64 `json:"message_ids"`
|
||||||
// Options to be used to send the messages; pass null to use default options
|
// Options to be used to send the messages; pass null to use default options
|
||||||
Options *MessageSendOptions `json:"options"`
|
Options *MessageSendOptions `json:"options"`
|
||||||
// Pass true to copy content of the messages without reference to the original sender. Always true if the messages are forwarded to a secret chat or are local. Use messageProperties.can_be_saved and messageProperties.can_be_copied_to_secret_chat to check whether the message is suitable
|
// Pass true to copy content of the messages without reference to the original sender. Always true if the messages are forwarded to a secret chat or are local. Use messageProperties.can_be_copied and messageProperties.can_be_copied_to_secret_chat to check whether the message is suitable
|
||||||
SendCopy bool `json:"send_copy"`
|
SendCopy bool `json:"send_copy"`
|
||||||
// Pass true to remove media captions of message copies. Ignored if send_copy is false
|
// Pass true to remove media captions of message copies. Ignored if send_copy is false
|
||||||
RemoveCaption bool `json:"remove_caption"`
|
RemoveCaption bool `json:"remove_caption"`
|
||||||
|
|
@ -4362,7 +4699,7 @@ func (client *Client) SendChatScreenshotTakenNotification(req *SendChatScreensho
|
||||||
}
|
}
|
||||||
|
|
||||||
type AddLocalMessageRequest struct {
|
type AddLocalMessageRequest struct {
|
||||||
// Target chat
|
// Target chat; channel direct messages chats aren't supported
|
||||||
ChatId int64 `json:"chat_id"`
|
ChatId int64 `json:"chat_id"`
|
||||||
// Identifier of the sender of the message
|
// Identifier of the sender of the message
|
||||||
SenderId MessageSender `json:"sender_id"`
|
SenderId MessageSender `json:"sender_id"`
|
||||||
|
|
@ -7976,8 +8313,10 @@ type OpenWebAppRequest struct {
|
||||||
BotUserId int64 `json:"bot_user_id"`
|
BotUserId int64 `json:"bot_user_id"`
|
||||||
// The URL from an inlineKeyboardButtonTypeWebApp button, a botMenuButton button, an internalLinkTypeAttachmentMenuBot link, or an empty string otherwise
|
// The URL from an inlineKeyboardButtonTypeWebApp button, a botMenuButton button, an internalLinkTypeAttachmentMenuBot link, or an empty string otherwise
|
||||||
Url string `json:"url"`
|
Url string `json:"url"`
|
||||||
// If not 0, the message thread identifier in which the message will be sent
|
// If not 0, the message thread identifier to which the message will be sent
|
||||||
MessageThreadId int64 `json:"message_thread_id"`
|
MessageThreadId int64 `json:"message_thread_id"`
|
||||||
|
// If not 0, unique identifier of the topic of channel direct messages chat to which the message will be sent
|
||||||
|
DirectMessagesChatTopicId int64 `json:"direct_messages_chat_topic_id"`
|
||||||
// Information about the message or story to be replied in the message sent by the Web App; pass null if none
|
// Information about the message or story to be replied in the message sent by the Web App; pass null if none
|
||||||
ReplyTo InputMessageReplyTo `json:"reply_to"`
|
ReplyTo InputMessageReplyTo `json:"reply_to"`
|
||||||
// Parameters to use to open the Web App
|
// Parameters to use to open the Web App
|
||||||
|
|
@ -7995,6 +8334,7 @@ func (client *Client) OpenWebApp(req *OpenWebAppRequest) (*WebAppInfo, error) {
|
||||||
"bot_user_id": req.BotUserId,
|
"bot_user_id": req.BotUserId,
|
||||||
"url": req.Url,
|
"url": req.Url,
|
||||||
"message_thread_id": req.MessageThreadId,
|
"message_thread_id": req.MessageThreadId,
|
||||||
|
"direct_messages_chat_topic_id": req.DirectMessagesChatTopicId,
|
||||||
"reply_to": req.ReplyTo,
|
"reply_to": req.ReplyTo,
|
||||||
"parameters": req.Parameters,
|
"parameters": req.Parameters,
|
||||||
},
|
},
|
||||||
|
|
@ -10449,6 +10789,38 @@ func (client *Client) SetChatDiscussionGroup(req *SetChatDiscussionGroupRequest)
|
||||||
return UnmarshalOk(result.Data)
|
return UnmarshalOk(result.Data)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
type SetChatDirectMessagesGroupRequest struct {
|
||||||
|
// Identifier of the channel chat
|
||||||
|
ChatId int64 `json:"chat_id"`
|
||||||
|
// Pass true if the direct messages group is enabled for the channel chat; pass false otherwise
|
||||||
|
IsEnabled bool `json:"is_enabled"`
|
||||||
|
// The new number of Telegram Stars that must be paid for each message that is sent to the direct messages chat unless the sender is an administrator of the channel chat; 0-getOption("paid_message_star_count_max"). The channel will receive getOption("paid_message_earnings_per_mille") Telegram Stars for each 1000 Telegram Stars paid for message sending. Requires supergroupFullInfo.can_enable_paid_messages for positive amounts
|
||||||
|
PaidMessageStarCount int64 `json:"paid_message_star_count"`
|
||||||
|
}
|
||||||
|
|
||||||
|
// Changes direct messages group settings for a channel chat; requires owner privileges in the chat
|
||||||
|
func (client *Client) SetChatDirectMessagesGroup(req *SetChatDirectMessagesGroupRequest) (*Ok, error) {
|
||||||
|
result, err := client.Send(Request{
|
||||||
|
meta: meta{
|
||||||
|
Type: "setChatDirectMessagesGroup",
|
||||||
|
},
|
||||||
|
Data: map[string]interface{}{
|
||||||
|
"chat_id": req.ChatId,
|
||||||
|
"is_enabled": req.IsEnabled,
|
||||||
|
"paid_message_star_count": req.PaidMessageStarCount,
|
||||||
|
},
|
||||||
|
})
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
if result.Type == "error" {
|
||||||
|
return nil, buildResponseError(result.Data)
|
||||||
|
}
|
||||||
|
|
||||||
|
return UnmarshalOk(result.Data)
|
||||||
|
}
|
||||||
|
|
||||||
type SetChatLocationRequest struct {
|
type SetChatLocationRequest struct {
|
||||||
// Chat identifier
|
// Chat identifier
|
||||||
ChatId int64 `json:"chat_id"`
|
ChatId int64 `json:"chat_id"`
|
||||||
|
|
@ -13114,7 +13486,7 @@ func (client *Client) SearchFileDownloads(req *SearchFileDownloadsRequest) (*Fou
|
||||||
type SetApplicationVerificationTokenRequest struct {
|
type SetApplicationVerificationTokenRequest struct {
|
||||||
// Unique identifier for the verification process as received from updateApplicationVerificationRequired or updateApplicationRecaptchaVerificationRequired
|
// Unique identifier for the verification process as received from updateApplicationVerificationRequired or updateApplicationRecaptchaVerificationRequired
|
||||||
VerificationId int64 `json:"verification_id"`
|
VerificationId int64 `json:"verification_id"`
|
||||||
// Play Integrity API token for the Android application, or secret from push notification for the iOS application for application verification, or reCAPTCHA token for reCAPTCHA verifications; pass an empty string to abort verification and receive error VERIFICATION_FAILED for the request
|
// Play Integrity API token for the Android application, or secret from push notification for the iOS application for application verification, or reCAPTCHA token for reCAPTCHA verifications; pass an empty string to abort verification and receive the error "VERIFICATION_FAILED" for the request
|
||||||
Token string `json:"token"`
|
Token string `json:"token"`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -14779,8 +15151,8 @@ type SetGroupCallParticipantIsSpeakingRequest struct {
|
||||||
IsSpeaking bool `json:"is_speaking"`
|
IsSpeaking bool `json:"is_speaking"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// Informs TDLib that speaking state of a participant of an active group call has changed
|
// Informs TDLib that speaking state of a participant of an active group call has changed. Returns identifier of the participant if it is found
|
||||||
func (client *Client) SetGroupCallParticipantIsSpeaking(req *SetGroupCallParticipantIsSpeakingRequest) (*Ok, error) {
|
func (client *Client) SetGroupCallParticipantIsSpeaking(req *SetGroupCallParticipantIsSpeakingRequest) (MessageSender, error) {
|
||||||
result, err := client.Send(Request{
|
result, err := client.Send(Request{
|
||||||
meta: meta{
|
meta: meta{
|
||||||
Type: "setGroupCallParticipantIsSpeaking",
|
Type: "setGroupCallParticipantIsSpeaking",
|
||||||
|
|
@ -14799,7 +15171,16 @@ func (client *Client) SetGroupCallParticipantIsSpeaking(req *SetGroupCallPartici
|
||||||
return nil, buildResponseError(result.Data)
|
return nil, buildResponseError(result.Data)
|
||||||
}
|
}
|
||||||
|
|
||||||
return UnmarshalOk(result.Data)
|
switch result.Type {
|
||||||
|
case TypeMessageSenderUser:
|
||||||
|
return UnmarshalMessageSenderUser(result.Data)
|
||||||
|
|
||||||
|
case TypeMessageSenderChat:
|
||||||
|
return UnmarshalMessageSenderChat(result.Data)
|
||||||
|
|
||||||
|
default:
|
||||||
|
return nil, errors.New("invalid type")
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
type ToggleGroupCallParticipantIsMutedRequest struct {
|
type ToggleGroupCallParticipantIsMutedRequest struct {
|
||||||
|
|
@ -19258,6 +19639,8 @@ type ToggleSupergroupIsForumRequest struct {
|
||||||
SupergroupId int64 `json:"supergroup_id"`
|
SupergroupId int64 `json:"supergroup_id"`
|
||||||
// New value of is_forum
|
// New value of is_forum
|
||||||
IsForum bool `json:"is_forum"`
|
IsForum bool `json:"is_forum"`
|
||||||
|
// New value of has_forum_tabs; ignored if is_forum is false
|
||||||
|
HasForumTabs bool `json:"has_forum_tabs"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// Toggles whether the supergroup is a forum; requires owner privileges in the supergroup. Discussion supergroups can't be converted to forums
|
// Toggles whether the supergroup is a forum; requires owner privileges in the supergroup. Discussion supergroups can't be converted to forums
|
||||||
|
|
@ -19269,6 +19652,7 @@ func (client *Client) ToggleSupergroupIsForum(req *ToggleSupergroupIsForumReques
|
||||||
Data: map[string]interface{}{
|
Data: map[string]interface{}{
|
||||||
"supergroup_id": req.SupergroupId,
|
"supergroup_id": req.SupergroupId,
|
||||||
"is_forum": req.IsForum,
|
"is_forum": req.IsForum,
|
||||||
|
"has_forum_tabs": req.HasForumTabs,
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
@ -25371,6 +25755,12 @@ func (client *Client) TestUseUpdate() (Update, error) {
|
||||||
case TypeUpdateSavedMessagesTopicCount:
|
case TypeUpdateSavedMessagesTopicCount:
|
||||||
return UnmarshalUpdateSavedMessagesTopicCount(result.Data)
|
return UnmarshalUpdateSavedMessagesTopicCount(result.Data)
|
||||||
|
|
||||||
|
case TypeUpdateDirectMessagesChatTopic:
|
||||||
|
return UnmarshalUpdateDirectMessagesChatTopic(result.Data)
|
||||||
|
|
||||||
|
case TypeUpdateTopicMessageCount:
|
||||||
|
return UnmarshalUpdateTopicMessageCount(result.Data)
|
||||||
|
|
||||||
case TypeUpdateQuickReplyShortcut:
|
case TypeUpdateQuickReplyShortcut:
|
||||||
return UnmarshalUpdateQuickReplyShortcut(result.Data)
|
return UnmarshalUpdateQuickReplyShortcut(result.Data)
|
||||||
|
|
||||||
|
|
|
||||||
407
client/type.go
407
client/type.go
|
|
@ -45,6 +45,7 @@ const (
|
||||||
ClassMessageOrigin = "MessageOrigin"
|
ClassMessageOrigin = "MessageOrigin"
|
||||||
ClassReactionType = "ReactionType"
|
ClassReactionType = "ReactionType"
|
||||||
ClassPaidReactionType = "PaidReactionType"
|
ClassPaidReactionType = "PaidReactionType"
|
||||||
|
ClassMessageTopic = "MessageTopic"
|
||||||
ClassMessageEffectType = "MessageEffectType"
|
ClassMessageEffectType = "MessageEffectType"
|
||||||
ClassMessageSendingState = "MessageSendingState"
|
ClassMessageSendingState = "MessageSendingState"
|
||||||
ClassMessageReplyTo = "MessageReplyTo"
|
ClassMessageReplyTo = "MessageReplyTo"
|
||||||
|
|
@ -400,6 +401,7 @@ const (
|
||||||
ClassWebAppOpenParameters = "WebAppOpenParameters"
|
ClassWebAppOpenParameters = "WebAppOpenParameters"
|
||||||
ClassMessageThreadInfo = "MessageThreadInfo"
|
ClassMessageThreadInfo = "MessageThreadInfo"
|
||||||
ClassSavedMessagesTopic = "SavedMessagesTopic"
|
ClassSavedMessagesTopic = "SavedMessagesTopic"
|
||||||
|
ClassDirectMessagesChatTopic = "DirectMessagesChatTopic"
|
||||||
ClassForumTopicIcon = "ForumTopicIcon"
|
ClassForumTopicIcon = "ForumTopicIcon"
|
||||||
ClassForumTopicInfo = "ForumTopicInfo"
|
ClassForumTopicInfo = "ForumTopicInfo"
|
||||||
ClassForumTopic = "ForumTopic"
|
ClassForumTopic = "ForumTopic"
|
||||||
|
|
@ -965,6 +967,9 @@ const (
|
||||||
TypeMessageReactions = "messageReactions"
|
TypeMessageReactions = "messageReactions"
|
||||||
TypeMessageInteractionInfo = "messageInteractionInfo"
|
TypeMessageInteractionInfo = "messageInteractionInfo"
|
||||||
TypeUnreadReaction = "unreadReaction"
|
TypeUnreadReaction = "unreadReaction"
|
||||||
|
TypeMessageTopicForum = "messageTopicForum"
|
||||||
|
TypeMessageTopicDirectMessages = "messageTopicDirectMessages"
|
||||||
|
TypeMessageTopicSavedMessages = "messageTopicSavedMessages"
|
||||||
TypeMessageEffectTypeEmojiReaction = "messageEffectTypeEmojiReaction"
|
TypeMessageEffectTypeEmojiReaction = "messageEffectTypeEmojiReaction"
|
||||||
TypeMessageEffectTypePremiumSticker = "messageEffectTypePremiumSticker"
|
TypeMessageEffectTypePremiumSticker = "messageEffectTypePremiumSticker"
|
||||||
TypeMessageEffect = "messageEffect"
|
TypeMessageEffect = "messageEffect"
|
||||||
|
|
@ -991,6 +996,7 @@ const (
|
||||||
TypeMessageSourceChatHistory = "messageSourceChatHistory"
|
TypeMessageSourceChatHistory = "messageSourceChatHistory"
|
||||||
TypeMessageSourceMessageThreadHistory = "messageSourceMessageThreadHistory"
|
TypeMessageSourceMessageThreadHistory = "messageSourceMessageThreadHistory"
|
||||||
TypeMessageSourceForumTopicHistory = "messageSourceForumTopicHistory"
|
TypeMessageSourceForumTopicHistory = "messageSourceForumTopicHistory"
|
||||||
|
TypeMessageSourceDirectMessagesChatTopicHistory = "messageSourceDirectMessagesChatTopicHistory"
|
||||||
TypeMessageSourceHistoryPreview = "messageSourceHistoryPreview"
|
TypeMessageSourceHistoryPreview = "messageSourceHistoryPreview"
|
||||||
TypeMessageSourceChatList = "messageSourceChatList"
|
TypeMessageSourceChatList = "messageSourceChatList"
|
||||||
TypeMessageSourceSearch = "messageSourceSearch"
|
TypeMessageSourceSearch = "messageSourceSearch"
|
||||||
|
|
@ -1101,6 +1107,7 @@ const (
|
||||||
TypeSavedMessagesTopicTypeAuthorHidden = "savedMessagesTopicTypeAuthorHidden"
|
TypeSavedMessagesTopicTypeAuthorHidden = "savedMessagesTopicTypeAuthorHidden"
|
||||||
TypeSavedMessagesTopicTypeSavedFromChat = "savedMessagesTopicTypeSavedFromChat"
|
TypeSavedMessagesTopicTypeSavedFromChat = "savedMessagesTopicTypeSavedFromChat"
|
||||||
TypeSavedMessagesTopic = "savedMessagesTopic"
|
TypeSavedMessagesTopic = "savedMessagesTopic"
|
||||||
|
TypeDirectMessagesChatTopic = "directMessagesChatTopic"
|
||||||
TypeForumTopicIcon = "forumTopicIcon"
|
TypeForumTopicIcon = "forumTopicIcon"
|
||||||
TypeForumTopicInfo = "forumTopicInfo"
|
TypeForumTopicInfo = "forumTopicInfo"
|
||||||
TypeForumTopic = "forumTopic"
|
TypeForumTopic = "forumTopic"
|
||||||
|
|
@ -1384,6 +1391,7 @@ const (
|
||||||
TypeMessageRefundedUpgradedGift = "messageRefundedUpgradedGift"
|
TypeMessageRefundedUpgradedGift = "messageRefundedUpgradedGift"
|
||||||
TypeMessagePaidMessagesRefunded = "messagePaidMessagesRefunded"
|
TypeMessagePaidMessagesRefunded = "messagePaidMessagesRefunded"
|
||||||
TypeMessagePaidMessagePriceChanged = "messagePaidMessagePriceChanged"
|
TypeMessagePaidMessagePriceChanged = "messagePaidMessagePriceChanged"
|
||||||
|
TypeMessageDirectMessagePriceChanged = "messageDirectMessagePriceChanged"
|
||||||
TypeMessageContactRegistered = "messageContactRegistered"
|
TypeMessageContactRegistered = "messageContactRegistered"
|
||||||
TypeMessageUsersShared = "messageUsersShared"
|
TypeMessageUsersShared = "messageUsersShared"
|
||||||
TypeMessageChatShared = "messageChatShared"
|
TypeMessageChatShared = "messageChatShared"
|
||||||
|
|
@ -2273,6 +2281,8 @@ const (
|
||||||
TypeUpdateChatOnlineMemberCount = "updateChatOnlineMemberCount"
|
TypeUpdateChatOnlineMemberCount = "updateChatOnlineMemberCount"
|
||||||
TypeUpdateSavedMessagesTopic = "updateSavedMessagesTopic"
|
TypeUpdateSavedMessagesTopic = "updateSavedMessagesTopic"
|
||||||
TypeUpdateSavedMessagesTopicCount = "updateSavedMessagesTopicCount"
|
TypeUpdateSavedMessagesTopicCount = "updateSavedMessagesTopicCount"
|
||||||
|
TypeUpdateDirectMessagesChatTopic = "updateDirectMessagesChatTopic"
|
||||||
|
TypeUpdateTopicMessageCount = "updateTopicMessageCount"
|
||||||
TypeUpdateQuickReplyShortcut = "updateQuickReplyShortcut"
|
TypeUpdateQuickReplyShortcut = "updateQuickReplyShortcut"
|
||||||
TypeUpdateQuickReplyShortcutDeleted = "updateQuickReplyShortcutDeleted"
|
TypeUpdateQuickReplyShortcutDeleted = "updateQuickReplyShortcutDeleted"
|
||||||
TypeUpdateQuickReplyShortcuts = "updateQuickReplyShortcuts"
|
TypeUpdateQuickReplyShortcuts = "updateQuickReplyShortcuts"
|
||||||
|
|
@ -2584,6 +2594,11 @@ type PaidReactionType interface {
|
||||||
PaidReactionTypeType() string
|
PaidReactionTypeType() string
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Describes a topic of messages in a chat
|
||||||
|
type MessageTopic interface {
|
||||||
|
MessageTopicType() string
|
||||||
|
}
|
||||||
|
|
||||||
// Describes type of emoji effect
|
// Describes type of emoji effect
|
||||||
type MessageEffectType interface {
|
type MessageEffectType interface {
|
||||||
MessageEffectTypeType() string
|
MessageEffectTypeType() string
|
||||||
|
|
@ -7626,11 +7641,11 @@ func (*ChatPermissions) GetType() string {
|
||||||
// Describes rights of the administrator
|
// Describes rights of the administrator
|
||||||
type ChatAdministratorRights struct {
|
type ChatAdministratorRights struct {
|
||||||
meta
|
meta
|
||||||
// True, if the administrator can access the chat event log, get boost list, see hidden supergroup and channel members, report supergroup spam messages and ignore slow mode. Implied by any other privilege; applicable to supergroups and channels only
|
// True, if the administrator can access the chat event log, get boost list, see hidden supergroup and channel members, report supergroup spam messages, ignore slow mode, and send messages to the chat without paying Telegram Stars. Implied by any other privilege; applicable to supergroups and channels only
|
||||||
CanManageChat bool `json:"can_manage_chat"`
|
CanManageChat bool `json:"can_manage_chat"`
|
||||||
// True, if the administrator can change the chat title, photo, and other settings
|
// True, if the administrator can change the chat title, photo, and other settings
|
||||||
CanChangeInfo bool `json:"can_change_info"`
|
CanChangeInfo bool `json:"can_change_info"`
|
||||||
// True, if the administrator can create channel posts or view channel statistics; applicable to channels only
|
// True, if the administrator can create channel posts, answer to channel direct messages, or view channel statistics; applicable to channels only
|
||||||
CanPostMessages bool `json:"can_post_messages"`
|
CanPostMessages bool `json:"can_post_messages"`
|
||||||
// True, if the administrator can edit messages of other users and pin messages; applicable to channels only
|
// True, if the administrator can edit messages of other users and pin messages; applicable to channels only
|
||||||
CanEditMessages bool `json:"can_edit_messages"`
|
CanEditMessages bool `json:"can_edit_messages"`
|
||||||
|
|
@ -10639,7 +10654,7 @@ func (*StarTransactionTypePaidMessageSend) StarTransactionTypeType() string {
|
||||||
return TypeStarTransactionTypePaidMessageSend
|
return TypeStarTransactionTypePaidMessageSend
|
||||||
}
|
}
|
||||||
|
|
||||||
// The transaction is a receiving of a paid message; for regular users and supergroup chats only
|
// The transaction is a receiving of a paid message; for regular users, supergroup and channel chats only
|
||||||
type StarTransactionTypePaidMessageReceive struct {
|
type StarTransactionTypePaidMessageReceive struct {
|
||||||
meta
|
meta
|
||||||
// Identifier of the sender of the message
|
// Identifier of the sender of the message
|
||||||
|
|
@ -13165,8 +13180,16 @@ type Supergroup struct {
|
||||||
IsBroadcastGroup bool `json:"is_broadcast_group"`
|
IsBroadcastGroup bool `json:"is_broadcast_group"`
|
||||||
// True, if the supergroup is a forum with topics
|
// True, if the supergroup is a forum with topics
|
||||||
IsForum bool `json:"is_forum"`
|
IsForum bool `json:"is_forum"`
|
||||||
|
// True, if the supergroup is a direct message group for a channel chat
|
||||||
|
IsDirectMessagesGroup bool `json:"is_direct_messages_group"`
|
||||||
|
// True, if the supergroup is a direct messages group for a channel chat that is administered by the current user
|
||||||
|
IsAdministeredDirectMessagesGroup bool `json:"is_administered_direct_messages_group"`
|
||||||
// Information about verification status of the supergroup or channel; may be null if none
|
// Information about verification status of the supergroup or channel; may be null if none
|
||||||
VerificationStatus *VerificationStatus `json:"verification_status"`
|
VerificationStatus *VerificationStatus `json:"verification_status"`
|
||||||
|
// True, if the channel has direct messages group
|
||||||
|
HasDirectMessagesGroup bool `json:"has_direct_messages_group"`
|
||||||
|
// True, if the supergroup is a forum, which topics are shown in the same way as in channel direct messages groups
|
||||||
|
HasForumTabs bool `json:"has_forum_tabs"`
|
||||||
// True, if content of media messages in the supergroup or channel chat must be hidden with 18+ spoiler
|
// True, if content of media messages in the supergroup or channel chat must be hidden with 18+ spoiler
|
||||||
HasSensitiveContent bool `json:"has_sensitive_content"`
|
HasSensitiveContent bool `json:"has_sensitive_content"`
|
||||||
// If non-empty, contains a human-readable description of the reason why access to this supergroup or channel must be restricted
|
// If non-empty, contains a human-readable description of the reason why access to this supergroup or channel must be restricted
|
||||||
|
|
@ -13215,7 +13238,11 @@ func (supergroup *Supergroup) UnmarshalJSON(data []byte) error {
|
||||||
IsChannel bool `json:"is_channel"`
|
IsChannel bool `json:"is_channel"`
|
||||||
IsBroadcastGroup bool `json:"is_broadcast_group"`
|
IsBroadcastGroup bool `json:"is_broadcast_group"`
|
||||||
IsForum bool `json:"is_forum"`
|
IsForum bool `json:"is_forum"`
|
||||||
|
IsDirectMessagesGroup bool `json:"is_direct_messages_group"`
|
||||||
|
IsAdministeredDirectMessagesGroup bool `json:"is_administered_direct_messages_group"`
|
||||||
VerificationStatus *VerificationStatus `json:"verification_status"`
|
VerificationStatus *VerificationStatus `json:"verification_status"`
|
||||||
|
HasDirectMessagesGroup bool `json:"has_direct_messages_group"`
|
||||||
|
HasForumTabs bool `json:"has_forum_tabs"`
|
||||||
HasSensitiveContent bool `json:"has_sensitive_content"`
|
HasSensitiveContent bool `json:"has_sensitive_content"`
|
||||||
RestrictionReason string `json:"restriction_reason"`
|
RestrictionReason string `json:"restriction_reason"`
|
||||||
PaidMessageStarCount int64 `json:"paid_message_star_count"`
|
PaidMessageStarCount int64 `json:"paid_message_star_count"`
|
||||||
|
|
@ -13245,7 +13272,11 @@ func (supergroup *Supergroup) UnmarshalJSON(data []byte) error {
|
||||||
supergroup.IsChannel = tmp.IsChannel
|
supergroup.IsChannel = tmp.IsChannel
|
||||||
supergroup.IsBroadcastGroup = tmp.IsBroadcastGroup
|
supergroup.IsBroadcastGroup = tmp.IsBroadcastGroup
|
||||||
supergroup.IsForum = tmp.IsForum
|
supergroup.IsForum = tmp.IsForum
|
||||||
|
supergroup.IsDirectMessagesGroup = tmp.IsDirectMessagesGroup
|
||||||
|
supergroup.IsAdministeredDirectMessagesGroup = tmp.IsAdministeredDirectMessagesGroup
|
||||||
supergroup.VerificationStatus = tmp.VerificationStatus
|
supergroup.VerificationStatus = tmp.VerificationStatus
|
||||||
|
supergroup.HasDirectMessagesGroup = tmp.HasDirectMessagesGroup
|
||||||
|
supergroup.HasForumTabs = tmp.HasForumTabs
|
||||||
supergroup.HasSensitiveContent = tmp.HasSensitiveContent
|
supergroup.HasSensitiveContent = tmp.HasSensitiveContent
|
||||||
supergroup.RestrictionReason = tmp.RestrictionReason
|
supergroup.RestrictionReason = tmp.RestrictionReason
|
||||||
supergroup.PaidMessageStarCount = tmp.PaidMessageStarCount
|
supergroup.PaidMessageStarCount = tmp.PaidMessageStarCount
|
||||||
|
|
@ -13275,6 +13306,8 @@ type SupergroupFullInfo struct {
|
||||||
BannedCount int32 `json:"banned_count"`
|
BannedCount int32 `json:"banned_count"`
|
||||||
// Chat identifier of a discussion group for the channel, or a channel, for which the supergroup is the designated discussion group; 0 if none or unknown
|
// Chat identifier of a discussion group for the channel, or a channel, for which the supergroup is the designated discussion group; 0 if none or unknown
|
||||||
LinkedChatId int64 `json:"linked_chat_id"`
|
LinkedChatId int64 `json:"linked_chat_id"`
|
||||||
|
// Chat identifier of a direct messages group for the channel, or a channel, for which the supergroup is the designated direct messages group; 0 if none
|
||||||
|
DirectMessagesChatId int64 `json:"direct_messages_chat_id"`
|
||||||
// Delay between consecutive sent messages for non-administrator supergroup members, in seconds
|
// Delay between consecutive sent messages for non-administrator supergroup members, in seconds
|
||||||
SlowModeDelay int32 `json:"slow_mode_delay"`
|
SlowModeDelay int32 `json:"slow_mode_delay"`
|
||||||
// Time left before next message can be sent in the supergroup, in seconds. An updateSupergroupFullInfo update is not triggered when value of this field changes, but both new and old values are non-zero
|
// Time left before next message can be sent in the supergroup, in seconds. An updateSupergroupFullInfo update is not triggered when value of this field changes, but both new and old values are non-zero
|
||||||
|
|
@ -14515,6 +14548,87 @@ func (unreadReaction *UnreadReaction) UnmarshalJSON(data []byte) error {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// A topic in a forum supergroup chat
|
||||||
|
type MessageTopicForum struct {
|
||||||
|
meta
|
||||||
|
// Unique identifier of the forum topic; all messages in a non-forum supergroup chats belongs to the General topic
|
||||||
|
ForumTopicId int64 `json:"forum_topic_id"`
|
||||||
|
}
|
||||||
|
|
||||||
|
func (entity *MessageTopicForum) MarshalJSON() ([]byte, error) {
|
||||||
|
entity.meta.Type = entity.GetType()
|
||||||
|
|
||||||
|
type stub MessageTopicForum
|
||||||
|
|
||||||
|
return json.Marshal((*stub)(entity))
|
||||||
|
}
|
||||||
|
|
||||||
|
func (*MessageTopicForum) GetClass() string {
|
||||||
|
return ClassMessageTopic
|
||||||
|
}
|
||||||
|
|
||||||
|
func (*MessageTopicForum) GetType() string {
|
||||||
|
return TypeMessageTopicForum
|
||||||
|
}
|
||||||
|
|
||||||
|
func (*MessageTopicForum) MessageTopicType() string {
|
||||||
|
return TypeMessageTopicForum
|
||||||
|
}
|
||||||
|
|
||||||
|
// A topic in a channel direct messages chat administered by the current user
|
||||||
|
type MessageTopicDirectMessages struct {
|
||||||
|
meta
|
||||||
|
// Unique identifier of the topic
|
||||||
|
DirectMessagesChatTopicId int64 `json:"direct_messages_chat_topic_id"`
|
||||||
|
}
|
||||||
|
|
||||||
|
func (entity *MessageTopicDirectMessages) MarshalJSON() ([]byte, error) {
|
||||||
|
entity.meta.Type = entity.GetType()
|
||||||
|
|
||||||
|
type stub MessageTopicDirectMessages
|
||||||
|
|
||||||
|
return json.Marshal((*stub)(entity))
|
||||||
|
}
|
||||||
|
|
||||||
|
func (*MessageTopicDirectMessages) GetClass() string {
|
||||||
|
return ClassMessageTopic
|
||||||
|
}
|
||||||
|
|
||||||
|
func (*MessageTopicDirectMessages) GetType() string {
|
||||||
|
return TypeMessageTopicDirectMessages
|
||||||
|
}
|
||||||
|
|
||||||
|
func (*MessageTopicDirectMessages) MessageTopicType() string {
|
||||||
|
return TypeMessageTopicDirectMessages
|
||||||
|
}
|
||||||
|
|
||||||
|
// A topic in Saved Messages chat
|
||||||
|
type MessageTopicSavedMessages struct {
|
||||||
|
meta
|
||||||
|
// Unique identifier of the Saved Messages topic
|
||||||
|
SavedMessagesTopicId int64 `json:"saved_messages_topic_id"`
|
||||||
|
}
|
||||||
|
|
||||||
|
func (entity *MessageTopicSavedMessages) MarshalJSON() ([]byte, error) {
|
||||||
|
entity.meta.Type = entity.GetType()
|
||||||
|
|
||||||
|
type stub MessageTopicSavedMessages
|
||||||
|
|
||||||
|
return json.Marshal((*stub)(entity))
|
||||||
|
}
|
||||||
|
|
||||||
|
func (*MessageTopicSavedMessages) GetClass() string {
|
||||||
|
return ClassMessageTopic
|
||||||
|
}
|
||||||
|
|
||||||
|
func (*MessageTopicSavedMessages) GetType() string {
|
||||||
|
return TypeMessageTopicSavedMessages
|
||||||
|
}
|
||||||
|
|
||||||
|
func (*MessageTopicSavedMessages) MessageTopicType() string {
|
||||||
|
return TypeMessageTopicSavedMessages
|
||||||
|
}
|
||||||
|
|
||||||
// An effect from an emoji reaction
|
// An effect from an emoji reaction
|
||||||
type MessageEffectTypeEmojiReaction struct {
|
type MessageEffectTypeEmojiReaction struct {
|
||||||
meta
|
meta
|
||||||
|
|
@ -14973,14 +15087,12 @@ type Message struct {
|
||||||
IsPinned bool `json:"is_pinned"`
|
IsPinned bool `json:"is_pinned"`
|
||||||
// True, if the message was sent because of a scheduled action by the message sender, for example, as away, or greeting service message
|
// True, if the message was sent because of a scheduled action by the message sender, for example, as away, or greeting service message
|
||||||
IsFromOffline bool `json:"is_from_offline"`
|
IsFromOffline bool `json:"is_from_offline"`
|
||||||
// True, if content of the message can be saved locally or copied using inputMessageForwarded or forwardMessages with copy options
|
// True, if content of the message can be saved locally
|
||||||
CanBeSaved bool `json:"can_be_saved"`
|
CanBeSaved bool `json:"can_be_saved"`
|
||||||
// True, if media timestamp entities refers to a media in this message as opposed to a media in the replied message
|
// True, if media timestamp entities refers to a media in this message as opposed to a media in the replied message
|
||||||
HasTimestampedMedia bool `json:"has_timestamped_media"`
|
HasTimestampedMedia bool `json:"has_timestamped_media"`
|
||||||
// True, if the message is a channel post. All messages to channels are channel posts, all other messages are not channel posts
|
// True, if the message is a channel post. All messages to channels are channel posts, all other messages are not channel posts
|
||||||
IsChannelPost bool `json:"is_channel_post"`
|
IsChannelPost bool `json:"is_channel_post"`
|
||||||
// True, if the message is a forum topic message
|
|
||||||
IsTopicMessage bool `json:"is_topic_message"`
|
|
||||||
// True, if the message contains an unread mention for the current user
|
// True, if the message contains an unread mention for the current user
|
||||||
ContainsUnreadMention bool `json:"contains_unread_mention"`
|
ContainsUnreadMention bool `json:"contains_unread_mention"`
|
||||||
// Point in time (Unix timestamp) when the message was sent; 0 for scheduled messages
|
// Point in time (Unix timestamp) when the message was sent; 0 for scheduled messages
|
||||||
|
|
@ -15001,8 +15113,8 @@ type Message struct {
|
||||||
ReplyTo MessageReplyTo `json:"reply_to"`
|
ReplyTo MessageReplyTo `json:"reply_to"`
|
||||||
// If non-zero, the identifier of the message thread the message belongs to; unique within the chat to which the message belongs
|
// If non-zero, the identifier of the message thread the message belongs to; unique within the chat to which the message belongs
|
||||||
MessageThreadId int64 `json:"message_thread_id"`
|
MessageThreadId int64 `json:"message_thread_id"`
|
||||||
// Identifier of the Saved Messages topic for the message; 0 for messages not from Saved Messages
|
// Identifier of the topic within the chat to which the message belongs; may be null if none
|
||||||
SavedMessagesTopicId int64 `json:"saved_messages_topic_id"`
|
TopicId MessageTopic `json:"topic_id"`
|
||||||
// The message's self-destruct type; may be null if none
|
// The message's self-destruct type; may be null if none
|
||||||
SelfDestructType MessageSelfDestructType `json:"self_destruct_type"`
|
SelfDestructType MessageSelfDestructType `json:"self_destruct_type"`
|
||||||
// Time left before the message self-destruct timer expires, in seconds; 0 if self-destruction isn't scheduled yet
|
// Time left before the message self-destruct timer expires, in seconds; 0 if self-destruction isn't scheduled yet
|
||||||
|
|
@ -15062,7 +15174,6 @@ func (message *Message) UnmarshalJSON(data []byte) error {
|
||||||
CanBeSaved bool `json:"can_be_saved"`
|
CanBeSaved bool `json:"can_be_saved"`
|
||||||
HasTimestampedMedia bool `json:"has_timestamped_media"`
|
HasTimestampedMedia bool `json:"has_timestamped_media"`
|
||||||
IsChannelPost bool `json:"is_channel_post"`
|
IsChannelPost bool `json:"is_channel_post"`
|
||||||
IsTopicMessage bool `json:"is_topic_message"`
|
|
||||||
ContainsUnreadMention bool `json:"contains_unread_mention"`
|
ContainsUnreadMention bool `json:"contains_unread_mention"`
|
||||||
Date int32 `json:"date"`
|
Date int32 `json:"date"`
|
||||||
EditDate int32 `json:"edit_date"`
|
EditDate int32 `json:"edit_date"`
|
||||||
|
|
@ -15073,7 +15184,7 @@ func (message *Message) UnmarshalJSON(data []byte) error {
|
||||||
FactCheck *FactCheck `json:"fact_check"`
|
FactCheck *FactCheck `json:"fact_check"`
|
||||||
ReplyTo json.RawMessage `json:"reply_to"`
|
ReplyTo json.RawMessage `json:"reply_to"`
|
||||||
MessageThreadId int64 `json:"message_thread_id"`
|
MessageThreadId int64 `json:"message_thread_id"`
|
||||||
SavedMessagesTopicId int64 `json:"saved_messages_topic_id"`
|
TopicId json.RawMessage `json:"topic_id"`
|
||||||
SelfDestructType json.RawMessage `json:"self_destruct_type"`
|
SelfDestructType json.RawMessage `json:"self_destruct_type"`
|
||||||
SelfDestructIn float64 `json:"self_destruct_in"`
|
SelfDestructIn float64 `json:"self_destruct_in"`
|
||||||
AutoDeleteIn float64 `json:"auto_delete_in"`
|
AutoDeleteIn float64 `json:"auto_delete_in"`
|
||||||
|
|
@ -15103,7 +15214,6 @@ func (message *Message) UnmarshalJSON(data []byte) error {
|
||||||
message.CanBeSaved = tmp.CanBeSaved
|
message.CanBeSaved = tmp.CanBeSaved
|
||||||
message.HasTimestampedMedia = tmp.HasTimestampedMedia
|
message.HasTimestampedMedia = tmp.HasTimestampedMedia
|
||||||
message.IsChannelPost = tmp.IsChannelPost
|
message.IsChannelPost = tmp.IsChannelPost
|
||||||
message.IsTopicMessage = tmp.IsTopicMessage
|
|
||||||
message.ContainsUnreadMention = tmp.ContainsUnreadMention
|
message.ContainsUnreadMention = tmp.ContainsUnreadMention
|
||||||
message.Date = tmp.Date
|
message.Date = tmp.Date
|
||||||
message.EditDate = tmp.EditDate
|
message.EditDate = tmp.EditDate
|
||||||
|
|
@ -15113,7 +15223,6 @@ func (message *Message) UnmarshalJSON(data []byte) error {
|
||||||
message.UnreadReactions = tmp.UnreadReactions
|
message.UnreadReactions = tmp.UnreadReactions
|
||||||
message.FactCheck = tmp.FactCheck
|
message.FactCheck = tmp.FactCheck
|
||||||
message.MessageThreadId = tmp.MessageThreadId
|
message.MessageThreadId = tmp.MessageThreadId
|
||||||
message.SavedMessagesTopicId = tmp.SavedMessagesTopicId
|
|
||||||
message.SelfDestructIn = tmp.SelfDestructIn
|
message.SelfDestructIn = tmp.SelfDestructIn
|
||||||
message.AutoDeleteIn = tmp.AutoDeleteIn
|
message.AutoDeleteIn = tmp.AutoDeleteIn
|
||||||
message.ViaBotUserId = tmp.ViaBotUserId
|
message.ViaBotUserId = tmp.ViaBotUserId
|
||||||
|
|
@ -15138,6 +15247,9 @@ func (message *Message) UnmarshalJSON(data []byte) error {
|
||||||
fieldReplyTo, _ := UnmarshalMessageReplyTo(tmp.ReplyTo)
|
fieldReplyTo, _ := UnmarshalMessageReplyTo(tmp.ReplyTo)
|
||||||
message.ReplyTo = fieldReplyTo
|
message.ReplyTo = fieldReplyTo
|
||||||
|
|
||||||
|
fieldTopicId, _ := UnmarshalMessageTopic(tmp.TopicId)
|
||||||
|
message.TopicId = fieldTopicId
|
||||||
|
|
||||||
fieldSelfDestructType, _ := UnmarshalMessageSelfDestructType(tmp.SelfDestructType)
|
fieldSelfDestructType, _ := UnmarshalMessageSelfDestructType(tmp.SelfDestructType)
|
||||||
message.SelfDestructType = fieldSelfDestructType
|
message.SelfDestructType = fieldSelfDestructType
|
||||||
|
|
||||||
|
|
@ -15404,7 +15516,7 @@ func (*MessageSourceChatHistory) MessageSourceType() string {
|
||||||
return TypeMessageSourceChatHistory
|
return TypeMessageSourceChatHistory
|
||||||
}
|
}
|
||||||
|
|
||||||
// The message is from a message thread history
|
// The message is from history of a message thread
|
||||||
type MessageSourceMessageThreadHistory struct{
|
type MessageSourceMessageThreadHistory struct{
|
||||||
meta
|
meta
|
||||||
}
|
}
|
||||||
|
|
@ -15429,7 +15541,7 @@ func (*MessageSourceMessageThreadHistory) MessageSourceType() string {
|
||||||
return TypeMessageSourceMessageThreadHistory
|
return TypeMessageSourceMessageThreadHistory
|
||||||
}
|
}
|
||||||
|
|
||||||
// The message is from a forum topic history
|
// The message is from history of a forum topic
|
||||||
type MessageSourceForumTopicHistory struct{
|
type MessageSourceForumTopicHistory struct{
|
||||||
meta
|
meta
|
||||||
}
|
}
|
||||||
|
|
@ -15454,6 +15566,31 @@ func (*MessageSourceForumTopicHistory) MessageSourceType() string {
|
||||||
return TypeMessageSourceForumTopicHistory
|
return TypeMessageSourceForumTopicHistory
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// The message is from history of a topic in a channel direct messages chat administered by the current user
|
||||||
|
type MessageSourceDirectMessagesChatTopicHistory struct{
|
||||||
|
meta
|
||||||
|
}
|
||||||
|
|
||||||
|
func (entity *MessageSourceDirectMessagesChatTopicHistory) MarshalJSON() ([]byte, error) {
|
||||||
|
entity.meta.Type = entity.GetType()
|
||||||
|
|
||||||
|
type stub MessageSourceDirectMessagesChatTopicHistory
|
||||||
|
|
||||||
|
return json.Marshal((*stub)(entity))
|
||||||
|
}
|
||||||
|
|
||||||
|
func (*MessageSourceDirectMessagesChatTopicHistory) GetClass() string {
|
||||||
|
return ClassMessageSource
|
||||||
|
}
|
||||||
|
|
||||||
|
func (*MessageSourceDirectMessagesChatTopicHistory) GetType() string {
|
||||||
|
return TypeMessageSourceDirectMessagesChatTopicHistory
|
||||||
|
}
|
||||||
|
|
||||||
|
func (*MessageSourceDirectMessagesChatTopicHistory) MessageSourceType() string {
|
||||||
|
return TypeMessageSourceDirectMessagesChatTopicHistory
|
||||||
|
}
|
||||||
|
|
||||||
// The message is from chat, message thread or forum topic history preview
|
// The message is from chat, message thread or forum topic history preview
|
||||||
type MessageSourceHistoryPreview struct{
|
type MessageSourceHistoryPreview struct{
|
||||||
meta
|
meta
|
||||||
|
|
@ -19020,6 +19157,86 @@ func (savedMessagesTopic *SavedMessagesTopic) UnmarshalJSON(data []byte) error {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Contains information about a topic in a channel direct messages chat administered by the current user
|
||||||
|
type DirectMessagesChatTopic struct {
|
||||||
|
meta
|
||||||
|
// Identifier of the chat to which the topic belongs
|
||||||
|
ChatId int64 `json:"chat_id"`
|
||||||
|
// Unique topic identifier
|
||||||
|
Id int64 `json:"id"`
|
||||||
|
// Identifier of the user or chat that sends the messages to the topic
|
||||||
|
SenderId MessageSender `json:"sender_id"`
|
||||||
|
// A parameter used to determine order of the topic in the topic list. Topics must be sorted by the order in descending order
|
||||||
|
Order JsonInt64 `json:"order"`
|
||||||
|
// True, if the forum topic is marked as unread
|
||||||
|
IsMarkedAsUnread bool `json:"is_marked_as_unread"`
|
||||||
|
// Number of unread messages in the chat
|
||||||
|
UnreadCount int64 `json:"unread_count"`
|
||||||
|
// Identifier of the last read incoming message
|
||||||
|
LastReadInboxMessageId int64 `json:"last_read_inbox_message_id"`
|
||||||
|
// Identifier of the last read outgoing message
|
||||||
|
LastReadOutboxMessageId int64 `json:"last_read_outbox_message_id"`
|
||||||
|
// Number of messages with unread reactions in the chat
|
||||||
|
UnreadReactionCount int64 `json:"unread_reaction_count"`
|
||||||
|
// Last message in the topic; may be null if none or unknown
|
||||||
|
LastMessage *Message `json:"last_message"`
|
||||||
|
// A draft of a message in the topic; may be null if none
|
||||||
|
DraftMessage *DraftMessage `json:"draft_message"`
|
||||||
|
}
|
||||||
|
|
||||||
|
func (entity *DirectMessagesChatTopic) MarshalJSON() ([]byte, error) {
|
||||||
|
entity.meta.Type = entity.GetType()
|
||||||
|
|
||||||
|
type stub DirectMessagesChatTopic
|
||||||
|
|
||||||
|
return json.Marshal((*stub)(entity))
|
||||||
|
}
|
||||||
|
|
||||||
|
func (*DirectMessagesChatTopic) GetClass() string {
|
||||||
|
return ClassDirectMessagesChatTopic
|
||||||
|
}
|
||||||
|
|
||||||
|
func (*DirectMessagesChatTopic) GetType() string {
|
||||||
|
return TypeDirectMessagesChatTopic
|
||||||
|
}
|
||||||
|
|
||||||
|
func (directMessagesChatTopic *DirectMessagesChatTopic) UnmarshalJSON(data []byte) error {
|
||||||
|
var tmp struct {
|
||||||
|
ChatId int64 `json:"chat_id"`
|
||||||
|
Id int64 `json:"id"`
|
||||||
|
SenderId json.RawMessage `json:"sender_id"`
|
||||||
|
Order JsonInt64 `json:"order"`
|
||||||
|
IsMarkedAsUnread bool `json:"is_marked_as_unread"`
|
||||||
|
UnreadCount int64 `json:"unread_count"`
|
||||||
|
LastReadInboxMessageId int64 `json:"last_read_inbox_message_id"`
|
||||||
|
LastReadOutboxMessageId int64 `json:"last_read_outbox_message_id"`
|
||||||
|
UnreadReactionCount int64 `json:"unread_reaction_count"`
|
||||||
|
LastMessage *Message `json:"last_message"`
|
||||||
|
DraftMessage *DraftMessage `json:"draft_message"`
|
||||||
|
}
|
||||||
|
|
||||||
|
err := json.Unmarshal(data, &tmp)
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
directMessagesChatTopic.ChatId = tmp.ChatId
|
||||||
|
directMessagesChatTopic.Id = tmp.Id
|
||||||
|
directMessagesChatTopic.Order = tmp.Order
|
||||||
|
directMessagesChatTopic.IsMarkedAsUnread = tmp.IsMarkedAsUnread
|
||||||
|
directMessagesChatTopic.UnreadCount = tmp.UnreadCount
|
||||||
|
directMessagesChatTopic.LastReadInboxMessageId = tmp.LastReadInboxMessageId
|
||||||
|
directMessagesChatTopic.LastReadOutboxMessageId = tmp.LastReadOutboxMessageId
|
||||||
|
directMessagesChatTopic.UnreadReactionCount = tmp.UnreadReactionCount
|
||||||
|
directMessagesChatTopic.LastMessage = tmp.LastMessage
|
||||||
|
directMessagesChatTopic.DraftMessage = tmp.DraftMessage
|
||||||
|
|
||||||
|
fieldSenderId, _ := UnmarshalMessageSender(tmp.SenderId)
|
||||||
|
directMessagesChatTopic.SenderId = fieldSenderId
|
||||||
|
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
// Describes a forum topic icon
|
// Describes a forum topic icon
|
||||||
type ForumTopicIcon struct {
|
type ForumTopicIcon struct {
|
||||||
meta
|
meta
|
||||||
|
|
@ -19050,6 +19267,8 @@ type ForumTopicInfo struct {
|
||||||
meta
|
meta
|
||||||
// Identifier of the forum chat to which the topic belongs
|
// Identifier of the forum chat to which the topic belongs
|
||||||
ChatId int64 `json:"chat_id"`
|
ChatId int64 `json:"chat_id"`
|
||||||
|
// Forum topic identifier of the topic
|
||||||
|
ForumTopicId int64 `json:"forum_topic_id"`
|
||||||
// Message thread identifier of the topic
|
// Message thread identifier of the topic
|
||||||
MessageThreadId int64 `json:"message_thread_id"`
|
MessageThreadId int64 `json:"message_thread_id"`
|
||||||
// Name of the topic
|
// Name of the topic
|
||||||
|
|
@ -19089,6 +19308,7 @@ func (*ForumTopicInfo) GetType() string {
|
||||||
func (forumTopicInfo *ForumTopicInfo) UnmarshalJSON(data []byte) error {
|
func (forumTopicInfo *ForumTopicInfo) UnmarshalJSON(data []byte) error {
|
||||||
var tmp struct {
|
var tmp struct {
|
||||||
ChatId int64 `json:"chat_id"`
|
ChatId int64 `json:"chat_id"`
|
||||||
|
ForumTopicId int64 `json:"forum_topic_id"`
|
||||||
MessageThreadId int64 `json:"message_thread_id"`
|
MessageThreadId int64 `json:"message_thread_id"`
|
||||||
Name string `json:"name"`
|
Name string `json:"name"`
|
||||||
Icon *ForumTopicIcon `json:"icon"`
|
Icon *ForumTopicIcon `json:"icon"`
|
||||||
|
|
@ -19106,6 +19326,7 @@ func (forumTopicInfo *ForumTopicInfo) UnmarshalJSON(data []byte) error {
|
||||||
}
|
}
|
||||||
|
|
||||||
forumTopicInfo.ChatId = tmp.ChatId
|
forumTopicInfo.ChatId = tmp.ChatId
|
||||||
|
forumTopicInfo.ForumTopicId = tmp.ForumTopicId
|
||||||
forumTopicInfo.MessageThreadId = tmp.MessageThreadId
|
forumTopicInfo.MessageThreadId = tmp.MessageThreadId
|
||||||
forumTopicInfo.Name = tmp.Name
|
forumTopicInfo.Name = tmp.Name
|
||||||
forumTopicInfo.Icon = tmp.Icon
|
forumTopicInfo.Icon = tmp.Icon
|
||||||
|
|
@ -27045,7 +27266,7 @@ func (messageCall *MessageCall) UnmarshalJSON(data []byte) error {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
// A message with information about a group call not bound to a chat. If the message is incoming, the call isn't active, isn't missed, and has no duration, and getOption("can_accept_calls") is true, then incoming call screen must be shown to the user. Use joinGroupCall to accept the call or declineGroupCallInvitation to decline it. If the call become active or missed, then the call screen must be hidden
|
// A message with information about a group call not bound to a chat. If the message is incoming, the call isn't active, isn't missed, and has no duration, and getOption("can_accept_calls") is true, then incoming call screen must be shown to the user. Use getGroupCallParticipants to show current group call participants on the screen. Use joinGroupCall to accept the call or declineGroupCallInvitation to decline it. If the call become active or missed, then the call screen must be hidden
|
||||||
type MessageGroupCall struct {
|
type MessageGroupCall struct {
|
||||||
meta
|
meta
|
||||||
// True, if the call is active, i.e. the called user joined the call
|
// True, if the call is active, i.e. the called user joined the call
|
||||||
|
|
@ -28441,6 +28662,8 @@ type MessageGift struct {
|
||||||
Gift *Gift `json:"gift"`
|
Gift *Gift `json:"gift"`
|
||||||
// Sender of the gift
|
// Sender of the gift
|
||||||
SenderId MessageSender `json:"sender_id"`
|
SenderId MessageSender `json:"sender_id"`
|
||||||
|
// Receiver of the gift
|
||||||
|
ReceiverId MessageSender `json:"receiver_id"`
|
||||||
// Unique identifier of the received gift for the current user; only for the receiver of the gift
|
// Unique identifier of the received gift for the current user; only for the receiver of the gift
|
||||||
ReceivedGiftId string `json:"received_gift_id"`
|
ReceivedGiftId string `json:"received_gift_id"`
|
||||||
// Message added to the gift
|
// Message added to the gift
|
||||||
|
|
@ -28489,6 +28712,7 @@ func (messageGift *MessageGift) UnmarshalJSON(data []byte) error {
|
||||||
var tmp struct {
|
var tmp struct {
|
||||||
Gift *Gift `json:"gift"`
|
Gift *Gift `json:"gift"`
|
||||||
SenderId json.RawMessage `json:"sender_id"`
|
SenderId json.RawMessage `json:"sender_id"`
|
||||||
|
ReceiverId json.RawMessage `json:"receiver_id"`
|
||||||
ReceivedGiftId string `json:"received_gift_id"`
|
ReceivedGiftId string `json:"received_gift_id"`
|
||||||
Text *FormattedText `json:"text"`
|
Text *FormattedText `json:"text"`
|
||||||
SellStarCount int64 `json:"sell_star_count"`
|
SellStarCount int64 `json:"sell_star_count"`
|
||||||
|
|
@ -28523,6 +28747,9 @@ func (messageGift *MessageGift) UnmarshalJSON(data []byte) error {
|
||||||
fieldSenderId, _ := UnmarshalMessageSender(tmp.SenderId)
|
fieldSenderId, _ := UnmarshalMessageSender(tmp.SenderId)
|
||||||
messageGift.SenderId = fieldSenderId
|
messageGift.SenderId = fieldSenderId
|
||||||
|
|
||||||
|
fieldReceiverId, _ := UnmarshalMessageSender(tmp.ReceiverId)
|
||||||
|
messageGift.ReceiverId = fieldReceiverId
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -28533,6 +28760,8 @@ type MessageUpgradedGift struct {
|
||||||
Gift *UpgradedGift `json:"gift"`
|
Gift *UpgradedGift `json:"gift"`
|
||||||
// Sender of the gift; may be null for anonymous gifts
|
// Sender of the gift; may be null for anonymous gifts
|
||||||
SenderId MessageSender `json:"sender_id"`
|
SenderId MessageSender `json:"sender_id"`
|
||||||
|
// Receiver of the gift
|
||||||
|
ReceiverId MessageSender `json:"receiver_id"`
|
||||||
// Unique identifier of the received gift for the current user; only for the receiver of the gift
|
// Unique identifier of the received gift for the current user; only for the receiver of the gift
|
||||||
ReceivedGiftId string `json:"received_gift_id"`
|
ReceivedGiftId string `json:"received_gift_id"`
|
||||||
// True, if the gift was obtained by upgrading of a previously received gift; otherwise, this is a transferred or resold gift
|
// True, if the gift was obtained by upgrading of a previously received gift; otherwise, this is a transferred or resold gift
|
||||||
|
|
@ -28579,6 +28808,7 @@ func (messageUpgradedGift *MessageUpgradedGift) UnmarshalJSON(data []byte) error
|
||||||
var tmp struct {
|
var tmp struct {
|
||||||
Gift *UpgradedGift `json:"gift"`
|
Gift *UpgradedGift `json:"gift"`
|
||||||
SenderId json.RawMessage `json:"sender_id"`
|
SenderId json.RawMessage `json:"sender_id"`
|
||||||
|
ReceiverId json.RawMessage `json:"receiver_id"`
|
||||||
ReceivedGiftId string `json:"received_gift_id"`
|
ReceivedGiftId string `json:"received_gift_id"`
|
||||||
IsUpgrade bool `json:"is_upgrade"`
|
IsUpgrade bool `json:"is_upgrade"`
|
||||||
IsSaved bool `json:"is_saved"`
|
IsSaved bool `json:"is_saved"`
|
||||||
|
|
@ -28611,6 +28841,9 @@ func (messageUpgradedGift *MessageUpgradedGift) UnmarshalJSON(data []byte) error
|
||||||
fieldSenderId, _ := UnmarshalMessageSender(tmp.SenderId)
|
fieldSenderId, _ := UnmarshalMessageSender(tmp.SenderId)
|
||||||
messageUpgradedGift.SenderId = fieldSenderId
|
messageUpgradedGift.SenderId = fieldSenderId
|
||||||
|
|
||||||
|
fieldReceiverId, _ := UnmarshalMessageSender(tmp.ReceiverId)
|
||||||
|
messageUpgradedGift.ReceiverId = fieldReceiverId
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -28621,6 +28854,8 @@ type MessageRefundedUpgradedGift struct {
|
||||||
Gift *Gift `json:"gift"`
|
Gift *Gift `json:"gift"`
|
||||||
// Sender of the gift
|
// Sender of the gift
|
||||||
SenderId MessageSender `json:"sender_id"`
|
SenderId MessageSender `json:"sender_id"`
|
||||||
|
// Receiver of the gift
|
||||||
|
ReceiverId MessageSender `json:"receiver_id"`
|
||||||
// True, if the gift was obtained by upgrading of a previously received gift; otherwise, this is a transferred or resold gift
|
// True, if the gift was obtained by upgrading of a previously received gift; otherwise, this is a transferred or resold gift
|
||||||
IsUpgrade bool `json:"is_upgrade"`
|
IsUpgrade bool `json:"is_upgrade"`
|
||||||
}
|
}
|
||||||
|
|
@ -28649,6 +28884,7 @@ func (messageRefundedUpgradedGift *MessageRefundedUpgradedGift) UnmarshalJSON(da
|
||||||
var tmp struct {
|
var tmp struct {
|
||||||
Gift *Gift `json:"gift"`
|
Gift *Gift `json:"gift"`
|
||||||
SenderId json.RawMessage `json:"sender_id"`
|
SenderId json.RawMessage `json:"sender_id"`
|
||||||
|
ReceiverId json.RawMessage `json:"receiver_id"`
|
||||||
IsUpgrade bool `json:"is_upgrade"`
|
IsUpgrade bool `json:"is_upgrade"`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -28663,6 +28899,9 @@ func (messageRefundedUpgradedGift *MessageRefundedUpgradedGift) UnmarshalJSON(da
|
||||||
fieldSenderId, _ := UnmarshalMessageSender(tmp.SenderId)
|
fieldSenderId, _ := UnmarshalMessageSender(tmp.SenderId)
|
||||||
messageRefundedUpgradedGift.SenderId = fieldSenderId
|
messageRefundedUpgradedGift.SenderId = fieldSenderId
|
||||||
|
|
||||||
|
fieldReceiverId, _ := UnmarshalMessageSender(tmp.ReceiverId)
|
||||||
|
messageRefundedUpgradedGift.ReceiverId = fieldReceiverId
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -28722,6 +28961,35 @@ func (*MessagePaidMessagePriceChanged) MessageContentType() string {
|
||||||
return TypeMessagePaidMessagePriceChanged
|
return TypeMessagePaidMessagePriceChanged
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// A price for direct messages was changed in the channel chat
|
||||||
|
type MessageDirectMessagePriceChanged struct {
|
||||||
|
meta
|
||||||
|
// True, if direct messages group was enabled for the channel; false otherwise
|
||||||
|
IsEnabled bool `json:"is_enabled"`
|
||||||
|
// The new number of Telegram Stars that must be paid by non-administrator users of the channel chat for each message sent to the direct messages group; 0 if the direct messages group was disabled or the messages are free
|
||||||
|
PaidMessageStarCount int64 `json:"paid_message_star_count"`
|
||||||
|
}
|
||||||
|
|
||||||
|
func (entity *MessageDirectMessagePriceChanged) MarshalJSON() ([]byte, error) {
|
||||||
|
entity.meta.Type = entity.GetType()
|
||||||
|
|
||||||
|
type stub MessageDirectMessagePriceChanged
|
||||||
|
|
||||||
|
return json.Marshal((*stub)(entity))
|
||||||
|
}
|
||||||
|
|
||||||
|
func (*MessageDirectMessagePriceChanged) GetClass() string {
|
||||||
|
return ClassMessageContent
|
||||||
|
}
|
||||||
|
|
||||||
|
func (*MessageDirectMessagePriceChanged) GetType() string {
|
||||||
|
return TypeMessageDirectMessagePriceChanged
|
||||||
|
}
|
||||||
|
|
||||||
|
func (*MessageDirectMessagePriceChanged) MessageContentType() string {
|
||||||
|
return TypeMessageDirectMessagePriceChanged
|
||||||
|
}
|
||||||
|
|
||||||
// A contact has registered with Telegram
|
// A contact has registered with Telegram
|
||||||
type MessageContactRegistered struct{
|
type MessageContactRegistered struct{
|
||||||
meta
|
meta
|
||||||
|
|
@ -29940,6 +30208,8 @@ func (*MessageSelfDestructTypeImmediately) MessageSelfDestructTypeType() string
|
||||||
// Options to be used when a message is sent
|
// Options to be used when a message is sent
|
||||||
type MessageSendOptions struct {
|
type MessageSendOptions struct {
|
||||||
meta
|
meta
|
||||||
|
// Unique identifier of the topic in a channel direct messages chat administered by the current user; pass 0 if the chat isn't a channel direct messages chat administered by the current user
|
||||||
|
DirectMessagesChatTopicId int64 `json:"direct_messages_chat_topic_id"`
|
||||||
// Pass true to disable notification for the message
|
// Pass true to disable notification for the message
|
||||||
DisableNotification bool `json:"disable_notification"`
|
DisableNotification bool `json:"disable_notification"`
|
||||||
// Pass true if the message is sent from the background
|
// Pass true if the message is sent from the background
|
||||||
|
|
@ -29952,7 +30222,7 @@ type MessageSendOptions struct {
|
||||||
PaidMessageStarCount int64 `json:"paid_message_star_count"`
|
PaidMessageStarCount int64 `json:"paid_message_star_count"`
|
||||||
// Pass true if the user explicitly chosen a sticker or a custom emoji from an installed sticker set; applicable only to sendMessage and sendMessageAlbum
|
// Pass true if the user explicitly chosen a sticker or a custom emoji from an installed sticker set; applicable only to sendMessage and sendMessageAlbum
|
||||||
UpdateOrderOfInstalledStickerSets bool `json:"update_order_of_installed_sticker_sets"`
|
UpdateOrderOfInstalledStickerSets bool `json:"update_order_of_installed_sticker_sets"`
|
||||||
// Message scheduling state; pass null to send message immediately. Messages sent to a secret chat, to a chat with paid messages, live location messages and self-destructing messages can't be scheduled
|
// Message scheduling state; pass null to send message immediately. Messages sent to a secret chat, to a chat with paid messages, to a channel direct messages chat, live location messages and self-destructing messages can't be scheduled
|
||||||
SchedulingState MessageSchedulingState `json:"scheduling_state"`
|
SchedulingState MessageSchedulingState `json:"scheduling_state"`
|
||||||
// Identifier of the effect to apply to the message; pass 0 if none; applicable only to sendMessage and sendMessageAlbum in private chats
|
// Identifier of the effect to apply to the message; pass 0 if none; applicable only to sendMessage and sendMessageAlbum in private chats
|
||||||
EffectId JsonInt64 `json:"effect_id"`
|
EffectId JsonInt64 `json:"effect_id"`
|
||||||
|
|
@ -29980,6 +30250,7 @@ func (*MessageSendOptions) GetType() string {
|
||||||
|
|
||||||
func (messageSendOptions *MessageSendOptions) UnmarshalJSON(data []byte) error {
|
func (messageSendOptions *MessageSendOptions) UnmarshalJSON(data []byte) error {
|
||||||
var tmp struct {
|
var tmp struct {
|
||||||
|
DirectMessagesChatTopicId int64 `json:"direct_messages_chat_topic_id"`
|
||||||
DisableNotification bool `json:"disable_notification"`
|
DisableNotification bool `json:"disable_notification"`
|
||||||
FromBackground bool `json:"from_background"`
|
FromBackground bool `json:"from_background"`
|
||||||
ProtectContent bool `json:"protect_content"`
|
ProtectContent bool `json:"protect_content"`
|
||||||
|
|
@ -29997,6 +30268,7 @@ func (messageSendOptions *MessageSendOptions) UnmarshalJSON(data []byte) error {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
messageSendOptions.DirectMessagesChatTopicId = tmp.DirectMessagesChatTopicId
|
||||||
messageSendOptions.DisableNotification = tmp.DisableNotification
|
messageSendOptions.DisableNotification = tmp.DisableNotification
|
||||||
messageSendOptions.FromBackground = tmp.FromBackground
|
messageSendOptions.FromBackground = tmp.FromBackground
|
||||||
messageSendOptions.ProtectContent = tmp.ProtectContent
|
messageSendOptions.ProtectContent = tmp.ProtectContent
|
||||||
|
|
@ -30016,7 +30288,7 @@ func (messageSendOptions *MessageSendOptions) UnmarshalJSON(data []byte) error {
|
||||||
// Options to be used when a message content is copied without reference to the original sender. Service messages, messages with messageInvoice, messagePaidMedia, messageGiveaway, or messageGiveawayWinners content can't be copied
|
// Options to be used when a message content is copied without reference to the original sender. Service messages, messages with messageInvoice, messagePaidMedia, messageGiveaway, or messageGiveawayWinners content can't be copied
|
||||||
type MessageCopyOptions struct {
|
type MessageCopyOptions struct {
|
||||||
meta
|
meta
|
||||||
// True, if content of the message needs to be copied without reference to the original sender. Always true if the message is forwarded to a secret chat or is local. Use messageProperties.can_be_saved and messageProperties.can_be_copied_to_secret_chat to check whether the message is suitable
|
// True, if content of the message needs to be copied without reference to the original sender. Always true if the message is forwarded to a secret chat or is local. Use messageProperties.can_be_copied and messageProperties.can_be_copied_to_secret_chat to check whether the message is suitable
|
||||||
SendCopy bool `json:"send_copy"`
|
SendCopy bool `json:"send_copy"`
|
||||||
// True, if media caption of the message copy needs to be replaced. Ignored if send_copy is false
|
// True, if media caption of the message copy needs to be replaced. Ignored if send_copy is false
|
||||||
ReplaceCaption bool `json:"replace_caption"`
|
ReplaceCaption bool `json:"replace_caption"`
|
||||||
|
|
@ -30858,12 +31130,12 @@ func (*InputMessageInvoice) InputMessageContentType() string {
|
||||||
return TypeInputMessageInvoice
|
return TypeInputMessageInvoice
|
||||||
}
|
}
|
||||||
|
|
||||||
// A message with a poll. Polls can't be sent to secret chats. Polls can be sent only to a private chat with a bot
|
// A message with a poll. Polls can't be sent to secret chats and channel direct messages chats. Polls can be sent to a private chat only if the chat is a chat with a bot or the Saved Messages chat
|
||||||
type InputMessagePoll struct {
|
type InputMessagePoll struct {
|
||||||
meta
|
meta
|
||||||
// Poll question; 1-255 characters (up to 300 characters for bots). Only custom emoji entities are allowed to be added and only by Premium users
|
// Poll question; 1-255 characters (up to 300 characters for bots). Only custom emoji entities are allowed to be added and only by Premium users
|
||||||
Question *FormattedText `json:"question"`
|
Question *FormattedText `json:"question"`
|
||||||
// List of poll answer options, 2-10 strings 1-100 characters each. Only custom emoji entities are allowed to be added and only by Premium users
|
// List of poll answer options, 2-getOption("poll_answer_count_max") strings 1-100 characters each. Only custom emoji entities are allowed to be added and only by Premium users
|
||||||
Options []*FormattedText `json:"options"`
|
Options []*FormattedText `json:"options"`
|
||||||
// True, if the poll voters are anonymous. Non-anonymous polls can't be sent or forwarded to channels
|
// True, if the poll voters are anonymous. Non-anonymous polls can't be sent or forwarded to channels
|
||||||
IsAnonymous bool `json:"is_anonymous"`
|
IsAnonymous bool `json:"is_anonymous"`
|
||||||
|
|
@ -30995,6 +31267,8 @@ func (*InputMessageForwarded) InputMessageContentType() string {
|
||||||
// Contains properties of a message and describes actions that can be done with the message right now
|
// Contains properties of a message and describes actions that can be done with the message right now
|
||||||
type MessageProperties struct {
|
type MessageProperties struct {
|
||||||
meta
|
meta
|
||||||
|
// True, if content of the message can be copied using inputMessageForwarded or forwardMessages with copy options
|
||||||
|
CanBeCopied bool `json:"can_be_copied"`
|
||||||
// True, if content of the message can be copied to a secret chat using inputMessageForwarded or forwardMessages with copy options
|
// True, if content of the message can be copied to a secret chat using inputMessageForwarded or forwardMessages with copy options
|
||||||
CanBeCopiedToSecretChat bool `json:"can_be_copied_to_secret_chat"`
|
CanBeCopiedToSecretChat bool `json:"can_be_copied_to_secret_chat"`
|
||||||
// True, if the message can be deleted only for the current user while other users will continue to see it using the method deleteMessages with revoke == false
|
// True, if the message can be deleted only for the current user while other users will continue to see it using the method deleteMessages with revoke == false
|
||||||
|
|
@ -31003,7 +31277,7 @@ type MessageProperties struct {
|
||||||
CanBeDeletedForAllUsers bool `json:"can_be_deleted_for_all_users"`
|
CanBeDeletedForAllUsers bool `json:"can_be_deleted_for_all_users"`
|
||||||
// True, if the message can be edited using the methods editMessageText, editMessageCaption, or editMessageReplyMarkup. For live location and poll messages this fields shows whether editMessageLiveLocation or stopPoll can be used with this message
|
// True, if the message can be edited using the methods editMessageText, editMessageCaption, or editMessageReplyMarkup. For live location and poll messages this fields shows whether editMessageLiveLocation or stopPoll can be used with this message
|
||||||
CanBeEdited bool `json:"can_be_edited"`
|
CanBeEdited bool `json:"can_be_edited"`
|
||||||
// True, if the message can be forwarded using inputMessageForwarded or forwardMessages
|
// True, if the message can be forwarded using inputMessageForwarded or forwardMessages without copy options
|
||||||
CanBeForwarded bool `json:"can_be_forwarded"`
|
CanBeForwarded bool `json:"can_be_forwarded"`
|
||||||
// True, if the message can be paid using inputInvoiceMessage
|
// True, if the message can be paid using inputInvoiceMessage
|
||||||
CanBePaid bool `json:"can_be_paid"`
|
CanBePaid bool `json:"can_be_paid"`
|
||||||
|
|
@ -31013,7 +31287,7 @@ type MessageProperties struct {
|
||||||
CanBeReplied bool `json:"can_be_replied"`
|
CanBeReplied bool `json:"can_be_replied"`
|
||||||
// True, if the message can be replied in another chat or forum topic using inputMessageReplyToExternalMessage
|
// True, if the message can be replied in another chat or forum topic using inputMessageReplyToExternalMessage
|
||||||
CanBeRepliedInAnotherChat bool `json:"can_be_replied_in_another_chat"`
|
CanBeRepliedInAnotherChat bool `json:"can_be_replied_in_another_chat"`
|
||||||
// True, if content of the message can be saved locally or copied using inputMessageForwarded or forwardMessages with copy options
|
// True, if content of the message can be saved locally
|
||||||
CanBeSaved bool `json:"can_be_saved"`
|
CanBeSaved bool `json:"can_be_saved"`
|
||||||
// True, if the message can be shared in a story using inputStoryAreaTypeMessage
|
// True, if the message can be shared in a story using inputStoryAreaTypeMessage
|
||||||
CanBeSharedInStory bool `json:"can_be_shared_in_story"`
|
CanBeSharedInStory bool `json:"can_be_shared_in_story"`
|
||||||
|
|
@ -31021,6 +31295,8 @@ type MessageProperties struct {
|
||||||
CanEditMedia bool `json:"can_edit_media"`
|
CanEditMedia bool `json:"can_edit_media"`
|
||||||
// True, if scheduling state of the message can be edited
|
// True, if scheduling state of the message can be edited
|
||||||
CanEditSchedulingState bool `json:"can_edit_scheduling_state"`
|
CanEditSchedulingState bool `json:"can_edit_scheduling_state"`
|
||||||
|
// True, if author of the message sent on behalf of a chat can be received through getMessageAuthor
|
||||||
|
CanGetAuthor bool `json:"can_get_author"`
|
||||||
// True, if code for message embedding can be received using getMessageEmbeddingCode
|
// True, if code for message embedding can be received using getMessageEmbeddingCode
|
||||||
CanGetEmbeddingCode bool `json:"can_get_embedding_code"`
|
CanGetEmbeddingCode bool `json:"can_get_embedding_code"`
|
||||||
// True, if a link can be generated for the message using getMessageLink
|
// True, if a link can be generated for the message using getMessageLink
|
||||||
|
|
@ -34981,7 +35257,7 @@ func (*ResendCodeReasonUserRequest) ResendCodeReasonType() string {
|
||||||
// The code is re-sent, because device verification has failed
|
// The code is re-sent, because device verification has failed
|
||||||
type ResendCodeReasonVerificationFailed struct {
|
type ResendCodeReasonVerificationFailed struct {
|
||||||
meta
|
meta
|
||||||
// Cause of the verification failure, for example, PLAY_SERVICES_NOT_AVAILABLE, APNS_RECEIVE_TIMEOUT, or APNS_INIT_FAILED
|
// Cause of the verification failure, for example, "PLAY_SERVICES_NOT_AVAILABLE", "APNS_RECEIVE_TIMEOUT", or "APNS_INIT_FAILED"
|
||||||
ErrorMessage string `json:"error_message"`
|
ErrorMessage string `json:"error_message"`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -49650,7 +49926,7 @@ func (*InternalLinkTypeGame) InternalLinkTypeType() string {
|
||||||
return TypeInternalLinkTypeGame
|
return TypeInternalLinkTypeGame
|
||||||
}
|
}
|
||||||
|
|
||||||
// The link is a link to a group call that isn't bound to a chat. Call joinGroupCall with the given invite_link
|
// The link is a link to a group call that isn't bound to a chat. Use getGroupCallParticipants to get the list of group call participants and show them on the join group call screen. Call joinGroupCall with the given invite_link to join the call
|
||||||
type InternalLinkTypeGroupCall struct {
|
type InternalLinkTypeGroupCall struct {
|
||||||
meta
|
meta
|
||||||
// Internal representation of the invite link
|
// Internal representation of the invite link
|
||||||
|
|
@ -54541,7 +54817,7 @@ func (*VectorPathCommandLine) VectorPathCommandType() string {
|
||||||
return TypeVectorPathCommandLine
|
return TypeVectorPathCommandLine
|
||||||
}
|
}
|
||||||
|
|
||||||
// A cubic Bézier curve to a given point
|
// A cubic Bézier curve to a given point
|
||||||
type VectorPathCommandCubicBezierCurve struct {
|
type VectorPathCommandCubicBezierCurve struct {
|
||||||
meta
|
meta
|
||||||
// The start control point of the curve
|
// The start control point of the curve
|
||||||
|
|
@ -56538,6 +56814,85 @@ func (*UpdateSavedMessagesTopicCount) UpdateType() string {
|
||||||
return TypeUpdateSavedMessagesTopicCount
|
return TypeUpdateSavedMessagesTopicCount
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Basic information about a topic in a channel direct messages chat administered by the current user has changed. This update is guaranteed to come before the topic identifier is returned to the application
|
||||||
|
type UpdateDirectMessagesChatTopic struct {
|
||||||
|
meta
|
||||||
|
// New data about the topic
|
||||||
|
Topic *DirectMessagesChatTopic `json:"topic"`
|
||||||
|
}
|
||||||
|
|
||||||
|
func (entity *UpdateDirectMessagesChatTopic) MarshalJSON() ([]byte, error) {
|
||||||
|
entity.meta.Type = entity.GetType()
|
||||||
|
|
||||||
|
type stub UpdateDirectMessagesChatTopic
|
||||||
|
|
||||||
|
return json.Marshal((*stub)(entity))
|
||||||
|
}
|
||||||
|
|
||||||
|
func (*UpdateDirectMessagesChatTopic) GetClass() string {
|
||||||
|
return ClassUpdate
|
||||||
|
}
|
||||||
|
|
||||||
|
func (*UpdateDirectMessagesChatTopic) GetType() string {
|
||||||
|
return TypeUpdateDirectMessagesChatTopic
|
||||||
|
}
|
||||||
|
|
||||||
|
func (*UpdateDirectMessagesChatTopic) UpdateType() string {
|
||||||
|
return TypeUpdateDirectMessagesChatTopic
|
||||||
|
}
|
||||||
|
|
||||||
|
// Number of messages in a topic has changed; for Saved Messages and channel direct messages chat topics only
|
||||||
|
type UpdateTopicMessageCount struct {
|
||||||
|
meta
|
||||||
|
// Identifier of the chat in topic of which the number of messages has changed
|
||||||
|
ChatId int64 `json:"chat_id"`
|
||||||
|
// Identifier of the topic
|
||||||
|
TopicId MessageTopic `json:"topic_id"`
|
||||||
|
// Approximate number of messages in the topics
|
||||||
|
MessageCount int32 `json:"message_count"`
|
||||||
|
}
|
||||||
|
|
||||||
|
func (entity *UpdateTopicMessageCount) MarshalJSON() ([]byte, error) {
|
||||||
|
entity.meta.Type = entity.GetType()
|
||||||
|
|
||||||
|
type stub UpdateTopicMessageCount
|
||||||
|
|
||||||
|
return json.Marshal((*stub)(entity))
|
||||||
|
}
|
||||||
|
|
||||||
|
func (*UpdateTopicMessageCount) GetClass() string {
|
||||||
|
return ClassUpdate
|
||||||
|
}
|
||||||
|
|
||||||
|
func (*UpdateTopicMessageCount) GetType() string {
|
||||||
|
return TypeUpdateTopicMessageCount
|
||||||
|
}
|
||||||
|
|
||||||
|
func (*UpdateTopicMessageCount) UpdateType() string {
|
||||||
|
return TypeUpdateTopicMessageCount
|
||||||
|
}
|
||||||
|
|
||||||
|
func (updateTopicMessageCount *UpdateTopicMessageCount) UnmarshalJSON(data []byte) error {
|
||||||
|
var tmp struct {
|
||||||
|
ChatId int64 `json:"chat_id"`
|
||||||
|
TopicId json.RawMessage `json:"topic_id"`
|
||||||
|
MessageCount int32 `json:"message_count"`
|
||||||
|
}
|
||||||
|
|
||||||
|
err := json.Unmarshal(data, &tmp)
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
updateTopicMessageCount.ChatId = tmp.ChatId
|
||||||
|
updateTopicMessageCount.MessageCount = tmp.MessageCount
|
||||||
|
|
||||||
|
fieldTopicId, _ := UnmarshalMessageTopic(tmp.TopicId)
|
||||||
|
updateTopicMessageCount.TopicId = fieldTopicId
|
||||||
|
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
// Basic information about a quick reply shortcut has changed. This update is guaranteed to come before the quick shortcut name is returned to the application
|
// Basic information about a quick reply shortcut has changed. This update is guaranteed to come before the quick shortcut name is returned to the application
|
||||||
type UpdateQuickReplyShortcut struct {
|
type UpdateQuickReplyShortcut struct {
|
||||||
meta
|
meta
|
||||||
|
|
@ -56688,6 +57043,10 @@ type UpdateForumTopic struct {
|
||||||
LastReadInboxMessageId int64 `json:"last_read_inbox_message_id"`
|
LastReadInboxMessageId int64 `json:"last_read_inbox_message_id"`
|
||||||
// Identifier of the last read outgoing message
|
// Identifier of the last read outgoing message
|
||||||
LastReadOutboxMessageId int64 `json:"last_read_outbox_message_id"`
|
LastReadOutboxMessageId int64 `json:"last_read_outbox_message_id"`
|
||||||
|
// Number of unread messages with a mention/reply in the topic
|
||||||
|
UnreadMentionCount int32 `json:"unread_mention_count"`
|
||||||
|
// Number of messages with unread reactions in the topic
|
||||||
|
UnreadReactionCount int32 `json:"unread_reaction_count"`
|
||||||
// Notification settings for the topic
|
// Notification settings for the topic
|
||||||
NotificationSettings *ChatNotificationSettings `json:"notification_settings"`
|
NotificationSettings *ChatNotificationSettings `json:"notification_settings"`
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1599,6 +1599,43 @@ func UnmarshalListOfPaidReactionType(dataList []json.RawMessage) ([]PaidReaction
|
||||||
return list, nil
|
return list, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func UnmarshalMessageTopic(data json.RawMessage) (MessageTopic, error) {
|
||||||
|
var meta meta
|
||||||
|
|
||||||
|
err := json.Unmarshal(data, &meta)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
switch meta.Type {
|
||||||
|
case TypeMessageTopicForum:
|
||||||
|
return UnmarshalMessageTopicForum(data)
|
||||||
|
|
||||||
|
case TypeMessageTopicDirectMessages:
|
||||||
|
return UnmarshalMessageTopicDirectMessages(data)
|
||||||
|
|
||||||
|
case TypeMessageTopicSavedMessages:
|
||||||
|
return UnmarshalMessageTopicSavedMessages(data)
|
||||||
|
|
||||||
|
default:
|
||||||
|
return nil, fmt.Errorf("Error unmarshaling. Unknown type: " + meta.Type)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func UnmarshalListOfMessageTopic(dataList []json.RawMessage) ([]MessageTopic, error) {
|
||||||
|
list := []MessageTopic{}
|
||||||
|
|
||||||
|
for _, data := range dataList {
|
||||||
|
entity, err := UnmarshalMessageTopic(data)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
list = append(list, entity)
|
||||||
|
}
|
||||||
|
|
||||||
|
return list, nil
|
||||||
|
}
|
||||||
|
|
||||||
func UnmarshalMessageEffectType(data json.RawMessage) (MessageEffectType, error) {
|
func UnmarshalMessageEffectType(data json.RawMessage) (MessageEffectType, error) {
|
||||||
var meta meta
|
var meta meta
|
||||||
|
|
||||||
|
|
@ -1756,6 +1793,9 @@ func UnmarshalMessageSource(data json.RawMessage) (MessageSource, error) {
|
||||||
case TypeMessageSourceForumTopicHistory:
|
case TypeMessageSourceForumTopicHistory:
|
||||||
return UnmarshalMessageSourceForumTopicHistory(data)
|
return UnmarshalMessageSourceForumTopicHistory(data)
|
||||||
|
|
||||||
|
case TypeMessageSourceDirectMessagesChatTopicHistory:
|
||||||
|
return UnmarshalMessageSourceDirectMessagesChatTopicHistory(data)
|
||||||
|
|
||||||
case TypeMessageSourceHistoryPreview:
|
case TypeMessageSourceHistoryPreview:
|
||||||
return UnmarshalMessageSourceHistoryPreview(data)
|
return UnmarshalMessageSourceHistoryPreview(data)
|
||||||
|
|
||||||
|
|
@ -3608,6 +3648,9 @@ func UnmarshalMessageContent(data json.RawMessage) (MessageContent, error) {
|
||||||
case TypeMessagePaidMessagePriceChanged:
|
case TypeMessagePaidMessagePriceChanged:
|
||||||
return UnmarshalMessagePaidMessagePriceChanged(data)
|
return UnmarshalMessagePaidMessagePriceChanged(data)
|
||||||
|
|
||||||
|
case TypeMessageDirectMessagePriceChanged:
|
||||||
|
return UnmarshalMessageDirectMessagePriceChanged(data)
|
||||||
|
|
||||||
case TypeMessageContactRegistered:
|
case TypeMessageContactRegistered:
|
||||||
return UnmarshalMessageContactRegistered(data)
|
return UnmarshalMessageContactRegistered(data)
|
||||||
|
|
||||||
|
|
@ -8393,6 +8436,12 @@ func UnmarshalUpdate(data json.RawMessage) (Update, error) {
|
||||||
case TypeUpdateSavedMessagesTopicCount:
|
case TypeUpdateSavedMessagesTopicCount:
|
||||||
return UnmarshalUpdateSavedMessagesTopicCount(data)
|
return UnmarshalUpdateSavedMessagesTopicCount(data)
|
||||||
|
|
||||||
|
case TypeUpdateDirectMessagesChatTopic:
|
||||||
|
return UnmarshalUpdateDirectMessagesChatTopic(data)
|
||||||
|
|
||||||
|
case TypeUpdateTopicMessageCount:
|
||||||
|
return UnmarshalUpdateTopicMessageCount(data)
|
||||||
|
|
||||||
case TypeUpdateQuickReplyShortcut:
|
case TypeUpdateQuickReplyShortcut:
|
||||||
return UnmarshalUpdateQuickReplyShortcut(data)
|
return UnmarshalUpdateQuickReplyShortcut(data)
|
||||||
|
|
||||||
|
|
@ -11484,6 +11533,30 @@ func UnmarshalUnreadReaction(data json.RawMessage) (*UnreadReaction, error) {
|
||||||
return &resp, err
|
return &resp, err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func UnmarshalMessageTopicForum(data json.RawMessage) (*MessageTopicForum, error) {
|
||||||
|
var resp MessageTopicForum
|
||||||
|
|
||||||
|
err := json.Unmarshal(data, &resp)
|
||||||
|
|
||||||
|
return &resp, err
|
||||||
|
}
|
||||||
|
|
||||||
|
func UnmarshalMessageTopicDirectMessages(data json.RawMessage) (*MessageTopicDirectMessages, error) {
|
||||||
|
var resp MessageTopicDirectMessages
|
||||||
|
|
||||||
|
err := json.Unmarshal(data, &resp)
|
||||||
|
|
||||||
|
return &resp, err
|
||||||
|
}
|
||||||
|
|
||||||
|
func UnmarshalMessageTopicSavedMessages(data json.RawMessage) (*MessageTopicSavedMessages, error) {
|
||||||
|
var resp MessageTopicSavedMessages
|
||||||
|
|
||||||
|
err := json.Unmarshal(data, &resp)
|
||||||
|
|
||||||
|
return &resp, err
|
||||||
|
}
|
||||||
|
|
||||||
func UnmarshalMessageEffectTypeEmojiReaction(data json.RawMessage) (*MessageEffectTypeEmojiReaction, error) {
|
func UnmarshalMessageEffectTypeEmojiReaction(data json.RawMessage) (*MessageEffectTypeEmojiReaction, error) {
|
||||||
var resp MessageEffectTypeEmojiReaction
|
var resp MessageEffectTypeEmojiReaction
|
||||||
|
|
||||||
|
|
@ -11692,6 +11765,14 @@ func UnmarshalMessageSourceForumTopicHistory(data json.RawMessage) (*MessageSour
|
||||||
return &resp, err
|
return &resp, err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func UnmarshalMessageSourceDirectMessagesChatTopicHistory(data json.RawMessage) (*MessageSourceDirectMessagesChatTopicHistory, error) {
|
||||||
|
var resp MessageSourceDirectMessagesChatTopicHistory
|
||||||
|
|
||||||
|
err := json.Unmarshal(data, &resp)
|
||||||
|
|
||||||
|
return &resp, err
|
||||||
|
}
|
||||||
|
|
||||||
func UnmarshalMessageSourceHistoryPreview(data json.RawMessage) (*MessageSourceHistoryPreview, error) {
|
func UnmarshalMessageSourceHistoryPreview(data json.RawMessage) (*MessageSourceHistoryPreview, error) {
|
||||||
var resp MessageSourceHistoryPreview
|
var resp MessageSourceHistoryPreview
|
||||||
|
|
||||||
|
|
@ -12572,6 +12653,14 @@ func UnmarshalSavedMessagesTopic(data json.RawMessage) (*SavedMessagesTopic, err
|
||||||
return &resp, err
|
return &resp, err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func UnmarshalDirectMessagesChatTopic(data json.RawMessage) (*DirectMessagesChatTopic, error) {
|
||||||
|
var resp DirectMessagesChatTopic
|
||||||
|
|
||||||
|
err := json.Unmarshal(data, &resp)
|
||||||
|
|
||||||
|
return &resp, err
|
||||||
|
}
|
||||||
|
|
||||||
func UnmarshalForumTopicIcon(data json.RawMessage) (*ForumTopicIcon, error) {
|
func UnmarshalForumTopicIcon(data json.RawMessage) (*ForumTopicIcon, error) {
|
||||||
var resp ForumTopicIcon
|
var resp ForumTopicIcon
|
||||||
|
|
||||||
|
|
@ -14836,6 +14925,14 @@ func UnmarshalMessagePaidMessagePriceChanged(data json.RawMessage) (*MessagePaid
|
||||||
return &resp, err
|
return &resp, err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func UnmarshalMessageDirectMessagePriceChanged(data json.RawMessage) (*MessageDirectMessagePriceChanged, error) {
|
||||||
|
var resp MessageDirectMessagePriceChanged
|
||||||
|
|
||||||
|
err := json.Unmarshal(data, &resp)
|
||||||
|
|
||||||
|
return &resp, err
|
||||||
|
}
|
||||||
|
|
||||||
func UnmarshalMessageContactRegistered(data json.RawMessage) (*MessageContactRegistered, error) {
|
func UnmarshalMessageContactRegistered(data json.RawMessage) (*MessageContactRegistered, error) {
|
||||||
var resp MessageContactRegistered
|
var resp MessageContactRegistered
|
||||||
|
|
||||||
|
|
@ -21948,6 +22045,22 @@ func UnmarshalUpdateSavedMessagesTopicCount(data json.RawMessage) (*UpdateSavedM
|
||||||
return &resp, err
|
return &resp, err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func UnmarshalUpdateDirectMessagesChatTopic(data json.RawMessage) (*UpdateDirectMessagesChatTopic, error) {
|
||||||
|
var resp UpdateDirectMessagesChatTopic
|
||||||
|
|
||||||
|
err := json.Unmarshal(data, &resp)
|
||||||
|
|
||||||
|
return &resp, err
|
||||||
|
}
|
||||||
|
|
||||||
|
func UnmarshalUpdateTopicMessageCount(data json.RawMessage) (*UpdateTopicMessageCount, error) {
|
||||||
|
var resp UpdateTopicMessageCount
|
||||||
|
|
||||||
|
err := json.Unmarshal(data, &resp)
|
||||||
|
|
||||||
|
return &resp, err
|
||||||
|
}
|
||||||
|
|
||||||
func UnmarshalUpdateQuickReplyShortcut(data json.RawMessage) (*UpdateQuickReplyShortcut, error) {
|
func UnmarshalUpdateQuickReplyShortcut(data json.RawMessage) (*UpdateQuickReplyShortcut, error) {
|
||||||
var resp UpdateQuickReplyShortcut
|
var resp UpdateQuickReplyShortcut
|
||||||
|
|
||||||
|
|
@ -23929,6 +24042,15 @@ func UnmarshalType(data json.RawMessage) (Type, error) {
|
||||||
case TypeUnreadReaction:
|
case TypeUnreadReaction:
|
||||||
return UnmarshalUnreadReaction(data)
|
return UnmarshalUnreadReaction(data)
|
||||||
|
|
||||||
|
case TypeMessageTopicForum:
|
||||||
|
return UnmarshalMessageTopicForum(data)
|
||||||
|
|
||||||
|
case TypeMessageTopicDirectMessages:
|
||||||
|
return UnmarshalMessageTopicDirectMessages(data)
|
||||||
|
|
||||||
|
case TypeMessageTopicSavedMessages:
|
||||||
|
return UnmarshalMessageTopicSavedMessages(data)
|
||||||
|
|
||||||
case TypeMessageEffectTypeEmojiReaction:
|
case TypeMessageEffectTypeEmojiReaction:
|
||||||
return UnmarshalMessageEffectTypeEmojiReaction(data)
|
return UnmarshalMessageEffectTypeEmojiReaction(data)
|
||||||
|
|
||||||
|
|
@ -24007,6 +24129,9 @@ func UnmarshalType(data json.RawMessage) (Type, error) {
|
||||||
case TypeMessageSourceForumTopicHistory:
|
case TypeMessageSourceForumTopicHistory:
|
||||||
return UnmarshalMessageSourceForumTopicHistory(data)
|
return UnmarshalMessageSourceForumTopicHistory(data)
|
||||||
|
|
||||||
|
case TypeMessageSourceDirectMessagesChatTopicHistory:
|
||||||
|
return UnmarshalMessageSourceDirectMessagesChatTopicHistory(data)
|
||||||
|
|
||||||
case TypeMessageSourceHistoryPreview:
|
case TypeMessageSourceHistoryPreview:
|
||||||
return UnmarshalMessageSourceHistoryPreview(data)
|
return UnmarshalMessageSourceHistoryPreview(data)
|
||||||
|
|
||||||
|
|
@ -24337,6 +24462,9 @@ func UnmarshalType(data json.RawMessage) (Type, error) {
|
||||||
case TypeSavedMessagesTopic:
|
case TypeSavedMessagesTopic:
|
||||||
return UnmarshalSavedMessagesTopic(data)
|
return UnmarshalSavedMessagesTopic(data)
|
||||||
|
|
||||||
|
case TypeDirectMessagesChatTopic:
|
||||||
|
return UnmarshalDirectMessagesChatTopic(data)
|
||||||
|
|
||||||
case TypeForumTopicIcon:
|
case TypeForumTopicIcon:
|
||||||
return UnmarshalForumTopicIcon(data)
|
return UnmarshalForumTopicIcon(data)
|
||||||
|
|
||||||
|
|
@ -25186,6 +25314,9 @@ func UnmarshalType(data json.RawMessage) (Type, error) {
|
||||||
case TypeMessagePaidMessagePriceChanged:
|
case TypeMessagePaidMessagePriceChanged:
|
||||||
return UnmarshalMessagePaidMessagePriceChanged(data)
|
return UnmarshalMessagePaidMessagePriceChanged(data)
|
||||||
|
|
||||||
|
case TypeMessageDirectMessagePriceChanged:
|
||||||
|
return UnmarshalMessageDirectMessagePriceChanged(data)
|
||||||
|
|
||||||
case TypeMessageContactRegistered:
|
case TypeMessageContactRegistered:
|
||||||
return UnmarshalMessageContactRegistered(data)
|
return UnmarshalMessageContactRegistered(data)
|
||||||
|
|
||||||
|
|
@ -27853,6 +27984,12 @@ func UnmarshalType(data json.RawMessage) (Type, error) {
|
||||||
case TypeUpdateSavedMessagesTopicCount:
|
case TypeUpdateSavedMessagesTopicCount:
|
||||||
return UnmarshalUpdateSavedMessagesTopicCount(data)
|
return UnmarshalUpdateSavedMessagesTopicCount(data)
|
||||||
|
|
||||||
|
case TypeUpdateDirectMessagesChatTopic:
|
||||||
|
return UnmarshalUpdateDirectMessagesChatTopic(data)
|
||||||
|
|
||||||
|
case TypeUpdateTopicMessageCount:
|
||||||
|
return UnmarshalUpdateTopicMessageCount(data)
|
||||||
|
|
||||||
case TypeUpdateQuickReplyShortcut:
|
case TypeUpdateQuickReplyShortcut:
|
||||||
return UnmarshalUpdateQuickReplyShortcut(data)
|
return UnmarshalUpdateQuickReplyShortcut(data)
|
||||||
|
|
||||||
|
|
|
||||||
244
data/td_api.tl
244
data/td_api.tl
|
|
@ -838,9 +838,10 @@ inputChatPhotoSticker sticker:chatPhotoSticker = InputChatPhoto;
|
||||||
chatPermissions can_send_basic_messages:Bool can_send_audios:Bool can_send_documents:Bool can_send_photos:Bool can_send_videos:Bool can_send_video_notes:Bool can_send_voice_notes:Bool can_send_polls:Bool can_send_stickers:Bool can_send_animations:Bool can_send_games:Bool can_use_inline_bots:Bool can_add_link_previews:Bool can_change_info:Bool can_invite_users:Bool can_pin_messages:Bool can_create_topics:Bool = ChatPermissions;
|
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_link_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
|
//@description Describes rights of the administrator
|
||||||
//@can_manage_chat True, if the administrator can access the chat event log, get boost list, see hidden supergroup and channel members, report supergroup spam messages and ignore slow mode. Implied by any other privilege; applicable to supergroups and channels only
|
//@can_manage_chat True, if the administrator can access the chat event log, get boost list, see hidden supergroup and channel members, report supergroup spam messages,
|
||||||
|
//-ignore slow mode, and send messages to the chat without paying Telegram Stars. Implied by any other privilege; applicable to supergroups and channels only
|
||||||
//@can_change_info True, if the administrator can change the chat title, photo, and other settings
|
//@can_change_info True, if the administrator can change the chat title, photo, and other settings
|
||||||
//@can_post_messages True, if the administrator can create channel posts or view channel statistics; applicable to channels only
|
//@can_post_messages True, if the administrator can create channel posts, answer to channel direct messages, or view channel statistics; applicable to channels only
|
||||||
//@can_edit_messages True, if the administrator can edit messages of other users and pin messages; applicable to channels only
|
//@can_edit_messages True, if the administrator can edit messages of other users and pin messages; applicable to channels only
|
||||||
//@can_delete_messages True, if the administrator can delete messages of other users
|
//@can_delete_messages True, if the administrator can delete messages of other users
|
||||||
//@can_invite_users True, if the administrator can invite new users to the chat
|
//@can_invite_users True, if the administrator can invite new users to the chat
|
||||||
|
|
@ -1393,7 +1394,7 @@ starTransactionTypeAffiliateProgramCommission chat_id:int53 commission_per_mille
|
||||||
//@description The transaction is a sending of a paid message; for regular users only @chat_id Identifier of the chat that received the payment @message_count Number of sent paid messages
|
//@description The transaction is a sending of a paid message; for regular users only @chat_id Identifier of the chat that received the payment @message_count Number of sent paid messages
|
||||||
starTransactionTypePaidMessageSend chat_id:int53 message_count:int32 = StarTransactionType;
|
starTransactionTypePaidMessageSend chat_id:int53 message_count:int32 = StarTransactionType;
|
||||||
|
|
||||||
//@description The transaction is a receiving of a paid message; for regular users and supergroup chats only
|
//@description The transaction is a receiving of a paid message; for regular users, supergroup and channel chats only
|
||||||
//@sender_id Identifier of the sender of the message
|
//@sender_id Identifier of the sender of the message
|
||||||
//@message_count Number of received paid messages
|
//@message_count Number of received paid messages
|
||||||
//@commission_per_mille The number of Telegram Stars received by the Telegram for each 1000 Telegram Stars paid for message sending
|
//@commission_per_mille The number of Telegram Stars received by the Telegram for each 1000 Telegram Stars paid for message sending
|
||||||
|
|
@ -1861,13 +1862,17 @@ basicGroupFullInfo photo:chatPhoto description:string creator_user_id:int53 memb
|
||||||
//@is_channel True, if the supergroup is a channel
|
//@is_channel True, if the supergroup is a channel
|
||||||
//@is_broadcast_group True, if the supergroup is a broadcast group, i.e. only administrators can send messages and there is no limit on the number of members
|
//@is_broadcast_group True, if the supergroup is a broadcast group, i.e. only administrators can send messages and there is no limit on the number of members
|
||||||
//@is_forum True, if the supergroup is a forum with topics
|
//@is_forum True, if the supergroup is a forum with topics
|
||||||
|
//@is_direct_messages_group True, if the supergroup is a direct message group for a channel chat
|
||||||
|
//@is_administered_direct_messages_group True, if the supergroup is a direct messages group for a channel chat that is administered by the current user
|
||||||
//@verification_status Information about verification status of the supergroup or channel; may be null if none
|
//@verification_status Information about verification status of the supergroup or channel; may be null if none
|
||||||
|
//@has_direct_messages_group True, if the channel has direct messages group
|
||||||
|
//@has_forum_tabs True, if the supergroup is a forum, which topics are shown in the same way as in channel direct messages groups
|
||||||
//@has_sensitive_content True, if content of media messages in the supergroup or channel chat must be hidden with 18+ spoiler
|
//@has_sensitive_content True, if content of media messages in the supergroup or channel chat must be hidden with 18+ spoiler
|
||||||
//@restriction_reason If non-empty, contains a human-readable description of the reason why access to this supergroup or channel must be restricted
|
//@restriction_reason If non-empty, contains a human-readable description of the reason why access to this supergroup or channel must be restricted
|
||||||
//@paid_message_star_count Number of Telegram Stars that must be paid by non-administrator users of the supergroup chat for each sent message
|
//@paid_message_star_count Number of Telegram Stars that must be paid by non-administrator users of the supergroup chat for each sent message
|
||||||
//@has_active_stories True, if the supergroup or channel has non-expired stories available to the current user
|
//@has_active_stories True, if the supergroup or channel has non-expired stories available to the current user
|
||||||
//@has_unread_active_stories True, if the supergroup or channel has unread non-expired stories available to the current user
|
//@has_unread_active_stories True, if the supergroup or channel has unread non-expired stories available to the current user
|
||||||
supergroup id:int53 access_hash:int64 usernames:usernames date:int32 status:ChatMemberStatus member_count:int32 boost_level:int32 has_automatic_translation:Bool has_linked_chat:Bool has_location:Bool sign_messages:Bool show_message_sender:Bool join_to_send_messages:Bool join_by_request:Bool is_slow_mode_enabled:Bool is_channel:Bool is_broadcast_group:Bool is_forum:Bool verification_status:verificationStatus has_sensitive_content:Bool restriction_reason:string paid_message_star_count:int53 has_active_stories:Bool has_unread_active_stories:Bool = Supergroup;
|
supergroup id:int53 access_hash:int64 usernames:usernames date:int32 status:ChatMemberStatus member_count:int32 boost_level:int32 has_automatic_translation:Bool has_linked_chat:Bool has_location:Bool sign_messages:Bool show_message_sender:Bool join_to_send_messages:Bool join_by_request:Bool is_slow_mode_enabled:Bool is_channel:Bool is_broadcast_group:Bool is_forum:Bool is_direct_messages_group:Bool is_administered_direct_messages_group:Bool verification_status:verificationStatus has_direct_messages_group:Bool has_forum_tabs:Bool has_sensitive_content:Bool restriction_reason:string paid_message_star_count:int53 has_active_stories:Bool has_unread_active_stories:Bool = Supergroup;
|
||||||
|
|
||||||
//@description Contains full information about a supergroup or channel
|
//@description Contains full information about a supergroup or channel
|
||||||
//@photo Chat photo; may be null if empty or unknown. If non-null, then it is the same photo as in chat.photo
|
//@photo Chat photo; may be null if empty or unknown. If non-null, then it is the same photo as in chat.photo
|
||||||
|
|
@ -1877,6 +1882,7 @@ supergroup id:int53 access_hash:int64 usernames:usernames date:int32 status:Chat
|
||||||
//@restricted_count Number of restricted users in the supergroup; 0 if unknown
|
//@restricted_count Number of restricted users in the supergroup; 0 if unknown
|
||||||
//@banned_count Number of users banned from chat; 0 if unknown
|
//@banned_count Number of users banned from chat; 0 if unknown
|
||||||
//@linked_chat_id Chat identifier of a discussion group for the channel, or a channel, for which the supergroup is the designated discussion group; 0 if none or unknown
|
//@linked_chat_id Chat identifier of a discussion group for the channel, or a channel, for which the supergroup is the designated discussion group; 0 if none or unknown
|
||||||
|
//@direct_messages_chat_id Chat identifier of a direct messages group for the channel, or a channel, for which the supergroup is the designated direct messages group; 0 if none
|
||||||
//@slow_mode_delay Delay between consecutive sent messages for non-administrator supergroup members, in seconds
|
//@slow_mode_delay Delay between consecutive sent messages for non-administrator supergroup members, in seconds
|
||||||
//@slow_mode_delay_expires_in Time left before next message can be sent in the supergroup, in seconds. An updateSupergroupFullInfo update is not triggered when value of this field changes, but both new and old values are non-zero
|
//@slow_mode_delay_expires_in Time left before next message can be sent in the supergroup, in seconds. An updateSupergroupFullInfo update is not triggered when value of this field changes, but both new and old values are non-zero
|
||||||
//@can_enable_paid_messages True, if paid messages can be enabled in the supergroup chat; for supergroup only
|
//@can_enable_paid_messages True, if paid messages can be enabled in the supergroup chat; for supergroup only
|
||||||
|
|
@ -1908,7 +1914,7 @@ supergroup id:int53 access_hash:int64 usernames:usernames date:int32 status:Chat
|
||||||
//@bot_verification Information about verification status of the supergroup or the channel provided by a bot; may be null if none or unknown
|
//@bot_verification Information about verification status of the supergroup or the channel provided by a bot; may be null if none or unknown
|
||||||
//@upgraded_from_basic_group_id Identifier of the basic group from which supergroup was upgraded; 0 if none
|
//@upgraded_from_basic_group_id Identifier of the basic group from which supergroup was upgraded; 0 if none
|
||||||
//@upgraded_from_max_message_id Identifier of the last message in the basic group from which supergroup was upgraded; 0 if none
|
//@upgraded_from_max_message_id Identifier of the last message in the basic group from which supergroup was upgraded; 0 if none
|
||||||
supergroupFullInfo photo:chatPhoto description:string member_count:int32 administrator_count:int32 restricted_count:int32 banned_count:int32 linked_chat_id:int53 slow_mode_delay:int32 slow_mode_delay_expires_in:double can_enable_paid_messages:Bool can_enable_paid_reaction:Bool can_get_members:Bool has_hidden_members:Bool can_hide_members:Bool can_set_sticker_set:Bool can_set_location:Bool can_get_statistics:Bool can_get_revenue_statistics:Bool can_get_star_revenue_statistics:Bool can_send_gift:Bool can_toggle_aggressive_anti_spam:Bool is_all_history_available:Bool can_have_sponsored_messages:Bool has_aggressive_anti_spam_enabled:Bool has_paid_media_allowed:Bool has_pinned_stories:Bool gift_count:int32 my_boost_count:int32 unrestrict_boost_count:int32 sticker_set_id:int64 custom_emoji_sticker_set_id:int64 location:chatLocation invite_link:chatInviteLink bot_commands:vector<botCommands> bot_verification:botVerification upgraded_from_basic_group_id:int53 upgraded_from_max_message_id:int53 = SupergroupFullInfo;
|
supergroupFullInfo photo:chatPhoto description:string member_count:int32 administrator_count:int32 restricted_count:int32 banned_count:int32 linked_chat_id:int53 direct_messages_chat_id:int53 slow_mode_delay:int32 slow_mode_delay_expires_in:double can_enable_paid_messages:Bool can_enable_paid_reaction:Bool can_get_members:Bool has_hidden_members:Bool can_hide_members:Bool can_set_sticker_set:Bool can_set_location:Bool can_get_statistics:Bool can_get_revenue_statistics:Bool can_get_star_revenue_statistics:Bool can_send_gift:Bool can_toggle_aggressive_anti_spam:Bool is_all_history_available:Bool can_have_sponsored_messages:Bool has_aggressive_anti_spam_enabled:Bool has_paid_media_allowed:Bool has_pinned_stories:Bool gift_count:int32 my_boost_count:int32 unrestrict_boost_count:int32 sticker_set_id:int64 custom_emoji_sticker_set_id:int64 location:chatLocation invite_link:chatInviteLink bot_commands:vector<botCommands> bot_verification:botVerification upgraded_from_basic_group_id:int53 upgraded_from_max_message_id:int53 = SupergroupFullInfo;
|
||||||
|
|
||||||
|
|
||||||
//@class SecretChatState @description Describes the current secret chat state
|
//@class SecretChatState @description Describes the current secret chat state
|
||||||
|
|
@ -2091,6 +2097,18 @@ messageInteractionInfo view_count:int32 forward_count:int32 reply_info:messageRe
|
||||||
unreadReaction type:ReactionType sender_id:MessageSender is_big:Bool = UnreadReaction;
|
unreadReaction type:ReactionType sender_id:MessageSender is_big:Bool = UnreadReaction;
|
||||||
|
|
||||||
|
|
||||||
|
//@class MessageTopic @description Describes a topic of messages in a chat
|
||||||
|
|
||||||
|
//@description A topic in a forum supergroup chat @forum_topic_id Unique identifier of the forum topic; all messages in a non-forum supergroup chats belongs to the General topic
|
||||||
|
messageTopicForum forum_topic_id:int53 = MessageTopic;
|
||||||
|
|
||||||
|
//@description A topic in a channel direct messages chat administered by the current user @direct_messages_chat_topic_id Unique identifier of the topic
|
||||||
|
messageTopicDirectMessages direct_messages_chat_topic_id:int53 = MessageTopic;
|
||||||
|
|
||||||
|
//@description A topic in Saved Messages chat @saved_messages_topic_id Unique identifier of the Saved Messages topic
|
||||||
|
messageTopicSavedMessages saved_messages_topic_id:int53 = MessageTopic;
|
||||||
|
|
||||||
|
|
||||||
//@class MessageEffectType @description Describes type of emoji effect
|
//@class MessageEffectType @description Describes type of emoji effect
|
||||||
|
|
||||||
//@description An effect from an emoji reaction @select_animation Select animation for the effect in TGS format @effect_animation Effect animation for the effect in TGS format
|
//@description An effect from an emoji reaction @select_animation Select animation for the effect in TGS format @effect_animation Effect animation for the effect in TGS format
|
||||||
|
|
@ -2189,10 +2207,9 @@ factCheck text:formattedText country_code:string = FactCheck;
|
||||||
//@is_outgoing True, if the message is outgoing
|
//@is_outgoing True, if the message is outgoing
|
||||||
//@is_pinned True, if the message is pinned
|
//@is_pinned True, if the message is pinned
|
||||||
//@is_from_offline True, if the message was sent because of a scheduled action by the message sender, for example, as away, or greeting service message
|
//@is_from_offline True, if the message was sent because of a scheduled action by the message sender, for example, as away, or greeting service message
|
||||||
//@can_be_saved True, if content of the message can be saved locally or copied using inputMessageForwarded or forwardMessages with copy options
|
//@can_be_saved True, if content of the message can be saved locally
|
||||||
//@has_timestamped_media True, if media timestamp entities refers to a media in this message as opposed to a media in the replied message
|
//@has_timestamped_media True, if media timestamp entities refers to a media in this message as opposed to a media in the replied message
|
||||||
//@is_channel_post True, if the message is a channel post. All messages to channels are channel posts, all other messages are not channel posts
|
//@is_channel_post True, if the message is a channel post. All messages to channels are channel posts, all other messages are not channel posts
|
||||||
//@is_topic_message True, if the message is a forum topic message
|
|
||||||
//@contains_unread_mention True, if the message contains an unread mention for the current user
|
//@contains_unread_mention True, if the message contains an unread mention for the current user
|
||||||
//@date Point in time (Unix timestamp) when the message was sent; 0 for scheduled messages
|
//@date Point in time (Unix timestamp) when the message was sent; 0 for scheduled messages
|
||||||
//@edit_date Point in time (Unix timestamp) when the message was last edited; 0 for scheduled messages
|
//@edit_date Point in time (Unix timestamp) when the message was last edited; 0 for scheduled messages
|
||||||
|
|
@ -2203,7 +2220,7 @@ factCheck text:formattedText country_code:string = FactCheck;
|
||||||
//@fact_check Information about fact-check added to the message; may be null if none
|
//@fact_check Information about fact-check added to the message; may be null if none
|
||||||
//@reply_to Information about the message or the story this message is replying to; may be null if none
|
//@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
|
//@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_id Identifier of the Saved Messages topic for the message; 0 for messages not from Saved Messages
|
//@topic_id Identifier of the topic within the chat to which the message belongs; may be null if none
|
||||||
//@self_destruct_type The message's self-destruct type; may be null if none
|
//@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
|
//@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
|
//@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
|
||||||
|
|
@ -2218,7 +2235,7 @@ factCheck text:formattedText country_code:string = FactCheck;
|
||||||
//@restriction_reason If non-empty, contains a human-readable description of the reason why access to this message must be restricted
|
//@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
|
//@content Content of the message
|
||||||
//@reply_markup Reply markup for the message; may be null if none
|
//@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 is_from_offline:Bool can_be_saved: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> fact_check:factCheck reply_to:MessageReplyTo message_thread_id:int53 saved_messages_topic_id:int53 self_destruct_type:MessageSelfDestructType self_destruct_in:double auto_delete_in:double via_bot_user_id:int53 sender_business_bot_user_id:int53 sender_boost_count:int32 paid_message_star_count:int53 author_signature:string media_album_id:int64 effect_id:int64 has_sensitive_content:Bool 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 is_from_offline:Bool can_be_saved:Bool has_timestamped_media:Bool is_channel_post:Bool contains_unread_mention:Bool date:int32 edit_date:int32 forward_info:messageForwardInfo import_info:messageImportInfo interaction_info:messageInteractionInfo unread_reactions:vector<unreadReaction> fact_check:factCheck reply_to:MessageReplyTo message_thread_id:int53 topic_id:MessageTopic self_destruct_type:MessageSelfDestructType self_destruct_in:double auto_delete_in:double via_bot_user_id:int53 sender_business_bot_user_id:int53 sender_boost_count:int32 paid_message_star_count:int53 author_signature:string media_album_id:int64 effect_id:int64 has_sensitive_content:Bool 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
|
//@description Contains a list of messages @total_count Approximate total number of messages found @messages List of messages; messages may be null
|
||||||
|
|
@ -2255,12 +2272,15 @@ businessMessages messages:vector<businessMessage> = BusinessMessages;
|
||||||
//@description The message is from a chat history
|
//@description The message is from a chat history
|
||||||
messageSourceChatHistory = MessageSource;
|
messageSourceChatHistory = MessageSource;
|
||||||
|
|
||||||
//@description The message is from a message thread history
|
//@description The message is from history of a message thread
|
||||||
messageSourceMessageThreadHistory = MessageSource;
|
messageSourceMessageThreadHistory = MessageSource;
|
||||||
|
|
||||||
//@description The message is from a forum topic history
|
//@description The message is from history of a forum topic
|
||||||
messageSourceForumTopicHistory = MessageSource;
|
messageSourceForumTopicHistory = MessageSource;
|
||||||
|
|
||||||
|
//@description The message is from history of a topic in a channel direct messages chat administered by the current user
|
||||||
|
messageSourceDirectMessagesChatTopicHistory = MessageSource;
|
||||||
|
|
||||||
//@description The message is from chat, message thread or forum topic history preview
|
//@description The message is from chat, message thread or forum topic history preview
|
||||||
messageSourceHistoryPreview = MessageSource;
|
messageSourceHistoryPreview = MessageSource;
|
||||||
|
|
||||||
|
|
@ -2892,11 +2912,27 @@ savedMessagesTopicTypeSavedFromChat chat_id:int53 = SavedMessagesTopicType;
|
||||||
savedMessagesTopic id:int53 type:SavedMessagesTopicType is_pinned:Bool order:int64 last_message:message draft_message:draftMessage = SavedMessagesTopic;
|
savedMessagesTopic id:int53 type:SavedMessagesTopicType is_pinned:Bool order:int64 last_message:message draft_message:draftMessage = SavedMessagesTopic;
|
||||||
|
|
||||||
|
|
||||||
|
//@description Contains information about a topic in a channel direct messages chat administered by the current user
|
||||||
|
//@chat_id Identifier of the chat to which the topic belongs
|
||||||
|
//@id Unique topic identifier
|
||||||
|
//@sender_id Identifier of the user or chat that sends the messages to the topic
|
||||||
|
//@order A parameter used to determine order of the topic in the topic list. Topics must be sorted by the order in descending order
|
||||||
|
//@is_marked_as_unread True, if the forum topic is marked as unread
|
||||||
|
//@unread_count Number of unread messages in the chat
|
||||||
|
//@last_read_inbox_message_id Identifier of the last read incoming message
|
||||||
|
//@last_read_outbox_message_id Identifier of the last read outgoing message
|
||||||
|
//@unread_reaction_count Number of messages with unread reactions in the chat
|
||||||
|
//@last_message Last message in the topic; may be null if none or unknown
|
||||||
|
//@draft_message A draft of a message in the topic; may be null if none
|
||||||
|
directMessagesChatTopic chat_id:int53 id:int53 sender_id:MessageSender order:int64 is_marked_as_unread:Bool unread_count:int53 last_read_inbox_message_id:int53 last_read_outbox_message_id:int53 unread_reaction_count:int53 last_message:message draft_message:draftMessage = DirectMessagesChatTopic;
|
||||||
|
|
||||||
|
|
||||||
//@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
|
//@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;
|
forumTopicIcon color:int32 custom_emoji_id:int64 = ForumTopicIcon;
|
||||||
|
|
||||||
//@description Contains basic information about a forum topic
|
//@description Contains basic information about a forum topic
|
||||||
//@chat_id Identifier of the forum chat to which the topic belongs
|
//@chat_id Identifier of the forum chat to which the topic belongs
|
||||||
|
//@forum_topic_id Forum topic identifier of the topic
|
||||||
//@message_thread_id Message thread identifier of the topic
|
//@message_thread_id Message thread identifier of the topic
|
||||||
//@name Name of the topic
|
//@name Name of the topic
|
||||||
//@icon Icon of the topic
|
//@icon Icon of the topic
|
||||||
|
|
@ -2906,7 +2942,7 @@ forumTopicIcon color:int32 custom_emoji_id:int64 = ForumTopicIcon;
|
||||||
//@is_outgoing True, if the topic was created by the current user
|
//@is_outgoing True, if the topic was created by the current user
|
||||||
//@is_closed True, if the topic is closed
|
//@is_closed True, if the topic is closed
|
||||||
//@is_hidden True, if the topic is hidden above the topic list and closed; for General topic only
|
//@is_hidden True, if the topic is hidden above the topic list and closed; for General topic only
|
||||||
forumTopicInfo chat_id:int53 message_thread_id:int53 name:string icon:forumTopicIcon creation_date:int32 creator_id:MessageSender is_general:Bool is_outgoing:Bool is_closed:Bool is_hidden:Bool = ForumTopicInfo;
|
forumTopicInfo chat_id:int53 forum_topic_id:int53 message_thread_id:int53 name:string icon:forumTopicIcon creation_date:int32 creator_id:MessageSender is_general:Bool is_outgoing:Bool is_closed:Bool is_hidden:Bool = ForumTopicInfo;
|
||||||
|
|
||||||
//@description Describes a forum topic
|
//@description Describes a forum topic
|
||||||
//@info Basic information about the topic
|
//@info Basic information about the topic
|
||||||
|
|
@ -4030,8 +4066,8 @@ messageInvoice product_info:productInfo currency:string total_amount:int53 start
|
||||||
messageCall is_video:Bool discard_reason:CallDiscardReason duration:int32 = MessageContent;
|
messageCall is_video:Bool discard_reason:CallDiscardReason duration:int32 = MessageContent;
|
||||||
|
|
||||||
//@description A message with information about a group call not bound to a chat. If the message is incoming, the call isn't active, isn't missed, and has no duration,
|
//@description A message with information about a group call not bound to a chat. If the message is incoming, the call isn't active, isn't missed, and has no duration,
|
||||||
//-and getOption("can_accept_calls") is true, then incoming call screen must be shown to the user. Use joinGroupCall to accept the call or declineGroupCallInvitation to decline it.
|
//-and getOption("can_accept_calls") is true, then incoming call screen must be shown to the user. Use getGroupCallParticipants to show current group call participants on the screen.
|
||||||
//-If the call become active or missed, then the call screen must be hidden
|
//-Use joinGroupCall to accept the call or declineGroupCallInvitation to decline it. If the call become active or missed, then the call screen must be hidden
|
||||||
//@is_active True, if the call is active, i.e. the called user joined the call
|
//@is_active True, if the call is active, i.e. the called user joined the call
|
||||||
//@was_missed True, if the called user missed or declined the call
|
//@was_missed True, if the called user missed or declined the call
|
||||||
//@is_video True, if the call is a video call
|
//@is_video True, if the call is a video call
|
||||||
|
|
@ -4244,6 +4280,7 @@ messageGiveawayPrizeStars star_count:int53 transaction_id:string boosted_chat_id
|
||||||
//@description A regular gift was received or sent by the current user, or the current user was notified about a channel gift
|
//@description A regular gift was received or sent by the current user, or the current user was notified about a channel gift
|
||||||
//@gift The gift
|
//@gift The gift
|
||||||
//@sender_id Sender of the gift
|
//@sender_id Sender of the gift
|
||||||
|
//@receiver_id Receiver of the gift
|
||||||
//@received_gift_id Unique identifier of the received gift for the current user; only for the receiver of the gift
|
//@received_gift_id Unique identifier of the received gift for the current user; only for the receiver of the gift
|
||||||
//@text Message added to the gift
|
//@text Message added to the gift
|
||||||
//@sell_star_count Number of Telegram Stars that can be claimed by the receiver instead of the regular gift; 0 if the gift can't be sold by the receiver
|
//@sell_star_count Number of Telegram Stars that can be claimed by the receiver instead of the regular gift; 0 if the gift can't be sold by the receiver
|
||||||
|
|
@ -4255,11 +4292,12 @@ messageGiveawayPrizeStars star_count:int53 transaction_id:string boosted_chat_id
|
||||||
//@was_upgraded True, if the gift was upgraded to a unique gift
|
//@was_upgraded True, if the gift was upgraded to a unique gift
|
||||||
//@was_refunded True, if the gift was refunded and isn't available anymore
|
//@was_refunded True, if the gift was refunded and isn't available anymore
|
||||||
//@upgraded_received_gift_id Identifier of the corresponding upgraded gift; may be empty if unknown. Use getReceivedGift to get information about the gift
|
//@upgraded_received_gift_id Identifier of the corresponding upgraded gift; may be empty if unknown. Use getReceivedGift to get information about the gift
|
||||||
messageGift gift:gift sender_id:MessageSender received_gift_id:string text:formattedText sell_star_count:int53 prepaid_upgrade_star_count:int53 is_private:Bool is_saved:Bool can_be_upgraded:Bool was_converted:Bool was_upgraded:Bool was_refunded:Bool upgraded_received_gift_id:string = MessageContent;
|
messageGift gift:gift sender_id:MessageSender receiver_id:MessageSender received_gift_id:string text:formattedText sell_star_count:int53 prepaid_upgrade_star_count:int53 is_private:Bool is_saved:Bool can_be_upgraded:Bool was_converted:Bool was_upgraded:Bool was_refunded:Bool upgraded_received_gift_id:string = MessageContent;
|
||||||
|
|
||||||
//@description An upgraded gift was received or sent by the current user, or the current user was notified about a channel gift
|
//@description An upgraded gift was received or sent by the current user, or the current user was notified about a channel gift
|
||||||
//@gift The gift
|
//@gift The gift
|
||||||
//@sender_id Sender of the gift; may be null for anonymous gifts
|
//@sender_id Sender of the gift; may be null for anonymous gifts
|
||||||
|
//@receiver_id Receiver of the gift
|
||||||
//@received_gift_id Unique identifier of the received gift for the current user; only for the receiver of the gift
|
//@received_gift_id Unique identifier of the received gift for the current user; only for the receiver of the gift
|
||||||
//@is_upgrade True, if the gift was obtained by upgrading of a previously received gift; otherwise, this is a transferred or resold gift
|
//@is_upgrade True, if the gift was obtained by upgrading of a previously received gift; otherwise, this is a transferred or resold gift
|
||||||
//@is_saved True, if the gift is displayed on the user's or the channel's profile page; only for the receiver of the gift
|
//@is_saved True, if the gift is displayed on the user's or the channel's profile page; only for the receiver of the gift
|
||||||
|
|
@ -4270,13 +4308,14 @@ messageGift gift:gift sender_id:MessageSender received_gift_id:string text:forma
|
||||||
//@next_transfer_date Point in time (Unix timestamp) when the gift can be transferred to another owner; 0 if the gift can be transferred immediately or transfer isn't possible; only for the receiver of the gift
|
//@next_transfer_date Point in time (Unix timestamp) when the gift can be transferred to another owner; 0 if the gift can be transferred immediately or transfer isn't possible; only for the receiver of the gift
|
||||||
//@next_resale_date Point in time (Unix timestamp) when the gift can be resold to another user; 0 if the gift can't be resold; only for the receiver of the gift
|
//@next_resale_date Point in time (Unix timestamp) when the gift can be resold to another user; 0 if the gift can't be resold; only for the receiver of the gift
|
||||||
//@export_date Point in time (Unix timestamp) when the gift can be transferred to the TON blockchain as an NFT; 0 if NFT export isn't possible; only for the receiver of the gift
|
//@export_date Point in time (Unix timestamp) when the gift can be transferred to the TON blockchain as an NFT; 0 if NFT export isn't possible; only for the receiver of the gift
|
||||||
messageUpgradedGift gift:upgradedGift sender_id:MessageSender received_gift_id:string is_upgrade:Bool is_saved:Bool can_be_transferred:Bool was_transferred:Bool last_resale_star_count:int53 transfer_star_count:int53 next_transfer_date:int32 next_resale_date:int32 export_date:int32 = MessageContent;
|
messageUpgradedGift gift:upgradedGift sender_id:MessageSender receiver_id:MessageSender received_gift_id:string is_upgrade:Bool is_saved:Bool can_be_transferred:Bool was_transferred:Bool last_resale_star_count:int53 transfer_star_count:int53 next_transfer_date:int32 next_resale_date:int32 export_date:int32 = MessageContent;
|
||||||
|
|
||||||
//@description A gift which purchase, upgrade or transfer were refunded
|
//@description A gift which purchase, upgrade or transfer were refunded
|
||||||
//@gift The gift
|
//@gift The gift
|
||||||
//@sender_id Sender of the gift
|
//@sender_id Sender of the gift
|
||||||
|
//@receiver_id Receiver of the gift
|
||||||
//@is_upgrade True, if the gift was obtained by upgrading of a previously received gift; otherwise, this is a transferred or resold gift
|
//@is_upgrade True, if the gift was obtained by upgrading of a previously received gift; otherwise, this is a transferred or resold gift
|
||||||
messageRefundedUpgradedGift gift:gift sender_id:MessageSender is_upgrade:Bool = MessageContent;
|
messageRefundedUpgradedGift gift:gift sender_id:MessageSender receiver_id:MessageSender is_upgrade:Bool = MessageContent;
|
||||||
|
|
||||||
//@description Paid messages were refunded @message_count The number of refunded messages @star_count The number of refunded Telegram Stars
|
//@description Paid messages were refunded @message_count The number of refunded messages @star_count The number of refunded Telegram Stars
|
||||||
messagePaidMessagesRefunded message_count:int32 star_count:int53 = MessageContent;
|
messagePaidMessagesRefunded message_count:int32 star_count:int53 = MessageContent;
|
||||||
|
|
@ -4284,6 +4323,12 @@ messagePaidMessagesRefunded message_count:int32 star_count:int53 = MessageConten
|
||||||
//@description A price for paid messages was changed in the supergroup chat @paid_message_star_count The new number of Telegram Stars that must be paid by non-administrator users of the supergroup chat for each sent message
|
//@description A price for paid messages was changed in the supergroup chat @paid_message_star_count The new number of Telegram Stars that must be paid by non-administrator users of the supergroup chat for each sent message
|
||||||
messagePaidMessagePriceChanged paid_message_star_count:int53 = MessageContent;
|
messagePaidMessagePriceChanged paid_message_star_count:int53 = MessageContent;
|
||||||
|
|
||||||
|
//@description A price for direct messages was changed in the channel chat
|
||||||
|
//@is_enabled True, if direct messages group was enabled for the channel; false otherwise
|
||||||
|
//@paid_message_star_count The new number of Telegram Stars that must be paid by non-administrator users of the channel chat for each message sent to the direct messages group;
|
||||||
|
//-0 if the direct messages group was disabled or the messages are free
|
||||||
|
messageDirectMessagePriceChanged is_enabled:Bool paid_message_star_count:int53 = MessageContent;
|
||||||
|
|
||||||
//@description A contact has registered with Telegram
|
//@description A contact has registered with Telegram
|
||||||
messageContactRegistered = MessageContent;
|
messageContactRegistered = MessageContent;
|
||||||
|
|
||||||
|
|
@ -4437,21 +4482,23 @@ messageSelfDestructTypeImmediately = MessageSelfDestructType;
|
||||||
|
|
||||||
|
|
||||||
//@description Options to be used when a message is sent
|
//@description Options to be used when a message is sent
|
||||||
|
//@direct_messages_chat_topic_id Unique identifier of the topic in a channel direct messages chat administered by the current user; pass 0 if the chat isn't a channel direct messages chat administered by the current user
|
||||||
//@disable_notification Pass true to disable notification for the message
|
//@disable_notification Pass true to disable notification for the message
|
||||||
//@from_background Pass true if the message is sent from the background
|
//@from_background Pass true if the message is sent from the background
|
||||||
//@protect_content Pass true if the content of the message must be protected from forwarding and saving; for bots only
|
//@protect_content Pass true if the content of the message must be protected from forwarding and saving; for bots only
|
||||||
//@allow_paid_broadcast Pass true to allow the message to ignore regular broadcast limits for a small fee; for bots only
|
//@allow_paid_broadcast Pass true to allow the message to ignore regular broadcast limits for a small fee; for bots only
|
||||||
//@paid_message_star_count The number of Telegram Stars the user agreed to pay to send the messages
|
//@paid_message_star_count The number of Telegram Stars the user agreed to pay to send the messages
|
||||||
//@update_order_of_installed_sticker_sets Pass true if the user explicitly chosen a sticker or a custom emoji from an installed sticker set; applicable only to sendMessage and sendMessageAlbum
|
//@update_order_of_installed_sticker_sets Pass true if the user explicitly chosen a sticker or a custom emoji from an installed sticker set; applicable only to sendMessage and sendMessageAlbum
|
||||||
//@scheduling_state Message scheduling state; pass null to send message immediately. Messages sent to a secret chat, to a chat with paid messages, live location messages and self-destructing messages can't be scheduled
|
//@scheduling_state Message scheduling state; pass null to send message immediately. Messages sent to a secret chat, to a chat with paid messages, to a channel direct messages chat,
|
||||||
|
//-live location messages and self-destructing messages can't be scheduled
|
||||||
//@effect_id Identifier of the effect to apply to the message; pass 0 if none; applicable only to sendMessage and sendMessageAlbum in private chats
|
//@effect_id Identifier of the effect to apply to the message; pass 0 if none; applicable only to sendMessage and sendMessageAlbum in private chats
|
||||||
//@sending_id Non-persistent identifier, which will be returned back in messageSendingStatePending object and can be used to match sent messages and corresponding updateNewMessage updates
|
//@sending_id Non-persistent identifier, which will be returned back in messageSendingStatePending object and can be used to match sent messages and corresponding updateNewMessage updates
|
||||||
//@only_preview Pass true to get a fake message instead of actually sending them
|
//@only_preview Pass true to get a fake message instead of actually sending them
|
||||||
messageSendOptions disable_notification:Bool from_background:Bool protect_content:Bool allow_paid_broadcast:Bool paid_message_star_count:int53 update_order_of_installed_sticker_sets:Bool scheduling_state:MessageSchedulingState effect_id:int64 sending_id:int32 only_preview:Bool = MessageSendOptions;
|
messageSendOptions direct_messages_chat_topic_id:int53 disable_notification:Bool from_background:Bool protect_content:Bool allow_paid_broadcast:Bool paid_message_star_count:int53 update_order_of_installed_sticker_sets:Bool scheduling_state:MessageSchedulingState effect_id:int64 sending_id:int32 only_preview:Bool = MessageSendOptions;
|
||||||
|
|
||||||
//@description Options to be used when a message content is copied without reference to the original sender. Service messages, messages with messageInvoice, messagePaidMedia, messageGiveaway, or messageGiveawayWinners content can't be copied
|
//@description Options to be used when a message content is copied without reference to the original sender. Service messages, messages with messageInvoice, messagePaidMedia, messageGiveaway, or messageGiveawayWinners content can't be copied
|
||||||
//@send_copy True, if content of the message needs to be copied without reference to the original sender. Always true if the message is forwarded to a secret chat or is local.
|
//@send_copy True, if content of the message needs to be copied without reference to the original sender. Always true if the message is forwarded to a secret chat or is local.
|
||||||
//-Use messageProperties.can_be_saved and messageProperties.can_be_copied_to_secret_chat to check whether the message is suitable
|
//-Use messageProperties.can_be_copied and messageProperties.can_be_copied_to_secret_chat to check whether the message is suitable
|
||||||
//@replace_caption True, if media caption of the message copy needs to be replaced. Ignored if send_copy is false
|
//@replace_caption True, if media caption of the message copy needs to be replaced. Ignored if send_copy is false
|
||||||
//@new_caption New message caption; pass null to copy message without caption. Ignored if replace_caption is false
|
//@new_caption New message caption; pass null to copy message without caption. Ignored if replace_caption is false
|
||||||
//@new_show_caption_above_media True, if new caption must be shown above the media; otherwise, new caption must be shown below the media; not supported in secret chats. Ignored if replace_caption is false
|
//@new_show_caption_above_media True, if new caption must be shown above the media; otherwise, new caption must be shown below the media; not supported in secret chats. Ignored if replace_caption is false
|
||||||
|
|
@ -4590,9 +4637,9 @@ inputMessageGame bot_user_id:int53 game_short_name:string = InputMessageContent;
|
||||||
//@paid_media_caption Paid media caption; pass null to use an empty caption; 0-getOption("message_caption_length_max") characters
|
//@paid_media_caption Paid media caption; pass null to use an empty caption; 0-getOption("message_caption_length_max") characters
|
||||||
inputMessageInvoice invoice:invoice title:string description:string photo_url:string photo_size:int32 photo_width:int32 photo_height:int32 payload:bytes provider_token:string provider_data:string start_parameter:string paid_media:inputPaidMedia paid_media_caption:formattedText = InputMessageContent;
|
inputMessageInvoice invoice:invoice title:string description:string photo_url:string photo_size:int32 photo_width:int32 photo_height:int32 payload:bytes provider_token:string provider_data:string start_parameter:string paid_media:inputPaidMedia paid_media_caption:formattedText = InputMessageContent;
|
||||||
|
|
||||||
//@description A message with a poll. Polls can't be sent to secret chats. Polls can be sent only to a private chat with a bot
|
//@description A message with a poll. Polls can't be sent to secret chats and channel direct messages chats. Polls can be sent to a private chat only if the chat is a chat with a bot or the Saved Messages chat
|
||||||
//@question Poll question; 1-255 characters (up to 300 characters for bots). Only custom emoji entities are allowed to be added and only by Premium users
|
//@question Poll question; 1-255 characters (up to 300 characters for bots). Only custom emoji entities are allowed to be added and only by Premium users
|
||||||
//@options List of poll answer options, 2-10 strings 1-100 characters each. Only custom emoji entities are allowed to be added and only by Premium users
|
//@options List of poll answer options, 2-getOption("poll_answer_count_max") strings 1-100 characters each. Only custom emoji entities are allowed to be added and only by Premium users
|
||||||
//@is_anonymous True, if the poll voters are anonymous. Non-anonymous polls can't be sent or forwarded to channels
|
//@is_anonymous True, if the poll voters are anonymous. Non-anonymous polls can't be sent or forwarded to channels
|
||||||
//@type Type of the poll
|
//@type Type of the poll
|
||||||
//@open_period Amount of time the poll will be active after creation, in seconds; for bots only
|
//@open_period Amount of time the poll will be active after creation, in seconds; for bots only
|
||||||
|
|
@ -4616,20 +4663,22 @@ inputMessageForwarded from_chat_id:int53 message_id:int53 in_game_share:Bool rep
|
||||||
|
|
||||||
|
|
||||||
//@description Contains properties of a message and describes actions that can be done with the message right now
|
//@description Contains properties of a message and describes actions that can be done with the message right now
|
||||||
|
//@can_be_copied True, if content of the message can be copied using inputMessageForwarded or forwardMessages with copy options
|
||||||
//@can_be_copied_to_secret_chat True, if content of the message can be copied to a secret chat using inputMessageForwarded or forwardMessages with copy options
|
//@can_be_copied_to_secret_chat True, if content of the message can be copied to a secret chat using inputMessageForwarded or forwardMessages with copy options
|
||||||
//@can_be_deleted_only_for_self True, if the message can be deleted only for the current user while other users will continue to see it using the method deleteMessages with revoke == false
|
//@can_be_deleted_only_for_self True, if the message can be deleted only for the current user while other users will continue to see it using the method deleteMessages with revoke == false
|
||||||
//@can_be_deleted_for_all_users True, if the message can be deleted for all users using the method deleteMessages with revoke == true
|
//@can_be_deleted_for_all_users True, if the message can be deleted for all users using the method deleteMessages with revoke == true
|
||||||
//@can_be_edited True, if the message can be edited using the methods editMessageText, editMessageCaption, or editMessageReplyMarkup.
|
//@can_be_edited True, if the message can be edited using the methods editMessageText, editMessageCaption, or editMessageReplyMarkup.
|
||||||
//-For live location and poll messages this fields shows whether editMessageLiveLocation or stopPoll can be used with this message
|
//-For live location and poll messages this fields shows whether editMessageLiveLocation or stopPoll can be used with this message
|
||||||
//@can_be_forwarded True, if the message can be forwarded using inputMessageForwarded or forwardMessages
|
//@can_be_forwarded True, if the message can be forwarded using inputMessageForwarded or forwardMessages without copy options
|
||||||
//@can_be_paid True, if the message can be paid using inputInvoiceMessage
|
//@can_be_paid True, if the message can be paid using inputInvoiceMessage
|
||||||
//@can_be_pinned True, if the message can be pinned or unpinned in the chat using pinChatMessage or unpinChatMessage
|
//@can_be_pinned True, if the message can be pinned or unpinned in the chat using pinChatMessage or unpinChatMessage
|
||||||
//@can_be_replied True, if the message can be replied in the same chat and forum topic using inputMessageReplyToMessage
|
//@can_be_replied True, if the message can be replied in the same chat and forum topic using inputMessageReplyToMessage
|
||||||
//@can_be_replied_in_another_chat True, if the message can be replied in another chat or forum topic using inputMessageReplyToExternalMessage
|
//@can_be_replied_in_another_chat True, if the message can be replied in another chat or forum topic using inputMessageReplyToExternalMessage
|
||||||
//@can_be_saved True, if content of the message can be saved locally or copied using inputMessageForwarded or forwardMessages with copy options
|
//@can_be_saved True, if content of the message can be saved locally
|
||||||
//@can_be_shared_in_story True, if the message can be shared in a story using inputStoryAreaTypeMessage
|
//@can_be_shared_in_story True, if the message can be shared in a story using inputStoryAreaTypeMessage
|
||||||
//@can_edit_media True, if the message can be edited using the method editMessageMedia
|
//@can_edit_media True, if the message can be edited using the method editMessageMedia
|
||||||
//@can_edit_scheduling_state True, if scheduling state of the message can be edited
|
//@can_edit_scheduling_state True, if scheduling state of the message can be edited
|
||||||
|
//@can_get_author True, if author of the message sent on behalf of a chat can be received through getMessageAuthor
|
||||||
//@can_get_embedding_code True, if code for message embedding can be received using getMessageEmbeddingCode
|
//@can_get_embedding_code True, if code for message embedding can be received using getMessageEmbeddingCode
|
||||||
//@can_get_link True, if a link can be generated for the message using getMessageLink
|
//@can_get_link True, if a link can be generated for the message using getMessageLink
|
||||||
//@can_get_media_timestamp_links True, if media timestamp links can be generated for media timestamp entities in the message text, caption or link preview description using getMessageLink
|
//@can_get_media_timestamp_links True, if media timestamp links can be generated for media timestamp entities in the message text, caption or link preview description using getMessageLink
|
||||||
|
|
@ -4643,7 +4692,7 @@ inputMessageForwarded from_chat_id:int53 message_id:int53 in_game_share:Bool rep
|
||||||
//@can_report_supergroup_spam True, if the message can be reported using reportSupergroupSpam
|
//@can_report_supergroup_spam True, if the message can be reported using reportSupergroupSpam
|
||||||
//@can_set_fact_check True, if fact check for the message can be changed through setMessageFactCheck
|
//@can_set_fact_check True, if fact check for the message can be changed through setMessageFactCheck
|
||||||
//@need_show_statistics True, if message statistics must be available from context menu of the message
|
//@need_show_statistics True, if message statistics must be available from context menu of the message
|
||||||
messageProperties can_be_copied_to_secret_chat:Bool can_be_deleted_only_for_self:Bool can_be_deleted_for_all_users:Bool can_be_edited:Bool can_be_forwarded:Bool can_be_paid:Bool can_be_pinned:Bool can_be_replied:Bool can_be_replied_in_another_chat:Bool can_be_saved:Bool can_be_shared_in_story:Bool can_edit_media:Bool can_edit_scheduling_state:Bool can_get_embedding_code:Bool can_get_link:Bool can_get_media_timestamp_links:Bool can_get_message_thread:Bool can_get_read_date:Bool can_get_statistics:Bool can_get_viewers:Bool can_recognize_speech:Bool can_report_chat:Bool can_report_reactions:Bool can_report_supergroup_spam:Bool can_set_fact_check:Bool need_show_statistics:Bool = MessageProperties;
|
messageProperties can_be_copied:Bool can_be_copied_to_secret_chat:Bool can_be_deleted_only_for_self:Bool can_be_deleted_for_all_users:Bool can_be_edited:Bool can_be_forwarded:Bool can_be_paid:Bool can_be_pinned:Bool can_be_replied:Bool can_be_replied_in_another_chat:Bool can_be_saved:Bool can_be_shared_in_story:Bool can_edit_media:Bool can_edit_scheduling_state:Bool can_get_author:Bool can_get_embedding_code:Bool can_get_link:Bool can_get_media_timestamp_links:Bool can_get_message_thread:Bool can_get_read_date:Bool can_get_statistics:Bool can_get_viewers:Bool can_recognize_speech:Bool can_report_chat:Bool can_report_reactions:Bool can_report_supergroup_spam:Bool can_set_fact_check:Bool need_show_statistics:Bool = MessageProperties;
|
||||||
|
|
||||||
|
|
||||||
//@class SearchMessagesFilter @description Represents a filter for message search results
|
//@class SearchMessagesFilter @description Represents a filter for message search results
|
||||||
|
|
@ -5291,7 +5340,7 @@ chatBoostSlots slots:vector<chatBoostSlot> = ChatBoostSlots;
|
||||||
resendCodeReasonUserRequest = ResendCodeReason;
|
resendCodeReasonUserRequest = ResendCodeReason;
|
||||||
|
|
||||||
//@description The code is re-sent, because device verification has failed
|
//@description The code is re-sent, because device verification has failed
|
||||||
//@error_message Cause of the verification failure, for example, PLAY_SERVICES_NOT_AVAILABLE, APNS_RECEIVE_TIMEOUT, or APNS_INIT_FAILED
|
//@error_message Cause of the verification failure, for example, "PLAY_SERVICES_NOT_AVAILABLE", "APNS_RECEIVE_TIMEOUT", or "APNS_INIT_FAILED"
|
||||||
resendCodeReasonVerificationFailed error_message:string = ResendCodeReason;
|
resendCodeReasonVerificationFailed error_message:string = ResendCodeReason;
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -7478,7 +7527,9 @@ internalLinkTypeEditProfileSettings = InternalLinkType;
|
||||||
//@game_short_name Short name of the game
|
//@game_short_name Short name of the game
|
||||||
internalLinkTypeGame bot_username:string game_short_name:string = InternalLinkType;
|
internalLinkTypeGame bot_username:string game_short_name:string = InternalLinkType;
|
||||||
|
|
||||||
//@description The link is a link to a group call that isn't bound to a chat. Call joinGroupCall with the given invite_link @invite_link Internal representation of the invite link
|
//@description The link is a link to a group call that isn't bound to a chat. Use getGroupCallParticipants to get the list of group call participants and show them on the join group call screen.
|
||||||
|
//-Call joinGroupCall with the given invite_link to join the call
|
||||||
|
//@invite_link Internal representation of the invite link
|
||||||
internalLinkTypeGroupCall invite_link:string = InternalLinkType;
|
internalLinkTypeGroupCall invite_link:string = InternalLinkType;
|
||||||
|
|
||||||
//@description The link must be opened in an Instant View. Call getWebPageInstantView with the given URL to process the link.
|
//@description The link must be opened in an Instant View. Call getWebPageInstantView with the given URL to process the link.
|
||||||
|
|
@ -8247,7 +8298,7 @@ point x:double y:double = Point;
|
||||||
//@description A straight line to a given point @end_point The end point of the straight line
|
//@description A straight line to a given point @end_point The end point of the straight line
|
||||||
vectorPathCommandLine end_point:point = VectorPathCommand;
|
vectorPathCommandLine end_point:point = VectorPathCommand;
|
||||||
|
|
||||||
//@description A cubic Bézier curve to a given point @start_control_point The start control point of the curve @end_control_point The end control point of the curve @end_point The end point of the curve
|
//@description A cubic Bézier curve to a given point @start_control_point The start control point of the curve @end_control_point The end control point of the curve @end_point The end point of the curve
|
||||||
vectorPathCommandCubicBezierCurve start_control_point:point end_control_point:point end_point:point = VectorPathCommand;
|
vectorPathCommandCubicBezierCurve start_control_point:point end_control_point:point end_point:point = VectorPathCommand;
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -8494,6 +8545,16 @@ updateSavedMessagesTopic topic:savedMessagesTopic = Update;
|
||||||
//@description Number of Saved Messages topics has changed @topic_count Approximate total number of Saved Messages topics
|
//@description Number of Saved Messages topics has changed @topic_count Approximate total number of Saved Messages topics
|
||||||
updateSavedMessagesTopicCount topic_count:int32 = Update;
|
updateSavedMessagesTopicCount topic_count:int32 = Update;
|
||||||
|
|
||||||
|
//@description Basic information about a topic in a channel direct messages chat administered by the current user has changed. This update is guaranteed to come before the topic identifier is returned to the application
|
||||||
|
//@topic New data about the topic
|
||||||
|
updateDirectMessagesChatTopic topic:directMessagesChatTopic = Update;
|
||||||
|
|
||||||
|
//@description Number of messages in a topic has changed; for Saved Messages and channel direct messages chat topics only
|
||||||
|
//@chat_id Identifier of the chat in topic of which the number of messages has changed
|
||||||
|
//@topic_id Identifier of the topic
|
||||||
|
//@message_count Approximate number of messages in the topics
|
||||||
|
updateTopicMessageCount chat_id:int53 topic_id:MessageTopic message_count:int32 = Update;
|
||||||
|
|
||||||
//@description Basic information about a quick reply shortcut has changed. This update is guaranteed to come before the quick shortcut name is returned to the application
|
//@description Basic information about a quick reply shortcut has changed. This update is guaranteed to come before the quick shortcut name is returned to the application
|
||||||
//@shortcut New data about the shortcut
|
//@shortcut New data about the shortcut
|
||||||
updateQuickReplyShortcut shortcut:quickReplyShortcut = Update;
|
updateQuickReplyShortcut shortcut:quickReplyShortcut = Update;
|
||||||
|
|
@ -8518,8 +8579,10 @@ updateForumTopicInfo info:forumTopicInfo = Update;
|
||||||
//@is_pinned True, if the topic is pinned in the topic list
|
//@is_pinned True, if the topic is pinned in the topic list
|
||||||
//@last_read_inbox_message_id Identifier of the last read incoming message
|
//@last_read_inbox_message_id Identifier of the last read incoming message
|
||||||
//@last_read_outbox_message_id Identifier of the last read outgoing message
|
//@last_read_outbox_message_id Identifier of the last read outgoing message
|
||||||
|
//@unread_mention_count Number of unread messages with a mention/reply in the topic
|
||||||
|
//@unread_reaction_count Number of messages with unread reactions in the topic
|
||||||
//@notification_settings Notification settings for the topic
|
//@notification_settings Notification settings for the topic
|
||||||
updateForumTopic chat_id:int53 message_thread_id:int53 is_pinned:Bool last_read_inbox_message_id:int53 last_read_outbox_message_id:int53 notification_settings:chatNotificationSettings = Update;
|
updateForumTopic chat_id:int53 message_thread_id:int53 is_pinned:Bool last_read_inbox_message_id:int53 last_read_outbox_message_id:int53 unread_mention_count:int32 unread_reaction_count:int32 notification_settings:chatNotificationSettings = Update;
|
||||||
|
|
||||||
//@description Notification settings for some type of chats were updated @scope Types of chats for which notification settings were updated @notification_settings The new notification settings
|
//@description Notification settings for some type of chats were updated @scope Types of chats for which notification settings were updated @notification_settings The new notification settings
|
||||||
updateScopeNotificationSettings scope:NotificationSettingsScope notification_settings:scopeNotificationSettings = Update;
|
updateScopeNotificationSettings scope:NotificationSettingsScope notification_settings:scopeNotificationSettings = Update;
|
||||||
|
|
@ -9282,6 +9345,11 @@ getMessageReadDate chat_id:int53 message_id:int53 = MessageReadDate;
|
||||||
//@message_id Identifier of the message
|
//@message_id Identifier of the message
|
||||||
getMessageViewers chat_id:int53 message_id:int53 = MessageViewers;
|
getMessageViewers chat_id:int53 message_id:int53 = MessageViewers;
|
||||||
|
|
||||||
|
//@description Returns information about actual author of a message sent on behalf of a channel. The method can be called if messageProperties.can_get_author == true
|
||||||
|
//@chat_id Chat identifier
|
||||||
|
//@message_id Identifier of the message
|
||||||
|
getMessageAuthor chat_id:int53 message_id:int53 = User;
|
||||||
|
|
||||||
//@description Returns information about a file. This is an offline method @file_id Identifier of the file to get
|
//@description Returns information about a file. This is an offline method @file_id Identifier of the file to get
|
||||||
getFile file_id:int32 = File;
|
getFile file_id:int32 = File;
|
||||||
|
|
||||||
|
|
@ -9382,13 +9450,74 @@ checkCreatedPublicChatsLimit type:PublicChatType = Ok;
|
||||||
//-To set a returned supergroup as a discussion group, access to its old messages must be enabled using toggleSupergroupIsAllHistoryAvailable first
|
//-To set a returned supergroup as a discussion group, access to its old messages must be enabled using toggleSupergroupIsAllHistoryAvailable first
|
||||||
getSuitableDiscussionChats = Chats;
|
getSuitableDiscussionChats = Chats;
|
||||||
|
|
||||||
//@description Returns a list of recently inactive supergroups and channels. Can be used when user reaches limit on the number of joined supergroups and channels and receives CHANNELS_TOO_MUCH error. Also, the limit can be increased with Telegram Premium
|
//@description Returns a list of recently inactive supergroups and channels. Can be used when user reaches limit on the number of joined supergroups and channels and receives the error "CHANNELS_TOO_MUCH". Also, the limit can be increased with Telegram Premium
|
||||||
getInactiveSupergroupChats = Chats;
|
getInactiveSupergroupChats = Chats;
|
||||||
|
|
||||||
//@description Returns a list of channel chats, which can be used as a personal chat
|
//@description Returns a list of channel chats, which can be used as a personal chat
|
||||||
getSuitablePersonalChats = Chats;
|
getSuitablePersonalChats = Chats;
|
||||||
|
|
||||||
|
|
||||||
|
//@description Loads more topics in a channel direct messages chat administered by the current user. The loaded topics will be sent through updateDirectMessagesChatTopic.
|
||||||
|
//-Topics are sorted by their topic.order in descending order. Returns a 404 error if all topics have been loaded
|
||||||
|
//@chat_id Chat identifier of the channel direct messages chat
|
||||||
|
//@limit The maximum number of topics to be loaded. For optimal performance, the number of loaded topics is chosen by TDLib and can be smaller than the specified limit, even if the end of the list is not reached
|
||||||
|
loadDirectMessagesChatTopics chat_id:int53 limit:int32 = Ok;
|
||||||
|
|
||||||
|
//@description Returns information about the topic in a channel direct messages chat administered by the current user
|
||||||
|
//@chat_id Chat identifier of the channel direct messages chat
|
||||||
|
//@topic_id Identifier of the topic to get
|
||||||
|
getDirectMessagesChatTopic chat_id:int53 topic_id:int53 = DirectMessagesChatTopic;
|
||||||
|
|
||||||
|
//@description Returns messages in the topic in a channel direct messages chat administered by the current user. The messages are returned in reverse chronological order (i.e., in order of decreasing message_id)
|
||||||
|
//@chat_id Chat identifier of the channel direct messages chat
|
||||||
|
//@topic_id Identifier of the 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
|
||||||
|
getDirectMessagesChatTopicHistory chat_id:int53 topic_id:int53 from_message_id:int53 offset:int32 limit:int32 = Messages;
|
||||||
|
|
||||||
|
//@description Returns the last message sent in the topic in a channel direct messages chat administered by the current user no later than the specified date
|
||||||
|
//@chat_id Chat identifier of the channel direct messages chat
|
||||||
|
//@topic_id Identifier of the topic which messages will be fetched
|
||||||
|
//@date Point in time (Unix timestamp) relative to which to search for messages
|
||||||
|
getDirectMessagesChatTopicMessageByDate chat_id:int53 topic_id:int53 date:int32 = Message;
|
||||||
|
|
||||||
|
//@description Deletes all messages in the topic in a channel direct messages chat administered by the current user
|
||||||
|
//@chat_id Chat identifier of the channel direct messages chat
|
||||||
|
//@topic_id Identifier of the topic which messages will be deleted
|
||||||
|
deleteDirectMessagesChatTopicHistory chat_id:int53 topic_id:int53 = Ok;
|
||||||
|
|
||||||
|
//@description Deletes all messages between the specified dates in the topic in a channel direct messages chat administered by the current user. Messages sent in the last 30 seconds will not be deleted
|
||||||
|
//@chat_id Chat identifier of the channel direct messages chat
|
||||||
|
//@topic_id Identifier of the 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
|
||||||
|
deleteDirectMessagesChatTopicMessagesByDate chat_id:int53 topic_id:int53 min_date:int32 max_date:int32 = Ok;
|
||||||
|
|
||||||
|
//@description Changes the marked as unread state of the topic in a channel direct messages chat administered by the current user
|
||||||
|
//@chat_id Chat identifier of the channel direct messages chat
|
||||||
|
//@topic_id Topic identifier
|
||||||
|
//@is_marked_as_unread New value of is_marked_as_unread
|
||||||
|
setDirectMessagesChatTopicIsMarkedAsUnread chat_id:int53 topic_id:int53 is_marked_as_unread:Bool = Ok;
|
||||||
|
|
||||||
|
//@description Changes the draft message in the topic in a channel direct messages chat administered by the current user
|
||||||
|
//@chat_id Chat identifier
|
||||||
|
//@topic_id Topic identifier
|
||||||
|
//@draft_message New draft message; pass null to remove the draft. All files in draft message content must be of the type inputFileLocal. Media thumbnails and captions are ignored
|
||||||
|
setDirectMessagesChatTopicDraftMessage chat_id:int53 topic_id:int53 draft_message:draftMessage = Ok;
|
||||||
|
|
||||||
|
//@description Removes all pinned messages from the topic in a channel direct messages chat administered by the current user
|
||||||
|
//@chat_id Identifier of the chat
|
||||||
|
//@topic_id Topic identifier
|
||||||
|
unpinAllDirectMessagesChatTopicMessages chat_id:int53 topic_id:int53 = Ok;
|
||||||
|
|
||||||
|
//@description Removes all unread reactions in the topic in a channel direct messages chat administered by the current user
|
||||||
|
//@chat_id Identifier of the chat
|
||||||
|
//@topic_id Topic identifier
|
||||||
|
readAllDirectMessagesChatTopicReactions chat_id:int53 topic_id:int53 = Ok;
|
||||||
|
|
||||||
|
|
||||||
//@description Loads more Saved Messages topics. The loaded topics will be sent through updateSavedMessagesTopic. Topics are sorted by their topic.order in descending order. Returns a 404 error if all topics have been loaded
|
//@description Loads more Saved Messages topics. The loaded topics will be sent through updateSavedMessagesTopic. Topics are sorted by their topic.order in descending order. Returns a 404 error if all topics have been loaded
|
||||||
//@limit The maximum number of topics to be loaded. For optimal performance, the number of loaded topics is chosen by TDLib and can be smaller than the specified limit, even if the end of the list is not reached
|
//@limit The maximum number of topics to be loaded. For optimal performance, the number of loaded topics is chosen by TDLib and can be smaller than the specified limit, even if the end of the list is not reached
|
||||||
loadSavedMessagesTopics limit:int32 = Ok;
|
loadSavedMessagesTopics limit:int32 = Ok;
|
||||||
|
|
@ -9464,8 +9593,9 @@ deleteChat chat_id:int53 = Ok;
|
||||||
|
|
||||||
//@description Searches for messages with given words in the chat. Returns the results in reverse chronological order, i.e. in order of decreasing message_id. Cannot be used in secret chats with a non-empty query
|
//@description Searches for messages with given words in the chat. Returns the results in reverse chronological order, i.e. in order of decreasing message_id. Cannot be used in secret chats with a non-empty query
|
||||||
//-(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.
|
//-(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
|
//-A combination of query, sender_id, filter and topic_id search criteria is expected to be supported, only if it is required for Telegram official application implementation
|
||||||
//@chat_id Identifier of the chat in which to search messages
|
//@chat_id Identifier of the chat in which to search messages
|
||||||
|
//@topic_id Pass topic identifier to search messages only in specific topic; pass null to search for messages in all topics
|
||||||
//@query Query to search for
|
//@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
|
//@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
|
//@from_message_id Identifier of the message starting from which history must be fetched; use 0 to get results from the last message
|
||||||
|
|
@ -9473,9 +9603,7 @@ deleteChat chat_id:int53 = Ok;
|
||||||
//@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.
|
//@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
|
//-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
|
//@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 topic_id:MessageTopic query:string sender_id:MessageSender from_message_id:int53 offset:int32 limit:int32 filter:SearchMessagesFilter = FoundChatMessages;
|
||||||
//@saved_messages_topic_id If not 0, only messages in the specified Saved Messages topic will be returned; pass 0 to return all messages, or for chats other than Saved Messages
|
|
||||||
searchChatMessages chat_id:int53 query:string sender_id:MessageSender from_message_id:int53 offset:int32 limit:int32 filter:SearchMessagesFilter message_thread_id:int53 saved_messages_topic_id:int53 = FoundChatMessages;
|
|
||||||
|
|
||||||
//@description Searches for messages in all chats except secret chats. Returns the results in reverse chronological order (i.e., in order of decreasing (date, chat_id, message_id)).
|
//@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
|
//-For optimal performance, the number of returned messages is chosen by TDLib and can be smaller than the specified limit
|
||||||
|
|
@ -9577,25 +9705,24 @@ getChatSparseMessagePositions chat_id:int53 filter:SearchMessagesFilter from_mes
|
||||||
|
|
||||||
//@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"
|
//@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
|
//@chat_id Identifier of the chat in which to return information about messages
|
||||||
|
//@topic_id Pass topic identifier to get the result only in specific topic; pass null to get the result in all topics; forum topics aren't supported
|
||||||
//@filter Filter for message content. Filters searchMessagesFilterEmpty, searchMessagesFilterMention, searchMessagesFilterUnreadMention, and searchMessagesFilterUnreadReaction are unsupported in this function
|
//@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
|
//@from_message_id The message identifier from which to return information about messages; use 0 to get results from the last message
|
||||||
//@saved_messages_topic_id If not0, only messages in the specified Saved Messages topic will be considered; pass 0 to consider all messages, or for chats other than Saved Messages
|
getChatMessageCalendar chat_id:int53 topic_id:MessageTopic filter:SearchMessagesFilter from_message_id:int53 = MessageCalendar;
|
||||||
getChatMessageCalendar chat_id:int53 filter:SearchMessagesFilter from_message_id:int53 saved_messages_topic_id:int53 = MessageCalendar;
|
|
||||||
|
|
||||||
//@description Returns approximate number of messages of the specified type in the chat
|
//@description Returns approximate number of messages of the specified type in the chat or its topic
|
||||||
//@chat_id Identifier of the chat in which to count messages
|
//@chat_id Identifier of the chat in which to count messages
|
||||||
|
//@topic_id Pass topic identifier to get number of messages only in specific topic; pass null to get number of messages in all topics
|
||||||
//@filter Filter for message content; searchMessagesFilterEmpty is unsupported in this function
|
//@filter Filter for message content; searchMessagesFilterEmpty is unsupported in this function
|
||||||
//@saved_messages_topic_id If not 0, only messages in the specified Saved Messages topic will be counted; pass 0 to count all messages, or for chats other than Saved Messages
|
|
||||||
//@return_local Pass true to get the number of messages without sending network requests, or -1 if the number of messages is unknown locally
|
//@return_local Pass true to get the number of messages without sending network requests, or -1 if the number of messages is unknown locally
|
||||||
getChatMessageCount chat_id:int53 filter:SearchMessagesFilter saved_messages_topic_id:int53 return_local:Bool = Count;
|
getChatMessageCount chat_id:int53 topic_id:MessageTopic filter:SearchMessagesFilter 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
|
//@description Returns approximate 1-based position of a message among messages, which can be found by the specified filter in the chat and topic. Cannot be used in secret chats
|
||||||
//@chat_id Identifier of the chat in which to find message position
|
//@chat_id Identifier of the chat in which to find message position
|
||||||
//@message_id Message identifier
|
//@topic_id Pass topic identifier to get position among messages only in specific topic; pass null to get position among all chat messages
|
||||||
//@filter Filter for message content; searchMessagesFilterEmpty, searchMessagesFilterUnreadMention, searchMessagesFilterUnreadReaction, and searchMessagesFilterFailedToSend are unsupported in this function
|
//@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
|
//@message_id Message identifier
|
||||||
//@saved_messages_topic_id If not 0, only messages in the specified Saved Messages topic will be considered; pass 0 to consider all relevant messages, or for chats other than Saved Messages
|
getChatMessagePosition chat_id:int53 topic_id:MessageTopic filter:SearchMessagesFilter message_id:int53 = Count;
|
||||||
getChatMessagePosition chat_id:int53 message_id:int53 filter:SearchMessagesFilter message_thread_id:int53 saved_messages_topic_id:int53 = Count;
|
|
||||||
|
|
||||||
//@description Returns all scheduled messages in a chat. The messages are returned in reverse chronological order (i.e., in order of decreasing message_id) @chat_id Chat identifier
|
//@description Returns all scheduled messages in a chat. The messages are returned in reverse chronological order (i.e., in order of decreasing message_id) @chat_id Chat identifier
|
||||||
getChatScheduledMessages chat_id:int53 = Messages;
|
getChatScheduledMessages chat_id:int53 = Messages;
|
||||||
|
|
@ -9732,7 +9859,7 @@ sendInlineQueryResultMessage chat_id:int53 message_thread_id:int53 reply_to:Inpu
|
||||||
//@message_ids Identifiers of the messages to forward. Message identifiers must be in a strictly increasing order. At most 100 messages can be forwarded simultaneously. A message can be forwarded only if messageProperties.can_be_forwarded
|
//@message_ids Identifiers of the messages to forward. Message identifiers must be in a strictly increasing order. At most 100 messages can be forwarded simultaneously. A message can be forwarded only if messageProperties.can_be_forwarded
|
||||||
//@options Options to be used to send the messages; pass null to use default options
|
//@options Options to be used to send the messages; pass null to use default options
|
||||||
//@send_copy Pass true to copy content of the messages without reference to the original sender. Always true if the messages are forwarded to a secret chat or are local.
|
//@send_copy Pass true to copy content of the messages without reference to the original sender. Always true if the messages are forwarded to a secret chat or are local.
|
||||||
//-Use messageProperties.can_be_saved and messageProperties.can_be_copied_to_secret_chat to check whether the message is suitable
|
//-Use messageProperties.can_be_copied and messageProperties.can_be_copied_to_secret_chat to check whether the message is suitable
|
||||||
//@remove_caption Pass true to remove media captions of message copies. Ignored if send_copy is false
|
//@remove_caption Pass true to remove media captions of message copies. Ignored if send_copy is false
|
||||||
forwardMessages chat_id:int53 message_thread_id:int53 from_chat_id:int53 message_ids:vector<int53> options:messageSendOptions send_copy:Bool remove_caption:Bool = Messages;
|
forwardMessages chat_id:int53 message_thread_id:int53 from_chat_id:int53 message_ids:vector<int53> options:messageSendOptions send_copy:Bool remove_caption:Bool = Messages;
|
||||||
|
|
||||||
|
|
@ -9754,7 +9881,7 @@ resendMessages chat_id:int53 message_ids:vector<int53> quote:inputTextQuote paid
|
||||||
sendChatScreenshotTakenNotification chat_id:int53 = Ok;
|
sendChatScreenshotTakenNotification chat_id:int53 = Ok;
|
||||||
|
|
||||||
//@description Adds a local message to a chat. The message is persistent across application restarts only if the message database is used. Returns the added message
|
//@description Adds a local message to a chat. The message is persistent across application restarts only if the message database is used. Returns the added message
|
||||||
//@chat_id Target chat
|
//@chat_id Target chat; channel direct messages chats aren't supported
|
||||||
//@sender_id Identifier of the sender of the message
|
//@sender_id Identifier of the sender of the message
|
||||||
//@reply_to Information about the message or story to be replied; pass null if none
|
//@reply_to Information about the message or story to be replied; pass null if none
|
||||||
//@disable_notification Pass true to disable notification for the message
|
//@disable_notification Pass true to disable notification for the message
|
||||||
|
|
@ -10405,10 +10532,11 @@ sendWebAppData bot_user_id:int53 button_text:string data:string = Ok;
|
||||||
//@chat_id Identifier of the chat in which the Web App is opened. The Web App can't be opened in secret chats
|
//@chat_id Identifier of the chat in which the Web App is opened. The Web App can't be opened in secret chats
|
||||||
//@bot_user_id Identifier of the bot, providing the Web App. If the bot is restricted for the current user, then show an error instead of calling the method
|
//@bot_user_id Identifier of the bot, providing the Web App. If the bot is restricted for the current user, then show an error instead of calling the method
|
||||||
//@url The URL from an inlineKeyboardButtonTypeWebApp button, a botMenuButton button, an internalLinkTypeAttachmentMenuBot link, or an empty string otherwise
|
//@url The URL from an inlineKeyboardButtonTypeWebApp button, a botMenuButton button, an internalLinkTypeAttachmentMenuBot link, or an empty string otherwise
|
||||||
//@message_thread_id If not 0, the message thread identifier in which the message will be sent
|
//@message_thread_id If not 0, the message thread identifier to which the message will be sent
|
||||||
|
//@direct_messages_chat_topic_id If not 0, unique identifier of the topic of channel direct messages chat to which the message will be sent
|
||||||
//@reply_to Information about the message or story to be replied in the message sent by the Web App; pass null if none
|
//@reply_to Information about the message or story to be replied in the message sent by the Web App; pass null if none
|
||||||
//@parameters Parameters to use to open the Web App
|
//@parameters Parameters to use to open the Web App
|
||||||
openWebApp chat_id:int53 bot_user_id:int53 url:string message_thread_id:int53 reply_to:InputMessageReplyTo parameters:webAppOpenParameters = WebAppInfo;
|
openWebApp chat_id:int53 bot_user_id:int53 url:string message_thread_id:int53 direct_messages_chat_topic_id:int53 reply_to:InputMessageReplyTo parameters:webAppOpenParameters = WebAppInfo;
|
||||||
|
|
||||||
//@description Informs TDLib that a previously opened Web App was closed @web_app_launch_id Identifier of Web App launch, received from openWebApp
|
//@description Informs TDLib that a previously opened Web App was closed @web_app_launch_id Identifier of Web App launch, received from openWebApp
|
||||||
closeWebApp web_app_launch_id:int64 = Ok;
|
closeWebApp web_app_launch_id:int64 = Ok;
|
||||||
|
|
@ -10754,6 +10882,13 @@ setChatDescription chat_id:int53 description:string = Ok;
|
||||||
//-Basic group chats must be first upgraded to supergroup chats. If new chat members don't have access to old messages in the supergroup, then toggleSupergroupIsAllHistoryAvailable must be used first to change that
|
//-Basic group chats must be first upgraded to supergroup chats. If new chat members don't have access to old messages in the supergroup, then toggleSupergroupIsAllHistoryAvailable must be used first to change that
|
||||||
setChatDiscussionGroup chat_id:int53 discussion_chat_id:int53 = Ok;
|
setChatDiscussionGroup chat_id:int53 discussion_chat_id:int53 = Ok;
|
||||||
|
|
||||||
|
//@description Changes direct messages group settings for a channel chat; requires owner privileges in the chat
|
||||||
|
//@chat_id Identifier of the channel chat
|
||||||
|
//@is_enabled Pass true if the direct messages group is enabled for the channel chat; pass false otherwise
|
||||||
|
//@paid_message_star_count The new number of Telegram Stars that must be paid for each message that is sent to the direct messages chat unless the sender is an administrator of the channel chat; 0-getOption("paid_message_star_count_max").
|
||||||
|
//-The channel will receive getOption("paid_message_earnings_per_mille") Telegram Stars for each 1000 Telegram Stars paid for message sending. Requires supergroupFullInfo.can_enable_paid_messages for positive amounts
|
||||||
|
setChatDirectMessagesGroup chat_id:int53 is_enabled:Bool paid_message_star_count:int53 = Ok;
|
||||||
|
|
||||||
//@description Changes the location of a chat. Available only for some location-based supergroups, use supergroupFullInfo.can_set_location to check whether the method is allowed to use @chat_id Chat identifier @location New location for the chat; must be valid and not null
|
//@description Changes the location of a chat. Available only for some location-based supergroups, use supergroupFullInfo.can_set_location to check whether the method is allowed to use @chat_id Chat identifier @location New location for the chat; must be valid and not null
|
||||||
setChatLocation chat_id:int53 location:chatLocation = Ok;
|
setChatLocation chat_id:int53 location:chatLocation = Ok;
|
||||||
|
|
||||||
|
|
@ -11202,7 +11337,7 @@ searchFileDownloads query:string only_active:Bool only_completed:Bool offset:str
|
||||||
//@description Application or reCAPTCHA verification has been completed. Can be called before authorization
|
//@description Application or reCAPTCHA verification has been completed. Can be called before authorization
|
||||||
//@verification_id Unique identifier for the verification process as received from updateApplicationVerificationRequired or updateApplicationRecaptchaVerificationRequired
|
//@verification_id Unique identifier for the verification process as received from updateApplicationVerificationRequired or updateApplicationRecaptchaVerificationRequired
|
||||||
//@token Play Integrity API token for the Android application, or secret from push notification for the iOS application for application verification, or reCAPTCHA token for reCAPTCHA verifications;
|
//@token Play Integrity API token for the Android application, or secret from push notification for the iOS application for application verification, or reCAPTCHA token for reCAPTCHA verifications;
|
||||||
//-pass an empty string to abort verification and receive error VERIFICATION_FAILED for the request
|
//-pass an empty string to abort verification and receive the error "VERIFICATION_FAILED" for the request
|
||||||
setApplicationVerificationToken verification_id:int53 token:string = Ok;
|
setApplicationVerificationToken verification_id:int53 token:string = Ok;
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -11462,11 +11597,11 @@ toggleGroupCallIsMyVideoPaused group_call_id:int32 is_my_video_paused:Bool = Ok;
|
||||||
//@description Toggles whether current user's video is enabled @group_call_id Group call identifier @is_my_video_enabled Pass true if the current user's video is enabled
|
//@description Toggles whether current user's video is enabled @group_call_id Group call identifier @is_my_video_enabled Pass true if the current user's video is enabled
|
||||||
toggleGroupCallIsMyVideoEnabled group_call_id:int32 is_my_video_enabled:Bool = Ok;
|
toggleGroupCallIsMyVideoEnabled group_call_id:int32 is_my_video_enabled:Bool = Ok;
|
||||||
|
|
||||||
//@description Informs TDLib that speaking state of a participant of an active group call has changed
|
//@description Informs TDLib that speaking state of a participant of an active group call has changed. Returns identifier of the participant if it is found
|
||||||
//@group_call_id Group call identifier
|
//@group_call_id Group call identifier
|
||||||
//@audio_source Group call participant's synchronization audio source identifier, or 0 for the current user
|
//@audio_source Group call participant's synchronization audio source identifier, or 0 for the current user
|
||||||
//@is_speaking Pass true if the user is speaking
|
//@is_speaking Pass true if the user is speaking
|
||||||
setGroupCallParticipantIsSpeaking group_call_id:int32 audio_source:int32 is_speaking:Bool = Ok;
|
setGroupCallParticipantIsSpeaking group_call_id:int32 audio_source:int32 is_speaking:Bool = MessageSender;
|
||||||
|
|
||||||
//@description Toggles whether a participant of an active group call is muted, unmuted, or allowed to unmute themselves
|
//@description Toggles whether a participant of an active group call is muted, unmuted, or allowed to unmute themselves
|
||||||
//@group_call_id Group call identifier
|
//@group_call_id Group call identifier
|
||||||
|
|
@ -12164,8 +12299,11 @@ toggleSupergroupHasHiddenMembers supergroup_id:int53 has_hidden_members:Bool = O
|
||||||
//@has_aggressive_anti_spam_enabled The new value of has_aggressive_anti_spam_enabled
|
//@has_aggressive_anti_spam_enabled The new value of has_aggressive_anti_spam_enabled
|
||||||
toggleSupergroupHasAggressiveAntiSpamEnabled supergroup_id:int53 has_aggressive_anti_spam_enabled:Bool = Ok;
|
toggleSupergroupHasAggressiveAntiSpamEnabled supergroup_id:int53 has_aggressive_anti_spam_enabled:Bool = Ok;
|
||||||
|
|
||||||
//@description Toggles whether the supergroup is a forum; requires owner privileges in the supergroup. Discussion supergroups can't be converted to forums @supergroup_id Identifier of the supergroup @is_forum New value of is_forum
|
//@description Toggles whether the supergroup is a forum; requires owner privileges in the supergroup. Discussion supergroups can't be converted to forums
|
||||||
toggleSupergroupIsForum supergroup_id:int53 is_forum:Bool = Ok;
|
//@supergroup_id Identifier of the supergroup
|
||||||
|
//@is_forum New value of is_forum
|
||||||
|
//@has_forum_tabs New value of has_forum_tabs; ignored if is_forum is false
|
||||||
|
toggleSupergroupIsForum supergroup_id:int53 is_forum:Bool has_forum_tabs:Bool = Ok;
|
||||||
|
|
||||||
//@description Upgrades supergroup to a broadcast group; requires owner privileges in the supergroup @supergroup_id Identifier of the supergroup
|
//@description Upgrades supergroup to a broadcast group; requires owner privileges in the supergroup @supergroup_id Identifier of the supergroup
|
||||||
toggleSupergroupIsBroadcastGroup supergroup_id:int53 = Ok;
|
toggleSupergroupIsBroadcastGroup supergroup_id:int53 = Ok;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue