Update to TDLib 1.8.6
This commit is contained in:
parent
0b0467fbb7
commit
3b10777734
|
@ -26,12 +26,15 @@ func (client *Client) GetAuthorizationState() (AuthorizationState, error) {
|
||||||
case TypeAuthorizationStateWaitTdlibParameters:
|
case TypeAuthorizationStateWaitTdlibParameters:
|
||||||
return UnmarshalAuthorizationStateWaitTdlibParameters(result.Data)
|
return UnmarshalAuthorizationStateWaitTdlibParameters(result.Data)
|
||||||
|
|
||||||
case TypeAuthorizationStateWaitEncryptionKey:
|
|
||||||
return UnmarshalAuthorizationStateWaitEncryptionKey(result.Data)
|
|
||||||
|
|
||||||
case TypeAuthorizationStateWaitPhoneNumber:
|
case TypeAuthorizationStateWaitPhoneNumber:
|
||||||
return UnmarshalAuthorizationStateWaitPhoneNumber(result.Data)
|
return UnmarshalAuthorizationStateWaitPhoneNumber(result.Data)
|
||||||
|
|
||||||
|
case TypeAuthorizationStateWaitEmailAddress:
|
||||||
|
return UnmarshalAuthorizationStateWaitEmailAddress(result.Data)
|
||||||
|
|
||||||
|
case TypeAuthorizationStateWaitEmailCode:
|
||||||
|
return UnmarshalAuthorizationStateWaitEmailCode(result.Data)
|
||||||
|
|
||||||
case TypeAuthorizationStateWaitCode:
|
case TypeAuthorizationStateWaitCode:
|
||||||
return UnmarshalAuthorizationStateWaitCode(result.Data)
|
return UnmarshalAuthorizationStateWaitCode(result.Data)
|
||||||
|
|
||||||
|
@ -62,8 +65,38 @@ func (client *Client) GetAuthorizationState() (AuthorizationState, error) {
|
||||||
}
|
}
|
||||||
|
|
||||||
type SetTdlibParametersRequest struct {
|
type SetTdlibParametersRequest struct {
|
||||||
// Parameters for TDLib initialization
|
// Pass true to use Telegram test environment instead of the production environment
|
||||||
Parameters *TdlibParameters `json:"parameters"`
|
UseTestDc bool `json:"use_test_dc"`
|
||||||
|
// The path to the directory for the persistent database; if empty, the current working directory will be used
|
||||||
|
DatabaseDirectory string `json:"database_directory"`
|
||||||
|
// The path to the directory for storing files; if empty, database_directory will be used
|
||||||
|
FilesDirectory string `json:"files_directory"`
|
||||||
|
// Encryption key for the database
|
||||||
|
DatabaseEncryptionKey []byte `json:"database_encryption_key"`
|
||||||
|
// Pass true to keep information about downloaded and uploaded files between application restarts
|
||||||
|
UseFileDatabase bool `json:"use_file_database"`
|
||||||
|
// Pass true to keep cache of users, basic groups, supergroups, channels and secret chats between restarts. Implies use_file_database
|
||||||
|
UseChatInfoDatabase bool `json:"use_chat_info_database"`
|
||||||
|
// Pass true to keep cache of chats and messages between restarts. Implies use_chat_info_database
|
||||||
|
UseMessageDatabase bool `json:"use_message_database"`
|
||||||
|
// Pass true to enable support for secret chats
|
||||||
|
UseSecretChats bool `json:"use_secret_chats"`
|
||||||
|
// Application identifier for Telegram API access, which can be obtained at https://my.telegram.org
|
||||||
|
ApiId int32 `json:"api_id"`
|
||||||
|
// Application identifier hash for Telegram API access, which can be obtained at https://my.telegram.org
|
||||||
|
ApiHash string `json:"api_hash"`
|
||||||
|
// IETF language tag of the user's operating system language; must be non-empty
|
||||||
|
SystemLanguageCode string `json:"system_language_code"`
|
||||||
|
// Model of the device the application is being run on; must be non-empty
|
||||||
|
DeviceModel string `json:"device_model"`
|
||||||
|
// Version of the operating system the application is being run on. If empty, the version is automatically detected by TDLib
|
||||||
|
SystemVersion string `json:"system_version"`
|
||||||
|
// Application version; must be non-empty
|
||||||
|
ApplicationVersion string `json:"application_version"`
|
||||||
|
// Pass true to automatically delete old files in background
|
||||||
|
EnableStorageOptimizer bool `json:"enable_storage_optimizer"`
|
||||||
|
// Pass true to ignore original file names for downloaded files. Otherwise, downloaded files are saved under names as close as possible to the original name
|
||||||
|
IgnoreFileNames bool `json:"ignore_file_names"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// Sets the parameters for TDLib initialization. Works only when the current authorization state is authorizationStateWaitTdlibParameters
|
// Sets the parameters for TDLib initialization. Works only when the current authorization state is authorizationStateWaitTdlibParameters
|
||||||
|
@ -73,33 +106,22 @@ func (client *Client) SetTdlibParameters(req *SetTdlibParametersRequest) (*Ok, e
|
||||||
Type: "setTdlibParameters",
|
Type: "setTdlibParameters",
|
||||||
},
|
},
|
||||||
Data: map[string]interface{}{
|
Data: map[string]interface{}{
|
||||||
"parameters": req.Parameters,
|
"use_test_dc": req.UseTestDc,
|
||||||
},
|
"database_directory": req.DatabaseDirectory,
|
||||||
})
|
"files_directory": req.FilesDirectory,
|
||||||
if err != nil {
|
"database_encryption_key": req.DatabaseEncryptionKey,
|
||||||
return nil, err
|
"use_file_database": req.UseFileDatabase,
|
||||||
}
|
"use_chat_info_database": req.UseChatInfoDatabase,
|
||||||
|
"use_message_database": req.UseMessageDatabase,
|
||||||
if result.Type == "error" {
|
"use_secret_chats": req.UseSecretChats,
|
||||||
return nil, buildResponseError(result.Data)
|
"api_id": req.ApiId,
|
||||||
}
|
"api_hash": req.ApiHash,
|
||||||
|
"system_language_code": req.SystemLanguageCode,
|
||||||
return UnmarshalOk(result.Data)
|
"device_model": req.DeviceModel,
|
||||||
}
|
"system_version": req.SystemVersion,
|
||||||
|
"application_version": req.ApplicationVersion,
|
||||||
type CheckDatabaseEncryptionKeyRequest struct {
|
"enable_storage_optimizer": req.EnableStorageOptimizer,
|
||||||
// Encryption key to check or set up
|
"ignore_file_names": req.IgnoreFileNames,
|
||||||
EncryptionKey []byte `json:"encryption_key"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// Checks the database encryption key for correctness. Works only when the current authorization state is authorizationStateWaitEncryptionKey
|
|
||||||
func (client *Client) CheckDatabaseEncryptionKey(req *CheckDatabaseEncryptionKeyRequest) (*Ok, error) {
|
|
||||||
result, err := client.Send(Request{
|
|
||||||
meta: meta{
|
|
||||||
Type: "checkDatabaseEncryptionKey",
|
|
||||||
},
|
|
||||||
Data: map[string]interface{}{
|
|
||||||
"encryption_key": req.EncryptionKey,
|
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
@ -142,7 +164,33 @@ func (client *Client) SetAuthenticationPhoneNumber(req *SetAuthenticationPhoneNu
|
||||||
return UnmarshalOk(result.Data)
|
return UnmarshalOk(result.Data)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Re-sends an authentication code to the user. Works only when the current authorization state is authorizationStateWaitCode, the next_code_type of the result is not null and the server-specified timeout has passed
|
type SetAuthenticationEmailAddressRequest struct {
|
||||||
|
// The email address of the user
|
||||||
|
EmailAddress string `json:"email_address"`
|
||||||
|
}
|
||||||
|
|
||||||
|
// Sets the email address of the user and sends an authentication code to the email address. Works only when the current authorization state is authorizationStateWaitEmailAddress
|
||||||
|
func (client *Client) SetAuthenticationEmailAddress(req *SetAuthenticationEmailAddressRequest) (*Ok, error) {
|
||||||
|
result, err := client.Send(Request{
|
||||||
|
meta: meta{
|
||||||
|
Type: "setAuthenticationEmailAddress",
|
||||||
|
},
|
||||||
|
Data: map[string]interface{}{
|
||||||
|
"email_address": req.EmailAddress,
|
||||||
|
},
|
||||||
|
})
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
if result.Type == "error" {
|
||||||
|
return nil, buildResponseError(result.Data)
|
||||||
|
}
|
||||||
|
|
||||||
|
return UnmarshalOk(result.Data)
|
||||||
|
}
|
||||||
|
|
||||||
|
// Resends an authentication code to the user. Works only when the current authorization state is authorizationStateWaitCode, the next_code_type of the result is not null and the server-specified timeout has passed, or when the current authorization state is authorizationStateWaitEmailCode
|
||||||
func (client *Client) ResendAuthenticationCode() (*Ok, error) {
|
func (client *Client) ResendAuthenticationCode() (*Ok, error) {
|
||||||
result, err := client.Send(Request{
|
result, err := client.Send(Request{
|
||||||
meta: meta{
|
meta: meta{
|
||||||
|
@ -161,6 +209,32 @@ func (client *Client) ResendAuthenticationCode() (*Ok, error) {
|
||||||
return UnmarshalOk(result.Data)
|
return UnmarshalOk(result.Data)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
type CheckAuthenticationEmailCodeRequest struct {
|
||||||
|
// Email address authentication to check
|
||||||
|
Code EmailAddressAuthentication `json:"code"`
|
||||||
|
}
|
||||||
|
|
||||||
|
// Checks the authentication of a email address. Works only when the current authorization state is authorizationStateWaitEmailCode
|
||||||
|
func (client *Client) CheckAuthenticationEmailCode(req *CheckAuthenticationEmailCodeRequest) (*Ok, error) {
|
||||||
|
result, err := client.Send(Request{
|
||||||
|
meta: meta{
|
||||||
|
Type: "checkAuthenticationEmailCode",
|
||||||
|
},
|
||||||
|
Data: map[string]interface{}{
|
||||||
|
"code": req.Code,
|
||||||
|
},
|
||||||
|
})
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
if result.Type == "error" {
|
||||||
|
return nil, buildResponseError(result.Data)
|
||||||
|
}
|
||||||
|
|
||||||
|
return UnmarshalOk(result.Data)
|
||||||
|
}
|
||||||
|
|
||||||
type CheckAuthenticationCodeRequest struct {
|
type CheckAuthenticationCodeRequest struct {
|
||||||
// Authentication code to check
|
// Authentication code to check
|
||||||
Code string `json:"code"`
|
Code string `json:"code"`
|
||||||
|
@ -556,6 +630,77 @@ func (client *Client) SetPassword(req *SetPasswordRequest) (*PasswordState, erro
|
||||||
return UnmarshalPasswordState(result.Data)
|
return UnmarshalPasswordState(result.Data)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
type SetLoginEmailAddressRequest struct {
|
||||||
|
// New login email address
|
||||||
|
NewLoginEmailAddress string `json:"new_login_email_address"`
|
||||||
|
}
|
||||||
|
|
||||||
|
// Changes the login email address of the user. The change will not be applied until the new login email address is confirmed with `checkLoginEmailAddressCode`. To use Apple ID/Google ID instead of a email address, call `checkLoginEmailAddressCode` directly
|
||||||
|
func (client *Client) SetLoginEmailAddress(req *SetLoginEmailAddressRequest) (*EmailAddressAuthenticationCodeInfo, error) {
|
||||||
|
result, err := client.Send(Request{
|
||||||
|
meta: meta{
|
||||||
|
Type: "setLoginEmailAddress",
|
||||||
|
},
|
||||||
|
Data: map[string]interface{}{
|
||||||
|
"new_login_email_address": req.NewLoginEmailAddress,
|
||||||
|
},
|
||||||
|
})
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
if result.Type == "error" {
|
||||||
|
return nil, buildResponseError(result.Data)
|
||||||
|
}
|
||||||
|
|
||||||
|
return UnmarshalEmailAddressAuthenticationCodeInfo(result.Data)
|
||||||
|
}
|
||||||
|
|
||||||
|
// Resends the login email address verification code
|
||||||
|
func (client *Client) ResendLoginEmailAddressCode() (*EmailAddressAuthenticationCodeInfo, error) {
|
||||||
|
result, err := client.Send(Request{
|
||||||
|
meta: meta{
|
||||||
|
Type: "resendLoginEmailAddressCode",
|
||||||
|
},
|
||||||
|
Data: map[string]interface{}{},
|
||||||
|
})
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
if result.Type == "error" {
|
||||||
|
return nil, buildResponseError(result.Data)
|
||||||
|
}
|
||||||
|
|
||||||
|
return UnmarshalEmailAddressAuthenticationCodeInfo(result.Data)
|
||||||
|
}
|
||||||
|
|
||||||
|
type CheckLoginEmailAddressCodeRequest struct {
|
||||||
|
// Email address authentication to check
|
||||||
|
Code EmailAddressAuthentication `json:"code"`
|
||||||
|
}
|
||||||
|
|
||||||
|
// Checks the login email address authentication
|
||||||
|
func (client *Client) CheckLoginEmailAddressCode(req *CheckLoginEmailAddressCodeRequest) (*Ok, error) {
|
||||||
|
result, err := client.Send(Request{
|
||||||
|
meta: meta{
|
||||||
|
Type: "checkLoginEmailAddressCode",
|
||||||
|
},
|
||||||
|
Data: map[string]interface{}{
|
||||||
|
"code": req.Code,
|
||||||
|
},
|
||||||
|
})
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
if result.Type == "error" {
|
||||||
|
return nil, buildResponseError(result.Data)
|
||||||
|
}
|
||||||
|
|
||||||
|
return UnmarshalOk(result.Data)
|
||||||
|
}
|
||||||
|
|
||||||
type GetRecoveryEmailAddressRequest struct {
|
type GetRecoveryEmailAddressRequest struct {
|
||||||
// The 2-step verification password for the current user
|
// The 2-step verification password for the current user
|
||||||
Password string `json:"password"`
|
Password string `json:"password"`
|
||||||
|
@ -3548,14 +3693,61 @@ func (client *Client) EditMessageSchedulingState(req *EditMessageSchedulingState
|
||||||
return UnmarshalOk(result.Data)
|
return UnmarshalOk(result.Data)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
type GetEmojiReactionRequest struct {
|
||||||
|
// Text representation of the reaction
|
||||||
|
Emoji string `json:"emoji"`
|
||||||
|
}
|
||||||
|
|
||||||
|
// Returns information about a emoji reaction. Returns a 404 error if the reaction is not found
|
||||||
|
func (client *Client) GetEmojiReaction(req *GetEmojiReactionRequest) (*EmojiReaction, error) {
|
||||||
|
result, err := client.Send(Request{
|
||||||
|
meta: meta{
|
||||||
|
Type: "getEmojiReaction",
|
||||||
|
},
|
||||||
|
Data: map[string]interface{}{
|
||||||
|
"emoji": req.Emoji,
|
||||||
|
},
|
||||||
|
})
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
if result.Type == "error" {
|
||||||
|
return nil, buildResponseError(result.Data)
|
||||||
|
}
|
||||||
|
|
||||||
|
return UnmarshalEmojiReaction(result.Data)
|
||||||
|
}
|
||||||
|
|
||||||
|
// Returns TGS files with generic animations for custom emoji reactions
|
||||||
|
func (client *Client) GetCustomEmojiReactionAnimations() (*Files, error) {
|
||||||
|
result, err := client.Send(Request{
|
||||||
|
meta: meta{
|
||||||
|
Type: "getCustomEmojiReactionAnimations",
|
||||||
|
},
|
||||||
|
Data: map[string]interface{}{},
|
||||||
|
})
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
if result.Type == "error" {
|
||||||
|
return nil, buildResponseError(result.Data)
|
||||||
|
}
|
||||||
|
|
||||||
|
return UnmarshalFiles(result.Data)
|
||||||
|
}
|
||||||
|
|
||||||
type GetMessageAvailableReactionsRequest struct {
|
type GetMessageAvailableReactionsRequest struct {
|
||||||
// Identifier of the chat to which the message belongs
|
// Identifier of the chat to which the message belongs
|
||||||
ChatId int64 `json:"chat_id"`
|
ChatId int64 `json:"chat_id"`
|
||||||
// Identifier of the message
|
// Identifier of the message
|
||||||
MessageId int64 `json:"message_id"`
|
MessageId int64 `json:"message_id"`
|
||||||
|
// Number of reaction per row, 5-25
|
||||||
|
RowSize int32 `json:"row_size"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// Returns reactions, which can be added to a message. The list can change after updateReactions, updateChatAvailableReactions for the chat, or updateMessageInteractionInfo for the message
|
// Returns reactions, which can be added to a message. The list can change after updateActiveEmojiReactions, updateChatAvailableReactions for the chat, or updateMessageInteractionInfo for the message
|
||||||
func (client *Client) GetMessageAvailableReactions(req *GetMessageAvailableReactionsRequest) (*AvailableReactions, error) {
|
func (client *Client) GetMessageAvailableReactions(req *GetMessageAvailableReactionsRequest) (*AvailableReactions, error) {
|
||||||
result, err := client.Send(Request{
|
result, err := client.Send(Request{
|
||||||
meta: meta{
|
meta: meta{
|
||||||
|
@ -3564,6 +3756,7 @@ func (client *Client) GetMessageAvailableReactions(req *GetMessageAvailableReact
|
||||||
Data: map[string]interface{}{
|
Data: map[string]interface{}{
|
||||||
"chat_id": req.ChatId,
|
"chat_id": req.ChatId,
|
||||||
"message_id": req.MessageId,
|
"message_id": req.MessageId,
|
||||||
|
"row_size": req.RowSize,
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
@ -3577,28 +3770,82 @@ func (client *Client) GetMessageAvailableReactions(req *GetMessageAvailableReact
|
||||||
return UnmarshalAvailableReactions(result.Data)
|
return UnmarshalAvailableReactions(result.Data)
|
||||||
}
|
}
|
||||||
|
|
||||||
type SetMessageReactionRequest struct {
|
// Clears the list of recently used reactions
|
||||||
|
func (client *Client) ClearRecentReactions() (*Ok, error) {
|
||||||
|
result, err := client.Send(Request{
|
||||||
|
meta: meta{
|
||||||
|
Type: "clearRecentReactions",
|
||||||
|
},
|
||||||
|
Data: map[string]interface{}{},
|
||||||
|
})
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
if result.Type == "error" {
|
||||||
|
return nil, buildResponseError(result.Data)
|
||||||
|
}
|
||||||
|
|
||||||
|
return UnmarshalOk(result.Data)
|
||||||
|
}
|
||||||
|
|
||||||
|
type AddMessageReactionRequest struct {
|
||||||
// Identifier of the chat to which the message belongs
|
// Identifier of the chat to which the message belongs
|
||||||
ChatId int64 `json:"chat_id"`
|
ChatId int64 `json:"chat_id"`
|
||||||
// Identifier of the message
|
// Identifier of the message
|
||||||
MessageId int64 `json:"message_id"`
|
MessageId int64 `json:"message_id"`
|
||||||
// Text representation of the new chosen reaction. Can be an empty string or the currently chosen non-big reaction to remove the reaction
|
// Type of the reaction to add
|
||||||
Reaction string `json:"reaction"`
|
ReactionType ReactionType `json:"reaction_type"`
|
||||||
// Pass true if the reaction is added with a big animation
|
// Pass true if the reaction is added with a big animation
|
||||||
IsBig bool `json:"is_big"`
|
IsBig bool `json:"is_big"`
|
||||||
|
// Pass true if the reaction needs to be added to recent reactions
|
||||||
|
UpdateRecentReactions bool `json:"update_recent_reactions"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// Changes chosen reaction for a message
|
// Adds a reaction to a message. Use getMessageAvailableReactions to receive the list of available reactions for the message
|
||||||
func (client *Client) SetMessageReaction(req *SetMessageReactionRequest) (*Ok, error) {
|
func (client *Client) AddMessageReaction(req *AddMessageReactionRequest) (*Ok, error) {
|
||||||
result, err := client.Send(Request{
|
result, err := client.Send(Request{
|
||||||
meta: meta{
|
meta: meta{
|
||||||
Type: "setMessageReaction",
|
Type: "addMessageReaction",
|
||||||
},
|
},
|
||||||
Data: map[string]interface{}{
|
Data: map[string]interface{}{
|
||||||
"chat_id": req.ChatId,
|
"chat_id": req.ChatId,
|
||||||
"message_id": req.MessageId,
|
"message_id": req.MessageId,
|
||||||
"reaction": req.Reaction,
|
"reaction_type": req.ReactionType,
|
||||||
"is_big": req.IsBig,
|
"is_big": req.IsBig,
|
||||||
|
"update_recent_reactions": req.UpdateRecentReactions,
|
||||||
|
},
|
||||||
|
})
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
if result.Type == "error" {
|
||||||
|
return nil, buildResponseError(result.Data)
|
||||||
|
}
|
||||||
|
|
||||||
|
return UnmarshalOk(result.Data)
|
||||||
|
}
|
||||||
|
|
||||||
|
type RemoveMessageReactionRequest struct {
|
||||||
|
// Identifier of the chat to which the message belongs
|
||||||
|
ChatId int64 `json:"chat_id"`
|
||||||
|
// Identifier of the message
|
||||||
|
MessageId int64 `json:"message_id"`
|
||||||
|
// Type of the reaction to remove
|
||||||
|
ReactionType ReactionType `json:"reaction_type"`
|
||||||
|
}
|
||||||
|
|
||||||
|
// Removes a reaction from a message. A chosen reaction can always be removed
|
||||||
|
func (client *Client) RemoveMessageReaction(req *RemoveMessageReactionRequest) (*Ok, error) {
|
||||||
|
result, err := client.Send(Request{
|
||||||
|
meta: meta{
|
||||||
|
Type: "removeMessageReaction",
|
||||||
|
},
|
||||||
|
Data: map[string]interface{}{
|
||||||
|
"chat_id": req.ChatId,
|
||||||
|
"message_id": req.MessageId,
|
||||||
|
"reaction_type": req.ReactionType,
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
@ -3617,8 +3864,8 @@ type GetMessageAddedReactionsRequest struct {
|
||||||
ChatId int64 `json:"chat_id"`
|
ChatId int64 `json:"chat_id"`
|
||||||
// Identifier of the message
|
// Identifier of the message
|
||||||
MessageId int64 `json:"message_id"`
|
MessageId int64 `json:"message_id"`
|
||||||
// If non-empty, only added reactions with the specified text representation will be returned
|
// Type of the reactions to return; pass null to return all added reactions
|
||||||
Reaction string `json:"reaction"`
|
ReactionType ReactionType `json:"reaction_type"`
|
||||||
// Offset of the first entry to return as received from the previous request; use empty string to get the first chunk of results
|
// Offset of the first entry to return as received from the previous request; use empty string to get the first chunk of results
|
||||||
Offset string `json:"offset"`
|
Offset string `json:"offset"`
|
||||||
// The maximum number of reactions to be returned; must be positive and can't be greater than 100
|
// The maximum number of reactions to be returned; must be positive and can't be greater than 100
|
||||||
|
@ -3634,7 +3881,7 @@ func (client *Client) GetMessageAddedReactions(req *GetMessageAddedReactionsRequ
|
||||||
Data: map[string]interface{}{
|
Data: map[string]interface{}{
|
||||||
"chat_id": req.ChatId,
|
"chat_id": req.ChatId,
|
||||||
"message_id": req.MessageId,
|
"message_id": req.MessageId,
|
||||||
"reaction": req.Reaction,
|
"reaction_type": req.ReactionType,
|
||||||
"offset": req.Offset,
|
"offset": req.Offset,
|
||||||
"limit": req.Limit,
|
"limit": req.Limit,
|
||||||
},
|
},
|
||||||
|
@ -3650,6 +3897,32 @@ func (client *Client) GetMessageAddedReactions(req *GetMessageAddedReactionsRequ
|
||||||
return UnmarshalAddedReactions(result.Data)
|
return UnmarshalAddedReactions(result.Data)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
type SetDefaultReactionTypeRequest struct {
|
||||||
|
// New type of the default reaction
|
||||||
|
ReactionType ReactionType `json:"reaction_type"`
|
||||||
|
}
|
||||||
|
|
||||||
|
// Changes type of default reaction for the current user
|
||||||
|
func (client *Client) SetDefaultReactionType(req *SetDefaultReactionTypeRequest) (*Ok, error) {
|
||||||
|
result, err := client.Send(Request{
|
||||||
|
meta: meta{
|
||||||
|
Type: "setDefaultReactionType",
|
||||||
|
},
|
||||||
|
Data: map[string]interface{}{
|
||||||
|
"reaction_type": req.ReactionType,
|
||||||
|
},
|
||||||
|
})
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
if result.Type == "error" {
|
||||||
|
return nil, buildResponseError(result.Data)
|
||||||
|
}
|
||||||
|
|
||||||
|
return UnmarshalOk(result.Data)
|
||||||
|
}
|
||||||
|
|
||||||
type GetTextEntitiesRequest struct {
|
type GetTextEntitiesRequest struct {
|
||||||
// The text in which to look for entites
|
// The text in which to look for entites
|
||||||
Text string `json:"text"`
|
Text string `json:"text"`
|
||||||
|
@ -4329,6 +4602,8 @@ type GetWebAppUrlRequest struct {
|
||||||
Url string `json:"url"`
|
Url string `json:"url"`
|
||||||
// Preferred Web App theme; pass null to use the default theme
|
// Preferred Web App theme; pass null to use the default theme
|
||||||
Theme *ThemeParameters `json:"theme"`
|
Theme *ThemeParameters `json:"theme"`
|
||||||
|
// Short name of the application; 0-64 English letters, digits, and underscores
|
||||||
|
ApplicationName string `json:"application_name"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// Returns an HTTPS URL of a Web App to open after keyboardButtonTypeWebApp button is pressed
|
// Returns an HTTPS URL of a Web App to open after keyboardButtonTypeWebApp button is pressed
|
||||||
|
@ -4341,6 +4616,7 @@ func (client *Client) GetWebAppUrl(req *GetWebAppUrlRequest) (*HttpUrl, error) {
|
||||||
"bot_user_id": req.BotUserId,
|
"bot_user_id": req.BotUserId,
|
||||||
"url": req.Url,
|
"url": req.Url,
|
||||||
"theme": req.Theme,
|
"theme": req.Theme,
|
||||||
|
"application_name": req.ApplicationName,
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
@ -4395,6 +4671,8 @@ type OpenWebAppRequest struct {
|
||||||
Url string `json:"url"`
|
Url string `json:"url"`
|
||||||
// Preferred Web App theme; pass null to use the default theme
|
// Preferred Web App theme; pass null to use the default theme
|
||||||
Theme *ThemeParameters `json:"theme"`
|
Theme *ThemeParameters `json:"theme"`
|
||||||
|
// Short name of the application; 0-64 English letters, digits, and underscores
|
||||||
|
ApplicationName string `json:"application_name"`
|
||||||
// Identifier of the replied message for the message sent by the Web App; 0 if none
|
// Identifier of the replied message for the message sent by the Web App; 0 if none
|
||||||
ReplyToMessageId int64 `json:"reply_to_message_id"`
|
ReplyToMessageId int64 `json:"reply_to_message_id"`
|
||||||
}
|
}
|
||||||
|
@ -4410,6 +4688,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,
|
||||||
"theme": req.Theme,
|
"theme": req.Theme,
|
||||||
|
"application_name": req.ApplicationName,
|
||||||
"reply_to_message_id": req.ReplyToMessageId,
|
"reply_to_message_id": req.ReplyToMessageId,
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
@ -5013,6 +5292,9 @@ func (client *Client) GetInternalLinkType(req *GetInternalLinkTypeRequest) (Inte
|
||||||
case TypeInternalLinkTypeGame:
|
case TypeInternalLinkTypeGame:
|
||||||
return UnmarshalInternalLinkTypeGame(result.Data)
|
return UnmarshalInternalLinkTypeGame(result.Data)
|
||||||
|
|
||||||
|
case TypeInternalLinkTypeInstantView:
|
||||||
|
return UnmarshalInternalLinkTypeInstantView(result.Data)
|
||||||
|
|
||||||
case TypeInternalLinkTypeInvoice:
|
case TypeInternalLinkTypeInvoice:
|
||||||
return UnmarshalInternalLinkTypeInvoice(result.Data)
|
return UnmarshalInternalLinkTypeInvoice(result.Data)
|
||||||
|
|
||||||
|
@ -5966,8 +6248,8 @@ func (client *Client) ToggleChatDefaultDisableNotification(req *ToggleChatDefaul
|
||||||
type SetChatAvailableReactionsRequest struct {
|
type SetChatAvailableReactionsRequest struct {
|
||||||
// Identifier of the chat
|
// Identifier of the chat
|
||||||
ChatId int64 `json:"chat_id"`
|
ChatId int64 `json:"chat_id"`
|
||||||
// New list of reactions, available in the chat. All reactions must be active
|
// Reactions available in the chat. All emoji reactions must be active
|
||||||
AvailableReactions []string `json:"available_reactions"`
|
AvailableReactions ChatAvailableReactions `json:"available_reactions"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// Changes reactions, available in a chat. Available for basic groups, supergroups, and channels. Requires can_change_info administrator right
|
// Changes reactions, available in a chat. Available for basic groups, supergroups, and channels. Requires can_change_info administrator right
|
||||||
|
@ -6905,6 +7187,82 @@ func (client *Client) ToggleBotIsAddedToAttachmentMenu(req *ToggleBotIsAddedToAt
|
||||||
return UnmarshalOk(result.Data)
|
return UnmarshalOk(result.Data)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Returns up to 8 themed emoji statuses, which color must be changed to the color of the Telegram Premium badge
|
||||||
|
func (client *Client) GetThemedEmojiStatuses() (*EmojiStatuses, error) {
|
||||||
|
result, err := client.Send(Request{
|
||||||
|
meta: meta{
|
||||||
|
Type: "getThemedEmojiStatuses",
|
||||||
|
},
|
||||||
|
Data: map[string]interface{}{},
|
||||||
|
})
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
if result.Type == "error" {
|
||||||
|
return nil, buildResponseError(result.Data)
|
||||||
|
}
|
||||||
|
|
||||||
|
return UnmarshalEmojiStatuses(result.Data)
|
||||||
|
}
|
||||||
|
|
||||||
|
// Returns recent emoji statuses
|
||||||
|
func (client *Client) GetRecentEmojiStatuses() (*EmojiStatuses, error) {
|
||||||
|
result, err := client.Send(Request{
|
||||||
|
meta: meta{
|
||||||
|
Type: "getRecentEmojiStatuses",
|
||||||
|
},
|
||||||
|
Data: map[string]interface{}{},
|
||||||
|
})
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
if result.Type == "error" {
|
||||||
|
return nil, buildResponseError(result.Data)
|
||||||
|
}
|
||||||
|
|
||||||
|
return UnmarshalEmojiStatuses(result.Data)
|
||||||
|
}
|
||||||
|
|
||||||
|
// Returns default emoji statuses
|
||||||
|
func (client *Client) GetDefaultEmojiStatuses() (*EmojiStatuses, error) {
|
||||||
|
result, err := client.Send(Request{
|
||||||
|
meta: meta{
|
||||||
|
Type: "getDefaultEmojiStatuses",
|
||||||
|
},
|
||||||
|
Data: map[string]interface{}{},
|
||||||
|
})
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
if result.Type == "error" {
|
||||||
|
return nil, buildResponseError(result.Data)
|
||||||
|
}
|
||||||
|
|
||||||
|
return UnmarshalEmojiStatuses(result.Data)
|
||||||
|
}
|
||||||
|
|
||||||
|
// Clears the list of recently used emoji statuses
|
||||||
|
func (client *Client) ClearRecentEmojiStatuses() (*Ok, error) {
|
||||||
|
result, err := client.Send(Request{
|
||||||
|
meta: meta{
|
||||||
|
Type: "clearRecentEmojiStatuses",
|
||||||
|
},
|
||||||
|
Data: map[string]interface{}{},
|
||||||
|
})
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
if result.Type == "error" {
|
||||||
|
return nil, buildResponseError(result.Data)
|
||||||
|
}
|
||||||
|
|
||||||
|
return UnmarshalOk(result.Data)
|
||||||
|
}
|
||||||
|
|
||||||
type DownloadFileRequest struct {
|
type DownloadFileRequest struct {
|
||||||
// Identifier of the file to download
|
// Identifier of the file to download
|
||||||
FileId int32 `json:"file_id"`
|
FileId int32 `json:"file_id"`
|
||||||
|
@ -10533,6 +10891,35 @@ func (client *Client) SetUsername(req *SetUsernameRequest) (*Ok, error) {
|
||||||
return UnmarshalOk(result.Data)
|
return UnmarshalOk(result.Data)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
type SetEmojiStatusRequest struct {
|
||||||
|
// New emoji status; pass null to switch to the default badge
|
||||||
|
EmojiStatus *EmojiStatus `json:"emoji_status"`
|
||||||
|
// Duration of the status, in seconds; pass 0 to keep the status active until it will be changed manually
|
||||||
|
Duration int32 `json:"duration"`
|
||||||
|
}
|
||||||
|
|
||||||
|
// Changes the emoji status of the current user; for Telegram Premium users only
|
||||||
|
func (client *Client) SetEmojiStatus(req *SetEmojiStatusRequest) (*Ok, error) {
|
||||||
|
result, err := client.Send(Request{
|
||||||
|
meta: meta{
|
||||||
|
Type: "setEmojiStatus",
|
||||||
|
},
|
||||||
|
Data: map[string]interface{}{
|
||||||
|
"emoji_status": req.EmojiStatus,
|
||||||
|
"duration": req.Duration,
|
||||||
|
},
|
||||||
|
})
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
if result.Type == "error" {
|
||||||
|
return nil, buildResponseError(result.Data)
|
||||||
|
}
|
||||||
|
|
||||||
|
return UnmarshalOk(result.Data)
|
||||||
|
}
|
||||||
|
|
||||||
type SetLocationRequest struct {
|
type SetLocationRequest struct {
|
||||||
// The new location of the user
|
// The new location of the user
|
||||||
Location *Location `json:"location"`
|
Location *Location `json:"location"`
|
||||||
|
@ -10588,7 +10975,7 @@ func (client *Client) ChangePhoneNumber(req *ChangePhoneNumberRequest) (*Authent
|
||||||
return UnmarshalAuthenticationCodeInfo(result.Data)
|
return UnmarshalAuthenticationCodeInfo(result.Data)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Re-sends the authentication code sent to confirm a new phone number for the current user. Works only if the previously received authenticationCodeInfo next_code_type was not null and the server-specified timeout has passed
|
// Resends the authentication code sent to confirm a new phone number for the current user. Works only if the previously received authenticationCodeInfo next_code_type was not null and the server-specified timeout has passed
|
||||||
func (client *Client) ResendChangePhoneNumberCode() (*AuthenticationCodeInfo, error) {
|
func (client *Client) ResendChangePhoneNumberCode() (*AuthenticationCodeInfo, error) {
|
||||||
result, err := client.Send(Request{
|
result, err := client.Send(Request{
|
||||||
meta: meta{
|
meta: meta{
|
||||||
|
@ -12419,6 +12806,38 @@ func (client *Client) ReportChatPhoto(req *ReportChatPhotoRequest) (*Ok, error)
|
||||||
return UnmarshalOk(result.Data)
|
return UnmarshalOk(result.Data)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
type ReportMessageReactionsRequest struct {
|
||||||
|
// Chat identifier
|
||||||
|
ChatId int64 `json:"chat_id"`
|
||||||
|
// Message identifier
|
||||||
|
MessageId int64 `json:"message_id"`
|
||||||
|
// Identifier of the sender, which added the reaction
|
||||||
|
SenderId MessageSender `json:"sender_id"`
|
||||||
|
}
|
||||||
|
|
||||||
|
// Reports reactions set on a message to the Telegram moderators. Reactions on a message can be reported only if message.can_report_reactions
|
||||||
|
func (client *Client) ReportMessageReactions(req *ReportMessageReactionsRequest) (*Ok, error) {
|
||||||
|
result, err := client.Send(Request{
|
||||||
|
meta: meta{
|
||||||
|
Type: "reportMessageReactions",
|
||||||
|
},
|
||||||
|
Data: map[string]interface{}{
|
||||||
|
"chat_id": req.ChatId,
|
||||||
|
"message_id": req.MessageId,
|
||||||
|
"sender_id": req.SenderId,
|
||||||
|
},
|
||||||
|
})
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
if result.Type == "error" {
|
||||||
|
return nil, buildResponseError(result.Data)
|
||||||
|
}
|
||||||
|
|
||||||
|
return UnmarshalOk(result.Data)
|
||||||
|
}
|
||||||
|
|
||||||
type GetChatStatisticsRequest struct {
|
type GetChatStatisticsRequest struct {
|
||||||
// Chat identifier
|
// Chat identifier
|
||||||
ChatId int64 `json:"chat_id"`
|
ChatId int64 `json:"chat_id"`
|
||||||
|
@ -13096,7 +13515,7 @@ func (client *Client) SendPhoneNumberVerificationCode(req *SendPhoneNumberVerifi
|
||||||
return UnmarshalAuthenticationCodeInfo(result.Data)
|
return UnmarshalAuthenticationCodeInfo(result.Data)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Re-sends the code to verify a phone number to be added to a user's Telegram Passport
|
// Resends the code to verify a phone number to be added to a user's Telegram Passport
|
||||||
func (client *Client) ResendPhoneNumberVerificationCode() (*AuthenticationCodeInfo, error) {
|
func (client *Client) ResendPhoneNumberVerificationCode() (*AuthenticationCodeInfo, error) {
|
||||||
result, err := client.Send(Request{
|
result, err := client.Send(Request{
|
||||||
meta: meta{
|
meta: meta{
|
||||||
|
@ -13167,7 +13586,7 @@ func (client *Client) SendEmailAddressVerificationCode(req *SendEmailAddressVeri
|
||||||
return UnmarshalEmailAddressAuthenticationCodeInfo(result.Data)
|
return UnmarshalEmailAddressAuthenticationCodeInfo(result.Data)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Re-sends the code to verify an email address to be added to a user's Telegram Passport
|
// Resends the code to verify an email address to be added to a user's Telegram Passport
|
||||||
func (client *Client) ResendEmailAddressVerificationCode() (*EmailAddressAuthenticationCodeInfo, error) {
|
func (client *Client) ResendEmailAddressVerificationCode() (*EmailAddressAuthenticationCodeInfo, error) {
|
||||||
result, err := client.Send(Request{
|
result, err := client.Send(Request{
|
||||||
meta: meta{
|
meta: meta{
|
||||||
|
@ -14715,6 +15134,61 @@ func AddLogMessage(req *AddLogMessageRequest) (*Ok, error) {
|
||||||
func (client *Client) AddLogMessage(req *AddLogMessageRequest) (*Ok, error) {
|
func (client *Client) AddLogMessage(req *AddLogMessageRequest) (*Ok, error) {
|
||||||
return AddLogMessage(req)}
|
return AddLogMessage(req)}
|
||||||
|
|
||||||
|
type GetUserSupportInfoRequest struct {
|
||||||
|
// User identifier
|
||||||
|
UserId int64 `json:"user_id"`
|
||||||
|
}
|
||||||
|
|
||||||
|
// Returns support information for the given user; for Telegram support only
|
||||||
|
func (client *Client) GetUserSupportInfo(req *GetUserSupportInfoRequest) (*UserSupportInfo, error) {
|
||||||
|
result, err := client.Send(Request{
|
||||||
|
meta: meta{
|
||||||
|
Type: "getUserSupportInfo",
|
||||||
|
},
|
||||||
|
Data: map[string]interface{}{
|
||||||
|
"user_id": req.UserId,
|
||||||
|
},
|
||||||
|
})
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
if result.Type == "error" {
|
||||||
|
return nil, buildResponseError(result.Data)
|
||||||
|
}
|
||||||
|
|
||||||
|
return UnmarshalUserSupportInfo(result.Data)
|
||||||
|
}
|
||||||
|
|
||||||
|
type SetUserSupportInfoRequest struct {
|
||||||
|
// User identifier
|
||||||
|
UserId int64 `json:"user_id"`
|
||||||
|
// New information message
|
||||||
|
Message *FormattedText `json:"message"`
|
||||||
|
}
|
||||||
|
|
||||||
|
// Sets support information for the given user; for Telegram support only
|
||||||
|
func (client *Client) SetUserSupportInfo(req *SetUserSupportInfoRequest) (*UserSupportInfo, error) {
|
||||||
|
result, err := client.Send(Request{
|
||||||
|
meta: meta{
|
||||||
|
Type: "setUserSupportInfo",
|
||||||
|
},
|
||||||
|
Data: map[string]interface{}{
|
||||||
|
"user_id": req.UserId,
|
||||||
|
"message": req.Message,
|
||||||
|
},
|
||||||
|
})
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
if result.Type == "error" {
|
||||||
|
return nil, buildResponseError(result.Data)
|
||||||
|
}
|
||||||
|
|
||||||
|
return UnmarshalUserSupportInfo(result.Data)
|
||||||
|
}
|
||||||
|
|
||||||
// Does nothing; for testing only. This is an offline method. Can be called before authorization
|
// Does nothing; for testing only. This is an offline method. Can be called before authorization
|
||||||
func (client *Client) TestCallEmpty() (*Ok, error) {
|
func (client *Client) TestCallEmpty() (*Ok, error) {
|
||||||
result, err := client.Send(Request{
|
result, err := client.Send(Request{
|
||||||
|
@ -15267,8 +15741,11 @@ func (client *Client) TestUseUpdate() (Update, error) {
|
||||||
case TypeUpdateWebAppMessageSent:
|
case TypeUpdateWebAppMessageSent:
|
||||||
return UnmarshalUpdateWebAppMessageSent(result.Data)
|
return UnmarshalUpdateWebAppMessageSent(result.Data)
|
||||||
|
|
||||||
case TypeUpdateReactions:
|
case TypeUpdateActiveEmojiReactions:
|
||||||
return UnmarshalUpdateReactions(result.Data)
|
return UnmarshalUpdateActiveEmojiReactions(result.Data)
|
||||||
|
|
||||||
|
case TypeUpdateDefaultReactionType:
|
||||||
|
return UnmarshalUpdateDefaultReactionType(result.Data)
|
||||||
|
|
||||||
case TypeUpdateDiceEmojis:
|
case TypeUpdateDiceEmojis:
|
||||||
return UnmarshalUpdateDiceEmojis(result.Data)
|
return UnmarshalUpdateDiceEmojis(result.Data)
|
||||||
|
|
806
client/type.go
806
client/type.go
File diff suppressed because it is too large
Load diff
|
@ -50,6 +50,43 @@ func UnmarshalListOfAuthenticationCodeType(dataList []json.RawMessage) ([]Authen
|
||||||
return list, nil
|
return list, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func UnmarshalEmailAddressAuthentication(data json.RawMessage) (EmailAddressAuthentication, error) {
|
||||||
|
var meta meta
|
||||||
|
|
||||||
|
err := json.Unmarshal(data, &meta)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
switch meta.Type {
|
||||||
|
case TypeEmailAddressAuthenticationCode:
|
||||||
|
return UnmarshalEmailAddressAuthenticationCode(data)
|
||||||
|
|
||||||
|
case TypeEmailAddressAuthenticationAppleId:
|
||||||
|
return UnmarshalEmailAddressAuthenticationAppleId(data)
|
||||||
|
|
||||||
|
case TypeEmailAddressAuthenticationGoogleId:
|
||||||
|
return UnmarshalEmailAddressAuthenticationGoogleId(data)
|
||||||
|
|
||||||
|
default:
|
||||||
|
return nil, fmt.Errorf("Error unmarshaling. Unknown type: " + meta.Type)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func UnmarshalListOfEmailAddressAuthentication(dataList []json.RawMessage) ([]EmailAddressAuthentication, error) {
|
||||||
|
list := []EmailAddressAuthentication{}
|
||||||
|
|
||||||
|
for _, data := range dataList {
|
||||||
|
entity, err := UnmarshalEmailAddressAuthentication(data)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
list = append(list, entity)
|
||||||
|
}
|
||||||
|
|
||||||
|
return list, nil
|
||||||
|
}
|
||||||
|
|
||||||
func UnmarshalAuthorizationState(data json.RawMessage) (AuthorizationState, error) {
|
func UnmarshalAuthorizationState(data json.RawMessage) (AuthorizationState, error) {
|
||||||
var meta meta
|
var meta meta
|
||||||
|
|
||||||
|
@ -62,12 +99,15 @@ func UnmarshalAuthorizationState(data json.RawMessage) (AuthorizationState, erro
|
||||||
case TypeAuthorizationStateWaitTdlibParameters:
|
case TypeAuthorizationStateWaitTdlibParameters:
|
||||||
return UnmarshalAuthorizationStateWaitTdlibParameters(data)
|
return UnmarshalAuthorizationStateWaitTdlibParameters(data)
|
||||||
|
|
||||||
case TypeAuthorizationStateWaitEncryptionKey:
|
|
||||||
return UnmarshalAuthorizationStateWaitEncryptionKey(data)
|
|
||||||
|
|
||||||
case TypeAuthorizationStateWaitPhoneNumber:
|
case TypeAuthorizationStateWaitPhoneNumber:
|
||||||
return UnmarshalAuthorizationStateWaitPhoneNumber(data)
|
return UnmarshalAuthorizationStateWaitPhoneNumber(data)
|
||||||
|
|
||||||
|
case TypeAuthorizationStateWaitEmailAddress:
|
||||||
|
return UnmarshalAuthorizationStateWaitEmailAddress(data)
|
||||||
|
|
||||||
|
case TypeAuthorizationStateWaitEmailCode:
|
||||||
|
return UnmarshalAuthorizationStateWaitEmailCode(data)
|
||||||
|
|
||||||
case TypeAuthorizationStateWaitCode:
|
case TypeAuthorizationStateWaitCode:
|
||||||
return UnmarshalAuthorizationStateWaitCode(data)
|
return UnmarshalAuthorizationStateWaitCode(data)
|
||||||
|
|
||||||
|
@ -686,6 +726,40 @@ func UnmarshalListOfMessageForwardOrigin(dataList []json.RawMessage) ([]MessageF
|
||||||
return list, nil
|
return list, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func UnmarshalReactionType(data json.RawMessage) (ReactionType, error) {
|
||||||
|
var meta meta
|
||||||
|
|
||||||
|
err := json.Unmarshal(data, &meta)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
switch meta.Type {
|
||||||
|
case TypeReactionTypeEmoji:
|
||||||
|
return UnmarshalReactionTypeEmoji(data)
|
||||||
|
|
||||||
|
case TypeReactionTypeCustomEmoji:
|
||||||
|
return UnmarshalReactionTypeCustomEmoji(data)
|
||||||
|
|
||||||
|
default:
|
||||||
|
return nil, fmt.Errorf("Error unmarshaling. Unknown type: " + meta.Type)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func UnmarshalListOfReactionType(dataList []json.RawMessage) ([]ReactionType, error) {
|
||||||
|
list := []ReactionType{}
|
||||||
|
|
||||||
|
for _, data := range dataList {
|
||||||
|
entity, err := UnmarshalReactionType(data)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
list = append(list, entity)
|
||||||
|
}
|
||||||
|
|
||||||
|
return list, nil
|
||||||
|
}
|
||||||
|
|
||||||
func UnmarshalMessageSendingState(data json.RawMessage) (MessageSendingState, error) {
|
func UnmarshalMessageSendingState(data json.RawMessage) (MessageSendingState, error) {
|
||||||
var meta meta
|
var meta meta
|
||||||
|
|
||||||
|
@ -868,6 +942,40 @@ func UnmarshalListOfChatSource(dataList []json.RawMessage) ([]ChatSource, error)
|
||||||
return list, nil
|
return list, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func UnmarshalChatAvailableReactions(data json.RawMessage) (ChatAvailableReactions, error) {
|
||||||
|
var meta meta
|
||||||
|
|
||||||
|
err := json.Unmarshal(data, &meta)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
switch meta.Type {
|
||||||
|
case TypeChatAvailableReactionsAll:
|
||||||
|
return UnmarshalChatAvailableReactionsAll(data)
|
||||||
|
|
||||||
|
case TypeChatAvailableReactionsSome:
|
||||||
|
return UnmarshalChatAvailableReactionsSome(data)
|
||||||
|
|
||||||
|
default:
|
||||||
|
return nil, fmt.Errorf("Error unmarshaling. Unknown type: " + meta.Type)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func UnmarshalListOfChatAvailableReactions(dataList []json.RawMessage) ([]ChatAvailableReactions, error) {
|
||||||
|
list := []ChatAvailableReactions{}
|
||||||
|
|
||||||
|
for _, data := range dataList {
|
||||||
|
entity, err := UnmarshalChatAvailableReactions(data)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
list = append(list, entity)
|
||||||
|
}
|
||||||
|
|
||||||
|
return list, nil
|
||||||
|
}
|
||||||
|
|
||||||
func UnmarshalPublicChatType(data json.RawMessage) (PublicChatType, error) {
|
func UnmarshalPublicChatType(data json.RawMessage) (PublicChatType, error) {
|
||||||
var meta meta
|
var meta meta
|
||||||
|
|
||||||
|
@ -3114,6 +3222,9 @@ func UnmarshalPremiumFeature(data json.RawMessage) (PremiumFeature, error) {
|
||||||
case TypePremiumFeatureProfileBadge:
|
case TypePremiumFeatureProfileBadge:
|
||||||
return UnmarshalPremiumFeatureProfileBadge(data)
|
return UnmarshalPremiumFeatureProfileBadge(data)
|
||||||
|
|
||||||
|
case TypePremiumFeatureEmojiStatus:
|
||||||
|
return UnmarshalPremiumFeatureEmojiStatus(data)
|
||||||
|
|
||||||
case TypePremiumFeatureAnimatedProfilePhoto:
|
case TypePremiumFeatureAnimatedProfilePhoto:
|
||||||
return UnmarshalPremiumFeatureAnimatedProfilePhoto(data)
|
return UnmarshalPremiumFeatureAnimatedProfilePhoto(data)
|
||||||
|
|
||||||
|
@ -4180,6 +4291,9 @@ func UnmarshalInternalLinkType(data json.RawMessage) (InternalLinkType, error) {
|
||||||
case TypeInternalLinkTypeGame:
|
case TypeInternalLinkTypeGame:
|
||||||
return UnmarshalInternalLinkTypeGame(data)
|
return UnmarshalInternalLinkTypeGame(data)
|
||||||
|
|
||||||
|
case TypeInternalLinkTypeInstantView:
|
||||||
|
return UnmarshalInternalLinkTypeInstantView(data)
|
||||||
|
|
||||||
case TypeInternalLinkTypeInvoice:
|
case TypeInternalLinkTypeInvoice:
|
||||||
return UnmarshalInternalLinkTypeInvoice(data)
|
return UnmarshalInternalLinkTypeInvoice(data)
|
||||||
|
|
||||||
|
@ -5088,8 +5202,11 @@ func UnmarshalUpdate(data json.RawMessage) (Update, error) {
|
||||||
case TypeUpdateWebAppMessageSent:
|
case TypeUpdateWebAppMessageSent:
|
||||||
return UnmarshalUpdateWebAppMessageSent(data)
|
return UnmarshalUpdateWebAppMessageSent(data)
|
||||||
|
|
||||||
case TypeUpdateReactions:
|
case TypeUpdateActiveEmojiReactions:
|
||||||
return UnmarshalUpdateReactions(data)
|
return UnmarshalUpdateActiveEmojiReactions(data)
|
||||||
|
|
||||||
|
case TypeUpdateDefaultReactionType:
|
||||||
|
return UnmarshalUpdateDefaultReactionType(data)
|
||||||
|
|
||||||
case TypeUpdateDiceEmojis:
|
case TypeUpdateDiceEmojis:
|
||||||
return UnmarshalUpdateDiceEmojis(data)
|
return UnmarshalUpdateDiceEmojis(data)
|
||||||
|
@ -5211,14 +5328,6 @@ func UnmarshalOk(data json.RawMessage) (*Ok, error) {
|
||||||
return &resp, err
|
return &resp, err
|
||||||
}
|
}
|
||||||
|
|
||||||
func UnmarshalTdlibParameters(data json.RawMessage) (*TdlibParameters, error) {
|
|
||||||
var resp TdlibParameters
|
|
||||||
|
|
||||||
err := json.Unmarshal(data, &resp)
|
|
||||||
|
|
||||||
return &resp, err
|
|
||||||
}
|
|
||||||
|
|
||||||
func UnmarshalAuthenticationCodeTypeTelegramMessage(data json.RawMessage) (*AuthenticationCodeTypeTelegramMessage, error) {
|
func UnmarshalAuthenticationCodeTypeTelegramMessage(data json.RawMessage) (*AuthenticationCodeTypeTelegramMessage, error) {
|
||||||
var resp AuthenticationCodeTypeTelegramMessage
|
var resp AuthenticationCodeTypeTelegramMessage
|
||||||
|
|
||||||
|
@ -5275,6 +5384,30 @@ func UnmarshalEmailAddressAuthenticationCodeInfo(data json.RawMessage) (*EmailAd
|
||||||
return &resp, err
|
return &resp, err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func UnmarshalEmailAddressAuthenticationCode(data json.RawMessage) (*EmailAddressAuthenticationCode, error) {
|
||||||
|
var resp EmailAddressAuthenticationCode
|
||||||
|
|
||||||
|
err := json.Unmarshal(data, &resp)
|
||||||
|
|
||||||
|
return &resp, err
|
||||||
|
}
|
||||||
|
|
||||||
|
func UnmarshalEmailAddressAuthenticationAppleId(data json.RawMessage) (*EmailAddressAuthenticationAppleId, error) {
|
||||||
|
var resp EmailAddressAuthenticationAppleId
|
||||||
|
|
||||||
|
err := json.Unmarshal(data, &resp)
|
||||||
|
|
||||||
|
return &resp, err
|
||||||
|
}
|
||||||
|
|
||||||
|
func UnmarshalEmailAddressAuthenticationGoogleId(data json.RawMessage) (*EmailAddressAuthenticationGoogleId, error) {
|
||||||
|
var resp EmailAddressAuthenticationGoogleId
|
||||||
|
|
||||||
|
err := json.Unmarshal(data, &resp)
|
||||||
|
|
||||||
|
return &resp, err
|
||||||
|
}
|
||||||
|
|
||||||
func UnmarshalTextEntity(data json.RawMessage) (*TextEntity, error) {
|
func UnmarshalTextEntity(data json.RawMessage) (*TextEntity, error) {
|
||||||
var resp TextEntity
|
var resp TextEntity
|
||||||
|
|
||||||
|
@ -5315,16 +5448,24 @@ func UnmarshalAuthorizationStateWaitTdlibParameters(data json.RawMessage) (*Auth
|
||||||
return &resp, err
|
return &resp, err
|
||||||
}
|
}
|
||||||
|
|
||||||
func UnmarshalAuthorizationStateWaitEncryptionKey(data json.RawMessage) (*AuthorizationStateWaitEncryptionKey, error) {
|
func UnmarshalAuthorizationStateWaitPhoneNumber(data json.RawMessage) (*AuthorizationStateWaitPhoneNumber, error) {
|
||||||
var resp AuthorizationStateWaitEncryptionKey
|
var resp AuthorizationStateWaitPhoneNumber
|
||||||
|
|
||||||
err := json.Unmarshal(data, &resp)
|
err := json.Unmarshal(data, &resp)
|
||||||
|
|
||||||
return &resp, err
|
return &resp, err
|
||||||
}
|
}
|
||||||
|
|
||||||
func UnmarshalAuthorizationStateWaitPhoneNumber(data json.RawMessage) (*AuthorizationStateWaitPhoneNumber, error) {
|
func UnmarshalAuthorizationStateWaitEmailAddress(data json.RawMessage) (*AuthorizationStateWaitEmailAddress, error) {
|
||||||
var resp AuthorizationStateWaitPhoneNumber
|
var resp AuthorizationStateWaitEmailAddress
|
||||||
|
|
||||||
|
err := json.Unmarshal(data, &resp)
|
||||||
|
|
||||||
|
return &resp, err
|
||||||
|
}
|
||||||
|
|
||||||
|
func UnmarshalAuthorizationStateWaitEmailCode(data json.RawMessage) (*AuthorizationStateWaitEmailCode, error) {
|
||||||
|
var resp AuthorizationStateWaitEmailCode
|
||||||
|
|
||||||
err := json.Unmarshal(data, &resp)
|
err := json.Unmarshal(data, &resp)
|
||||||
|
|
||||||
|
@ -5443,6 +5584,14 @@ func UnmarshalFile(data json.RawMessage) (*File, error) {
|
||||||
return &resp, err
|
return &resp, err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func UnmarshalFiles(data json.RawMessage) (*Files, error) {
|
||||||
|
var resp Files
|
||||||
|
|
||||||
|
err := json.Unmarshal(data, &resp)
|
||||||
|
|
||||||
|
return &resp, err
|
||||||
|
}
|
||||||
|
|
||||||
func UnmarshalInputFileId(data json.RawMessage) (*InputFileId, error) {
|
func UnmarshalInputFileId(data json.RawMessage) (*InputFileId, error) {
|
||||||
var resp InputFileId
|
var resp InputFileId
|
||||||
|
|
||||||
|
@ -5931,8 +6080,24 @@ func UnmarshalChatAdministratorRights(data json.RawMessage) (*ChatAdministratorR
|
||||||
return &resp, err
|
return &resp, err
|
||||||
}
|
}
|
||||||
|
|
||||||
func UnmarshalPremiumGiftOption(data json.RawMessage) (*PremiumGiftOption, error) {
|
func UnmarshalPremiumPaymentOption(data json.RawMessage) (*PremiumPaymentOption, error) {
|
||||||
var resp PremiumGiftOption
|
var resp PremiumPaymentOption
|
||||||
|
|
||||||
|
err := json.Unmarshal(data, &resp)
|
||||||
|
|
||||||
|
return &resp, err
|
||||||
|
}
|
||||||
|
|
||||||
|
func UnmarshalEmojiStatus(data json.RawMessage) (*EmojiStatus, error) {
|
||||||
|
var resp EmojiStatus
|
||||||
|
|
||||||
|
err := json.Unmarshal(data, &resp)
|
||||||
|
|
||||||
|
return &resp, err
|
||||||
|
}
|
||||||
|
|
||||||
|
func UnmarshalEmojiStatuses(data json.RawMessage) (*EmojiStatuses, error) {
|
||||||
|
var resp EmojiStatuses
|
||||||
|
|
||||||
err := json.Unmarshal(data, &resp)
|
err := json.Unmarshal(data, &resp)
|
||||||
|
|
||||||
|
@ -6379,6 +6544,22 @@ func UnmarshalMessageForwardOriginMessageImport(data json.RawMessage) (*MessageF
|
||||||
return &resp, err
|
return &resp, err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func UnmarshalReactionTypeEmoji(data json.RawMessage) (*ReactionTypeEmoji, error) {
|
||||||
|
var resp ReactionTypeEmoji
|
||||||
|
|
||||||
|
err := json.Unmarshal(data, &resp)
|
||||||
|
|
||||||
|
return &resp, err
|
||||||
|
}
|
||||||
|
|
||||||
|
func UnmarshalReactionTypeCustomEmoji(data json.RawMessage) (*ReactionTypeCustomEmoji, error) {
|
||||||
|
var resp ReactionTypeCustomEmoji
|
||||||
|
|
||||||
|
err := json.Unmarshal(data, &resp)
|
||||||
|
|
||||||
|
return &resp, err
|
||||||
|
}
|
||||||
|
|
||||||
func UnmarshalMessageForwardInfo(data json.RawMessage) (*MessageForwardInfo, error) {
|
func UnmarshalMessageForwardInfo(data json.RawMessage) (*MessageForwardInfo, error) {
|
||||||
var resp MessageForwardInfo
|
var resp MessageForwardInfo
|
||||||
|
|
||||||
|
@ -6691,6 +6872,22 @@ func UnmarshalChatPosition(data json.RawMessage) (*ChatPosition, error) {
|
||||||
return &resp, err
|
return &resp, err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func UnmarshalChatAvailableReactionsAll(data json.RawMessage) (*ChatAvailableReactionsAll, error) {
|
||||||
|
var resp ChatAvailableReactionsAll
|
||||||
|
|
||||||
|
err := json.Unmarshal(data, &resp)
|
||||||
|
|
||||||
|
return &resp, err
|
||||||
|
}
|
||||||
|
|
||||||
|
func UnmarshalChatAvailableReactionsSome(data json.RawMessage) (*ChatAvailableReactionsSome, error) {
|
||||||
|
var resp ChatAvailableReactionsSome
|
||||||
|
|
||||||
|
err := json.Unmarshal(data, &resp)
|
||||||
|
|
||||||
|
return &resp, err
|
||||||
|
}
|
||||||
|
|
||||||
func UnmarshalVideoChat(data json.RawMessage) (*VideoChat, error) {
|
func UnmarshalVideoChat(data json.RawMessage) (*VideoChat, error) {
|
||||||
var resp VideoChat
|
var resp VideoChat
|
||||||
|
|
||||||
|
@ -9699,8 +9896,8 @@ func UnmarshalAvailableReactions(data json.RawMessage) (*AvailableReactions, err
|
||||||
return &resp, err
|
return &resp, err
|
||||||
}
|
}
|
||||||
|
|
||||||
func UnmarshalReaction(data json.RawMessage) (*Reaction, error) {
|
func UnmarshalEmojiReaction(data json.RawMessage) (*EmojiReaction, error) {
|
||||||
var resp Reaction
|
var resp EmojiReaction
|
||||||
|
|
||||||
err := json.Unmarshal(data, &resp)
|
err := json.Unmarshal(data, &resp)
|
||||||
|
|
||||||
|
@ -10571,6 +10768,14 @@ func UnmarshalPremiumFeatureProfileBadge(data json.RawMessage) (*PremiumFeatureP
|
||||||
return &resp, err
|
return &resp, err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func UnmarshalPremiumFeatureEmojiStatus(data json.RawMessage) (*PremiumFeatureEmojiStatus, error) {
|
||||||
|
var resp PremiumFeatureEmojiStatus
|
||||||
|
|
||||||
|
err := json.Unmarshal(data, &resp)
|
||||||
|
|
||||||
|
return &resp, err
|
||||||
|
}
|
||||||
|
|
||||||
func UnmarshalPremiumFeatureAnimatedProfilePhoto(data json.RawMessage) (*PremiumFeatureAnimatedProfilePhoto, error) {
|
func UnmarshalPremiumFeatureAnimatedProfilePhoto(data json.RawMessage) (*PremiumFeatureAnimatedProfilePhoto, error) {
|
||||||
var resp PremiumFeatureAnimatedProfilePhoto
|
var resp PremiumFeatureAnimatedProfilePhoto
|
||||||
|
|
||||||
|
@ -11939,6 +12144,14 @@ func UnmarshalInternalLinkTypeGame(data json.RawMessage) (*InternalLinkTypeGame,
|
||||||
return &resp, err
|
return &resp, err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func UnmarshalInternalLinkTypeInstantView(data json.RawMessage) (*InternalLinkTypeInstantView, error) {
|
||||||
|
var resp InternalLinkTypeInstantView
|
||||||
|
|
||||||
|
err := json.Unmarshal(data, &resp)
|
||||||
|
|
||||||
|
return &resp, err
|
||||||
|
}
|
||||||
|
|
||||||
func UnmarshalInternalLinkTypeInvoice(data json.RawMessage) (*InternalLinkTypeInvoice, error) {
|
func UnmarshalInternalLinkTypeInvoice(data json.RawMessage) (*InternalLinkTypeInvoice, error) {
|
||||||
var resp InternalLinkTypeInvoice
|
var resp InternalLinkTypeInvoice
|
||||||
|
|
||||||
|
@ -13547,8 +13760,16 @@ func UnmarshalUpdateWebAppMessageSent(data json.RawMessage) (*UpdateWebAppMessag
|
||||||
return &resp, err
|
return &resp, err
|
||||||
}
|
}
|
||||||
|
|
||||||
func UnmarshalUpdateReactions(data json.RawMessage) (*UpdateReactions, error) {
|
func UnmarshalUpdateActiveEmojiReactions(data json.RawMessage) (*UpdateActiveEmojiReactions, error) {
|
||||||
var resp UpdateReactions
|
var resp UpdateActiveEmojiReactions
|
||||||
|
|
||||||
|
err := json.Unmarshal(data, &resp)
|
||||||
|
|
||||||
|
return &resp, err
|
||||||
|
}
|
||||||
|
|
||||||
|
func UnmarshalUpdateDefaultReactionType(data json.RawMessage) (*UpdateDefaultReactionType, error) {
|
||||||
|
var resp UpdateDefaultReactionType
|
||||||
|
|
||||||
err := json.Unmarshal(data, &resp)
|
err := json.Unmarshal(data, &resp)
|
||||||
|
|
||||||
|
@ -13731,6 +13952,14 @@ func UnmarshalLogTags(data json.RawMessage) (*LogTags, error) {
|
||||||
return &resp, err
|
return &resp, err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func UnmarshalUserSupportInfo(data json.RawMessage) (*UserSupportInfo, error) {
|
||||||
|
var resp UserSupportInfo
|
||||||
|
|
||||||
|
err := json.Unmarshal(data, &resp)
|
||||||
|
|
||||||
|
return &resp, err
|
||||||
|
}
|
||||||
|
|
||||||
func UnmarshalTestInt(data json.RawMessage) (*TestInt, error) {
|
func UnmarshalTestInt(data json.RawMessage) (*TestInt, error) {
|
||||||
var resp TestInt
|
var resp TestInt
|
||||||
|
|
||||||
|
@ -13802,9 +14031,6 @@ func UnmarshalType(data json.RawMessage) (Type, error) {
|
||||||
case TypeOk:
|
case TypeOk:
|
||||||
return UnmarshalOk(data)
|
return UnmarshalOk(data)
|
||||||
|
|
||||||
case TypeTdlibParameters:
|
|
||||||
return UnmarshalTdlibParameters(data)
|
|
||||||
|
|
||||||
case TypeAuthenticationCodeTypeTelegramMessage:
|
case TypeAuthenticationCodeTypeTelegramMessage:
|
||||||
return UnmarshalAuthenticationCodeTypeTelegramMessage(data)
|
return UnmarshalAuthenticationCodeTypeTelegramMessage(data)
|
||||||
|
|
||||||
|
@ -13826,6 +14052,15 @@ func UnmarshalType(data json.RawMessage) (Type, error) {
|
||||||
case TypeEmailAddressAuthenticationCodeInfo:
|
case TypeEmailAddressAuthenticationCodeInfo:
|
||||||
return UnmarshalEmailAddressAuthenticationCodeInfo(data)
|
return UnmarshalEmailAddressAuthenticationCodeInfo(data)
|
||||||
|
|
||||||
|
case TypeEmailAddressAuthenticationCode:
|
||||||
|
return UnmarshalEmailAddressAuthenticationCode(data)
|
||||||
|
|
||||||
|
case TypeEmailAddressAuthenticationAppleId:
|
||||||
|
return UnmarshalEmailAddressAuthenticationAppleId(data)
|
||||||
|
|
||||||
|
case TypeEmailAddressAuthenticationGoogleId:
|
||||||
|
return UnmarshalEmailAddressAuthenticationGoogleId(data)
|
||||||
|
|
||||||
case TypeTextEntity:
|
case TypeTextEntity:
|
||||||
return UnmarshalTextEntity(data)
|
return UnmarshalTextEntity(data)
|
||||||
|
|
||||||
|
@ -13841,12 +14076,15 @@ func UnmarshalType(data json.RawMessage) (Type, error) {
|
||||||
case TypeAuthorizationStateWaitTdlibParameters:
|
case TypeAuthorizationStateWaitTdlibParameters:
|
||||||
return UnmarshalAuthorizationStateWaitTdlibParameters(data)
|
return UnmarshalAuthorizationStateWaitTdlibParameters(data)
|
||||||
|
|
||||||
case TypeAuthorizationStateWaitEncryptionKey:
|
|
||||||
return UnmarshalAuthorizationStateWaitEncryptionKey(data)
|
|
||||||
|
|
||||||
case TypeAuthorizationStateWaitPhoneNumber:
|
case TypeAuthorizationStateWaitPhoneNumber:
|
||||||
return UnmarshalAuthorizationStateWaitPhoneNumber(data)
|
return UnmarshalAuthorizationStateWaitPhoneNumber(data)
|
||||||
|
|
||||||
|
case TypeAuthorizationStateWaitEmailAddress:
|
||||||
|
return UnmarshalAuthorizationStateWaitEmailAddress(data)
|
||||||
|
|
||||||
|
case TypeAuthorizationStateWaitEmailCode:
|
||||||
|
return UnmarshalAuthorizationStateWaitEmailCode(data)
|
||||||
|
|
||||||
case TypeAuthorizationStateWaitCode:
|
case TypeAuthorizationStateWaitCode:
|
||||||
return UnmarshalAuthorizationStateWaitCode(data)
|
return UnmarshalAuthorizationStateWaitCode(data)
|
||||||
|
|
||||||
|
@ -13889,6 +14127,9 @@ func UnmarshalType(data json.RawMessage) (Type, error) {
|
||||||
case TypeFile:
|
case TypeFile:
|
||||||
return UnmarshalFile(data)
|
return UnmarshalFile(data)
|
||||||
|
|
||||||
|
case TypeFiles:
|
||||||
|
return UnmarshalFiles(data)
|
||||||
|
|
||||||
case TypeInputFileId:
|
case TypeInputFileId:
|
||||||
return UnmarshalInputFileId(data)
|
return UnmarshalInputFileId(data)
|
||||||
|
|
||||||
|
@ -14072,8 +14313,14 @@ func UnmarshalType(data json.RawMessage) (Type, error) {
|
||||||
case TypeChatAdministratorRights:
|
case TypeChatAdministratorRights:
|
||||||
return UnmarshalChatAdministratorRights(data)
|
return UnmarshalChatAdministratorRights(data)
|
||||||
|
|
||||||
case TypePremiumGiftOption:
|
case TypePremiumPaymentOption:
|
||||||
return UnmarshalPremiumGiftOption(data)
|
return UnmarshalPremiumPaymentOption(data)
|
||||||
|
|
||||||
|
case TypeEmojiStatus:
|
||||||
|
return UnmarshalEmojiStatus(data)
|
||||||
|
|
||||||
|
case TypeEmojiStatuses:
|
||||||
|
return UnmarshalEmojiStatuses(data)
|
||||||
|
|
||||||
case TypeUser:
|
case TypeUser:
|
||||||
return UnmarshalUser(data)
|
return UnmarshalUser(data)
|
||||||
|
@ -14240,6 +14487,12 @@ func UnmarshalType(data json.RawMessage) (Type, error) {
|
||||||
case TypeMessageForwardOriginMessageImport:
|
case TypeMessageForwardOriginMessageImport:
|
||||||
return UnmarshalMessageForwardOriginMessageImport(data)
|
return UnmarshalMessageForwardOriginMessageImport(data)
|
||||||
|
|
||||||
|
case TypeReactionTypeEmoji:
|
||||||
|
return UnmarshalReactionTypeEmoji(data)
|
||||||
|
|
||||||
|
case TypeReactionTypeCustomEmoji:
|
||||||
|
return UnmarshalReactionTypeCustomEmoji(data)
|
||||||
|
|
||||||
case TypeMessageForwardInfo:
|
case TypeMessageForwardInfo:
|
||||||
return UnmarshalMessageForwardInfo(data)
|
return UnmarshalMessageForwardInfo(data)
|
||||||
|
|
||||||
|
@ -14357,6 +14610,12 @@ func UnmarshalType(data json.RawMessage) (Type, error) {
|
||||||
case TypeChatPosition:
|
case TypeChatPosition:
|
||||||
return UnmarshalChatPosition(data)
|
return UnmarshalChatPosition(data)
|
||||||
|
|
||||||
|
case TypeChatAvailableReactionsAll:
|
||||||
|
return UnmarshalChatAvailableReactionsAll(data)
|
||||||
|
|
||||||
|
case TypeChatAvailableReactionsSome:
|
||||||
|
return UnmarshalChatAvailableReactionsSome(data)
|
||||||
|
|
||||||
case TypeVideoChat:
|
case TypeVideoChat:
|
||||||
return UnmarshalVideoChat(data)
|
return UnmarshalVideoChat(data)
|
||||||
|
|
||||||
|
@ -15485,8 +15744,8 @@ func UnmarshalType(data json.RawMessage) (Type, error) {
|
||||||
case TypeAvailableReactions:
|
case TypeAvailableReactions:
|
||||||
return UnmarshalAvailableReactions(data)
|
return UnmarshalAvailableReactions(data)
|
||||||
|
|
||||||
case TypeReaction:
|
case TypeEmojiReaction:
|
||||||
return UnmarshalReaction(data)
|
return UnmarshalEmojiReaction(data)
|
||||||
|
|
||||||
case TypeAnimations:
|
case TypeAnimations:
|
||||||
return UnmarshalAnimations(data)
|
return UnmarshalAnimations(data)
|
||||||
|
@ -15812,6 +16071,9 @@ func UnmarshalType(data json.RawMessage) (Type, error) {
|
||||||
case TypePremiumFeatureProfileBadge:
|
case TypePremiumFeatureProfileBadge:
|
||||||
return UnmarshalPremiumFeatureProfileBadge(data)
|
return UnmarshalPremiumFeatureProfileBadge(data)
|
||||||
|
|
||||||
|
case TypePremiumFeatureEmojiStatus:
|
||||||
|
return UnmarshalPremiumFeatureEmojiStatus(data)
|
||||||
|
|
||||||
case TypePremiumFeatureAnimatedProfilePhoto:
|
case TypePremiumFeatureAnimatedProfilePhoto:
|
||||||
return UnmarshalPremiumFeatureAnimatedProfilePhoto(data)
|
return UnmarshalPremiumFeatureAnimatedProfilePhoto(data)
|
||||||
|
|
||||||
|
@ -16325,6 +16587,9 @@ func UnmarshalType(data json.RawMessage) (Type, error) {
|
||||||
case TypeInternalLinkTypeGame:
|
case TypeInternalLinkTypeGame:
|
||||||
return UnmarshalInternalLinkTypeGame(data)
|
return UnmarshalInternalLinkTypeGame(data)
|
||||||
|
|
||||||
|
case TypeInternalLinkTypeInstantView:
|
||||||
|
return UnmarshalInternalLinkTypeInstantView(data)
|
||||||
|
|
||||||
case TypeInternalLinkTypeInvoice:
|
case TypeInternalLinkTypeInvoice:
|
||||||
return UnmarshalInternalLinkTypeInvoice(data)
|
return UnmarshalInternalLinkTypeInvoice(data)
|
||||||
|
|
||||||
|
@ -16928,8 +17193,11 @@ func UnmarshalType(data json.RawMessage) (Type, error) {
|
||||||
case TypeUpdateWebAppMessageSent:
|
case TypeUpdateWebAppMessageSent:
|
||||||
return UnmarshalUpdateWebAppMessageSent(data)
|
return UnmarshalUpdateWebAppMessageSent(data)
|
||||||
|
|
||||||
case TypeUpdateReactions:
|
case TypeUpdateActiveEmojiReactions:
|
||||||
return UnmarshalUpdateReactions(data)
|
return UnmarshalUpdateActiveEmojiReactions(data)
|
||||||
|
|
||||||
|
case TypeUpdateDefaultReactionType:
|
||||||
|
return UnmarshalUpdateDefaultReactionType(data)
|
||||||
|
|
||||||
case TypeUpdateDiceEmojis:
|
case TypeUpdateDiceEmojis:
|
||||||
return UnmarshalUpdateDiceEmojis(data)
|
return UnmarshalUpdateDiceEmojis(data)
|
||||||
|
@ -16997,6 +17265,9 @@ func UnmarshalType(data json.RawMessage) (Type, error) {
|
||||||
case TypeLogTags:
|
case TypeLogTags:
|
||||||
return UnmarshalLogTags(data)
|
return UnmarshalLogTags(data)
|
||||||
|
|
||||||
|
case TypeUserSupportInfo:
|
||||||
|
return UnmarshalUserSupportInfo(data)
|
||||||
|
|
||||||
case TypeTestInt:
|
case TypeTestInt:
|
||||||
return UnmarshalTestInt(data)
|
return UnmarshalTestInt(data)
|
||||||
|
|
||||||
|
|
283
data/td_api.tl
283
data/td_api.tl
|
@ -22,25 +22,6 @@ error code:int32 message:string = Error;
|
||||||
ok = Ok;
|
ok = Ok;
|
||||||
|
|
||||||
|
|
||||||
//@description Contains parameters for TDLib initialization
|
|
||||||
//@use_test_dc If set to true, the Telegram test environment will be used instead of the production environment
|
|
||||||
//@database_directory The path to the directory for the persistent database; if empty, the current working directory will be used
|
|
||||||
//@files_directory The path to the directory for storing files; if empty, database_directory will be used
|
|
||||||
//@use_file_database If set to true, information about downloaded and uploaded files will be saved between application restarts
|
|
||||||
//@use_chat_info_database If set to true, the library will maintain a cache of users, basic groups, supergroups, channels and secret chats. Implies use_file_database
|
|
||||||
//@use_message_database If set to true, the library will maintain a cache of chats and messages. Implies use_chat_info_database
|
|
||||||
//@use_secret_chats If set to true, support for secret chats will be enabled
|
|
||||||
//@api_id Application identifier for Telegram API access, which can be obtained at https://my.telegram.org
|
|
||||||
//@api_hash Application identifier hash for Telegram API access, which can be obtained at https://my.telegram.org
|
|
||||||
//@system_language_code IETF language tag of the user's operating system language; must be non-empty
|
|
||||||
//@device_model Model of the device the application is being run on; must be non-empty
|
|
||||||
//@system_version Version of the operating system the application is being run on. If empty, the version is automatically detected by TDLib
|
|
||||||
//@application_version Application version; must be non-empty
|
|
||||||
//@enable_storage_optimizer If set to true, old files will automatically be deleted
|
|
||||||
//@ignore_file_names If set to true, original file names will be ignored. Otherwise, downloaded files will be saved under names as close as possible to the original name
|
|
||||||
tdlibParameters use_test_dc:Bool database_directory:string files_directory:string use_file_database:Bool use_chat_info_database:Bool use_message_database:Bool use_secret_chats:Bool api_id:int32 api_hash:string system_language_code:string device_model:string system_version:string application_version:string enable_storage_optimizer:Bool ignore_file_names:Bool = TdlibParameters;
|
|
||||||
|
|
||||||
|
|
||||||
//@class AuthenticationCodeType @description Provides information about the method by which an authentication code is delivered to the user
|
//@class AuthenticationCodeType @description Provides information about the method by which an authentication code is delivered to the user
|
||||||
|
|
||||||
//@description An authentication code is delivered via a private Telegram message, which can be viewed from another active session @length Length of the code
|
//@description An authentication code is delivered via a private Telegram message, which can be viewed from another active session @length Length of the code
|
||||||
|
@ -66,6 +47,18 @@ authenticationCodeInfo phone_number:string type:AuthenticationCodeType next_type
|
||||||
emailAddressAuthenticationCodeInfo email_address_pattern:string length:int32 = EmailAddressAuthenticationCodeInfo;
|
emailAddressAuthenticationCodeInfo email_address_pattern:string length:int32 = EmailAddressAuthenticationCodeInfo;
|
||||||
|
|
||||||
|
|
||||||
|
//@class EmailAddressAuthentication @description Contains authentication data for a email address
|
||||||
|
|
||||||
|
//@description An authentication code delivered to a user's email address @code The code
|
||||||
|
emailAddressAuthenticationCode code:string = EmailAddressAuthentication;
|
||||||
|
|
||||||
|
//@description An authentication token received through Apple ID @token The token
|
||||||
|
emailAddressAuthenticationAppleId token:string = EmailAddressAuthentication;
|
||||||
|
|
||||||
|
//@description An authentication token received through Google ID @token The token
|
||||||
|
emailAddressAuthenticationGoogleId token:string = EmailAddressAuthentication;
|
||||||
|
|
||||||
|
|
||||||
//@description Represents a part of the text that needs to be formatted in some unusual way @offset Offset of the entity, in UTF-16 code units @length Length of the entity, in UTF-16 code units @type Type of the entity
|
//@description Represents a part of the text that needs to be formatted in some unusual way @offset Offset of the entity, in UTF-16 code units @length Length of the entity, in UTF-16 code units @type Type of the entity
|
||||||
textEntity offset:int32 length:int32 type:TextEntityType = TextEntity;
|
textEntity offset:int32 length:int32 type:TextEntityType = TextEntity;
|
||||||
|
|
||||||
|
@ -83,15 +76,22 @@ termsOfService text:formattedText min_user_age:int32 show_popup:Bool = TermsOfSe
|
||||||
|
|
||||||
//@class AuthorizationState @description Represents the current authorization state of the TDLib client
|
//@class AuthorizationState @description Represents the current authorization state of the TDLib client
|
||||||
|
|
||||||
//@description TDLib needs TdlibParameters for initialization
|
//@description Initializetion parameters are needed. Call `setTdlibParameters` to provide them
|
||||||
authorizationStateWaitTdlibParameters = AuthorizationState;
|
authorizationStateWaitTdlibParameters = AuthorizationState;
|
||||||
|
|
||||||
//@description TDLib needs an encryption key to decrypt the local database @is_encrypted True, if the database is currently encrypted
|
|
||||||
authorizationStateWaitEncryptionKey is_encrypted:Bool = AuthorizationState;
|
|
||||||
|
|
||||||
//@description TDLib needs the user's phone number to authorize. Call `setAuthenticationPhoneNumber` to provide the phone number, or use `requestQrCodeAuthentication`, or `checkAuthenticationBotToken` for other authentication options
|
//@description TDLib needs the user's phone number to authorize. Call `setAuthenticationPhoneNumber` to provide the phone number, or use `requestQrCodeAuthentication`, or `checkAuthenticationBotToken` for other authentication options
|
||||||
authorizationStateWaitPhoneNumber = AuthorizationState;
|
authorizationStateWaitPhoneNumber = AuthorizationState;
|
||||||
|
|
||||||
|
//@description TDLib needs the user's email address to authorize. Call `setAuthenticationEmailAddress` to provide the email address, or directly call `checkAuthenticationEmailCode` with Apple ID/Google ID token if allowed
|
||||||
|
//@allow_apple_id True, if authorization through Apple ID is allowed @allow_google_id True, if authorization through Google ID is allowed
|
||||||
|
authorizationStateWaitEmailAddress allow_apple_id:Bool allow_google_id:Bool = AuthorizationState;
|
||||||
|
|
||||||
|
//@description TDLib needs the user's authentication code sent to an email address to authorize. Call `checkAuthenticationEmailCode` to provide the code
|
||||||
|
//@allow_apple_id True, if authorization through Apple ID is allowed @allow_google_id True, if authorization through Google ID is allowed
|
||||||
|
//@code_info Information about the sent authentication code
|
||||||
|
//@next_phone_number_authorization_date Point in time (Unix timestamp) when the user will be able to authorize with a code sent to the user's phone number; 0 if unknown
|
||||||
|
authorizationStateWaitEmailCode allow_apple_id:Bool allow_google_id:Bool code_info:emailAddressAuthenticationCodeInfo next_phone_number_authorization_date:int32 = AuthorizationState;
|
||||||
|
|
||||||
//@description TDLib needs the user's authentication code to authorize @code_info Information about the authorization code that was sent
|
//@description TDLib needs the user's authentication code to authorize @code_info Information about the authorization code that was sent
|
||||||
authorizationStateWaitCode code_info:authenticationCodeInfo = AuthorizationState;
|
authorizationStateWaitCode code_info:authenticationCodeInfo = AuthorizationState;
|
||||||
|
|
||||||
|
@ -122,8 +122,9 @@ authorizationStateClosed = AuthorizationState;
|
||||||
//@description Represents the current state of 2-step verification @has_password True, if a 2-step verification password is set @password_hint Hint for the password; may be empty
|
//@description Represents the current state of 2-step verification @has_password True, if a 2-step verification password is set @password_hint Hint for the password; may be empty
|
||||||
//@has_recovery_email_address True, if a recovery email is set @has_passport_data True, if some Telegram Passport elements were saved
|
//@has_recovery_email_address True, if a recovery email is set @has_passport_data True, if some Telegram Passport elements were saved
|
||||||
//@recovery_email_address_code_info Information about the recovery email address to which the confirmation email was sent; may be null
|
//@recovery_email_address_code_info Information about the recovery email address to which the confirmation email was sent; may be null
|
||||||
|
//@login_email_address_pattern Pattern of the email address set up for logging in
|
||||||
//@pending_reset_date If not 0, point in time (Unix timestamp) after which the 2-step verification password can be reset immediately using resetPassword
|
//@pending_reset_date If not 0, point in time (Unix timestamp) after which the 2-step verification password can be reset immediately using resetPassword
|
||||||
passwordState has_password:Bool password_hint:string has_recovery_email_address:Bool has_passport_data:Bool recovery_email_address_code_info:emailAddressAuthenticationCodeInfo pending_reset_date:int32 = PasswordState;
|
passwordState has_password:Bool password_hint:string has_recovery_email_address:Bool has_passport_data:Bool recovery_email_address_code_info:emailAddressAuthenticationCodeInfo login_email_address_pattern:string pending_reset_date:int32 = PasswordState;
|
||||||
|
|
||||||
//@description Contains information about the current recovery email address @recovery_email_address Recovery email address
|
//@description Contains information about the current recovery email address @recovery_email_address Recovery email address
|
||||||
recoveryEmailAddress recovery_email_address:string = RecoveryEmailAddress;
|
recoveryEmailAddress recovery_email_address:string = RecoveryEmailAddress;
|
||||||
|
@ -163,6 +164,9 @@ remoteFile id:string unique_id:string is_uploading_active:Bool is_uploading_comp
|
||||||
//@remote Information about the remote copy of the file
|
//@remote Information about the remote copy of the file
|
||||||
file id:int32 dc_id:int32 size:int53 expected_size:int53 local:localFile remote:remoteFile = File;
|
file id:int32 dc_id:int32 size:int53 expected_size:int53 local:localFile remote:remoteFile = File;
|
||||||
|
|
||||||
|
//@description Represents a list of files @files List of files
|
||||||
|
files files:vector<file> = Files;
|
||||||
|
|
||||||
|
|
||||||
//@class InputFile @description Points to a file
|
//@class InputFile @description Points to a file
|
||||||
|
|
||||||
|
@ -470,14 +474,20 @@ chatPermissions can_send_messages:Bool can_send_media_messages:Bool can_send_pol
|
||||||
chatAdministratorRights can_manage_chat:Bool can_change_info:Bool can_post_messages:Bool can_edit_messages:Bool can_delete_messages:Bool can_invite_users:Bool can_restrict_members:Bool can_pin_messages:Bool can_promote_members:Bool can_manage_video_chats:Bool is_anonymous:Bool = ChatAdministratorRights;
|
chatAdministratorRights can_manage_chat:Bool can_change_info:Bool can_post_messages:Bool can_edit_messages:Bool can_delete_messages:Bool can_invite_users:Bool can_restrict_members:Bool can_pin_messages:Bool can_promote_members:Bool can_manage_video_chats:Bool is_anonymous:Bool = ChatAdministratorRights;
|
||||||
|
|
||||||
|
|
||||||
//@description Describes an option for gifting Telegram Premium to a user
|
//@description Describes an option for buying Telegram Premium to a user
|
||||||
//@currency ISO 4217 currency code for Telegram Premium subscription payment
|
//@currency ISO 4217 currency code for Telegram Premium subscription payment
|
||||||
//@amount The amount to pay, in the smallest units of the currency
|
//@amount The amount to pay, in the smallest units of the currency
|
||||||
//@discount_percentage The discount associated with this gift option, as a percentage
|
//@discount_percentage The discount associated with this option, as a percentage
|
||||||
//@month_count Number of month the Telegram Premium subscription will be active
|
//@month_count Number of month the Telegram Premium subscription will be active
|
||||||
//@store_product_id Identifier of the store product associated with the option
|
//@store_product_id Identifier of the store product associated with the option
|
||||||
//@payment_link An internal link to be opened for gifting Telegram Premium to the user if store payment isn't possible; may be null if direct payment isn't available
|
//@payment_link An internal link to be opened for buying Telegram Premium to the user if store payment isn't possible; may be null if direct payment isn't available
|
||||||
premiumGiftOption currency:string amount:int53 discount_percentage:int32 month_count:int32 store_product_id:string payment_link:InternalLinkType = PremiumGiftOption;
|
premiumPaymentOption currency:string amount:int53 discount_percentage:int32 month_count:int32 store_product_id:string payment_link:InternalLinkType = PremiumPaymentOption;
|
||||||
|
|
||||||
|
//@description Describes a custom emoji to be shown instead of the Telegram Premium badge @custom_emoji_id Identifier of the custom emoji in stickerFormatTgs format. If the custom emoji belongs to the sticker set GetOption("themed_emoji_statuses_sticker_set_id"), then it's color must be changed to the color of the Telegram Premium badge
|
||||||
|
emojiStatus custom_emoji_id:int64 = EmojiStatus;
|
||||||
|
|
||||||
|
//@description Contains a list of emoji statuses @emoji_statuses The list of emoji statuses
|
||||||
|
emojiStatuses emoji_statuses:vector<emojiStatus> = EmojiStatuses;
|
||||||
|
|
||||||
|
|
||||||
//@description Represents a user
|
//@description Represents a user
|
||||||
|
@ -489,6 +499,7 @@ premiumGiftOption currency:string amount:int53 discount_percentage:int32 month_c
|
||||||
//@phone_number Phone number of the user
|
//@phone_number Phone number of the user
|
||||||
//@status Current online status of the user
|
//@status Current online status of the user
|
||||||
//@profile_photo Profile photo of the user; may be null
|
//@profile_photo Profile photo of the user; may be null
|
||||||
|
//@emoji_status Emoji status to be shown instead of the default Telegram Premium badge; may be null. For Telegram Premium users only
|
||||||
//@is_contact The user is a contact of the current user
|
//@is_contact The user is a contact of the current user
|
||||||
//@is_mutual_contact The user is a contact of the current user and the current user is a contact of the user
|
//@is_mutual_contact The user is a contact of the current user and the current user is a contact of the user
|
||||||
//@is_verified True, if the user is verified
|
//@is_verified True, if the user is verified
|
||||||
|
@ -501,7 +512,7 @@ premiumGiftOption currency:string amount:int53 discount_percentage:int32 month_c
|
||||||
//@type Type of the user
|
//@type Type of the user
|
||||||
//@language_code IETF language tag of the user's language; only available to bots
|
//@language_code IETF language tag of the user's language; only available to bots
|
||||||
//@added_to_attachment_menu True, if the user added the current bot to attachment menu; only available to bots
|
//@added_to_attachment_menu True, if the user added the current bot to attachment menu; only available to bots
|
||||||
user id:int53 access_hash:int64 first_name:string last_name:string username:string phone_number:string status:UserStatus profile_photo:profilePhoto is_contact:Bool is_mutual_contact:Bool is_verified:Bool is_premium:Bool is_support:Bool restriction_reason:string is_scam:Bool is_fake:Bool have_access:Bool type:UserType language_code:string added_to_attachment_menu:Bool = User;
|
user id:int53 access_hash:int64 first_name:string last_name:string username:string phone_number:string status:UserStatus profile_photo:profilePhoto emoji_status:emojiStatus is_contact:Bool is_mutual_contact:Bool is_verified:Bool is_premium:Bool is_support:Bool restriction_reason:string is_scam:Bool is_fake:Bool have_access:Bool type:UserType language_code:string added_to_attachment_menu:Bool = User;
|
||||||
|
|
||||||
|
|
||||||
//@description Contains information about a bot
|
//@description Contains information about a bot
|
||||||
|
@ -528,7 +539,7 @@ botInfo share_text:string description:string photo:photo animation:animation men
|
||||||
//@premium_gift_options The list of available options for gifting Telegram Premium to the user
|
//@premium_gift_options The list of available options for gifting Telegram Premium to the user
|
||||||
//@group_in_common_count Number of group chats where both the other user and the current user are a member; 0 for the current user
|
//@group_in_common_count Number of group chats where both the other user and the current user are a member; 0 for the current user
|
||||||
//@bot_info For bots, information about the bot; may be null
|
//@bot_info For bots, information about the bot; may be null
|
||||||
userFullInfo photo:chatPhoto is_blocked:Bool can_be_called:Bool supports_video_calls:Bool has_private_calls:Bool has_private_forwards:Bool has_restricted_voice_and_video_note_messages:Bool need_phone_number_privacy_exception:Bool bio:formattedText premium_gift_options:vector<premiumGiftOption> group_in_common_count:int32 bot_info:botInfo = UserFullInfo;
|
userFullInfo photo:chatPhoto is_blocked:Bool can_be_called:Bool supports_video_calls:Bool has_private_calls:Bool has_private_forwards:Bool has_restricted_voice_and_video_note_messages:Bool need_phone_number_privacy_exception:Bool bio:formattedText premium_gift_options:vector<premiumPaymentOption> group_in_common_count:int32 bot_info:botInfo = UserFullInfo;
|
||||||
|
|
||||||
//@description Represents a list of users @total_count Approximate total number of users found @user_ids A list of user identifiers
|
//@description Represents a list of users @total_count Approximate total number of users found @user_ids A list of user identifiers
|
||||||
users total_count:int32 user_ids:vector<int53> = Users;
|
users total_count:int32 user_ids:vector<int53> = Users;
|
||||||
|
@ -814,6 +825,15 @@ messageForwardOriginChannel chat_id:int53 message_id:int53 author_signature:stri
|
||||||
messageForwardOriginMessageImport sender_name:string = MessageForwardOrigin;
|
messageForwardOriginMessageImport sender_name:string = MessageForwardOrigin;
|
||||||
|
|
||||||
|
|
||||||
|
//@class ReactionType @description Describes type of message reaction
|
||||||
|
|
||||||
|
//@description A reaction with an emoji @emoji Text representation of the reaction
|
||||||
|
reactionTypeEmoji emoji:string = ReactionType;
|
||||||
|
|
||||||
|
//@description A reaction with a custom emoji @custom_emoji_id Unique identifier of the custom emoji
|
||||||
|
reactionTypeCustomEmoji custom_emoji_id:int64 = ReactionType;
|
||||||
|
|
||||||
|
|
||||||
//@description Contains information about a forwarded message
|
//@description Contains information about a forwarded message
|
||||||
//@origin Origin of a forwarded message
|
//@origin Origin of a forwarded message
|
||||||
//@date Point in time (Unix timestamp) when the message was originally sent
|
//@date Point in time (Unix timestamp) when the message was originally sent
|
||||||
|
@ -831,11 +851,11 @@ messageForwardInfo origin:MessageForwardOrigin date:int32 public_service_announc
|
||||||
messageReplyInfo reply_count:int32 recent_replier_ids:vector<MessageSender> last_read_inbox_message_id:int53 last_read_outbox_message_id:int53 last_message_id:int53 = MessageReplyInfo;
|
messageReplyInfo reply_count:int32 recent_replier_ids:vector<MessageSender> last_read_inbox_message_id:int53 last_read_outbox_message_id:int53 last_message_id:int53 = MessageReplyInfo;
|
||||||
|
|
||||||
//@description Contains information about a reaction to a message
|
//@description Contains information about a reaction to a message
|
||||||
//@reaction Text representation of the reaction
|
//@type Type of the reaction
|
||||||
//@total_count Number of times the reaction was added
|
//@total_count Number of times the reaction was added
|
||||||
//@is_chosen True, if the reaction is chosen by the current user
|
//@is_chosen True, if the reaction is chosen by the current user
|
||||||
//@recent_sender_ids Identifiers of at most 3 recent message senders, added the reaction; available in private, basic group and supergroup chats
|
//@recent_sender_ids Identifiers of at most 3 recent message senders, added the reaction; available in private, basic group and supergroup chats
|
||||||
messageReaction reaction:string total_count:int32 is_chosen:Bool recent_sender_ids:vector<MessageSender> = MessageReaction;
|
messageReaction type:ReactionType total_count:int32 is_chosen:Bool recent_sender_ids:vector<MessageSender> = MessageReaction;
|
||||||
|
|
||||||
//@description Contains information about interactions with a message
|
//@description Contains information about interactions with a message
|
||||||
//@view_count Number of times the message was viewed
|
//@view_count Number of times the message was viewed
|
||||||
|
@ -845,10 +865,10 @@ messageReaction reaction:string total_count:int32 is_chosen:Bool recent_sender_i
|
||||||
messageInteractionInfo view_count:int32 forward_count:int32 reply_info:messageReplyInfo reactions:vector<messageReaction> = MessageInteractionInfo;
|
messageInteractionInfo view_count:int32 forward_count:int32 reply_info:messageReplyInfo reactions:vector<messageReaction> = MessageInteractionInfo;
|
||||||
|
|
||||||
//@description Contains information about an unread reaction to a message
|
//@description Contains information about an unread reaction to a message
|
||||||
//@reaction Text representation of the reaction
|
//@type Type of the reaction
|
||||||
//@sender_id Identifier of the sender, added the reaction
|
//@sender_id Identifier of the sender, added the reaction
|
||||||
//@is_big True, if the reaction was added with a big animation
|
//@is_big True, if the reaction was added with a big animation
|
||||||
unreadReaction reaction:string sender_id:MessageSender is_big:Bool = UnreadReaction;
|
unreadReaction type:ReactionType sender_id:MessageSender is_big:Bool = UnreadReaction;
|
||||||
|
|
||||||
|
|
||||||
//@class MessageSendingState @description Contains information about the sending state of the message
|
//@class MessageSendingState @description Contains information about the sending state of the message
|
||||||
|
@ -881,6 +901,7 @@ messageSendingStateFailed error_code:int32 error_message:string can_retry:Bool n
|
||||||
//@can_get_message_thread True, if information about the message thread is available through getMessageThread and getMessageThreadHistory
|
//@can_get_message_thread True, if information about the message thread is available through getMessageThread and getMessageThreadHistory
|
||||||
//@can_get_viewers True, if chat members already viewed the message can be received through getMessageViewers
|
//@can_get_viewers True, if chat members already viewed the message can be received through getMessageViewers
|
||||||
//@can_get_media_timestamp_links True, if media timestamp links can be generated for media timestamp entities in the message text, caption or web page description through getMessageLink
|
//@can_get_media_timestamp_links True, if media timestamp links can be generated for media timestamp entities in the message text, caption or web page description through getMessageLink
|
||||||
|
//@can_report_reactions True, if reactions on the message can be reported through reportMessageReactions
|
||||||
//@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
|
||||||
//@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
|
||||||
|
@ -900,7 +921,7 @@ messageSendingStateFailed error_code:int32 error_message:string can_retry:Bool n
|
||||||
//@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
|
//@reply_markup Reply markup for the message; may be null
|
||||||
message id:int53 sender_id:MessageSender chat_id:int53 sending_state:MessageSendingState scheduling_state:MessageSchedulingState is_outgoing:Bool is_pinned:Bool can_be_edited:Bool can_be_forwarded:Bool can_be_saved:Bool can_be_deleted_only_for_self:Bool can_be_deleted_for_all_users:Bool can_get_added_reactions:Bool can_get_statistics:Bool can_get_message_thread:Bool can_get_viewers:Bool can_get_media_timestamp_links:Bool has_timestamped_media:Bool is_channel_post:Bool contains_unread_mention:Bool date:int32 edit_date:int32 forward_info:messageForwardInfo interaction_info:messageInteractionInfo unread_reactions:vector<unreadReaction> reply_in_chat_id:int53 reply_to_message_id:int53 message_thread_id:int53 ttl:int32 ttl_expires_in:double via_bot_user_id:int53 author_signature:string media_album_id:int64 restriction_reason:string content:MessageContent reply_markup:ReplyMarkup = Message;
|
message id:int53 sender_id:MessageSender chat_id:int53 sending_state:MessageSendingState scheduling_state:MessageSchedulingState is_outgoing:Bool is_pinned:Bool can_be_edited:Bool can_be_forwarded:Bool can_be_saved:Bool can_be_deleted_only_for_self:Bool can_be_deleted_for_all_users:Bool can_get_added_reactions:Bool can_get_statistics:Bool can_get_message_thread:Bool can_get_viewers:Bool can_get_media_timestamp_links:Bool can_report_reactions:Bool has_timestamped_media:Bool is_channel_post:Bool contains_unread_mention:Bool date:int32 edit_date:int32 forward_info:messageForwardInfo interaction_info:messageInteractionInfo unread_reactions:vector<unreadReaction> reply_in_chat_id:int53 reply_to_message_id:int53 message_thread_id:int53 ttl:int32 ttl_expires_in:double via_bot_user_id:int53 author_signature:string media_album_id:int64 restriction_reason:string content:MessageContent reply_markup:ReplyMarkup = Message;
|
||||||
|
|
||||||
//@description Contains a list of messages @total_count Approximate total number of messages found @messages List of messages; messages may be null
|
//@description Contains a list of messages @total_count Approximate total number of messages found @messages List of messages; messages may be null
|
||||||
messages total_count:int32 messages:vector<message> = Messages;
|
messages total_count:int32 messages:vector<message> = Messages;
|
||||||
|
@ -1065,6 +1086,15 @@ chatSourcePublicServiceAnnouncement type:string text:string = ChatSource;
|
||||||
chatPosition list:ChatList order:int64 is_pinned:Bool source:ChatSource = ChatPosition;
|
chatPosition list:ChatList order:int64 is_pinned:Bool source:ChatSource = ChatPosition;
|
||||||
|
|
||||||
|
|
||||||
|
//@class ChatAvailableReactions @description Describes reactions available in the chat
|
||||||
|
|
||||||
|
//@description All reactions are available in the chat
|
||||||
|
chatAvailableReactionsAll = ChatAvailableReactions;
|
||||||
|
|
||||||
|
//@description Only specific reactions are available in the chat @reactions The list of reactions
|
||||||
|
chatAvailableReactionsSome reactions:vector<ReactionType> = ChatAvailableReactions;
|
||||||
|
|
||||||
|
|
||||||
//@description Describes a video chat
|
//@description Describes a video chat
|
||||||
//@group_call_id Group call identifier of an active video chat; 0 if none. Full information about the video chat can be received through the method getGroupCall
|
//@group_call_id Group call identifier of an active video chat; 0 if none. Full information about the video chat can be received through the method getGroupCall
|
||||||
//@has_participants True, if the video chat has participants
|
//@has_participants True, if the video chat has participants
|
||||||
|
@ -1095,7 +1125,7 @@ videoChat group_call_id:int32 has_participants:Bool default_participant_id:Messa
|
||||||
//@unread_mention_count Number of unread messages with a mention/reply in the chat
|
//@unread_mention_count Number of unread messages with a mention/reply in the chat
|
||||||
//@unread_reaction_count Number of messages with unread reactions in the chat
|
//@unread_reaction_count Number of messages with unread reactions in the chat
|
||||||
//@notification_settings Notification settings for the chat
|
//@notification_settings Notification settings for the chat
|
||||||
//@available_reactions List of reactions, available in the chat
|
//@available_reactions Types of reaction, available in the chat
|
||||||
//@message_ttl Current message Time To Live setting (self-destruct timer) for the chat; 0 if not defined. TTL is counted from the time message or its content is viewed in secret chats and from the send date in other chats
|
//@message_ttl Current message Time To Live setting (self-destruct timer) for the chat; 0 if not defined. TTL is counted from the time message or its content is viewed in secret chats and from the send date in other chats
|
||||||
//@theme_name If non-empty, name of a theme, set for the chat
|
//@theme_name If non-empty, name of a theme, set for the chat
|
||||||
//@action_bar Information about actions which must be possible to do through the chat action bar; may be null
|
//@action_bar Information about actions which must be possible to do through the chat action bar; may be null
|
||||||
|
@ -1104,7 +1134,7 @@ videoChat group_call_id:int32 has_participants:Bool default_participant_id:Messa
|
||||||
//@reply_markup_message_id Identifier of the message from which reply markup needs to be used; 0 if there is no default custom reply markup in the chat
|
//@reply_markup_message_id Identifier of the message from which reply markup needs to be used; 0 if there is no default custom reply markup in the chat
|
||||||
//@draft_message A draft of a message in the chat; may be null
|
//@draft_message A draft of a message in the chat; may be null
|
||||||
//@client_data Application-specific data associated with the chat. (For example, the chat scroll position or local chat notification settings can be stored here.) Persistent if the message database is used
|
//@client_data Application-specific data associated with the chat. (For example, the chat scroll position or local chat notification settings can be stored here.) Persistent if the message database is used
|
||||||
chat id:int53 type:ChatType title:string photo:chatPhotoInfo permissions:chatPermissions last_message:message positions:vector<chatPosition> message_sender_id:MessageSender has_protected_content:Bool is_marked_as_unread:Bool is_blocked:Bool has_scheduled_messages:Bool can_be_deleted_only_for_self:Bool can_be_deleted_for_all_users:Bool can_be_reported:Bool default_disable_notification:Bool unread_count:int32 last_read_inbox_message_id:int53 last_read_outbox_message_id:int53 unread_mention_count:int32 unread_reaction_count:int32 notification_settings:chatNotificationSettings available_reactions:vector<string> message_ttl:int32 theme_name:string action_bar:ChatActionBar video_chat:videoChat pending_join_requests:chatJoinRequestsInfo reply_markup_message_id:int53 draft_message:draftMessage client_data:string = Chat;
|
chat id:int53 type:ChatType title:string photo:chatPhotoInfo permissions:chatPermissions last_message:message positions:vector<chatPosition> message_sender_id:MessageSender has_protected_content:Bool is_marked_as_unread:Bool is_blocked:Bool has_scheduled_messages:Bool can_be_deleted_only_for_self:Bool can_be_deleted_for_all_users:Bool can_be_reported:Bool default_disable_notification:Bool unread_count:int32 last_read_inbox_message_id:int53 last_read_outbox_message_id:int53 unread_mention_count:int32 unread_reaction_count:int32 notification_settings:chatNotificationSettings available_reactions:ChatAvailableReactions message_ttl:int32 theme_name:string action_bar:ChatActionBar video_chat:videoChat pending_join_requests:chatJoinRequestsInfo reply_markup_message_id:int53 draft_message:draftMessage client_data:string = Chat;
|
||||||
|
|
||||||
//@description Represents a list of chats @total_count Approximate total number of chats found @chat_ids List of chat identifiers
|
//@description Represents a list of chats @total_count Approximate total number of chats found @chat_ids List of chat identifiers
|
||||||
chats total_count:int32 chat_ids:vector<int53> = Chats;
|
chats total_count:int32 chat_ids:vector<int53> = Chats;
|
||||||
|
@ -2128,8 +2158,9 @@ messageSchedulingStateSendWhenOnline = MessageSchedulingState;
|
||||||
//@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
|
||||||
|
//@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, 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, live location messages and self-destructing messages can't be scheduled
|
||||||
messageSendOptions disable_notification:Bool from_background:Bool protect_content:Bool scheduling_state:MessageSchedulingState = MessageSendOptions;
|
messageSendOptions disable_notification:Bool from_background:Bool protect_content:Bool update_order_of_installed_sticker_sets:Bool scheduling_state:MessageSchedulingState = MessageSendOptions;
|
||||||
|
|
||||||
//@description Options to be used when a message content is copied without reference to the original sender. Service messages and messageInvoice can't be copied
|
//@description Options to be used when a message content is copied without reference to the original sender. Service messages and messageInvoice 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
|
||||||
|
@ -2553,24 +2584,26 @@ call id:int32 user_id:int53 is_outgoing:Bool is_video:Bool state:CallState = Cal
|
||||||
phoneNumberAuthenticationSettings allow_flash_call:Bool allow_missed_call:Bool is_current_phone_number:Bool allow_sms_retriever_api:Bool authentication_tokens:vector<string> = PhoneNumberAuthenticationSettings;
|
phoneNumberAuthenticationSettings allow_flash_call:Bool allow_missed_call:Bool is_current_phone_number:Bool allow_sms_retriever_api:Bool authentication_tokens:vector<string> = PhoneNumberAuthenticationSettings;
|
||||||
|
|
||||||
|
|
||||||
//@description Represents a reaction applied to a message @reaction Text representation of the reaction @sender_id Identifier of the chat member, applied the reaction
|
//@description Represents a reaction applied to a message @type Type of the reaction @sender_id Identifier of the chat member, applied the reaction
|
||||||
addedReaction reaction:string sender_id:MessageSender = AddedReaction;
|
addedReaction type:ReactionType sender_id:MessageSender = AddedReaction;
|
||||||
|
|
||||||
//@description Represents a list of reactions added to a message @total_count The total number of found reactions @reactions The list of added reactions @next_offset The offset for the next request. If empty, there are no more results
|
//@description Represents a list of reactions added to a message @total_count The total number of found reactions @reactions The list of added reactions @next_offset The offset for the next request. If empty, there are no more results
|
||||||
addedReactions total_count:int32 reactions:vector<addedReaction> next_offset:string = AddedReactions;
|
addedReactions total_count:int32 reactions:vector<addedReaction> next_offset:string = AddedReactions;
|
||||||
|
|
||||||
//@description Represents an available reaction @reaction Text representation of the reaction @needs_premium True, if Telegram Premium is needed to send the reaction
|
//@description Represents an available reaction @type Type of the reaction @needs_premium True, if Telegram Premium is needed to send the reaction
|
||||||
availableReaction reaction:string needs_premium:Bool = AvailableReaction;
|
availableReaction type:ReactionType needs_premium:Bool = AvailableReaction;
|
||||||
|
|
||||||
//@description Represents a list of available reactions @reactions List of reactions
|
//@description Represents a list of reactions that can be added to a message
|
||||||
availableReactions reactions:vector<availableReaction> = AvailableReactions;
|
//@top_reactions List of reactions to be shown at the top
|
||||||
|
//@recent_reactions List of recently used reactions
|
||||||
|
//@popular_reactions List of popular reactions
|
||||||
|
//@allow_custom_emoji True, if custom emoji reactions could be added by Telegram Premium subscribers
|
||||||
|
availableReactions top_reactions:vector<availableReaction> recent_reactions:vector<availableReaction> popular_reactions:vector<availableReaction> allow_custom_emoji:Bool = AvailableReactions;
|
||||||
|
|
||||||
|
//@description Contains information about a emoji reaction
|
||||||
//@description Contains stickers which must be used for reaction animation rendering
|
//@emoji Text representation of the reaction
|
||||||
//@reaction Text representation of the reaction
|
|
||||||
//@title Reaction title
|
//@title Reaction title
|
||||||
//@is_active True, if the reaction can be added to new messages and enabled in chats
|
//@is_active True, if the reaction can be added to new messages and enabled in chats
|
||||||
//@is_premium True, if the reaction is available only for Premium users
|
|
||||||
//@static_icon Static icon for the reaction
|
//@static_icon Static icon for the reaction
|
||||||
//@appear_animation Appear animation for the reaction
|
//@appear_animation Appear animation for the reaction
|
||||||
//@select_animation Select animation for the reaction
|
//@select_animation Select animation for the reaction
|
||||||
|
@ -2578,7 +2611,7 @@ availableReactions reactions:vector<availableReaction> = AvailableReactions;
|
||||||
//@effect_animation Effect animation for the reaction
|
//@effect_animation Effect animation for the reaction
|
||||||
//@around_animation Around animation for the reaction; may be null
|
//@around_animation Around animation for the reaction; may be null
|
||||||
//@center_animation Center animation for the reaction; may be null
|
//@center_animation Center animation for the reaction; may be null
|
||||||
reaction reaction:string title:string is_active:Bool is_premium:Bool static_icon:sticker appear_animation:sticker select_animation:sticker activate_animation:sticker effect_animation:sticker around_animation:sticker center_animation:sticker = Reaction;
|
emojiReaction emoji:string title:string is_active:Bool static_icon:sticker appear_animation:sticker select_animation:sticker activate_animation:sticker effect_animation:sticker around_animation:sticker center_animation:sticker = EmojiReaction;
|
||||||
|
|
||||||
|
|
||||||
//@description Represents a list of animations @animations List of animations
|
//@description Represents a list of animations @animations List of animations
|
||||||
|
@ -2832,7 +2865,7 @@ chatEventMemberPromoted user_id:int53 old_status:ChatMemberStatus new_status:Cha
|
||||||
chatEventMemberRestricted member_id:MessageSender old_status:ChatMemberStatus new_status:ChatMemberStatus = ChatEventAction;
|
chatEventMemberRestricted member_id:MessageSender old_status:ChatMemberStatus new_status:ChatMemberStatus = ChatEventAction;
|
||||||
|
|
||||||
//@description The chat available reactions were changed @old_available_reactions Previous chat available reactions @new_available_reactions New chat available reactions
|
//@description The chat available reactions were changed @old_available_reactions Previous chat available reactions @new_available_reactions New chat available reactions
|
||||||
chatEventAvailableReactionsChanged old_available_reactions:vector<string> new_available_reactions:vector<string> = ChatEventAction;
|
chatEventAvailableReactionsChanged old_available_reactions:ChatAvailableReactions new_available_reactions:ChatAvailableReactions = ChatEventAction;
|
||||||
|
|
||||||
//@description The chat description was changed @old_description Previous chat description @new_description New chat description
|
//@description The chat description was changed @old_description Previous chat description @new_description New chat description
|
||||||
chatEventDescriptionChanged old_description:string new_description:string = ChatEventAction;
|
chatEventDescriptionChanged old_description:string new_description:string = ChatEventAction;
|
||||||
|
@ -3021,6 +3054,9 @@ premiumFeatureAdvancedChatManagement = PremiumFeature;
|
||||||
//@description A badge in the user's profile
|
//@description A badge in the user's profile
|
||||||
premiumFeatureProfileBadge = PremiumFeature;
|
premiumFeatureProfileBadge = PremiumFeature;
|
||||||
|
|
||||||
|
//@description A emoji status shown along with the user's name
|
||||||
|
premiumFeatureEmojiStatus = PremiumFeature;
|
||||||
|
|
||||||
//@description Profile photo animation on message and chat screens
|
//@description Profile photo animation on message and chat screens
|
||||||
premiumFeatureAnimatedProfilePhoto = PremiumFeature;
|
premiumFeatureAnimatedProfilePhoto = PremiumFeature;
|
||||||
|
|
||||||
|
@ -3056,10 +3092,9 @@ premiumFeaturePromotionAnimation feature:PremiumFeature animation:animation = Pr
|
||||||
|
|
||||||
//@description Contains state of Telegram Premium subscription and promotion videos for Premium features
|
//@description Contains state of Telegram Premium subscription and promotion videos for Premium features
|
||||||
//@state Text description of the state of the current Premium subscription; may be empty if the current user has no Telegram Premium subscription
|
//@state Text description of the state of the current Premium subscription; may be empty if the current user has no Telegram Premium subscription
|
||||||
//@currency ISO 4217 currency code for Telegram Premium subscription payment
|
//@payment_options The list of available options for buying Telegram Premium
|
||||||
//@monthly_amount Monthly subscription payment for Telegram Premium subscription, in the smallest units of the currency
|
|
||||||
//@animations The list of available promotion animations for Premium features
|
//@animations The list of available promotion animations for Premium features
|
||||||
premiumState state:formattedText currency:string monthly_amount:int53 animations:vector<premiumFeaturePromotionAnimation> = PremiumState;
|
premiumState state:formattedText payment_options:vector<premiumPaymentOption> animations:vector<premiumFeaturePromotionAnimation> = PremiumState;
|
||||||
|
|
||||||
|
|
||||||
//@class StorePaymentPurpose @description Describes a purpose of an in-store payment
|
//@class StorePaymentPurpose @description Describes a purpose of an in-store payment
|
||||||
|
@ -3697,6 +3732,9 @@ internalLinkTypeFilterSettings = InternalLinkType;
|
||||||
//@bot_username Username of the bot that owns the game @game_short_name Short name of the game
|
//@bot_username Username of the bot that owns the game @game_short_name Short name of the game
|
||||||
internalLinkTypeGame bot_username:string game_short_name:string = InternalLinkType;
|
internalLinkTypeGame bot_username:string game_short_name:string = InternalLinkType;
|
||||||
|
|
||||||
|
//@description The link must be opened in an Instant View. Call getWebPageInstantView with the given URL to process the link @url URL to be passed to getWebPageInstantView
|
||||||
|
internalLinkTypeInstantView url:string = InternalLinkType;
|
||||||
|
|
||||||
//@description The link is a link to an invoice. Call getPaymentForm with the given invoice name to process the link @invoice_name Name of the invoice
|
//@description The link is a link to an invoice. Call getPaymentForm with the given invoice name to process the link @invoice_name Name of the invoice
|
||||||
internalLinkTypeInvoice invoice_name:string = InternalLinkType;
|
internalLinkTypeInvoice invoice_name:string = InternalLinkType;
|
||||||
|
|
||||||
|
@ -4248,8 +4286,8 @@ updateChatReadOutbox chat_id:int53 last_read_outbox_message_id:int53 = Update;
|
||||||
//@description The chat action bar was changed @chat_id Chat identifier @action_bar The new value of the action bar; may be null
|
//@description The chat action bar was changed @chat_id Chat identifier @action_bar The new value of the action bar; may be null
|
||||||
updateChatActionBar chat_id:int53 action_bar:ChatActionBar = Update;
|
updateChatActionBar chat_id:int53 action_bar:ChatActionBar = Update;
|
||||||
|
|
||||||
//@description The chat available reactions were changed @chat_id Chat identifier @available_reactions The new list of reactions, available in the chat
|
//@description The chat available reactions were changed @chat_id Chat identifier @available_reactions The new reactions, available in the chat
|
||||||
updateChatAvailableReactions chat_id:int53 available_reactions:vector<string> = Update;
|
updateChatAvailableReactions chat_id:int53 available_reactions:ChatAvailableReactions = Update;
|
||||||
|
|
||||||
//@description A chat draft has changed. Be aware that the update may come in the currently opened chat but with old content of the draft. If the user has changed the content of the draft, this update mustn't be applied @chat_id Chat identifier @draft_message The new draft message; may be null @positions The new chat positions in the chat lists
|
//@description A chat draft has changed. Be aware that the update may come in the currently opened chat but with old content of the draft. If the user has changed the content of the draft, this update mustn't be applied @chat_id Chat identifier @draft_message The new draft message; may be null @positions The new chat positions in the chat lists
|
||||||
updateChatDraftMessage chat_id:int53 draft_message:draftMessage positions:vector<chatPosition> = Update;
|
updateChatDraftMessage chat_id:int53 draft_message:draftMessage positions:vector<chatPosition> = Update;
|
||||||
|
@ -4470,8 +4508,11 @@ updateAttachmentMenuBots bots:vector<attachmentMenuBot> = Update;
|
||||||
//@description A message was sent by an opened Web App, so the Web App needs to be closed @web_app_launch_id Identifier of Web App launch
|
//@description A message was sent by an opened Web App, so the Web App needs to be closed @web_app_launch_id Identifier of Web App launch
|
||||||
updateWebAppMessageSent web_app_launch_id:int64 = Update;
|
updateWebAppMessageSent web_app_launch_id:int64 = Update;
|
||||||
|
|
||||||
//@description The list of supported reactions has changed @reactions The new list of supported reactions
|
//@description The list of active emoji reactions has changed @emojis The new list of active emoji reactions
|
||||||
updateReactions reactions:vector<reaction> = Update;
|
updateActiveEmojiReactions emojis:vector<string> = Update;
|
||||||
|
|
||||||
|
//@description The type of default reaction has changed @reaction_type The new type of the default reaction
|
||||||
|
updateDefaultReactionType reaction_type:ReactionType = Update;
|
||||||
|
|
||||||
//@description The list of supported dice emojis has changed @emojis The new list of supported dice emojis
|
//@description The list of supported dice emojis has changed @emojis The new list of supported dice emojis
|
||||||
updateDiceEmojis emojis:vector<string> = Update;
|
updateDiceEmojis emojis:vector<string> = Update;
|
||||||
|
@ -4557,6 +4598,10 @@ logVerbosityLevel verbosity_level:int32 = LogVerbosityLevel;
|
||||||
logTags tags:vector<string> = LogTags;
|
logTags tags:vector<string> = LogTags;
|
||||||
|
|
||||||
|
|
||||||
|
//@description Contains custom information about the user @message Information message @author Information author @date Information change date
|
||||||
|
userSupportInfo message:formattedText author:string date:int32 = UserSupportInfo;
|
||||||
|
|
||||||
|
|
||||||
//@description A simple object containing a number; for testing only @value Number
|
//@description A simple object containing a number; for testing only @value Number
|
||||||
testInt value:int32 = TestInt;
|
testInt value:int32 = TestInt;
|
||||||
//@description A simple object containing a string; for testing only @value String
|
//@description A simple object containing a string; for testing only @value String
|
||||||
|
@ -4578,20 +4623,39 @@ testVectorStringObject value:vector<testString> = TestVectorStringObject;
|
||||||
getAuthorizationState = AuthorizationState;
|
getAuthorizationState = AuthorizationState;
|
||||||
|
|
||||||
|
|
||||||
//@description Sets the parameters for TDLib initialization. Works only when the current authorization state is authorizationStateWaitTdlibParameters @parameters Parameters for TDLib initialization
|
//@description Sets the parameters for TDLib initialization. Works only when the current authorization state is authorizationStateWaitTdlibParameters
|
||||||
setTdlibParameters parameters:tdlibParameters = Ok;
|
//@use_test_dc Pass true to use Telegram test environment instead of the production environment
|
||||||
|
//@database_directory The path to the directory for the persistent database; if empty, the current working directory will be used
|
||||||
//@description Checks the database encryption key for correctness. Works only when the current authorization state is authorizationStateWaitEncryptionKey @encryption_key Encryption key to check or set up
|
//@files_directory The path to the directory for storing files; if empty, database_directory will be used
|
||||||
checkDatabaseEncryptionKey encryption_key:bytes = Ok;
|
//@database_encryption_key Encryption key for the database
|
||||||
|
//@use_file_database Pass true to keep information about downloaded and uploaded files between application restarts
|
||||||
|
//@use_chat_info_database Pass true to keep cache of users, basic groups, supergroups, channels and secret chats between restarts. Implies use_file_database
|
||||||
|
//@use_message_database Pass true to keep cache of chats and messages between restarts. Implies use_chat_info_database
|
||||||
|
//@use_secret_chats Pass true to enable support for secret chats
|
||||||
|
//@api_id Application identifier for Telegram API access, which can be obtained at https://my.telegram.org
|
||||||
|
//@api_hash Application identifier hash for Telegram API access, which can be obtained at https://my.telegram.org
|
||||||
|
//@system_language_code IETF language tag of the user's operating system language; must be non-empty
|
||||||
|
//@device_model Model of the device the application is being run on; must be non-empty
|
||||||
|
//@system_version Version of the operating system the application is being run on. If empty, the version is automatically detected by TDLib
|
||||||
|
//@application_version Application version; must be non-empty
|
||||||
|
//@enable_storage_optimizer Pass true to automatically delete old files in background
|
||||||
|
//@ignore_file_names Pass true to ignore original file names for downloaded files. Otherwise, downloaded files are saved under names as close as possible to the original name
|
||||||
|
setTdlibParameters use_test_dc:Bool database_directory:string files_directory:string database_encryption_key:bytes use_file_database:Bool use_chat_info_database:Bool use_message_database:Bool use_secret_chats:Bool api_id:int32 api_hash:string system_language_code:string device_model:string system_version:string application_version:string enable_storage_optimizer:Bool ignore_file_names:Bool = Ok;
|
||||||
|
|
||||||
//@description Sets the phone number of the user and sends an authentication code to the user. Works only when the current authorization state is authorizationStateWaitPhoneNumber,
|
//@description Sets the phone number of the user and sends an authentication code to the user. Works only when the current authorization state is authorizationStateWaitPhoneNumber,
|
||||||
//-or if there is no pending authentication query and the current authorization state is authorizationStateWaitCode, authorizationStateWaitRegistration, or authorizationStateWaitPassword
|
//-or if there is no pending authentication query and the current authorization state is authorizationStateWaitCode, authorizationStateWaitRegistration, or authorizationStateWaitPassword
|
||||||
//@phone_number The phone number of the user, in international format @settings Settings for the authentication of the user's phone number; pass null to use default settings
|
//@phone_number The phone number of the user, in international format @settings Settings for the authentication of the user's phone number; pass null to use default settings
|
||||||
setAuthenticationPhoneNumber phone_number:string settings:phoneNumberAuthenticationSettings = Ok;
|
setAuthenticationPhoneNumber phone_number:string settings:phoneNumberAuthenticationSettings = Ok;
|
||||||
|
|
||||||
//@description Re-sends an authentication code to the user. Works only when the current authorization state is authorizationStateWaitCode, the next_code_type of the result is not null and the server-specified timeout has passed
|
//@description Sets the email address of the user and sends an authentication code to the email address. Works only when the current authorization state is authorizationStateWaitEmailAddress @email_address The email address of the user
|
||||||
|
setAuthenticationEmailAddress email_address:string = Ok;
|
||||||
|
|
||||||
|
//@description Resends an authentication code to the user. Works only when the current authorization state is authorizationStateWaitCode, the next_code_type of the result is not null and the server-specified timeout has passed, or when the current authorization state is authorizationStateWaitEmailCode
|
||||||
resendAuthenticationCode = Ok;
|
resendAuthenticationCode = Ok;
|
||||||
|
|
||||||
|
//@description Checks the authentication of a email address. Works only when the current authorization state is authorizationStateWaitEmailCode @code Email address authentication to check
|
||||||
|
checkAuthenticationEmailCode code:EmailAddressAuthentication = Ok;
|
||||||
|
|
||||||
//@description Checks the authentication code. Works only when the current authorization state is authorizationStateWaitCode @code Authentication code to check
|
//@description Checks the authentication code. Works only when the current authorization state is authorizationStateWaitCode @code Authentication code to check
|
||||||
checkAuthenticationCode code:string = Ok;
|
checkAuthenticationCode code:string = Ok;
|
||||||
|
|
||||||
|
@ -4649,6 +4713,15 @@ getPasswordState = PasswordState;
|
||||||
//@old_password Previous 2-step verification password of the user @new_password New 2-step verification password of the user; may be empty to remove the password @new_hint New password hint; may be empty @set_recovery_email_address Pass true to change also the recovery email address @new_recovery_email_address New recovery email address; may be empty
|
//@old_password Previous 2-step verification password of the user @new_password New 2-step verification password of the user; may be empty to remove the password @new_hint New password hint; may be empty @set_recovery_email_address Pass true to change also the recovery email address @new_recovery_email_address New recovery email address; may be empty
|
||||||
setPassword old_password:string new_password:string new_hint:string set_recovery_email_address:Bool new_recovery_email_address:string = PasswordState;
|
setPassword old_password:string new_password:string new_hint:string set_recovery_email_address:Bool new_recovery_email_address:string = PasswordState;
|
||||||
|
|
||||||
|
//@description Changes the login email address of the user. The change will not be applied until the new login email address is confirmed with `checkLoginEmailAddressCode`. To use Apple ID/Google ID instead of a email address, call `checkLoginEmailAddressCode` directly @new_login_email_address New login email address
|
||||||
|
setLoginEmailAddress new_login_email_address:string = EmailAddressAuthenticationCodeInfo;
|
||||||
|
|
||||||
|
//@description Resends the login email address verification code
|
||||||
|
resendLoginEmailAddressCode = EmailAddressAuthenticationCodeInfo;
|
||||||
|
|
||||||
|
//@description Checks the login email address authentication @code Email address authentication to check
|
||||||
|
checkLoginEmailAddressCode code:EmailAddressAuthentication = Ok;
|
||||||
|
|
||||||
//@description Returns a 2-step verification recovery email address that was previously set up. This method can be used to verify a password provided by the user @password The 2-step verification password for the current user
|
//@description Returns a 2-step verification recovery email address that was previously set up. This method can be used to verify a password provided by the user @password The 2-step verification password for the current user
|
||||||
getRecoveryEmailAddress password:string = RecoveryEmailAddress;
|
getRecoveryEmailAddress password:string = RecoveryEmailAddress;
|
||||||
|
|
||||||
|
@ -5110,25 +5183,45 @@ editInlineMessageReplyMarkup inline_message_id:string reply_markup:ReplyMarkup =
|
||||||
editMessageSchedulingState chat_id:int53 message_id:int53 scheduling_state:MessageSchedulingState = Ok;
|
editMessageSchedulingState chat_id:int53 message_id:int53 scheduling_state:MessageSchedulingState = Ok;
|
||||||
|
|
||||||
|
|
||||||
//@description Returns reactions, which can be added to a message. The list can change after updateReactions, updateChatAvailableReactions for the chat, or updateMessageInteractionInfo for the message
|
//@description Returns information about a emoji reaction. Returns a 404 error if the reaction is not found @emoji Text representation of the reaction
|
||||||
//@chat_id Identifier of the chat to which the message belongs
|
getEmojiReaction emoji:string = EmojiReaction;
|
||||||
//@message_id Identifier of the message
|
|
||||||
getMessageAvailableReactions chat_id:int53 message_id:int53 = AvailableReactions;
|
|
||||||
|
|
||||||
//@description Changes chosen reaction for a message
|
//@description Returns TGS files with generic animations for custom emoji reactions
|
||||||
|
getCustomEmojiReactionAnimations = Files;
|
||||||
|
|
||||||
|
//@description Returns reactions, which can be added to a message. The list can change after updateActiveEmojiReactions, updateChatAvailableReactions for the chat, or updateMessageInteractionInfo for the message
|
||||||
//@chat_id Identifier of the chat to which the message belongs
|
//@chat_id Identifier of the chat to which the message belongs
|
||||||
//@message_id Identifier of the message
|
//@message_id Identifier of the message
|
||||||
//@reaction Text representation of the new chosen reaction. Can be an empty string or the currently chosen non-big reaction to remove the reaction
|
//@row_size Number of reaction per row, 5-25
|
||||||
|
getMessageAvailableReactions chat_id:int53 message_id:int53 row_size:int32 = AvailableReactions;
|
||||||
|
|
||||||
|
//@description Clears the list of recently used reactions
|
||||||
|
clearRecentReactions = Ok;
|
||||||
|
|
||||||
|
//@description Adds a reaction to a message. Use getMessageAvailableReactions to receive the list of available reactions for the message
|
||||||
|
//@chat_id Identifier of the chat to which the message belongs
|
||||||
|
//@message_id Identifier of the message
|
||||||
|
//@reaction_type Type of the reaction to add
|
||||||
//@is_big Pass true if the reaction is added with a big animation
|
//@is_big Pass true if the reaction is added with a big animation
|
||||||
setMessageReaction chat_id:int53 message_id:int53 reaction:string is_big:Bool = Ok;
|
//@update_recent_reactions Pass true if the reaction needs to be added to recent reactions
|
||||||
|
addMessageReaction chat_id:int53 message_id:int53 reaction_type:ReactionType is_big:Bool update_recent_reactions:Bool = Ok;
|
||||||
|
|
||||||
|
//@description Removes a reaction from a message. A chosen reaction can always be removed
|
||||||
|
//@chat_id Identifier of the chat to which the message belongs
|
||||||
|
//@message_id Identifier of the message
|
||||||
|
//@reaction_type Type of the reaction to remove
|
||||||
|
removeMessageReaction chat_id:int53 message_id:int53 reaction_type:ReactionType = Ok;
|
||||||
|
|
||||||
//@description Returns reactions added for a message, along with their sender
|
//@description Returns reactions added for a message, along with their sender
|
||||||
//@chat_id Identifier of the chat to which the message belongs
|
//@chat_id Identifier of the chat to which the message belongs
|
||||||
//@message_id Identifier of the message
|
//@message_id Identifier of the message
|
||||||
//@reaction If non-empty, only added reactions with the specified text representation will be returned
|
//@reaction_type Type of the reactions to return; pass null to return all added reactions
|
||||||
//@offset Offset of the first entry to return as received from the previous request; use empty string to get the first chunk of results
|
//@offset Offset of the first entry to return as received from the previous request; use empty string to get the first chunk of results
|
||||||
//@limit The maximum number of reactions to be returned; must be positive and can't be greater than 100
|
//@limit The maximum number of reactions to be returned; must be positive and can't be greater than 100
|
||||||
getMessageAddedReactions chat_id:int53 message_id:int53 reaction:string offset:string limit:int32 = AddedReactions;
|
getMessageAddedReactions chat_id:int53 message_id:int53 reaction_type:ReactionType offset:string limit:int32 = AddedReactions;
|
||||||
|
|
||||||
|
//@description Changes type of default reaction for the current user @reaction_type New type of the default reaction
|
||||||
|
setDefaultReactionType reaction_type:ReactionType = Ok;
|
||||||
|
|
||||||
|
|
||||||
//@description Returns all entities (mentions, hashtags, cashtags, bot commands, bank card numbers, URLs, and email addresses) contained in the text. Can be called synchronously @text The text in which to look for entites
|
//@description Returns all entities (mentions, hashtags, cashtags, bot commands, bank card numbers, URLs, and email addresses) contained in the text. Can be called synchronously @text The text in which to look for entites
|
||||||
|
@ -5226,7 +5319,8 @@ answerInlineQuery inline_query_id:int64 is_personal:Bool results:vector<InputInl
|
||||||
//@bot_user_id Identifier of the target bot
|
//@bot_user_id Identifier of the target bot
|
||||||
//@url The URL from the keyboardButtonTypeWebApp button
|
//@url The URL from the keyboardButtonTypeWebApp button
|
||||||
//@theme Preferred Web App theme; pass null to use the default theme
|
//@theme Preferred Web App theme; pass null to use the default theme
|
||||||
getWebAppUrl bot_user_id:int53 url:string theme:themeParameters = HttpUrl;
|
//@application_name Short name of the application; 0-64 English letters, digits, and underscores
|
||||||
|
getWebAppUrl bot_user_id:int53 url:string theme:themeParameters application_name:string = HttpUrl;
|
||||||
|
|
||||||
//@description Sends data received from a keyboardButtonTypeWebApp Web App to a bot
|
//@description Sends data received from a keyboardButtonTypeWebApp Web App to a bot
|
||||||
//@bot_user_id Identifier of the target bot @button_text Text of the keyboardButtonTypeWebApp button, which opened the Web App @data Received data
|
//@bot_user_id Identifier of the target bot @button_text Text of the keyboardButtonTypeWebApp button, which opened the Web App @data Received data
|
||||||
|
@ -5238,8 +5332,9 @@ sendWebAppData bot_user_id:int53 button_text:string data:string = Ok;
|
||||||
//@bot_user_id Identifier of the bot, providing the Web App
|
//@bot_user_id Identifier of the bot, providing the Web App
|
||||||
//@url The URL from an inlineKeyboardButtonTypeWebApp button, a botMenuButton button, or an internalLinkTypeAttachmentMenuBot link, or an empty string otherwise
|
//@url The URL from an inlineKeyboardButtonTypeWebApp button, a botMenuButton button, or an internalLinkTypeAttachmentMenuBot link, or an empty string otherwise
|
||||||
//@theme Preferred Web App theme; pass null to use the default theme
|
//@theme Preferred Web App theme; pass null to use the default theme
|
||||||
|
//@application_name Short name of the application; 0-64 English letters, digits, and underscores
|
||||||
//@reply_to_message_id Identifier of the replied message for the message sent by the Web App; 0 if none
|
//@reply_to_message_id Identifier of the replied message for the message sent by the Web App; 0 if none
|
||||||
openWebApp chat_id:int53 bot_user_id:int53 url:string theme:themeParameters reply_to_message_id:int53 = WebAppInfo;
|
openWebApp chat_id:int53 bot_user_id:int53 url:string theme:themeParameters application_name:string reply_to_message_id:int53 = 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;
|
||||||
|
@ -5423,8 +5518,8 @@ toggleChatIsMarkedAsUnread chat_id:int53 is_marked_as_unread:Bool = Ok;
|
||||||
//@description Changes the value of the default disable_notification parameter, used when a message is sent to a chat @chat_id Chat identifier @default_disable_notification New value of default_disable_notification
|
//@description Changes the value of the default disable_notification parameter, used when a message is sent to a chat @chat_id Chat identifier @default_disable_notification New value of default_disable_notification
|
||||||
toggleChatDefaultDisableNotification chat_id:int53 default_disable_notification:Bool = Ok;
|
toggleChatDefaultDisableNotification chat_id:int53 default_disable_notification:Bool = Ok;
|
||||||
|
|
||||||
//@description Changes reactions, available in a chat. Available for basic groups, supergroups, and channels. Requires can_change_info administrator right @chat_id Identifier of the chat @available_reactions New list of reactions, available in the chat. All reactions must be active
|
//@description Changes reactions, available in a chat. Available for basic groups, supergroups, and channels. Requires can_change_info administrator right @chat_id Identifier of the chat @available_reactions Reactions available in the chat. All emoji reactions must be active
|
||||||
setChatAvailableReactions chat_id:int53 available_reactions:vector<string> = Ok;
|
setChatAvailableReactions chat_id:int53 available_reactions:ChatAvailableReactions = Ok;
|
||||||
|
|
||||||
//@description Changes application-specific data associated with a chat @chat_id Chat identifier @client_data New value of client_data
|
//@description Changes application-specific data associated with a chat @chat_id Chat identifier @client_data New value of client_data
|
||||||
setChatClientData chat_id:int53 client_data:string = Ok;
|
setChatClientData chat_id:int53 client_data:string = Ok;
|
||||||
|
@ -5549,6 +5644,19 @@ getAttachmentMenuBot bot_user_id:int53 = AttachmentMenuBot;
|
||||||
toggleBotIsAddedToAttachmentMenu bot_user_id:int53 is_added:Bool = Ok;
|
toggleBotIsAddedToAttachmentMenu bot_user_id:int53 is_added:Bool = Ok;
|
||||||
|
|
||||||
|
|
||||||
|
//@description Returns up to 8 themed emoji statuses, which color must be changed to the color of the Telegram Premium badge
|
||||||
|
getThemedEmojiStatuses = EmojiStatuses;
|
||||||
|
|
||||||
|
//@description Returns recent emoji statuses
|
||||||
|
getRecentEmojiStatuses = EmojiStatuses;
|
||||||
|
|
||||||
|
//@description Returns default emoji statuses
|
||||||
|
getDefaultEmojiStatuses = EmojiStatuses;
|
||||||
|
|
||||||
|
//@description Clears the list of recently used emoji statuses
|
||||||
|
clearRecentEmojiStatuses = Ok;
|
||||||
|
|
||||||
|
|
||||||
//@description Downloads a file from the cloud. Download progress and completion of the download will be notified through updateFile updates
|
//@description Downloads a file from the cloud. Download progress and completion of the download will be notified through updateFile updates
|
||||||
//@file_id Identifier of the file to download
|
//@file_id Identifier of the file to download
|
||||||
//@priority Priority of the download (1-32). The higher the priority, the earlier the file will be downloaded. If the priorities of two files are equal, then the last one for which downloadFile/addFileToDownloads was called will be downloaded first
|
//@priority Priority of the download (1-32). The higher the priority, the earlier the file will be downloaded. If the priorities of two files are equal, then the last one for which downloadFile/addFileToDownloads was called will be downloaded first
|
||||||
|
@ -6055,6 +6163,11 @@ setBio bio:string = Ok;
|
||||||
//@description Changes the username of the current user @username The new value of the username. Use an empty string to remove the username
|
//@description Changes the username of the current user @username The new value of the username. Use an empty string to remove the username
|
||||||
setUsername username:string = Ok;
|
setUsername username:string = Ok;
|
||||||
|
|
||||||
|
//@description Changes the emoji status of the current user; for Telegram Premium users only
|
||||||
|
//@emoji_status New emoji status; pass null to switch to the default badge
|
||||||
|
//@duration Duration of the status, in seconds; pass 0 to keep the status active until it will be changed manually
|
||||||
|
setEmojiStatus emoji_status:emojiStatus duration:int32 = Ok;
|
||||||
|
|
||||||
//@description Changes the location of the current user. Needs to be called if GetOption("is_location_visible") is true and location changes for more than 1 kilometer @location The new location of the user
|
//@description Changes the location of the current user. Needs to be called if GetOption("is_location_visible") is true and location changes for more than 1 kilometer @location The new location of the user
|
||||||
setLocation location:location = Ok;
|
setLocation location:location = Ok;
|
||||||
|
|
||||||
|
@ -6062,7 +6175,7 @@ setLocation location:location = Ok;
|
||||||
//@phone_number The new phone number of the user in international format @settings Settings for the authentication of the user's phone number; pass null to use default settings
|
//@phone_number The new phone number of the user in international format @settings Settings for the authentication of the user's phone number; pass null to use default settings
|
||||||
changePhoneNumber phone_number:string settings:phoneNumberAuthenticationSettings = AuthenticationCodeInfo;
|
changePhoneNumber phone_number:string settings:phoneNumberAuthenticationSettings = AuthenticationCodeInfo;
|
||||||
|
|
||||||
//@description Re-sends the authentication code sent to confirm a new phone number for the current user. Works only if the previously received authenticationCodeInfo next_code_type was not null and the server-specified timeout has passed
|
//@description Resends the authentication code sent to confirm a new phone number for the current user. Works only if the previously received authenticationCodeInfo next_code_type was not null and the server-specified timeout has passed
|
||||||
resendChangePhoneNumberCode = AuthenticationCodeInfo;
|
resendChangePhoneNumberCode = AuthenticationCodeInfo;
|
||||||
|
|
||||||
//@description Checks the authentication code sent to confirm a new phone number of the user @code Authentication code to check
|
//@description Checks the authentication code sent to confirm a new phone number of the user @code Authentication code to check
|
||||||
|
@ -6307,6 +6420,11 @@ reportChat chat_id:int53 message_ids:vector<int53> reason:ChatReportReason text:
|
||||||
//@chat_id Chat identifier @file_id Identifier of the photo to report. Only full photos from chatPhoto can be reported @reason The reason for reporting the chat photo @text Additional report details; 0-1024 characters
|
//@chat_id Chat identifier @file_id Identifier of the photo to report. Only full photos from chatPhoto can be reported @reason The reason for reporting the chat photo @text Additional report details; 0-1024 characters
|
||||||
reportChatPhoto chat_id:int53 file_id:int32 reason:ChatReportReason text:string = Ok;
|
reportChatPhoto chat_id:int53 file_id:int32 reason:ChatReportReason text:string = Ok;
|
||||||
|
|
||||||
|
//@description Reports reactions set on a message to the Telegram moderators. Reactions on a message can be reported only if message.can_report_reactions
|
||||||
|
//@chat_id Chat identifier @message_id Message identifier @sender_id Identifier of the sender, which added the reaction
|
||||||
|
reportMessageReactions chat_id:int53 message_id:int53 sender_id:MessageSender = Ok;
|
||||||
|
|
||||||
|
|
||||||
//@description Returns detailed statistics about a chat. Currently, this method can be used only for supergroups and channels. Can be used only if supergroupFullInfo.can_get_statistics == true @chat_id Chat identifier @is_dark Pass true if a dark theme is used by the application
|
//@description Returns detailed statistics about a chat. Currently, this method can be used only for supergroups and channels. Can be used only if supergroupFullInfo.can_get_statistics == true @chat_id Chat identifier @is_dark Pass true if a dark theme is used by the application
|
||||||
getChatStatistics chat_id:int53 is_dark:Bool = ChatStatistics;
|
getChatStatistics chat_id:int53 is_dark:Bool = ChatStatistics;
|
||||||
|
|
||||||
|
@ -6387,7 +6505,7 @@ getPreferredCountryLanguage country_code:string = Text;
|
||||||
//@phone_number The phone number of the user, in international format @settings Settings for the authentication of the user's phone number; pass null to use default settings
|
//@phone_number The phone number of the user, in international format @settings Settings for the authentication of the user's phone number; pass null to use default settings
|
||||||
sendPhoneNumberVerificationCode phone_number:string settings:phoneNumberAuthenticationSettings = AuthenticationCodeInfo;
|
sendPhoneNumberVerificationCode phone_number:string settings:phoneNumberAuthenticationSettings = AuthenticationCodeInfo;
|
||||||
|
|
||||||
//@description Re-sends the code to verify a phone number to be added to a user's Telegram Passport
|
//@description Resends the code to verify a phone number to be added to a user's Telegram Passport
|
||||||
resendPhoneNumberVerificationCode = AuthenticationCodeInfo;
|
resendPhoneNumberVerificationCode = AuthenticationCodeInfo;
|
||||||
|
|
||||||
//@description Checks the phone number verification code for Telegram Passport @code Verification code to check
|
//@description Checks the phone number verification code for Telegram Passport @code Verification code to check
|
||||||
|
@ -6397,7 +6515,7 @@ checkPhoneNumberVerificationCode code:string = Ok;
|
||||||
//@description Sends a code to verify an email address to be added to a user's Telegram Passport @email_address Email address
|
//@description Sends a code to verify an email address to be added to a user's Telegram Passport @email_address Email address
|
||||||
sendEmailAddressVerificationCode email_address:string = EmailAddressAuthenticationCodeInfo;
|
sendEmailAddressVerificationCode email_address:string = EmailAddressAuthenticationCodeInfo;
|
||||||
|
|
||||||
//@description Re-sends the code to verify an email address to be added to a user's Telegram Passport
|
//@description Resends the code to verify an email address to be added to a user's Telegram Passport
|
||||||
resendEmailAddressVerificationCode = EmailAddressAuthenticationCodeInfo;
|
resendEmailAddressVerificationCode = EmailAddressAuthenticationCodeInfo;
|
||||||
|
|
||||||
//@description Checks the email address verification code for Telegram Passport @code Verification code to check
|
//@description Checks the email address verification code for Telegram Passport @code Verification code to check
|
||||||
|
@ -6591,6 +6709,13 @@ getLogTagVerbosityLevel tag:string = LogVerbosityLevel;
|
||||||
addLogMessage verbosity_level:int32 text:string = Ok;
|
addLogMessage verbosity_level:int32 text:string = Ok;
|
||||||
|
|
||||||
|
|
||||||
|
//@description Returns support information for the given user; for Telegram support only @user_id User identifier
|
||||||
|
getUserSupportInfo user_id:int53 = UserSupportInfo;
|
||||||
|
|
||||||
|
//@description Sets support information for the given user; for Telegram support only @user_id User identifier @message New information message
|
||||||
|
setUserSupportInfo user_id:int53 message:formattedText = UserSupportInfo;
|
||||||
|
|
||||||
|
|
||||||
//@description Does nothing; for testing only. This is an offline method. Can be called before authorization
|
//@description Does nothing; for testing only. This is an offline method. Can be called before authorization
|
||||||
testCallEmpty = Ok;
|
testCallEmpty = Ok;
|
||||||
//@description Returns the received string; for testing only. This is an offline method. Can be called before authorization @x String to return
|
//@description Returns the received string; for testing only. This is an offline method. Can be called before authorization @x String to return
|
||||||
|
|
Loading…
Reference in a new issue