mirror of
https://github.com/c0re100/gotdlib.git
synced 2026-02-21 20:20:17 +01:00
Update to TDLib 1.8.30
This commit is contained in:
parent
3052b01106
commit
b5f52a79a6
4 changed files with 2272 additions and 165 deletions
|
|
@ -184,13 +184,20 @@ func (client *Client) SetAuthenticationEmailAddress(req *SetAuthenticationEmailA
|
||||||
return UnmarshalOk(result.Data)
|
return UnmarshalOk(result.Data)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
type ResendAuthenticationCodeRequest struct {
|
||||||
|
// Reason of code resending; pass null if unknown
|
||||||
|
Reason ResendCodeReason `json:"reason"`
|
||||||
|
}
|
||||||
|
|
||||||
// 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
|
// 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(req *ResendAuthenticationCodeRequest) (*Ok, error) {
|
||||||
result, err := client.Send(Request{
|
result, err := client.Send(Request{
|
||||||
meta: meta{
|
meta: meta{
|
||||||
Type: "resendAuthenticationCode",
|
Type: "resendAuthenticationCode",
|
||||||
},
|
},
|
||||||
Data: map[string]interface{}{},
|
Data: map[string]interface{}{
|
||||||
|
"reason": req.Reason,
|
||||||
|
},
|
||||||
})
|
})
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
|
|
@ -436,7 +443,7 @@ func (client *Client) RecoverAuthenticationPassword(req *RecoverAuthenticationPa
|
||||||
}
|
}
|
||||||
|
|
||||||
type SendAuthenticationFirebaseSmsRequest struct {
|
type SendAuthenticationFirebaseSmsRequest struct {
|
||||||
// SafetyNet Attestation API token for the Android application, or secret from push notification for the iOS application
|
// Play Integrity API or SafetyNet Attestation API token for the Android application, or secret from push notification for the iOS application
|
||||||
Token string `json:"token"`
|
Token string `json:"token"`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -466,7 +473,7 @@ type ReportAuthenticationCodeMissingRequest struct {
|
||||||
MobileNetworkCode string `json:"mobile_network_code"`
|
MobileNetworkCode string `json:"mobile_network_code"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// Reports that authentication code wasn't delivered via SMS; for official mobile apps only. Works only when the current authorization state is authorizationStateWaitCode
|
// Reports that authentication code wasn't delivered via SMS; for official mobile applications only. Works only when the current authorization state is authorizationStateWaitCode
|
||||||
func (client *Client) ReportAuthenticationCodeMissing(req *ReportAuthenticationCodeMissingRequest) (*Ok, error) {
|
func (client *Client) ReportAuthenticationCodeMissing(req *ReportAuthenticationCodeMissingRequest) (*Ok, error) {
|
||||||
result, err := client.Send(Request{
|
result, err := client.Send(Request{
|
||||||
meta: meta{
|
meta: meta{
|
||||||
|
|
@ -2870,6 +2877,112 @@ func (client *Client) SearchOutgoingDocumentMessages(req *SearchOutgoingDocument
|
||||||
return UnmarshalFoundMessages(result.Data)
|
return UnmarshalFoundMessages(result.Data)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
type SearchPublicHashtagMessagesRequest struct {
|
||||||
|
// Hashtag to search for
|
||||||
|
Hashtag string `json:"hashtag"`
|
||||||
|
// Offset of the first entry to return as received from the previous request; use empty string to get the first chunk of results
|
||||||
|
Offset string `json:"offset"`
|
||||||
|
// The maximum number of messages to be returned; up to 100. For optimal performance, the number of returned messages is chosen by TDLib and can be smaller than the specified limit
|
||||||
|
Limit int32 `json:"limit"`
|
||||||
|
}
|
||||||
|
|
||||||
|
// Searches for public channel posts with the given hashtag. For optimal performance, the number of returned messages is chosen by TDLib and can be smaller than the specified limit
|
||||||
|
func (client *Client) SearchPublicHashtagMessages(req *SearchPublicHashtagMessagesRequest) (*FoundMessages, error) {
|
||||||
|
result, err := client.Send(Request{
|
||||||
|
meta: meta{
|
||||||
|
Type: "searchPublicHashtagMessages",
|
||||||
|
},
|
||||||
|
Data: map[string]interface{}{
|
||||||
|
"hashtag": req.Hashtag,
|
||||||
|
"offset": req.Offset,
|
||||||
|
"limit": req.Limit,
|
||||||
|
},
|
||||||
|
})
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
if result.Type == "error" {
|
||||||
|
return nil, buildResponseError(result.Data)
|
||||||
|
}
|
||||||
|
|
||||||
|
return UnmarshalFoundMessages(result.Data)
|
||||||
|
}
|
||||||
|
|
||||||
|
type GetSearchedForHashtagsRequest struct {
|
||||||
|
// Prefix of hashtags to return
|
||||||
|
Prefix string `json:"prefix"`
|
||||||
|
// The maximum number of hashtags to be returned
|
||||||
|
Limit int32 `json:"limit"`
|
||||||
|
}
|
||||||
|
|
||||||
|
// Returns recently searched for hashtags by their prefix
|
||||||
|
func (client *Client) GetSearchedForHashtags(req *GetSearchedForHashtagsRequest) (*Hashtags, error) {
|
||||||
|
result, err := client.Send(Request{
|
||||||
|
meta: meta{
|
||||||
|
Type: "getSearchedForHashtags",
|
||||||
|
},
|
||||||
|
Data: map[string]interface{}{
|
||||||
|
"prefix": req.Prefix,
|
||||||
|
"limit": req.Limit,
|
||||||
|
},
|
||||||
|
})
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
if result.Type == "error" {
|
||||||
|
return nil, buildResponseError(result.Data)
|
||||||
|
}
|
||||||
|
|
||||||
|
return UnmarshalHashtags(result.Data)
|
||||||
|
}
|
||||||
|
|
||||||
|
type RemoveSearchedForHashtagRequest struct {
|
||||||
|
// Hashtag to delete
|
||||||
|
Hashtag string `json:"hashtag"`
|
||||||
|
}
|
||||||
|
|
||||||
|
// Removes a hashtag from the list of recently searched for hashtags
|
||||||
|
func (client *Client) RemoveSearchedForHashtag(req *RemoveSearchedForHashtagRequest) (*Ok, error) {
|
||||||
|
result, err := client.Send(Request{
|
||||||
|
meta: meta{
|
||||||
|
Type: "removeSearchedForHashtag",
|
||||||
|
},
|
||||||
|
Data: map[string]interface{}{
|
||||||
|
"hashtag": req.Hashtag,
|
||||||
|
},
|
||||||
|
})
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
if result.Type == "error" {
|
||||||
|
return nil, buildResponseError(result.Data)
|
||||||
|
}
|
||||||
|
|
||||||
|
return UnmarshalOk(result.Data)
|
||||||
|
}
|
||||||
|
|
||||||
|
// Clears the list of recently searched for hashtags
|
||||||
|
func (client *Client) ClearSearchedForHashtags() (*Ok, error) {
|
||||||
|
result, err := client.Send(Request{
|
||||||
|
meta: meta{
|
||||||
|
Type: "clearSearchedForHashtags",
|
||||||
|
},
|
||||||
|
Data: map[string]interface{}{},
|
||||||
|
})
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
if result.Type == "error" {
|
||||||
|
return nil, buildResponseError(result.Data)
|
||||||
|
}
|
||||||
|
|
||||||
|
return UnmarshalOk(result.Data)
|
||||||
|
}
|
||||||
|
|
||||||
type DeleteAllCallMessagesRequest struct {
|
type DeleteAllCallMessagesRequest struct {
|
||||||
// Pass true to delete the messages for all users
|
// Pass true to delete the messages for all users
|
||||||
Revoke bool `json:"revoke"`
|
Revoke bool `json:"revoke"`
|
||||||
|
|
@ -3631,7 +3744,7 @@ type SendMessageAlbumRequest struct {
|
||||||
ReplyTo InputMessageReplyTo `json:"reply_to"`
|
ReplyTo InputMessageReplyTo `json:"reply_to"`
|
||||||
// Options to be used to send the messages; pass null to use default options
|
// Options to be used to send the messages; pass null to use default options
|
||||||
Options *MessageSendOptions `json:"options"`
|
Options *MessageSendOptions `json:"options"`
|
||||||
// Contents of messages to be sent. At most 10 messages can be added to an album
|
// Contents of messages to be sent. At most 10 messages can be added to an album. All messages must have the same value of show_caption_above_media
|
||||||
InputMessageContents []InputMessageContent `json:"input_message_contents"`
|
InputMessageContents []InputMessageContent `json:"input_message_contents"`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -4015,7 +4128,7 @@ type EditMessageTextRequest struct {
|
||||||
InputMessageContent InputMessageContent `json:"input_message_content"`
|
InputMessageContent InputMessageContent `json:"input_message_content"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// Edits the text of a message (or a text of a game message). Returns the edited message after the edit is completed on the server side
|
// Edits the text of a message (or a text of a game message). Returns the edited message after the edit is completed on the server side. Can be used only if message.can_be_edited == true
|
||||||
func (client *Client) EditMessageText(req *EditMessageTextRequest) (*Message, error) {
|
func (client *Client) EditMessageText(req *EditMessageTextRequest) (*Message, error) {
|
||||||
result, err := client.Send(Request{
|
result, err := client.Send(Request{
|
||||||
meta: meta{
|
meta: meta{
|
||||||
|
|
@ -4056,7 +4169,7 @@ type EditMessageLiveLocationRequest struct {
|
||||||
ProximityAlertRadius int32 `json:"proximity_alert_radius"`
|
ProximityAlertRadius int32 `json:"proximity_alert_radius"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// Edits the message content of a live location. Messages can be edited for a limited period of time specified in the live location. Returns the edited message after the edit is completed on the server side
|
// Edits the message content of a live location. Messages can be edited for a limited period of time specified in the live location. Returns the edited message after the edit is completed on the server side. Can be used only if message.can_be_edited == true
|
||||||
func (client *Client) EditMessageLiveLocation(req *EditMessageLiveLocationRequest) (*Message, error) {
|
func (client *Client) EditMessageLiveLocation(req *EditMessageLiveLocationRequest) (*Message, error) {
|
||||||
result, err := client.Send(Request{
|
result, err := client.Send(Request{
|
||||||
meta: meta{
|
meta: meta{
|
||||||
|
|
@ -4094,7 +4207,7 @@ type EditMessageMediaRequest struct {
|
||||||
InputMessageContent InputMessageContent `json:"input_message_content"`
|
InputMessageContent InputMessageContent `json:"input_message_content"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// Edits the content of a message with an animation, an audio, a document, a photo or a video, including message caption. If only the caption needs to be edited, use editMessageCaption instead. The media can't be edited if the message was set to self-destruct or to a self-destructing media. The type of message content in an album can't be changed with exception of replacing a photo with a video or vice versa. Returns the edited message after the edit is completed on the server side
|
// Edits the content of a message with an animation, an audio, a document, a photo or a video, including message caption. If only the caption needs to be edited, use editMessageCaption instead. The media can't be edited if the message was set to self-destruct or to a self-destructing media. The type of message content in an album can't be changed with exception of replacing a photo with a video or vice versa. Returns the edited message after the edit is completed on the server side. Can be used only if message.can_be_edited == true
|
||||||
func (client *Client) EditMessageMedia(req *EditMessageMediaRequest) (*Message, error) {
|
func (client *Client) EditMessageMedia(req *EditMessageMediaRequest) (*Message, error) {
|
||||||
result, err := client.Send(Request{
|
result, err := client.Send(Request{
|
||||||
meta: meta{
|
meta: meta{
|
||||||
|
|
@ -4127,9 +4240,11 @@ type EditMessageCaptionRequest struct {
|
||||||
ReplyMarkup ReplyMarkup `json:"reply_markup"`
|
ReplyMarkup ReplyMarkup `json:"reply_markup"`
|
||||||
// New message content caption; 0-getOption("message_caption_length_max") characters; pass null to remove caption
|
// New message content caption; 0-getOption("message_caption_length_max") characters; pass null to remove caption
|
||||||
Caption *FormattedText `json:"caption"`
|
Caption *FormattedText `json:"caption"`
|
||||||
|
// Pass true to show the caption above the media; otherwise, caption will be shown below the media. Can be true only for animation, photo, and video messages
|
||||||
|
ShowCaptionAboveMedia bool `json:"show_caption_above_media"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// Edits the message content caption. Returns the edited message after the edit is completed on the server side
|
// Edits the message content caption. Returns the edited message after the edit is completed on the server side. Can be used only if message.can_be_edited == true
|
||||||
func (client *Client) EditMessageCaption(req *EditMessageCaptionRequest) (*Message, error) {
|
func (client *Client) EditMessageCaption(req *EditMessageCaptionRequest) (*Message, error) {
|
||||||
result, err := client.Send(Request{
|
result, err := client.Send(Request{
|
||||||
meta: meta{
|
meta: meta{
|
||||||
|
|
@ -4140,6 +4255,7 @@ func (client *Client) EditMessageCaption(req *EditMessageCaptionRequest) (*Messa
|
||||||
"message_id": req.MessageId,
|
"message_id": req.MessageId,
|
||||||
"reply_markup": req.ReplyMarkup,
|
"reply_markup": req.ReplyMarkup,
|
||||||
"caption": req.Caption,
|
"caption": req.Caption,
|
||||||
|
"show_caption_above_media": req.ShowCaptionAboveMedia,
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
@ -4162,7 +4278,7 @@ type EditMessageReplyMarkupRequest struct {
|
||||||
ReplyMarkup ReplyMarkup `json:"reply_markup"`
|
ReplyMarkup ReplyMarkup `json:"reply_markup"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// Edits the message reply markup; for bots only. Returns the edited message after the edit is completed on the server side
|
// Edits the message reply markup; for bots only. Returns the edited message after the edit is completed on the server side. Can be used only if message.can_be_edited == true
|
||||||
func (client *Client) EditMessageReplyMarkup(req *EditMessageReplyMarkupRequest) (*Message, error) {
|
func (client *Client) EditMessageReplyMarkup(req *EditMessageReplyMarkupRequest) (*Message, error) {
|
||||||
result, err := client.Send(Request{
|
result, err := client.Send(Request{
|
||||||
meta: meta{
|
meta: meta{
|
||||||
|
|
@ -4297,6 +4413,8 @@ type EditInlineMessageCaptionRequest struct {
|
||||||
ReplyMarkup ReplyMarkup `json:"reply_markup"`
|
ReplyMarkup ReplyMarkup `json:"reply_markup"`
|
||||||
// New message content caption; pass null to remove caption; 0-getOption("message_caption_length_max") characters
|
// New message content caption; pass null to remove caption; 0-getOption("message_caption_length_max") characters
|
||||||
Caption *FormattedText `json:"caption"`
|
Caption *FormattedText `json:"caption"`
|
||||||
|
// Pass true to show the caption above the media; otherwise, caption will be shown below the media. Can be true only for animation, photo, and video messages
|
||||||
|
ShowCaptionAboveMedia bool `json:"show_caption_above_media"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// Edits the caption of an inline message sent via a bot; for bots only
|
// Edits the caption of an inline message sent via a bot; for bots only
|
||||||
|
|
@ -4309,6 +4427,7 @@ func (client *Client) EditInlineMessageCaption(req *EditInlineMessageCaptionRequ
|
||||||
"inline_message_id": req.InlineMessageId,
|
"inline_message_id": req.InlineMessageId,
|
||||||
"reply_markup": req.ReplyMarkup,
|
"reply_markup": req.ReplyMarkup,
|
||||||
"caption": req.Caption,
|
"caption": req.Caption,
|
||||||
|
"show_caption_above_media": req.ShowCaptionAboveMedia,
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
@ -4383,6 +4502,38 @@ func (client *Client) EditMessageSchedulingState(req *EditMessageSchedulingState
|
||||||
return UnmarshalOk(result.Data)
|
return UnmarshalOk(result.Data)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
type SetMessageFactCheckRequest struct {
|
||||||
|
// The channel chat the message belongs to
|
||||||
|
ChatId int64 `json:"chat_id"`
|
||||||
|
// Identifier of the message
|
||||||
|
MessageId int64 `json:"message_id"`
|
||||||
|
// New text of the fact-check; 0-getOption("fact_check_length_max") characters; pass null to remove it. Only Bold, Italic, and TextUrl entities with https://t.me/ links are supported
|
||||||
|
Text *FormattedText `json:"text"`
|
||||||
|
}
|
||||||
|
|
||||||
|
// Changes the fact-check of a message. Can be only used if getOption("can_edit_fact_check") == true
|
||||||
|
func (client *Client) SetMessageFactCheck(req *SetMessageFactCheckRequest) (*Ok, error) {
|
||||||
|
result, err := client.Send(Request{
|
||||||
|
meta: meta{
|
||||||
|
Type: "setMessageFactCheck",
|
||||||
|
},
|
||||||
|
Data: map[string]interface{}{
|
||||||
|
"chat_id": req.ChatId,
|
||||||
|
"message_id": req.MessageId,
|
||||||
|
"text": req.Text,
|
||||||
|
},
|
||||||
|
})
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
if result.Type == "error" {
|
||||||
|
return nil, buildResponseError(result.Data)
|
||||||
|
}
|
||||||
|
|
||||||
|
return UnmarshalOk(result.Data)
|
||||||
|
}
|
||||||
|
|
||||||
type SendBusinessMessageRequest struct {
|
type SendBusinessMessageRequest struct {
|
||||||
// Unique identifier of business connection on behalf of which to send the request
|
// Unique identifier of business connection on behalf of which to send the request
|
||||||
BusinessConnectionId string `json:"business_connection_id"`
|
BusinessConnectionId string `json:"business_connection_id"`
|
||||||
|
|
@ -4394,6 +4545,8 @@ type SendBusinessMessageRequest struct {
|
||||||
DisableNotification bool `json:"disable_notification"`
|
DisableNotification bool `json:"disable_notification"`
|
||||||
// Pass true if the content of the message must be protected from forwarding and saving
|
// Pass true if the content of the message must be protected from forwarding and saving
|
||||||
ProtectContent bool `json:"protect_content"`
|
ProtectContent bool `json:"protect_content"`
|
||||||
|
// Identifier of the effect to apply to the message
|
||||||
|
EffectId JsonInt64 `json:"effect_id"`
|
||||||
// Markup for replying to the message; pass null if none
|
// Markup for replying to the message; pass null if none
|
||||||
ReplyMarkup ReplyMarkup `json:"reply_markup"`
|
ReplyMarkup ReplyMarkup `json:"reply_markup"`
|
||||||
// The content of the message to be sent
|
// The content of the message to be sent
|
||||||
|
|
@ -4412,6 +4565,7 @@ func (client *Client) SendBusinessMessage(req *SendBusinessMessageRequest) (*Bus
|
||||||
"reply_to": req.ReplyTo,
|
"reply_to": req.ReplyTo,
|
||||||
"disable_notification": req.DisableNotification,
|
"disable_notification": req.DisableNotification,
|
||||||
"protect_content": req.ProtectContent,
|
"protect_content": req.ProtectContent,
|
||||||
|
"effect_id": req.EffectId,
|
||||||
"reply_markup": req.ReplyMarkup,
|
"reply_markup": req.ReplyMarkup,
|
||||||
"input_message_content": req.InputMessageContent,
|
"input_message_content": req.InputMessageContent,
|
||||||
},
|
},
|
||||||
|
|
@ -4438,7 +4592,9 @@ type SendBusinessMessageAlbumRequest struct {
|
||||||
DisableNotification bool `json:"disable_notification"`
|
DisableNotification bool `json:"disable_notification"`
|
||||||
// Pass true if the content of the message must be protected from forwarding and saving
|
// Pass true if the content of the message must be protected from forwarding and saving
|
||||||
ProtectContent bool `json:"protect_content"`
|
ProtectContent bool `json:"protect_content"`
|
||||||
// Contents of messages to be sent. At most 10 messages can be added to an album
|
// Identifier of the effect to apply to the message
|
||||||
|
EffectId JsonInt64 `json:"effect_id"`
|
||||||
|
// Contents of messages to be sent. At most 10 messages can be added to an album. All messages must have the same value of show_caption_above_media
|
||||||
InputMessageContents []InputMessageContent `json:"input_message_contents"`
|
InputMessageContents []InputMessageContent `json:"input_message_contents"`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -4454,6 +4610,7 @@ func (client *Client) SendBusinessMessageAlbum(req *SendBusinessMessageAlbumRequ
|
||||||
"reply_to": req.ReplyTo,
|
"reply_to": req.ReplyTo,
|
||||||
"disable_notification": req.DisableNotification,
|
"disable_notification": req.DisableNotification,
|
||||||
"protect_content": req.ProtectContent,
|
"protect_content": req.ProtectContent,
|
||||||
|
"effect_id": req.EffectId,
|
||||||
"input_message_contents": req.InputMessageContents,
|
"input_message_contents": req.InputMessageContents,
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
@ -4729,7 +4886,7 @@ type AddQuickReplyShortcutMessageAlbumRequest struct {
|
||||||
ShortcutName string `json:"shortcut_name"`
|
ShortcutName string `json:"shortcut_name"`
|
||||||
// Identifier of a quick reply message in the same shortcut to be replied; pass 0 if none
|
// Identifier of a quick reply message in the same shortcut to be replied; pass 0 if none
|
||||||
ReplyToMessageId int64 `json:"reply_to_message_id"`
|
ReplyToMessageId int64 `json:"reply_to_message_id"`
|
||||||
// Contents of messages to be sent. At most 10 messages can be added to an album
|
// Contents of messages to be sent. At most 10 messages can be added to an album. All messages must have the same value of show_caption_above_media
|
||||||
InputMessageContents []InputMessageContent `json:"input_message_contents"`
|
InputMessageContents []InputMessageContent `json:"input_message_contents"`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -5508,6 +5665,32 @@ func (client *Client) SetSavedMessagesTagLabel(req *SetSavedMessagesTagLabelRequ
|
||||||
return UnmarshalOk(result.Data)
|
return UnmarshalOk(result.Data)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
type GetMessageEffectRequest struct {
|
||||||
|
// Unique identifier of the effect
|
||||||
|
EffectId JsonInt64 `json:"effect_id"`
|
||||||
|
}
|
||||||
|
|
||||||
|
// Returns information about a message effect. Returns a 404 error if the effect is not found
|
||||||
|
func (client *Client) GetMessageEffect(req *GetMessageEffectRequest) (*MessageEffect, error) {
|
||||||
|
result, err := client.Send(Request{
|
||||||
|
meta: meta{
|
||||||
|
Type: "getMessageEffect",
|
||||||
|
},
|
||||||
|
Data: map[string]interface{}{
|
||||||
|
"effect_id": req.EffectId,
|
||||||
|
},
|
||||||
|
})
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
if result.Type == "error" {
|
||||||
|
return nil, buildResponseError(result.Data)
|
||||||
|
}
|
||||||
|
|
||||||
|
return UnmarshalMessageEffect(result.Data)
|
||||||
|
}
|
||||||
|
|
||||||
type SearchQuoteRequest struct {
|
type SearchQuoteRequest struct {
|
||||||
// Text in which to search for the quote
|
// Text in which to search for the quote
|
||||||
Text *FormattedText `json:"text"`
|
Text *FormattedText `json:"text"`
|
||||||
|
|
@ -5583,7 +5766,7 @@ type ParseTextEntitiesRequest struct {
|
||||||
ParseMode TextParseMode `json:"parse_mode"`
|
ParseMode TextParseMode `json:"parse_mode"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// Parses Bold, Italic, Underline, Strikethrough, Spoiler, CustomEmoji, BlockQuote, Code, Pre, PreCode, TextUrl and MentionName entities from a marked-up text. Can be called synchronously
|
// Parses Bold, Italic, Underline, Strikethrough, Spoiler, CustomEmoji, BlockQuote, ExpandableBlockQuote, Code, Pre, PreCode, TextUrl and MentionName entities from a marked-up text. Can be called synchronously
|
||||||
func ParseTextEntities(req *ParseTextEntitiesRequest) (*FormattedText, error) {
|
func ParseTextEntities(req *ParseTextEntitiesRequest) (*FormattedText, error) {
|
||||||
result, err := Execute(Request{
|
result, err := Execute(Request{
|
||||||
meta: meta{
|
meta: meta{
|
||||||
|
|
@ -5606,7 +5789,7 @@ func ParseTextEntities(req *ParseTextEntitiesRequest) (*FormattedText, error) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// deprecated
|
// deprecated
|
||||||
// Parses Bold, Italic, Underline, Strikethrough, Spoiler, CustomEmoji, BlockQuote, Code, Pre, PreCode, TextUrl and MentionName entities from a marked-up text. Can be called synchronously
|
// Parses Bold, Italic, Underline, Strikethrough, Spoiler, CustomEmoji, BlockQuote, ExpandableBlockQuote, Code, Pre, PreCode, TextUrl and MentionName entities from a marked-up text. Can be called synchronously
|
||||||
func (client *Client) ParseTextEntities(req *ParseTextEntitiesRequest) (*FormattedText, error) {
|
func (client *Client) ParseTextEntities(req *ParseTextEntitiesRequest) (*FormattedText, error) {
|
||||||
return ParseTextEntities(req)}
|
return ParseTextEntities(req)}
|
||||||
|
|
||||||
|
|
@ -11515,6 +11698,35 @@ func (client *Client) SearchFileDownloads(req *SearchFileDownloadsRequest) (*Fou
|
||||||
return UnmarshalFoundFileDownloads(result.Data)
|
return UnmarshalFoundFileDownloads(result.Data)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
type SetApplicationVerificationTokenRequest struct {
|
||||||
|
// Unique identifier for the verification process as received from updateApplicationVerificationRequired
|
||||||
|
VerificationId int64 `json:"verification_id"`
|
||||||
|
// Play Integrity API token for the Android application, or secret from push notification for the iOS application; pass an empty string to abort verification and receive error VERIFICATION_FAILED for the request
|
||||||
|
Token string `json:"token"`
|
||||||
|
}
|
||||||
|
|
||||||
|
// Application verification has been completed. Can be called before authorization
|
||||||
|
func (client *Client) SetApplicationVerificationToken(req *SetApplicationVerificationTokenRequest) (*Ok, error) {
|
||||||
|
result, err := client.Send(Request{
|
||||||
|
meta: meta{
|
||||||
|
Type: "setApplicationVerificationToken",
|
||||||
|
},
|
||||||
|
Data: map[string]interface{}{
|
||||||
|
"verification_id": req.VerificationId,
|
||||||
|
"token": req.Token,
|
||||||
|
},
|
||||||
|
})
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
if result.Type == "error" {
|
||||||
|
return nil, buildResponseError(result.Data)
|
||||||
|
}
|
||||||
|
|
||||||
|
return UnmarshalOk(result.Data)
|
||||||
|
}
|
||||||
|
|
||||||
type GetMessageFileTypeRequest struct {
|
type GetMessageFileTypeRequest struct {
|
||||||
// Beginning of the message file; up to 100 first lines
|
// Beginning of the message file; up to 100 first lines
|
||||||
MessageFileHead string `json:"message_file_head"`
|
MessageFileHead string `json:"message_file_head"`
|
||||||
|
|
@ -13592,6 +13804,8 @@ func (client *Client) SuggestUserProfilePhoto(req *SuggestUserProfilePhotoReques
|
||||||
type SearchUserByPhoneNumberRequest struct {
|
type SearchUserByPhoneNumberRequest struct {
|
||||||
// Phone number to search for
|
// Phone number to search for
|
||||||
PhoneNumber string `json:"phone_number"`
|
PhoneNumber string `json:"phone_number"`
|
||||||
|
// Pass true to get only locally available information without sending network requests
|
||||||
|
OnlyLocal bool `json:"only_local"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// Searches a user by their phone number. Returns a 404 error if the user can't be found
|
// Searches a user by their phone number. Returns a 404 error if the user can't be found
|
||||||
|
|
@ -13602,6 +13816,7 @@ func (client *Client) SearchUserByPhoneNumber(req *SearchUserByPhoneNumberReques
|
||||||
},
|
},
|
||||||
Data: map[string]interface{}{
|
Data: map[string]interface{}{
|
||||||
"phone_number": req.PhoneNumber,
|
"phone_number": req.PhoneNumber,
|
||||||
|
"only_local": req.OnlyLocal,
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
@ -15307,7 +15522,7 @@ func (client *Client) SendPhoneNumberCode(req *SendPhoneNumberCodeRequest) (*Aut
|
||||||
}
|
}
|
||||||
|
|
||||||
type SendPhoneNumberFirebaseSmsRequest struct {
|
type SendPhoneNumberFirebaseSmsRequest struct {
|
||||||
// SafetyNet Attestation API token for the Android application, or secret from push notification for the iOS application
|
// Play Integrity API or SafetyNet Attestation API token for the Android application, or secret from push notification for the iOS application
|
||||||
Token string `json:"token"`
|
Token string `json:"token"`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -15337,7 +15552,7 @@ type ReportPhoneNumberCodeMissingRequest struct {
|
||||||
MobileNetworkCode string `json:"mobile_network_code"`
|
MobileNetworkCode string `json:"mobile_network_code"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// Reports that authentication code wasn't delivered via SMS to the specified phone number; for official mobile apps only
|
// Reports that authentication code wasn't delivered via SMS to the specified phone number; for official mobile applications only
|
||||||
func (client *Client) ReportPhoneNumberCodeMissing(req *ReportPhoneNumberCodeMissingRequest) (*Ok, error) {
|
func (client *Client) ReportPhoneNumberCodeMissing(req *ReportPhoneNumberCodeMissingRequest) (*Ok, error) {
|
||||||
result, err := client.Send(Request{
|
result, err := client.Send(Request{
|
||||||
meta: meta{
|
meta: meta{
|
||||||
|
|
@ -15358,13 +15573,20 @@ func (client *Client) ReportPhoneNumberCodeMissing(req *ReportPhoneNumberCodeMis
|
||||||
return UnmarshalOk(result.Data)
|
return UnmarshalOk(result.Data)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
type ResendPhoneNumberCodeRequest struct {
|
||||||
|
// Reason of code resending; pass null if unknown
|
||||||
|
Reason ResendCodeReason `json:"reason"`
|
||||||
|
}
|
||||||
|
|
||||||
// Resends the authentication code sent to a phone number. 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 a phone number. Works only if the previously received authenticationCodeInfo next_code_type was not null and the server-specified timeout has passed
|
||||||
func (client *Client) ResendPhoneNumberCode() (*AuthenticationCodeInfo, error) {
|
func (client *Client) ResendPhoneNumberCode(req *ResendPhoneNumberCodeRequest) (*AuthenticationCodeInfo, error) {
|
||||||
result, err := client.Send(Request{
|
result, err := client.Send(Request{
|
||||||
meta: meta{
|
meta: meta{
|
||||||
Type: "resendPhoneNumberCode",
|
Type: "resendPhoneNumberCode",
|
||||||
},
|
},
|
||||||
Data: map[string]interface{}{},
|
Data: map[string]interface{}{
|
||||||
|
"reason": req.Reason,
|
||||||
|
},
|
||||||
})
|
})
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
|
|
@ -16725,7 +16947,7 @@ func (client *Client) ToggleSupergroupSignMessages(req *ToggleSupergroupSignMess
|
||||||
}
|
}
|
||||||
|
|
||||||
type ToggleSupergroupJoinToSendMessagesRequest struct {
|
type ToggleSupergroupJoinToSendMessagesRequest struct {
|
||||||
// Identifier of the supergroup
|
// Identifier of the supergroup that isn't a broadcast group
|
||||||
SupergroupId int64 `json:"supergroup_id"`
|
SupergroupId int64 `json:"supergroup_id"`
|
||||||
// New value of join_to_send_messages
|
// New value of join_to_send_messages
|
||||||
JoinToSendMessages bool `json:"join_to_send_messages"`
|
JoinToSendMessages bool `json:"join_to_send_messages"`
|
||||||
|
|
@ -16754,7 +16976,7 @@ func (client *Client) ToggleSupergroupJoinToSendMessages(req *ToggleSupergroupJo
|
||||||
}
|
}
|
||||||
|
|
||||||
type ToggleSupergroupJoinByRequestRequest struct {
|
type ToggleSupergroupJoinByRequestRequest struct {
|
||||||
// Identifier of the channel
|
// Identifier of the supergroup that isn't a broadcast group
|
||||||
SupergroupId int64 `json:"supergroup_id"`
|
SupergroupId int64 `json:"supergroup_id"`
|
||||||
// New value of join_by_request
|
// New value of join_by_request
|
||||||
JoinByRequest bool `json:"join_by_request"`
|
JoinByRequest bool `json:"join_by_request"`
|
||||||
|
|
@ -17202,7 +17424,7 @@ type SendPaymentFormRequest struct {
|
||||||
OrderInfoId string `json:"order_info_id"`
|
OrderInfoId string `json:"order_info_id"`
|
||||||
// Identifier of a chosen shipping option, if applicable
|
// Identifier of a chosen shipping option, if applicable
|
||||||
ShippingOptionId string `json:"shipping_option_id"`
|
ShippingOptionId string `json:"shipping_option_id"`
|
||||||
// The credentials chosen by user for payment
|
// The credentials chosen by user for payment; pass null for a payment in Telegram stars
|
||||||
Credentials InputCredentials `json:"credentials"`
|
Credentials InputCredentials `json:"credentials"`
|
||||||
// Chosen by the user amount of tip in the smallest units of the currency
|
// Chosen by the user amount of tip in the smallest units of the currency
|
||||||
TipAmount int64 `json:"tip_amount"`
|
TipAmount int64 `json:"tip_amount"`
|
||||||
|
|
@ -17346,6 +17568,35 @@ func (client *Client) CreateInvoiceLink(req *CreateInvoiceLinkRequest) (*HttpUrl
|
||||||
return UnmarshalHttpUrl(result.Data)
|
return UnmarshalHttpUrl(result.Data)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
type RefundStarPaymentRequest struct {
|
||||||
|
// Identifier of the user that did the payment
|
||||||
|
UserId int64 `json:"user_id"`
|
||||||
|
// Telegram payment identifier
|
||||||
|
TelegramPaymentChargeId string `json:"telegram_payment_charge_id"`
|
||||||
|
}
|
||||||
|
|
||||||
|
// Refunds a previously done payment in Telegram Stars
|
||||||
|
func (client *Client) RefundStarPayment(req *RefundStarPaymentRequest) (*Ok, error) {
|
||||||
|
result, err := client.Send(Request{
|
||||||
|
meta: meta{
|
||||||
|
Type: "refundStarPayment",
|
||||||
|
},
|
||||||
|
Data: map[string]interface{}{
|
||||||
|
"user_id": req.UserId,
|
||||||
|
"telegram_payment_charge_id": req.TelegramPaymentChargeId,
|
||||||
|
},
|
||||||
|
})
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
if result.Type == "error" {
|
||||||
|
return nil, buildResponseError(result.Data)
|
||||||
|
}
|
||||||
|
|
||||||
|
return UnmarshalOk(result.Data)
|
||||||
|
}
|
||||||
|
|
||||||
// Returns a user that can be contacted to get support
|
// Returns a user that can be contacted to get support
|
||||||
func (client *Client) GetSupportUser() (*User, error) {
|
func (client *Client) GetSupportUser() (*User, error) {
|
||||||
result, err := client.Send(Request{
|
result, err := client.Send(Request{
|
||||||
|
|
@ -20295,16 +20546,64 @@ func (client *Client) GetPremiumGiveawayInfo(req *GetPremiumGiveawayInfoRequest)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
type CanPurchasePremiumRequest struct {
|
// Returns available options for Telegram stars purchase
|
||||||
|
func (client *Client) GetStarPaymentOptions() (*StarPaymentOptions, error) {
|
||||||
|
result, err := client.Send(Request{
|
||||||
|
meta: meta{
|
||||||
|
Type: "getStarPaymentOptions",
|
||||||
|
},
|
||||||
|
Data: map[string]interface{}{},
|
||||||
|
})
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
if result.Type == "error" {
|
||||||
|
return nil, buildResponseError(result.Data)
|
||||||
|
}
|
||||||
|
|
||||||
|
return UnmarshalStarPaymentOptions(result.Data)
|
||||||
|
}
|
||||||
|
|
||||||
|
type GetStarTransactionsRequest struct {
|
||||||
|
// Offset of the first transaction to return as received from the previous request; use empty string to get the first chunk of results
|
||||||
|
Offset string `json:"offset"`
|
||||||
|
// Direction of the transactions to receive; pass null to get all transactions
|
||||||
|
Direction StarTransactionDirection `json:"direction"`
|
||||||
|
}
|
||||||
|
|
||||||
|
// Returns the list of Telegram star transactions for the current user
|
||||||
|
func (client *Client) GetStarTransactions(req *GetStarTransactionsRequest) (*StarTransactions, error) {
|
||||||
|
result, err := client.Send(Request{
|
||||||
|
meta: meta{
|
||||||
|
Type: "getStarTransactions",
|
||||||
|
},
|
||||||
|
Data: map[string]interface{}{
|
||||||
|
"offset": req.Offset,
|
||||||
|
"direction": req.Direction,
|
||||||
|
},
|
||||||
|
})
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
if result.Type == "error" {
|
||||||
|
return nil, buildResponseError(result.Data)
|
||||||
|
}
|
||||||
|
|
||||||
|
return UnmarshalStarTransactions(result.Data)
|
||||||
|
}
|
||||||
|
|
||||||
|
type CanPurchaseFromStoreRequest struct {
|
||||||
// Transaction purpose
|
// Transaction purpose
|
||||||
Purpose StorePaymentPurpose `json:"purpose"`
|
Purpose StorePaymentPurpose `json:"purpose"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// Checks whether Telegram Premium purchase is possible. Must be called before in-store Premium purchase
|
// Checks whether an in-store purchase is possible. Must be called before any in-store purchase
|
||||||
func (client *Client) CanPurchasePremium(req *CanPurchasePremiumRequest) (*Ok, error) {
|
func (client *Client) CanPurchaseFromStore(req *CanPurchaseFromStoreRequest) (*Ok, error) {
|
||||||
result, err := client.Send(Request{
|
result, err := client.Send(Request{
|
||||||
meta: meta{
|
meta: meta{
|
||||||
Type: "canPurchasePremium",
|
Type: "canPurchaseFromStore",
|
||||||
},
|
},
|
||||||
Data: map[string]interface{}{
|
Data: map[string]interface{}{
|
||||||
"purpose": req.Purpose,
|
"purpose": req.Purpose,
|
||||||
|
|
@ -21666,6 +21965,9 @@ func (client *Client) TestUseUpdate() (Update, error) {
|
||||||
case TypeUpdateMessageUnreadReactions:
|
case TypeUpdateMessageUnreadReactions:
|
||||||
return UnmarshalUpdateMessageUnreadReactions(result.Data)
|
return UnmarshalUpdateMessageUnreadReactions(result.Data)
|
||||||
|
|
||||||
|
case TypeUpdateMessageFactCheck:
|
||||||
|
return UnmarshalUpdateMessageFactCheck(result.Data)
|
||||||
|
|
||||||
case TypeUpdateMessageLiveLocationViewed:
|
case TypeUpdateMessageLiveLocationViewed:
|
||||||
return UnmarshalUpdateMessageLiveLocationViewed(result.Data)
|
return UnmarshalUpdateMessageLiveLocationViewed(result.Data)
|
||||||
|
|
||||||
|
|
@ -21867,6 +22169,9 @@ func (client *Client) TestUseUpdate() (Update, error) {
|
||||||
case TypeUpdateFileRemovedFromDownloads:
|
case TypeUpdateFileRemovedFromDownloads:
|
||||||
return UnmarshalUpdateFileRemovedFromDownloads(result.Data)
|
return UnmarshalUpdateFileRemovedFromDownloads(result.Data)
|
||||||
|
|
||||||
|
case TypeUpdateApplicationVerificationRequired:
|
||||||
|
return UnmarshalUpdateApplicationVerificationRequired(result.Data)
|
||||||
|
|
||||||
case TypeUpdateCall:
|
case TypeUpdateCall:
|
||||||
return UnmarshalUpdateCall(result.Data)
|
return UnmarshalUpdateCall(result.Data)
|
||||||
|
|
||||||
|
|
@ -21969,12 +22274,18 @@ func (client *Client) TestUseUpdate() (Update, error) {
|
||||||
case TypeUpdateActiveEmojiReactions:
|
case TypeUpdateActiveEmojiReactions:
|
||||||
return UnmarshalUpdateActiveEmojiReactions(result.Data)
|
return UnmarshalUpdateActiveEmojiReactions(result.Data)
|
||||||
|
|
||||||
|
case TypeUpdateAvailableMessageEffects:
|
||||||
|
return UnmarshalUpdateAvailableMessageEffects(result.Data)
|
||||||
|
|
||||||
case TypeUpdateDefaultReactionType:
|
case TypeUpdateDefaultReactionType:
|
||||||
return UnmarshalUpdateDefaultReactionType(result.Data)
|
return UnmarshalUpdateDefaultReactionType(result.Data)
|
||||||
|
|
||||||
case TypeUpdateSavedMessagesTags:
|
case TypeUpdateSavedMessagesTags:
|
||||||
return UnmarshalUpdateSavedMessagesTags(result.Data)
|
return UnmarshalUpdateSavedMessagesTags(result.Data)
|
||||||
|
|
||||||
|
case TypeUpdateOwnedStarCount:
|
||||||
|
return UnmarshalUpdateOwnedStarCount(result.Data)
|
||||||
|
|
||||||
case TypeUpdateChatRevenueAmount:
|
case TypeUpdateChatRevenueAmount:
|
||||||
return UnmarshalUpdateChatRevenueAmount(result.Data)
|
return UnmarshalUpdateChatRevenueAmount(result.Data)
|
||||||
|
|
||||||
|
|
|
||||||
1145
client/type.go
1145
client/type.go
File diff suppressed because it is too large
Load diff
|
|
@ -625,6 +625,86 @@ func UnmarshalListOfInputChatPhoto(dataList []json.RawMessage) ([]InputChatPhoto
|
||||||
return list, nil
|
return list, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func UnmarshalStarTransactionDirection(data json.RawMessage) (StarTransactionDirection, error) {
|
||||||
|
var meta meta
|
||||||
|
|
||||||
|
err := json.Unmarshal(data, &meta)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
switch meta.Type {
|
||||||
|
case TypeStarTransactionDirectionIncoming:
|
||||||
|
return UnmarshalStarTransactionDirectionIncoming(data)
|
||||||
|
|
||||||
|
case TypeStarTransactionDirectionOutgoing:
|
||||||
|
return UnmarshalStarTransactionDirectionOutgoing(data)
|
||||||
|
|
||||||
|
default:
|
||||||
|
return nil, fmt.Errorf("Error unmarshaling. Unknown type: " + meta.Type)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func UnmarshalListOfStarTransactionDirection(dataList []json.RawMessage) ([]StarTransactionDirection, error) {
|
||||||
|
list := []StarTransactionDirection{}
|
||||||
|
|
||||||
|
for _, data := range dataList {
|
||||||
|
entity, err := UnmarshalStarTransactionDirection(data)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
list = append(list, entity)
|
||||||
|
}
|
||||||
|
|
||||||
|
return list, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func UnmarshalStarTransactionSource(data json.RawMessage) (StarTransactionSource, error) {
|
||||||
|
var meta meta
|
||||||
|
|
||||||
|
err := json.Unmarshal(data, &meta)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
switch meta.Type {
|
||||||
|
case TypeStarTransactionSourceTelegram:
|
||||||
|
return UnmarshalStarTransactionSourceTelegram(data)
|
||||||
|
|
||||||
|
case TypeStarTransactionSourceAppStore:
|
||||||
|
return UnmarshalStarTransactionSourceAppStore(data)
|
||||||
|
|
||||||
|
case TypeStarTransactionSourceGooglePlay:
|
||||||
|
return UnmarshalStarTransactionSourceGooglePlay(data)
|
||||||
|
|
||||||
|
case TypeStarTransactionSourceFragment:
|
||||||
|
return UnmarshalStarTransactionSourceFragment(data)
|
||||||
|
|
||||||
|
case TypeStarTransactionSourceUser:
|
||||||
|
return UnmarshalStarTransactionSourceUser(data)
|
||||||
|
|
||||||
|
case TypeStarTransactionSourceUnsupported:
|
||||||
|
return UnmarshalStarTransactionSourceUnsupported(data)
|
||||||
|
|
||||||
|
default:
|
||||||
|
return nil, fmt.Errorf("Error unmarshaling. Unknown type: " + meta.Type)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func UnmarshalListOfStarTransactionSource(dataList []json.RawMessage) ([]StarTransactionSource, error) {
|
||||||
|
list := []StarTransactionSource{}
|
||||||
|
|
||||||
|
for _, data := range dataList {
|
||||||
|
entity, err := UnmarshalStarTransactionSource(data)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
list = append(list, entity)
|
||||||
|
}
|
||||||
|
|
||||||
|
return list, nil
|
||||||
|
}
|
||||||
|
|
||||||
func UnmarshalPremiumGiveawayParticipantStatus(data json.RawMessage) (PremiumGiveawayParticipantStatus, error) {
|
func UnmarshalPremiumGiveawayParticipantStatus(data json.RawMessage) (PremiumGiveawayParticipantStatus, error) {
|
||||||
var meta meta
|
var meta meta
|
||||||
|
|
||||||
|
|
@ -1074,6 +1154,40 @@ func UnmarshalListOfReactionType(dataList []json.RawMessage) ([]ReactionType, er
|
||||||
return list, nil
|
return list, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func UnmarshalMessageEffectType(data json.RawMessage) (MessageEffectType, error) {
|
||||||
|
var meta meta
|
||||||
|
|
||||||
|
err := json.Unmarshal(data, &meta)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
switch meta.Type {
|
||||||
|
case TypeMessageEffectTypeEmojiReaction:
|
||||||
|
return UnmarshalMessageEffectTypeEmojiReaction(data)
|
||||||
|
|
||||||
|
case TypeMessageEffectTypePremiumSticker:
|
||||||
|
return UnmarshalMessageEffectTypePremiumSticker(data)
|
||||||
|
|
||||||
|
default:
|
||||||
|
return nil, fmt.Errorf("Error unmarshaling. Unknown type: " + meta.Type)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func UnmarshalListOfMessageEffectType(dataList []json.RawMessage) ([]MessageEffectType, error) {
|
||||||
|
list := []MessageEffectType{}
|
||||||
|
|
||||||
|
for _, data := range dataList {
|
||||||
|
entity, err := UnmarshalMessageEffectType(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
|
||||||
|
|
||||||
|
|
@ -2173,6 +2287,74 @@ func UnmarshalListOfPaymentProvider(dataList []json.RawMessage) ([]PaymentProvid
|
||||||
return list, nil
|
return list, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func UnmarshalPaymentFormType(data json.RawMessage) (PaymentFormType, error) {
|
||||||
|
var meta meta
|
||||||
|
|
||||||
|
err := json.Unmarshal(data, &meta)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
switch meta.Type {
|
||||||
|
case TypePaymentFormTypeRegular:
|
||||||
|
return UnmarshalPaymentFormTypeRegular(data)
|
||||||
|
|
||||||
|
case TypePaymentFormTypeStars:
|
||||||
|
return UnmarshalPaymentFormTypeStars(data)
|
||||||
|
|
||||||
|
default:
|
||||||
|
return nil, fmt.Errorf("Error unmarshaling. Unknown type: " + meta.Type)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func UnmarshalListOfPaymentFormType(dataList []json.RawMessage) ([]PaymentFormType, error) {
|
||||||
|
list := []PaymentFormType{}
|
||||||
|
|
||||||
|
for _, data := range dataList {
|
||||||
|
entity, err := UnmarshalPaymentFormType(data)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
list = append(list, entity)
|
||||||
|
}
|
||||||
|
|
||||||
|
return list, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func UnmarshalPaymentReceiptType(data json.RawMessage) (PaymentReceiptType, error) {
|
||||||
|
var meta meta
|
||||||
|
|
||||||
|
err := json.Unmarshal(data, &meta)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
switch meta.Type {
|
||||||
|
case TypePaymentReceiptTypeRegular:
|
||||||
|
return UnmarshalPaymentReceiptTypeRegular(data)
|
||||||
|
|
||||||
|
case TypePaymentReceiptTypeStars:
|
||||||
|
return UnmarshalPaymentReceiptTypeStars(data)
|
||||||
|
|
||||||
|
default:
|
||||||
|
return nil, fmt.Errorf("Error unmarshaling. Unknown type: " + meta.Type)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func UnmarshalListOfPaymentReceiptType(dataList []json.RawMessage) ([]PaymentReceiptType, error) {
|
||||||
|
list := []PaymentReceiptType{}
|
||||||
|
|
||||||
|
for _, data := range dataList {
|
||||||
|
entity, err := UnmarshalPaymentReceiptType(data)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
list = append(list, entity)
|
||||||
|
}
|
||||||
|
|
||||||
|
return list, nil
|
||||||
|
}
|
||||||
|
|
||||||
func UnmarshalInputInvoice(data json.RawMessage) (InputInvoice, error) {
|
func UnmarshalInputInvoice(data json.RawMessage) (InputInvoice, error) {
|
||||||
var meta meta
|
var meta meta
|
||||||
|
|
||||||
|
|
@ -2856,6 +3038,9 @@ func UnmarshalTextEntityType(data json.RawMessage) (TextEntityType, error) {
|
||||||
case TypeTextEntityTypeBlockQuote:
|
case TypeTextEntityTypeBlockQuote:
|
||||||
return UnmarshalTextEntityTypeBlockQuote(data)
|
return UnmarshalTextEntityTypeBlockQuote(data)
|
||||||
|
|
||||||
|
case TypeTextEntityTypeExpandableBlockQuote:
|
||||||
|
return UnmarshalTextEntityTypeExpandableBlockQuote(data)
|
||||||
|
|
||||||
case TypeTextEntityTypeTextUrl:
|
case TypeTextEntityTypeTextUrl:
|
||||||
return UnmarshalTextEntityTypeTextUrl(data)
|
return UnmarshalTextEntityTypeTextUrl(data)
|
||||||
|
|
||||||
|
|
@ -3639,6 +3824,40 @@ func UnmarshalListOfChatBoostSource(dataList []json.RawMessage) ([]ChatBoostSour
|
||||||
return list, nil
|
return list, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func UnmarshalResendCodeReason(data json.RawMessage) (ResendCodeReason, error) {
|
||||||
|
var meta meta
|
||||||
|
|
||||||
|
err := json.Unmarshal(data, &meta)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
switch meta.Type {
|
||||||
|
case TypeResendCodeReasonUserRequest:
|
||||||
|
return UnmarshalResendCodeReasonUserRequest(data)
|
||||||
|
|
||||||
|
case TypeResendCodeReasonVerificationFailed:
|
||||||
|
return UnmarshalResendCodeReasonVerificationFailed(data)
|
||||||
|
|
||||||
|
default:
|
||||||
|
return nil, fmt.Errorf("Error unmarshaling. Unknown type: " + meta.Type)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func UnmarshalListOfResendCodeReason(dataList []json.RawMessage) ([]ResendCodeReason, error) {
|
||||||
|
list := []ResendCodeReason{}
|
||||||
|
|
||||||
|
for _, data := range dataList {
|
||||||
|
entity, err := UnmarshalResendCodeReason(data)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
list = append(list, entity)
|
||||||
|
}
|
||||||
|
|
||||||
|
return list, nil
|
||||||
|
}
|
||||||
|
|
||||||
func UnmarshalCallDiscardReason(data json.RawMessage) (CallDiscardReason, error) {
|
func UnmarshalCallDiscardReason(data json.RawMessage) (CallDiscardReason, error) {
|
||||||
var meta meta
|
var meta meta
|
||||||
|
|
||||||
|
|
@ -4803,6 +5022,9 @@ func UnmarshalStorePaymentPurpose(data json.RawMessage) (StorePaymentPurpose, er
|
||||||
case TypeStorePaymentPurposePremiumGiveaway:
|
case TypeStorePaymentPurposePremiumGiveaway:
|
||||||
return UnmarshalStorePaymentPurposePremiumGiveaway(data)
|
return UnmarshalStorePaymentPurposePremiumGiveaway(data)
|
||||||
|
|
||||||
|
case TypeStorePaymentPurposeStars:
|
||||||
|
return UnmarshalStorePaymentPurposeStars(data)
|
||||||
|
|
||||||
default:
|
default:
|
||||||
return nil, fmt.Errorf("Error unmarshaling. Unknown type: " + meta.Type)
|
return nil, fmt.Errorf("Error unmarshaling. Unknown type: " + meta.Type)
|
||||||
}
|
}
|
||||||
|
|
@ -4837,6 +5059,9 @@ func UnmarshalTelegramPaymentPurpose(data json.RawMessage) (TelegramPaymentPurpo
|
||||||
case TypeTelegramPaymentPurposePremiumGiveaway:
|
case TypeTelegramPaymentPurposePremiumGiveaway:
|
||||||
return UnmarshalTelegramPaymentPurposePremiumGiveaway(data)
|
return UnmarshalTelegramPaymentPurposePremiumGiveaway(data)
|
||||||
|
|
||||||
|
case TypeTelegramPaymentPurposeStars:
|
||||||
|
return UnmarshalTelegramPaymentPurposeStars(data)
|
||||||
|
|
||||||
default:
|
default:
|
||||||
return nil, fmt.Errorf("Error unmarshaling. Unknown type: " + meta.Type)
|
return nil, fmt.Errorf("Error unmarshaling. Unknown type: " + meta.Type)
|
||||||
}
|
}
|
||||||
|
|
@ -6947,6 +7172,9 @@ func UnmarshalUpdate(data json.RawMessage) (Update, error) {
|
||||||
case TypeUpdateMessageUnreadReactions:
|
case TypeUpdateMessageUnreadReactions:
|
||||||
return UnmarshalUpdateMessageUnreadReactions(data)
|
return UnmarshalUpdateMessageUnreadReactions(data)
|
||||||
|
|
||||||
|
case TypeUpdateMessageFactCheck:
|
||||||
|
return UnmarshalUpdateMessageFactCheck(data)
|
||||||
|
|
||||||
case TypeUpdateMessageLiveLocationViewed:
|
case TypeUpdateMessageLiveLocationViewed:
|
||||||
return UnmarshalUpdateMessageLiveLocationViewed(data)
|
return UnmarshalUpdateMessageLiveLocationViewed(data)
|
||||||
|
|
||||||
|
|
@ -7148,6 +7376,9 @@ func UnmarshalUpdate(data json.RawMessage) (Update, error) {
|
||||||
case TypeUpdateFileRemovedFromDownloads:
|
case TypeUpdateFileRemovedFromDownloads:
|
||||||
return UnmarshalUpdateFileRemovedFromDownloads(data)
|
return UnmarshalUpdateFileRemovedFromDownloads(data)
|
||||||
|
|
||||||
|
case TypeUpdateApplicationVerificationRequired:
|
||||||
|
return UnmarshalUpdateApplicationVerificationRequired(data)
|
||||||
|
|
||||||
case TypeUpdateCall:
|
case TypeUpdateCall:
|
||||||
return UnmarshalUpdateCall(data)
|
return UnmarshalUpdateCall(data)
|
||||||
|
|
||||||
|
|
@ -7250,12 +7481,18 @@ func UnmarshalUpdate(data json.RawMessage) (Update, error) {
|
||||||
case TypeUpdateActiveEmojiReactions:
|
case TypeUpdateActiveEmojiReactions:
|
||||||
return UnmarshalUpdateActiveEmojiReactions(data)
|
return UnmarshalUpdateActiveEmojiReactions(data)
|
||||||
|
|
||||||
|
case TypeUpdateAvailableMessageEffects:
|
||||||
|
return UnmarshalUpdateAvailableMessageEffects(data)
|
||||||
|
|
||||||
case TypeUpdateDefaultReactionType:
|
case TypeUpdateDefaultReactionType:
|
||||||
return UnmarshalUpdateDefaultReactionType(data)
|
return UnmarshalUpdateDefaultReactionType(data)
|
||||||
|
|
||||||
case TypeUpdateSavedMessagesTags:
|
case TypeUpdateSavedMessagesTags:
|
||||||
return UnmarshalUpdateSavedMessagesTags(data)
|
return UnmarshalUpdateSavedMessagesTags(data)
|
||||||
|
|
||||||
|
case TypeUpdateOwnedStarCount:
|
||||||
|
return UnmarshalUpdateOwnedStarCount(data)
|
||||||
|
|
||||||
case TypeUpdateChatRevenueAmount:
|
case TypeUpdateChatRevenueAmount:
|
||||||
return UnmarshalUpdateChatRevenueAmount(data)
|
return UnmarshalUpdateChatRevenueAmount(data)
|
||||||
|
|
||||||
|
|
@ -8452,6 +8689,14 @@ func UnmarshalChatAdministratorRights(data json.RawMessage) (*ChatAdministratorR
|
||||||
return &resp, err
|
return &resp, err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func UnmarshalProductInfo(data json.RawMessage) (*ProductInfo, error) {
|
||||||
|
var resp ProductInfo
|
||||||
|
|
||||||
|
err := json.Unmarshal(data, &resp)
|
||||||
|
|
||||||
|
return &resp, err
|
||||||
|
}
|
||||||
|
|
||||||
func UnmarshalPremiumPaymentOption(data json.RawMessage) (*PremiumPaymentOption, error) {
|
func UnmarshalPremiumPaymentOption(data json.RawMessage) (*PremiumPaymentOption, error) {
|
||||||
var resp PremiumPaymentOption
|
var resp PremiumPaymentOption
|
||||||
|
|
||||||
|
|
@ -8492,6 +8737,102 @@ func UnmarshalPremiumGiftCodeInfo(data json.RawMessage) (*PremiumGiftCodeInfo, e
|
||||||
return &resp, err
|
return &resp, err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func UnmarshalStarPaymentOption(data json.RawMessage) (*StarPaymentOption, error) {
|
||||||
|
var resp StarPaymentOption
|
||||||
|
|
||||||
|
err := json.Unmarshal(data, &resp)
|
||||||
|
|
||||||
|
return &resp, err
|
||||||
|
}
|
||||||
|
|
||||||
|
func UnmarshalStarPaymentOptions(data json.RawMessage) (*StarPaymentOptions, error) {
|
||||||
|
var resp StarPaymentOptions
|
||||||
|
|
||||||
|
err := json.Unmarshal(data, &resp)
|
||||||
|
|
||||||
|
return &resp, err
|
||||||
|
}
|
||||||
|
|
||||||
|
func UnmarshalStarTransactionDirectionIncoming(data json.RawMessage) (*StarTransactionDirectionIncoming, error) {
|
||||||
|
var resp StarTransactionDirectionIncoming
|
||||||
|
|
||||||
|
err := json.Unmarshal(data, &resp)
|
||||||
|
|
||||||
|
return &resp, err
|
||||||
|
}
|
||||||
|
|
||||||
|
func UnmarshalStarTransactionDirectionOutgoing(data json.RawMessage) (*StarTransactionDirectionOutgoing, error) {
|
||||||
|
var resp StarTransactionDirectionOutgoing
|
||||||
|
|
||||||
|
err := json.Unmarshal(data, &resp)
|
||||||
|
|
||||||
|
return &resp, err
|
||||||
|
}
|
||||||
|
|
||||||
|
func UnmarshalStarTransactionSourceTelegram(data json.RawMessage) (*StarTransactionSourceTelegram, error) {
|
||||||
|
var resp StarTransactionSourceTelegram
|
||||||
|
|
||||||
|
err := json.Unmarshal(data, &resp)
|
||||||
|
|
||||||
|
return &resp, err
|
||||||
|
}
|
||||||
|
|
||||||
|
func UnmarshalStarTransactionSourceAppStore(data json.RawMessage) (*StarTransactionSourceAppStore, error) {
|
||||||
|
var resp StarTransactionSourceAppStore
|
||||||
|
|
||||||
|
err := json.Unmarshal(data, &resp)
|
||||||
|
|
||||||
|
return &resp, err
|
||||||
|
}
|
||||||
|
|
||||||
|
func UnmarshalStarTransactionSourceGooglePlay(data json.RawMessage) (*StarTransactionSourceGooglePlay, error) {
|
||||||
|
var resp StarTransactionSourceGooglePlay
|
||||||
|
|
||||||
|
err := json.Unmarshal(data, &resp)
|
||||||
|
|
||||||
|
return &resp, err
|
||||||
|
}
|
||||||
|
|
||||||
|
func UnmarshalStarTransactionSourceFragment(data json.RawMessage) (*StarTransactionSourceFragment, error) {
|
||||||
|
var resp StarTransactionSourceFragment
|
||||||
|
|
||||||
|
err := json.Unmarshal(data, &resp)
|
||||||
|
|
||||||
|
return &resp, err
|
||||||
|
}
|
||||||
|
|
||||||
|
func UnmarshalStarTransactionSourceUser(data json.RawMessage) (*StarTransactionSourceUser, error) {
|
||||||
|
var resp StarTransactionSourceUser
|
||||||
|
|
||||||
|
err := json.Unmarshal(data, &resp)
|
||||||
|
|
||||||
|
return &resp, err
|
||||||
|
}
|
||||||
|
|
||||||
|
func UnmarshalStarTransactionSourceUnsupported(data json.RawMessage) (*StarTransactionSourceUnsupported, error) {
|
||||||
|
var resp StarTransactionSourceUnsupported
|
||||||
|
|
||||||
|
err := json.Unmarshal(data, &resp)
|
||||||
|
|
||||||
|
return &resp, err
|
||||||
|
}
|
||||||
|
|
||||||
|
func UnmarshalStarTransaction(data json.RawMessage) (*StarTransaction, error) {
|
||||||
|
var resp StarTransaction
|
||||||
|
|
||||||
|
err := json.Unmarshal(data, &resp)
|
||||||
|
|
||||||
|
return &resp, err
|
||||||
|
}
|
||||||
|
|
||||||
|
func UnmarshalStarTransactions(data json.RawMessage) (*StarTransactions, error) {
|
||||||
|
var resp StarTransactions
|
||||||
|
|
||||||
|
err := json.Unmarshal(data, &resp)
|
||||||
|
|
||||||
|
return &resp, err
|
||||||
|
}
|
||||||
|
|
||||||
func UnmarshalPremiumGiveawayParticipantStatusEligible(data json.RawMessage) (*PremiumGiveawayParticipantStatusEligible, error) {
|
func UnmarshalPremiumGiveawayParticipantStatusEligible(data json.RawMessage) (*PremiumGiveawayParticipantStatusEligible, error) {
|
||||||
var resp PremiumGiveawayParticipantStatusEligible
|
var resp PremiumGiveawayParticipantStatusEligible
|
||||||
|
|
||||||
|
|
@ -9204,6 +9545,30 @@ func UnmarshalUnreadReaction(data json.RawMessage) (*UnreadReaction, error) {
|
||||||
return &resp, err
|
return &resp, err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func UnmarshalMessageEffectTypeEmojiReaction(data json.RawMessage) (*MessageEffectTypeEmojiReaction, error) {
|
||||||
|
var resp MessageEffectTypeEmojiReaction
|
||||||
|
|
||||||
|
err := json.Unmarshal(data, &resp)
|
||||||
|
|
||||||
|
return &resp, err
|
||||||
|
}
|
||||||
|
|
||||||
|
func UnmarshalMessageEffectTypePremiumSticker(data json.RawMessage) (*MessageEffectTypePremiumSticker, error) {
|
||||||
|
var resp MessageEffectTypePremiumSticker
|
||||||
|
|
||||||
|
err := json.Unmarshal(data, &resp)
|
||||||
|
|
||||||
|
return &resp, err
|
||||||
|
}
|
||||||
|
|
||||||
|
func UnmarshalMessageEffect(data json.RawMessage) (*MessageEffect, error) {
|
||||||
|
var resp MessageEffect
|
||||||
|
|
||||||
|
err := json.Unmarshal(data, &resp)
|
||||||
|
|
||||||
|
return &resp, err
|
||||||
|
}
|
||||||
|
|
||||||
func UnmarshalMessageSendingStatePending(data json.RawMessage) (*MessageSendingStatePending, error) {
|
func UnmarshalMessageSendingStatePending(data json.RawMessage) (*MessageSendingStatePending, error) {
|
||||||
var resp MessageSendingStatePending
|
var resp MessageSendingStatePending
|
||||||
|
|
||||||
|
|
@ -9268,6 +9633,14 @@ func UnmarshalInputMessageReplyToStory(data json.RawMessage) (*InputMessageReply
|
||||||
return &resp, err
|
return &resp, err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func UnmarshalFactCheck(data json.RawMessage) (*FactCheck, error) {
|
||||||
|
var resp FactCheck
|
||||||
|
|
||||||
|
err := json.Unmarshal(data, &resp)
|
||||||
|
|
||||||
|
return &resp, err
|
||||||
|
}
|
||||||
|
|
||||||
func UnmarshalMessage(data json.RawMessage) (*Message, error) {
|
func UnmarshalMessage(data json.RawMessage) (*Message, error) {
|
||||||
var resp Message
|
var resp Message
|
||||||
|
|
||||||
|
|
@ -10892,6 +11265,22 @@ func UnmarshalPaymentOption(data json.RawMessage) (*PaymentOption, error) {
|
||||||
return &resp, err
|
return &resp, err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func UnmarshalPaymentFormTypeRegular(data json.RawMessage) (*PaymentFormTypeRegular, error) {
|
||||||
|
var resp PaymentFormTypeRegular
|
||||||
|
|
||||||
|
err := json.Unmarshal(data, &resp)
|
||||||
|
|
||||||
|
return &resp, err
|
||||||
|
}
|
||||||
|
|
||||||
|
func UnmarshalPaymentFormTypeStars(data json.RawMessage) (*PaymentFormTypeStars, error) {
|
||||||
|
var resp PaymentFormTypeStars
|
||||||
|
|
||||||
|
err := json.Unmarshal(data, &resp)
|
||||||
|
|
||||||
|
return &resp, err
|
||||||
|
}
|
||||||
|
|
||||||
func UnmarshalPaymentForm(data json.RawMessage) (*PaymentForm, error) {
|
func UnmarshalPaymentForm(data json.RawMessage) (*PaymentForm, error) {
|
||||||
var resp PaymentForm
|
var resp PaymentForm
|
||||||
|
|
||||||
|
|
@ -10916,6 +11305,22 @@ func UnmarshalPaymentResult(data json.RawMessage) (*PaymentResult, error) {
|
||||||
return &resp, err
|
return &resp, err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func UnmarshalPaymentReceiptTypeRegular(data json.RawMessage) (*PaymentReceiptTypeRegular, error) {
|
||||||
|
var resp PaymentReceiptTypeRegular
|
||||||
|
|
||||||
|
err := json.Unmarshal(data, &resp)
|
||||||
|
|
||||||
|
return &resp, err
|
||||||
|
}
|
||||||
|
|
||||||
|
func UnmarshalPaymentReceiptTypeStars(data json.RawMessage) (*PaymentReceiptTypeStars, error) {
|
||||||
|
var resp PaymentReceiptTypeStars
|
||||||
|
|
||||||
|
err := json.Unmarshal(data, &resp)
|
||||||
|
|
||||||
|
return &resp, err
|
||||||
|
}
|
||||||
|
|
||||||
func UnmarshalPaymentReceipt(data json.RawMessage) (*PaymentReceipt, error) {
|
func UnmarshalPaymentReceipt(data json.RawMessage) (*PaymentReceipt, error) {
|
||||||
var resp PaymentReceipt
|
var resp PaymentReceipt
|
||||||
|
|
||||||
|
|
@ -12260,6 +12665,14 @@ func UnmarshalTextEntityTypeBlockQuote(data json.RawMessage) (*TextEntityTypeBlo
|
||||||
return &resp, err
|
return &resp, err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func UnmarshalTextEntityTypeExpandableBlockQuote(data json.RawMessage) (*TextEntityTypeExpandableBlockQuote, error) {
|
||||||
|
var resp TextEntityTypeExpandableBlockQuote
|
||||||
|
|
||||||
|
err := json.Unmarshal(data, &resp)
|
||||||
|
|
||||||
|
return &resp, err
|
||||||
|
}
|
||||||
|
|
||||||
func UnmarshalTextEntityTypeTextUrl(data json.RawMessage) (*TextEntityTypeTextUrl, error) {
|
func UnmarshalTextEntityTypeTextUrl(data json.RawMessage) (*TextEntityTypeTextUrl, error) {
|
||||||
var resp TextEntityTypeTextUrl
|
var resp TextEntityTypeTextUrl
|
||||||
|
|
||||||
|
|
@ -13340,6 +13753,22 @@ func UnmarshalChatBoostSlots(data json.RawMessage) (*ChatBoostSlots, error) {
|
||||||
return &resp, err
|
return &resp, err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func UnmarshalResendCodeReasonUserRequest(data json.RawMessage) (*ResendCodeReasonUserRequest, error) {
|
||||||
|
var resp ResendCodeReasonUserRequest
|
||||||
|
|
||||||
|
err := json.Unmarshal(data, &resp)
|
||||||
|
|
||||||
|
return &resp, err
|
||||||
|
}
|
||||||
|
|
||||||
|
func UnmarshalResendCodeReasonVerificationFailed(data json.RawMessage) (*ResendCodeReasonVerificationFailed, error) {
|
||||||
|
var resp ResendCodeReasonVerificationFailed
|
||||||
|
|
||||||
|
err := json.Unmarshal(data, &resp)
|
||||||
|
|
||||||
|
return &resp, err
|
||||||
|
}
|
||||||
|
|
||||||
func UnmarshalCallDiscardReasonEmpty(data json.RawMessage) (*CallDiscardReasonEmpty, error) {
|
func UnmarshalCallDiscardReasonEmpty(data json.RawMessage) (*CallDiscardReasonEmpty, error) {
|
||||||
var resp CallDiscardReasonEmpty
|
var resp CallDiscardReasonEmpty
|
||||||
|
|
||||||
|
|
@ -15220,6 +15649,14 @@ func UnmarshalStorePaymentPurposePremiumGiveaway(data json.RawMessage) (*StorePa
|
||||||
return &resp, err
|
return &resp, err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func UnmarshalStorePaymentPurposeStars(data json.RawMessage) (*StorePaymentPurposeStars, error) {
|
||||||
|
var resp StorePaymentPurposeStars
|
||||||
|
|
||||||
|
err := json.Unmarshal(data, &resp)
|
||||||
|
|
||||||
|
return &resp, err
|
||||||
|
}
|
||||||
|
|
||||||
func UnmarshalTelegramPaymentPurposePremiumGiftCodes(data json.RawMessage) (*TelegramPaymentPurposePremiumGiftCodes, error) {
|
func UnmarshalTelegramPaymentPurposePremiumGiftCodes(data json.RawMessage) (*TelegramPaymentPurposePremiumGiftCodes, error) {
|
||||||
var resp TelegramPaymentPurposePremiumGiftCodes
|
var resp TelegramPaymentPurposePremiumGiftCodes
|
||||||
|
|
||||||
|
|
@ -15236,6 +15673,14 @@ func UnmarshalTelegramPaymentPurposePremiumGiveaway(data json.RawMessage) (*Tele
|
||||||
return &resp, err
|
return &resp, err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func UnmarshalTelegramPaymentPurposeStars(data json.RawMessage) (*TelegramPaymentPurposeStars, error) {
|
||||||
|
var resp TelegramPaymentPurposeStars
|
||||||
|
|
||||||
|
err := json.Unmarshal(data, &resp)
|
||||||
|
|
||||||
|
return &resp, err
|
||||||
|
}
|
||||||
|
|
||||||
func UnmarshalDeviceTokenFirebaseCloudMessaging(data json.RawMessage) (*DeviceTokenFirebaseCloudMessaging, error) {
|
func UnmarshalDeviceTokenFirebaseCloudMessaging(data json.RawMessage) (*DeviceTokenFirebaseCloudMessaging, error) {
|
||||||
var resp DeviceTokenFirebaseCloudMessaging
|
var resp DeviceTokenFirebaseCloudMessaging
|
||||||
|
|
||||||
|
|
@ -18148,6 +18593,14 @@ func UnmarshalUpdateMessageUnreadReactions(data json.RawMessage) (*UpdateMessage
|
||||||
return &resp, err
|
return &resp, err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func UnmarshalUpdateMessageFactCheck(data json.RawMessage) (*UpdateMessageFactCheck, error) {
|
||||||
|
var resp UpdateMessageFactCheck
|
||||||
|
|
||||||
|
err := json.Unmarshal(data, &resp)
|
||||||
|
|
||||||
|
return &resp, err
|
||||||
|
}
|
||||||
|
|
||||||
func UnmarshalUpdateMessageLiveLocationViewed(data json.RawMessage) (*UpdateMessageLiveLocationViewed, error) {
|
func UnmarshalUpdateMessageLiveLocationViewed(data json.RawMessage) (*UpdateMessageLiveLocationViewed, error) {
|
||||||
var resp UpdateMessageLiveLocationViewed
|
var resp UpdateMessageLiveLocationViewed
|
||||||
|
|
||||||
|
|
@ -18684,6 +19137,14 @@ func UnmarshalUpdateFileRemovedFromDownloads(data json.RawMessage) (*UpdateFileR
|
||||||
return &resp, err
|
return &resp, err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func UnmarshalUpdateApplicationVerificationRequired(data json.RawMessage) (*UpdateApplicationVerificationRequired, error) {
|
||||||
|
var resp UpdateApplicationVerificationRequired
|
||||||
|
|
||||||
|
err := json.Unmarshal(data, &resp)
|
||||||
|
|
||||||
|
return &resp, err
|
||||||
|
}
|
||||||
|
|
||||||
func UnmarshalUpdateCall(data json.RawMessage) (*UpdateCall, error) {
|
func UnmarshalUpdateCall(data json.RawMessage) (*UpdateCall, error) {
|
||||||
var resp UpdateCall
|
var resp UpdateCall
|
||||||
|
|
||||||
|
|
@ -18956,6 +19417,14 @@ func UnmarshalUpdateActiveEmojiReactions(data json.RawMessage) (*UpdateActiveEmo
|
||||||
return &resp, err
|
return &resp, err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func UnmarshalUpdateAvailableMessageEffects(data json.RawMessage) (*UpdateAvailableMessageEffects, error) {
|
||||||
|
var resp UpdateAvailableMessageEffects
|
||||||
|
|
||||||
|
err := json.Unmarshal(data, &resp)
|
||||||
|
|
||||||
|
return &resp, err
|
||||||
|
}
|
||||||
|
|
||||||
func UnmarshalUpdateDefaultReactionType(data json.RawMessage) (*UpdateDefaultReactionType, error) {
|
func UnmarshalUpdateDefaultReactionType(data json.RawMessage) (*UpdateDefaultReactionType, error) {
|
||||||
var resp UpdateDefaultReactionType
|
var resp UpdateDefaultReactionType
|
||||||
|
|
||||||
|
|
@ -18972,6 +19441,14 @@ func UnmarshalUpdateSavedMessagesTags(data json.RawMessage) (*UpdateSavedMessage
|
||||||
return &resp, err
|
return &resp, err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func UnmarshalUpdateOwnedStarCount(data json.RawMessage) (*UpdateOwnedStarCount, error) {
|
||||||
|
var resp UpdateOwnedStarCount
|
||||||
|
|
||||||
|
err := json.Unmarshal(data, &resp)
|
||||||
|
|
||||||
|
return &resp, err
|
||||||
|
}
|
||||||
|
|
||||||
func UnmarshalUpdateChatRevenueAmount(data json.RawMessage) (*UpdateChatRevenueAmount, error) {
|
func UnmarshalUpdateChatRevenueAmount(data json.RawMessage) (*UpdateChatRevenueAmount, error) {
|
||||||
var resp UpdateChatRevenueAmount
|
var resp UpdateChatRevenueAmount
|
||||||
|
|
||||||
|
|
@ -19713,6 +20190,9 @@ func UnmarshalType(data json.RawMessage) (Type, error) {
|
||||||
case TypeChatAdministratorRights:
|
case TypeChatAdministratorRights:
|
||||||
return UnmarshalChatAdministratorRights(data)
|
return UnmarshalChatAdministratorRights(data)
|
||||||
|
|
||||||
|
case TypeProductInfo:
|
||||||
|
return UnmarshalProductInfo(data)
|
||||||
|
|
||||||
case TypePremiumPaymentOption:
|
case TypePremiumPaymentOption:
|
||||||
return UnmarshalPremiumPaymentOption(data)
|
return UnmarshalPremiumPaymentOption(data)
|
||||||
|
|
||||||
|
|
@ -19728,6 +20208,42 @@ func UnmarshalType(data json.RawMessage) (Type, error) {
|
||||||
case TypePremiumGiftCodeInfo:
|
case TypePremiumGiftCodeInfo:
|
||||||
return UnmarshalPremiumGiftCodeInfo(data)
|
return UnmarshalPremiumGiftCodeInfo(data)
|
||||||
|
|
||||||
|
case TypeStarPaymentOption:
|
||||||
|
return UnmarshalStarPaymentOption(data)
|
||||||
|
|
||||||
|
case TypeStarPaymentOptions:
|
||||||
|
return UnmarshalStarPaymentOptions(data)
|
||||||
|
|
||||||
|
case TypeStarTransactionDirectionIncoming:
|
||||||
|
return UnmarshalStarTransactionDirectionIncoming(data)
|
||||||
|
|
||||||
|
case TypeStarTransactionDirectionOutgoing:
|
||||||
|
return UnmarshalStarTransactionDirectionOutgoing(data)
|
||||||
|
|
||||||
|
case TypeStarTransactionSourceTelegram:
|
||||||
|
return UnmarshalStarTransactionSourceTelegram(data)
|
||||||
|
|
||||||
|
case TypeStarTransactionSourceAppStore:
|
||||||
|
return UnmarshalStarTransactionSourceAppStore(data)
|
||||||
|
|
||||||
|
case TypeStarTransactionSourceGooglePlay:
|
||||||
|
return UnmarshalStarTransactionSourceGooglePlay(data)
|
||||||
|
|
||||||
|
case TypeStarTransactionSourceFragment:
|
||||||
|
return UnmarshalStarTransactionSourceFragment(data)
|
||||||
|
|
||||||
|
case TypeStarTransactionSourceUser:
|
||||||
|
return UnmarshalStarTransactionSourceUser(data)
|
||||||
|
|
||||||
|
case TypeStarTransactionSourceUnsupported:
|
||||||
|
return UnmarshalStarTransactionSourceUnsupported(data)
|
||||||
|
|
||||||
|
case TypeStarTransaction:
|
||||||
|
return UnmarshalStarTransaction(data)
|
||||||
|
|
||||||
|
case TypeStarTransactions:
|
||||||
|
return UnmarshalStarTransactions(data)
|
||||||
|
|
||||||
case TypePremiumGiveawayParticipantStatusEligible:
|
case TypePremiumGiveawayParticipantStatusEligible:
|
||||||
return UnmarshalPremiumGiveawayParticipantStatusEligible(data)
|
return UnmarshalPremiumGiveawayParticipantStatusEligible(data)
|
||||||
|
|
||||||
|
|
@ -19995,6 +20511,15 @@ func UnmarshalType(data json.RawMessage) (Type, error) {
|
||||||
case TypeUnreadReaction:
|
case TypeUnreadReaction:
|
||||||
return UnmarshalUnreadReaction(data)
|
return UnmarshalUnreadReaction(data)
|
||||||
|
|
||||||
|
case TypeMessageEffectTypeEmojiReaction:
|
||||||
|
return UnmarshalMessageEffectTypeEmojiReaction(data)
|
||||||
|
|
||||||
|
case TypeMessageEffectTypePremiumSticker:
|
||||||
|
return UnmarshalMessageEffectTypePremiumSticker(data)
|
||||||
|
|
||||||
|
case TypeMessageEffect:
|
||||||
|
return UnmarshalMessageEffect(data)
|
||||||
|
|
||||||
case TypeMessageSendingStatePending:
|
case TypeMessageSendingStatePending:
|
||||||
return UnmarshalMessageSendingStatePending(data)
|
return UnmarshalMessageSendingStatePending(data)
|
||||||
|
|
||||||
|
|
@ -20019,6 +20544,9 @@ func UnmarshalType(data json.RawMessage) (Type, error) {
|
||||||
case TypeInputMessageReplyToStory:
|
case TypeInputMessageReplyToStory:
|
||||||
return UnmarshalInputMessageReplyToStory(data)
|
return UnmarshalInputMessageReplyToStory(data)
|
||||||
|
|
||||||
|
case TypeFactCheck:
|
||||||
|
return UnmarshalFactCheck(data)
|
||||||
|
|
||||||
case TypeMessage:
|
case TypeMessage:
|
||||||
return UnmarshalMessage(data)
|
return UnmarshalMessage(data)
|
||||||
|
|
||||||
|
|
@ -20628,6 +21156,12 @@ func UnmarshalType(data json.RawMessage) (Type, error) {
|
||||||
case TypePaymentOption:
|
case TypePaymentOption:
|
||||||
return UnmarshalPaymentOption(data)
|
return UnmarshalPaymentOption(data)
|
||||||
|
|
||||||
|
case TypePaymentFormTypeRegular:
|
||||||
|
return UnmarshalPaymentFormTypeRegular(data)
|
||||||
|
|
||||||
|
case TypePaymentFormTypeStars:
|
||||||
|
return UnmarshalPaymentFormTypeStars(data)
|
||||||
|
|
||||||
case TypePaymentForm:
|
case TypePaymentForm:
|
||||||
return UnmarshalPaymentForm(data)
|
return UnmarshalPaymentForm(data)
|
||||||
|
|
||||||
|
|
@ -20637,6 +21171,12 @@ func UnmarshalType(data json.RawMessage) (Type, error) {
|
||||||
case TypePaymentResult:
|
case TypePaymentResult:
|
||||||
return UnmarshalPaymentResult(data)
|
return UnmarshalPaymentResult(data)
|
||||||
|
|
||||||
|
case TypePaymentReceiptTypeRegular:
|
||||||
|
return UnmarshalPaymentReceiptTypeRegular(data)
|
||||||
|
|
||||||
|
case TypePaymentReceiptTypeStars:
|
||||||
|
return UnmarshalPaymentReceiptTypeStars(data)
|
||||||
|
|
||||||
case TypePaymentReceipt:
|
case TypePaymentReceipt:
|
||||||
return UnmarshalPaymentReceipt(data)
|
return UnmarshalPaymentReceipt(data)
|
||||||
|
|
||||||
|
|
@ -21141,6 +21681,9 @@ func UnmarshalType(data json.RawMessage) (Type, error) {
|
||||||
case TypeTextEntityTypeBlockQuote:
|
case TypeTextEntityTypeBlockQuote:
|
||||||
return UnmarshalTextEntityTypeBlockQuote(data)
|
return UnmarshalTextEntityTypeBlockQuote(data)
|
||||||
|
|
||||||
|
case TypeTextEntityTypeExpandableBlockQuote:
|
||||||
|
return UnmarshalTextEntityTypeExpandableBlockQuote(data)
|
||||||
|
|
||||||
case TypeTextEntityTypeTextUrl:
|
case TypeTextEntityTypeTextUrl:
|
||||||
return UnmarshalTextEntityTypeTextUrl(data)
|
return UnmarshalTextEntityTypeTextUrl(data)
|
||||||
|
|
||||||
|
|
@ -21546,6 +22089,12 @@ func UnmarshalType(data json.RawMessage) (Type, error) {
|
||||||
case TypeChatBoostSlots:
|
case TypeChatBoostSlots:
|
||||||
return UnmarshalChatBoostSlots(data)
|
return UnmarshalChatBoostSlots(data)
|
||||||
|
|
||||||
|
case TypeResendCodeReasonUserRequest:
|
||||||
|
return UnmarshalResendCodeReasonUserRequest(data)
|
||||||
|
|
||||||
|
case TypeResendCodeReasonVerificationFailed:
|
||||||
|
return UnmarshalResendCodeReasonVerificationFailed(data)
|
||||||
|
|
||||||
case TypeCallDiscardReasonEmpty:
|
case TypeCallDiscardReasonEmpty:
|
||||||
return UnmarshalCallDiscardReasonEmpty(data)
|
return UnmarshalCallDiscardReasonEmpty(data)
|
||||||
|
|
||||||
|
|
@ -22251,12 +22800,18 @@ func UnmarshalType(data json.RawMessage) (Type, error) {
|
||||||
case TypeStorePaymentPurposePremiumGiveaway:
|
case TypeStorePaymentPurposePremiumGiveaway:
|
||||||
return UnmarshalStorePaymentPurposePremiumGiveaway(data)
|
return UnmarshalStorePaymentPurposePremiumGiveaway(data)
|
||||||
|
|
||||||
|
case TypeStorePaymentPurposeStars:
|
||||||
|
return UnmarshalStorePaymentPurposeStars(data)
|
||||||
|
|
||||||
case TypeTelegramPaymentPurposePremiumGiftCodes:
|
case TypeTelegramPaymentPurposePremiumGiftCodes:
|
||||||
return UnmarshalTelegramPaymentPurposePremiumGiftCodes(data)
|
return UnmarshalTelegramPaymentPurposePremiumGiftCodes(data)
|
||||||
|
|
||||||
case TypeTelegramPaymentPurposePremiumGiveaway:
|
case TypeTelegramPaymentPurposePremiumGiveaway:
|
||||||
return UnmarshalTelegramPaymentPurposePremiumGiveaway(data)
|
return UnmarshalTelegramPaymentPurposePremiumGiveaway(data)
|
||||||
|
|
||||||
|
case TypeTelegramPaymentPurposeStars:
|
||||||
|
return UnmarshalTelegramPaymentPurposeStars(data)
|
||||||
|
|
||||||
case TypeDeviceTokenFirebaseCloudMessaging:
|
case TypeDeviceTokenFirebaseCloudMessaging:
|
||||||
return UnmarshalDeviceTokenFirebaseCloudMessaging(data)
|
return UnmarshalDeviceTokenFirebaseCloudMessaging(data)
|
||||||
|
|
||||||
|
|
@ -23349,6 +23904,9 @@ func UnmarshalType(data json.RawMessage) (Type, error) {
|
||||||
case TypeUpdateMessageUnreadReactions:
|
case TypeUpdateMessageUnreadReactions:
|
||||||
return UnmarshalUpdateMessageUnreadReactions(data)
|
return UnmarshalUpdateMessageUnreadReactions(data)
|
||||||
|
|
||||||
|
case TypeUpdateMessageFactCheck:
|
||||||
|
return UnmarshalUpdateMessageFactCheck(data)
|
||||||
|
|
||||||
case TypeUpdateMessageLiveLocationViewed:
|
case TypeUpdateMessageLiveLocationViewed:
|
||||||
return UnmarshalUpdateMessageLiveLocationViewed(data)
|
return UnmarshalUpdateMessageLiveLocationViewed(data)
|
||||||
|
|
||||||
|
|
@ -23550,6 +24108,9 @@ func UnmarshalType(data json.RawMessage) (Type, error) {
|
||||||
case TypeUpdateFileRemovedFromDownloads:
|
case TypeUpdateFileRemovedFromDownloads:
|
||||||
return UnmarshalUpdateFileRemovedFromDownloads(data)
|
return UnmarshalUpdateFileRemovedFromDownloads(data)
|
||||||
|
|
||||||
|
case TypeUpdateApplicationVerificationRequired:
|
||||||
|
return UnmarshalUpdateApplicationVerificationRequired(data)
|
||||||
|
|
||||||
case TypeUpdateCall:
|
case TypeUpdateCall:
|
||||||
return UnmarshalUpdateCall(data)
|
return UnmarshalUpdateCall(data)
|
||||||
|
|
||||||
|
|
@ -23652,12 +24213,18 @@ func UnmarshalType(data json.RawMessage) (Type, error) {
|
||||||
case TypeUpdateActiveEmojiReactions:
|
case TypeUpdateActiveEmojiReactions:
|
||||||
return UnmarshalUpdateActiveEmojiReactions(data)
|
return UnmarshalUpdateActiveEmojiReactions(data)
|
||||||
|
|
||||||
|
case TypeUpdateAvailableMessageEffects:
|
||||||
|
return UnmarshalUpdateAvailableMessageEffects(data)
|
||||||
|
|
||||||
case TypeUpdateDefaultReactionType:
|
case TypeUpdateDefaultReactionType:
|
||||||
return UnmarshalUpdateDefaultReactionType(data)
|
return UnmarshalUpdateDefaultReactionType(data)
|
||||||
|
|
||||||
case TypeUpdateSavedMessagesTags:
|
case TypeUpdateSavedMessagesTags:
|
||||||
return UnmarshalUpdateSavedMessagesTags(data)
|
return UnmarshalUpdateSavedMessagesTags(data)
|
||||||
|
|
||||||
|
case TypeUpdateOwnedStarCount:
|
||||||
|
return UnmarshalUpdateOwnedStarCount(data)
|
||||||
|
|
||||||
case TypeUpdateChatRevenueAmount:
|
case TypeUpdateChatRevenueAmount:
|
||||||
return UnmarshalUpdateChatRevenueAmount(data)
|
return UnmarshalUpdateChatRevenueAmount(data)
|
||||||
|
|
||||||
|
|
|
||||||
364
data/td_api.tl
364
data/td_api.tl
|
|
@ -59,9 +59,10 @@ authenticationCodeTypeMissedCall phone_number_prefix:string length:int32 = Authe
|
||||||
authenticationCodeTypeFragment url:string length:int32 = AuthenticationCodeType;
|
authenticationCodeTypeFragment url:string length:int32 = AuthenticationCodeType;
|
||||||
|
|
||||||
//@description A digit-only authentication code is delivered via Firebase Authentication to the official Android application
|
//@description A digit-only authentication code is delivered via Firebase Authentication to the official Android application
|
||||||
//@nonce Nonce to pass to the SafetyNet Attestation API
|
//@use_play_integrity True, if Play Integrity API must be used for device verification. Otherwise, SafetyNet Attestation API must be used
|
||||||
|
//@nonce Nonce to pass to the Play Integrity API or the SafetyNet Attestation API
|
||||||
//@length Length of the code
|
//@length Length of the code
|
||||||
authenticationCodeTypeFirebaseAndroid nonce:bytes length:int32 = AuthenticationCodeType;
|
authenticationCodeTypeFirebaseAndroid use_play_integrity:Bool nonce:bytes length:int32 = AuthenticationCodeType;
|
||||||
|
|
||||||
//@description A digit-only authentication code is delivered via Firebase Authentication to the official iOS application
|
//@description A digit-only authentication code is delivered via Firebase Authentication to the official iOS application
|
||||||
//@receipt Receipt of successful application token validation to compare with receipt from push notification
|
//@receipt Receipt of successful application token validation to compare with receipt from push notification
|
||||||
|
|
@ -787,6 +788,13 @@ chatPermissions can_send_basic_messages:Bool can_send_audios:Bool can_send_docum
|
||||||
chatAdministratorRights can_manage_chat:Bool can_change_info:Bool can_post_messages:Bool can_edit_messages:Bool can_delete_messages:Bool can_invite_users:Bool can_restrict_members:Bool can_pin_messages:Bool can_manage_topics:Bool can_promote_members:Bool can_manage_video_chats:Bool can_post_stories:Bool can_edit_stories:Bool can_delete_stories:Bool is_anonymous:Bool = ChatAdministratorRights;
|
chatAdministratorRights can_manage_chat:Bool can_change_info:Bool can_post_messages:Bool can_edit_messages:Bool can_delete_messages:Bool can_invite_users:Bool can_restrict_members:Bool can_pin_messages:Bool can_manage_topics:Bool can_promote_members:Bool can_manage_video_chats:Bool can_post_stories:Bool can_edit_stories:Bool can_delete_stories:Bool is_anonymous:Bool = ChatAdministratorRights;
|
||||||
|
|
||||||
|
|
||||||
|
//@description Contains information about a product that can be paid with invoice
|
||||||
|
//@title Product title
|
||||||
|
//@param_description Product description
|
||||||
|
//@photo Product photo; may be null
|
||||||
|
productInfo title:string description:formattedText photo:photo = ProductInfo;
|
||||||
|
|
||||||
|
|
||||||
//@description Describes an option for buying 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
|
||||||
|
|
@ -825,6 +833,62 @@ premiumGiftCodePaymentOptions options:vector<premiumGiftCodePaymentOption> = Pre
|
||||||
//@use_date Point in time (Unix timestamp) when the code was activated; 0 if none
|
//@use_date Point in time (Unix timestamp) when the code was activated; 0 if none
|
||||||
premiumGiftCodeInfo creator_id:MessageSender creation_date:int32 is_from_giveaway:Bool giveaway_message_id:int53 month_count:int32 user_id:int53 use_date:int32 = PremiumGiftCodeInfo;
|
premiumGiftCodeInfo creator_id:MessageSender creation_date:int32 is_from_giveaway:Bool giveaway_message_id:int53 month_count:int32 user_id:int53 use_date:int32 = PremiumGiftCodeInfo;
|
||||||
|
|
||||||
|
//@description Describes an option for buying Telegram stars
|
||||||
|
//@currency ISO 4217 currency code for the payment
|
||||||
|
//@amount The amount to pay, in the smallest units of the currency
|
||||||
|
//@star_count Number of stars that will be purchased
|
||||||
|
//@store_product_id Identifier of the store product associated with the option; may be empty if none
|
||||||
|
//@is_additional True, if the option must be shown only in the full list of payment options
|
||||||
|
starPaymentOption currency:string amount:int53 star_count:int53 store_product_id:string is_additional:Bool = StarPaymentOption;
|
||||||
|
|
||||||
|
//@description Contains a list of options for buying Telegram stars @options The list of options
|
||||||
|
starPaymentOptions options:vector<starPaymentOption> = StarPaymentOptions;
|
||||||
|
|
||||||
|
|
||||||
|
//@class StarTransactionDirection @description Describes direction of a transaction with Telegram stars
|
||||||
|
|
||||||
|
//@description The transaction is incoming and increases the number of owned Telegram stars
|
||||||
|
starTransactionDirectionIncoming = StarTransactionDirection;
|
||||||
|
|
||||||
|
//@description The transaction is outgoing and decreases the number of owned Telegram stars
|
||||||
|
starTransactionDirectionOutgoing = StarTransactionDirection;
|
||||||
|
|
||||||
|
|
||||||
|
//@class StarTransactionSource @description Describes source or recipient of a transaction with Telegram stars
|
||||||
|
|
||||||
|
//@description The transaction is a transaction with Telegram through a bot
|
||||||
|
starTransactionSourceTelegram = StarTransactionSource;
|
||||||
|
|
||||||
|
//@description The transaction is a transaction with App Store
|
||||||
|
starTransactionSourceAppStore = StarTransactionSource;
|
||||||
|
|
||||||
|
//@description The transaction is a transaction with Google Play
|
||||||
|
starTransactionSourceGooglePlay = StarTransactionSource;
|
||||||
|
|
||||||
|
//@description The transaction is a transaction with Fragment
|
||||||
|
starTransactionSourceFragment = StarTransactionSource;
|
||||||
|
|
||||||
|
//@description The transaction is a transaction with another user @user_id Identifier of the user @product_info Information about the bought product; may be null if none
|
||||||
|
starTransactionSourceUser user_id:int53 product_info:productInfo = StarTransactionSource;
|
||||||
|
|
||||||
|
//@description The transaction is a transaction with unknown source
|
||||||
|
starTransactionSourceUnsupported = StarTransactionSource;
|
||||||
|
|
||||||
|
|
||||||
|
//@description Represents a transaction changing the amount of owned Telegram stars
|
||||||
|
//@id Unique identifier of the transaction
|
||||||
|
//@star_count The amount of added owned Telegram stars; negative for outgoing transactions
|
||||||
|
//@is_refund True, if the transaction is a refund of a previous transaction
|
||||||
|
//@date Point in time (Unix timestamp) when the transaction was completed
|
||||||
|
//@source Source of the transaction, or its recipient for outgoing transactions
|
||||||
|
starTransaction id:string star_count:int53 is_refund:Bool date:int32 source:StarTransactionSource = StarTransaction;
|
||||||
|
|
||||||
|
//@description Represents a list of Telegram star transactions
|
||||||
|
//@star_count The amount of owned Telegram stars
|
||||||
|
//@transactions List of transactions with Telegram stars
|
||||||
|
//@next_offset The offset for the next request. If empty, then there are no more results
|
||||||
|
starTransactions star_count:int53 transactions:vector<starTransaction> next_offset:string = StarTransactions;
|
||||||
|
|
||||||
|
|
||||||
//@class PremiumGiveawayParticipantStatus @description Contains information about status of a user in a Telegram Premium giveaway
|
//@class PremiumGiveawayParticipantStatus @description Contains information about status of a user in a Telegram Premium giveaway
|
||||||
|
|
||||||
|
|
@ -1398,6 +1462,24 @@ messageInteractionInfo view_count:int32 forward_count:int32 reply_info:messageRe
|
||||||
unreadReaction type:ReactionType sender_id:MessageSender is_big:Bool = UnreadReaction;
|
unreadReaction type:ReactionType sender_id:MessageSender is_big:Bool = UnreadReaction;
|
||||||
|
|
||||||
|
|
||||||
|
//@class MessageEffectType @description Describes type of emoji effect
|
||||||
|
|
||||||
|
//@description An effect from an emoji reaction @select_animation Select animation for the effect in TGS format @effect_animation Effect animation for the effect in TGS format
|
||||||
|
messageEffectTypeEmojiReaction select_animation:sticker effect_animation:sticker = MessageEffectType;
|
||||||
|
|
||||||
|
//@description An effect from a premium sticker @sticker The premium sticker. The effect can be found at sticker.full_type.premium_animation
|
||||||
|
messageEffectTypePremiumSticker sticker:sticker = MessageEffectType;
|
||||||
|
|
||||||
|
|
||||||
|
//@description Contains information about an effect added to a message
|
||||||
|
//@id Unique identifier of the effect
|
||||||
|
//@static_icon Static icon for the effect in WEBP format; may be null if none
|
||||||
|
//@emoji Emoji corresponding to the effect that can be used if static icon isn't available
|
||||||
|
//@is_premium True, if Telegram Premium subscription is required to use the effect
|
||||||
|
//@type Type of the effect
|
||||||
|
messageEffect id:int64 static_icon:sticker emoji:string is_premium:Bool type:MessageEffectType = MessageEffect;
|
||||||
|
|
||||||
|
|
||||||
//@class MessageSendingState @description Contains information about the sending state of the message
|
//@class MessageSendingState @description Contains information about the sending state of the message
|
||||||
|
|
||||||
//@description The message is being sent now, but has not yet been delivered to the server @sending_id Non-persistent message sending identifier, specified by the application
|
//@description The message is being sent now, but has not yet been delivered to the server @sending_id Non-persistent message sending identifier, specified by the application
|
||||||
|
|
@ -1457,6 +1539,12 @@ inputMessageReplyToMessage chat_id:int53 message_id:int53 quote:inputTextQuote =
|
||||||
inputMessageReplyToStory story_sender_chat_id:int53 story_id:int32 = InputMessageReplyTo;
|
inputMessageReplyToStory story_sender_chat_id:int53 story_id:int32 = InputMessageReplyTo;
|
||||||
|
|
||||||
|
|
||||||
|
//@description Describes a fact-check added to the message by an independent checker
|
||||||
|
//@text Text of the fact-check
|
||||||
|
//@country_code A two-letter ISO 3166-1 alpha-2 country code of the country for which the fact-check is shown
|
||||||
|
factCheck text:formattedText country_code:string = FactCheck;
|
||||||
|
|
||||||
|
|
||||||
//@description Describes a message
|
//@description Describes a message
|
||||||
//@id Message identifier; unique for the chat to which the message belongs
|
//@id Message identifier; unique for the chat to which the message belongs
|
||||||
//@sender_id Identifier of the sender of the message
|
//@sender_id Identifier of the sender of the message
|
||||||
|
|
@ -1489,6 +1577,7 @@ inputMessageReplyToStory story_sender_chat_id:int53 story_id:int32 = InputMessag
|
||||||
//@import_info Information about the initial message for messages created with importMessages; may be null if the message isn't imported
|
//@import_info Information about the initial message for messages created with importMessages; may be null if the message isn't imported
|
||||||
//@interaction_info Information about interactions with the message; may be null if none
|
//@interaction_info Information about interactions with the message; may be null if none
|
||||||
//@unread_reactions Information about unread reactions added to the message
|
//@unread_reactions Information about unread reactions added to the message
|
||||||
|
//@fact_check Information about fact-check added to the message; may be null if none
|
||||||
//@reply_to Information about the message or the story this message is replying to; may be null if none
|
//@reply_to Information about the message or the story this message is replying to; may be null if none
|
||||||
//@message_thread_id If non-zero, the identifier of the message thread the message belongs to; unique within the chat to which the message belongs
|
//@message_thread_id If non-zero, the identifier of the message thread the message belongs to; unique within the chat to which the message belongs
|
||||||
//@saved_messages_topic_id Identifier of the Saved Messages topic for the message; 0 for messages not from Saved Messages
|
//@saved_messages_topic_id Identifier of the Saved Messages topic for the message; 0 for messages not from Saved Messages
|
||||||
|
|
@ -1500,10 +1589,11 @@ inputMessageReplyToStory story_sender_chat_id:int53 story_id:int32 = InputMessag
|
||||||
//@sender_boost_count Number of times the sender of the message boosted the supergroup at the time the message was sent; 0 if none or unknown. For messages sent by the current user, supergroupFullInfo.my_boost_count must be used instead
|
//@sender_boost_count Number of times the sender of the message boosted the supergroup at the time the message was sent; 0 if none or unknown. For messages sent by the current user, supergroupFullInfo.my_boost_count must be used instead
|
||||||
//@author_signature For channel posts and anonymous group messages, optional author signature
|
//@author_signature For channel posts and anonymous group messages, optional author signature
|
||||||
//@media_album_id Unique identifier of an album this message belongs to; 0 if none. Only audios, documents, photos and videos can be grouped together in albums
|
//@media_album_id Unique identifier of an album this message belongs to; 0 if none. Only audios, documents, photos and videos can be grouped together in albums
|
||||||
|
//@effect_id Unique identifier of the effect added to the message; 0 if none
|
||||||
//@restriction_reason If non-empty, contains a human-readable description of the reason why access to this message must be restricted
|
//@restriction_reason If non-empty, contains a human-readable description of the reason why access to this message must be restricted
|
||||||
//@content Content of the message
|
//@content Content of the message
|
||||||
//@reply_markup Reply markup for the message; may be null if none
|
//@reply_markup Reply markup for the message; may be null if none
|
||||||
message id:int53 sender_id:MessageSender chat_id:int53 sending_state:MessageSendingState scheduling_state:MessageSchedulingState is_outgoing:Bool is_pinned:Bool is_from_offline:Bool can_be_edited:Bool can_be_forwarded:Bool can_be_replied_in_another_chat:Bool can_be_saved:Bool can_be_deleted_only_for_self:Bool can_be_deleted_for_all_users:Bool can_get_added_reactions:Bool can_get_statistics:Bool can_get_message_thread:Bool can_get_read_date:Bool can_get_viewers:Bool can_get_media_timestamp_links:Bool can_report_reactions:Bool has_timestamped_media:Bool is_channel_post:Bool is_topic_message:Bool contains_unread_mention:Bool date:int32 edit_date:int32 forward_info:messageForwardInfo import_info:messageImportInfo interaction_info:messageInteractionInfo unread_reactions:vector<unreadReaction> reply_to:MessageReplyTo message_thread_id:int53 saved_messages_topic_id:int53 self_destruct_type:MessageSelfDestructType self_destruct_in:double auto_delete_in:double via_bot_user_id:int53 sender_business_bot_user_id:int53 sender_boost_count:int32 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 is_from_offline:Bool can_be_edited:Bool can_be_forwarded:Bool can_be_replied_in_another_chat:Bool can_be_saved:Bool can_be_deleted_only_for_self:Bool can_be_deleted_for_all_users:Bool can_get_added_reactions:Bool can_get_statistics:Bool can_get_message_thread:Bool can_get_read_date:Bool can_get_viewers:Bool can_get_media_timestamp_links:Bool can_report_reactions:Bool has_timestamped_media:Bool is_channel_post:Bool is_topic_message:Bool contains_unread_mention:Bool date:int32 edit_date:int32 forward_info:messageForwardInfo import_info:messageImportInfo interaction_info:messageInteractionInfo unread_reactions:vector<unreadReaction> fact_check:factCheck reply_to:MessageReplyTo message_thread_id:int53 saved_messages_topic_id:int53 self_destruct_type:MessageSelfDestructType self_destruct_in:double auto_delete_in:double via_bot_user_id:int53 sender_business_bot_user_id:int53 sender_boost_count:int32 author_signature:string media_album_id:int64 effect_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;
|
||||||
|
|
@ -1912,7 +2002,7 @@ chatNearby chat_id:int53 distance:int32 = ChatNearby;
|
||||||
chatsNearby users_nearby:vector<chatNearby> supergroups_nearby:vector<chatNearby> = ChatsNearby;
|
chatsNearby users_nearby:vector<chatNearby> supergroups_nearby:vector<chatNearby> = ChatsNearby;
|
||||||
|
|
||||||
|
|
||||||
//@class PublicChatType @description Describes a type of public chats
|
//@class PublicChatType @description Describes type of public chat
|
||||||
|
|
||||||
//@description The chat is public, because it has an active username
|
//@description The chat is public, because it has an active username
|
||||||
publicChatTypeHasUsername = PublicChatType;
|
publicChatTypeHasUsername = PublicChatType;
|
||||||
|
|
@ -2613,10 +2703,10 @@ paymentProviderOther url:string = PaymentProvider;
|
||||||
paymentOption title:string url:string = PaymentOption;
|
paymentOption title:string url:string = PaymentOption;
|
||||||
|
|
||||||
|
|
||||||
//@description Contains information about an invoice payment form
|
//@class PaymentFormType @description Describes type of payment form
|
||||||
//@id The payment form identifier
|
|
||||||
|
//@description The payment form is for a regular payment
|
||||||
//@invoice Full information about the invoice
|
//@invoice Full information about the invoice
|
||||||
//@seller_bot_user_id User identifier of the seller bot
|
|
||||||
//@payment_provider_user_id User identifier of the payment provider bot
|
//@payment_provider_user_id User identifier of the payment provider bot
|
||||||
//@payment_provider Information about the payment provider
|
//@payment_provider Information about the payment provider
|
||||||
//@additional_payment_options The list of additional payment options
|
//@additional_payment_options The list of additional payment options
|
||||||
|
|
@ -2624,10 +2714,18 @@ paymentOption title:string url:string = PaymentOption;
|
||||||
//@saved_credentials The list of saved payment credentials
|
//@saved_credentials The list of saved payment credentials
|
||||||
//@can_save_credentials True, if the user can choose to save credentials
|
//@can_save_credentials True, if the user can choose to save credentials
|
||||||
//@need_password True, if the user will be able to save credentials, if sets up a 2-step verification password
|
//@need_password True, if the user will be able to save credentials, if sets up a 2-step verification password
|
||||||
//@product_title Product title
|
paymentFormTypeRegular invoice:invoice payment_provider_user_id:int53 payment_provider:PaymentProvider additional_payment_options:vector<paymentOption> saved_order_info:orderInfo saved_credentials:vector<savedCredentials> can_save_credentials:Bool need_password:Bool = PaymentFormType;
|
||||||
//@product_description Product description
|
|
||||||
//@product_photo Product photo; may be null
|
//@description The payment form is for a payment in Telegram stars @star_count Number of stars that will be paid
|
||||||
paymentForm id:int64 invoice:invoice seller_bot_user_id:int53 payment_provider_user_id:int53 payment_provider:PaymentProvider additional_payment_options:vector<paymentOption> saved_order_info:orderInfo saved_credentials:vector<savedCredentials> can_save_credentials:Bool need_password:Bool product_title:string product_description:formattedText product_photo:photo = PaymentForm;
|
paymentFormTypeStars star_count:int53 = PaymentFormType;
|
||||||
|
|
||||||
|
|
||||||
|
//@description Contains information about an invoice payment form
|
||||||
|
//@id The payment form identifier
|
||||||
|
//@type Type of the payment form
|
||||||
|
//@seller_bot_user_id User identifier of the seller bot
|
||||||
|
//@product_info Information about the product
|
||||||
|
paymentForm id:int64 type:PaymentFormType seller_bot_user_id:int53 product_info:productInfo = PaymentForm;
|
||||||
|
|
||||||
//@description Contains a temporary identifier of validated order information, which is stored for one hour, and the available shipping options @order_info_id Temporary identifier of the order information @shipping_options Available shipping options
|
//@description Contains a temporary identifier of validated order information, which is stored for one hour, and the available shipping options @order_info_id Temporary identifier of the order information @shipping_options Available shipping options
|
||||||
validatedOrderInfo order_info_id:string shipping_options:vector<shippingOption> = ValidatedOrderInfo;
|
validatedOrderInfo order_info_id:string shipping_options:vector<shippingOption> = ValidatedOrderInfo;
|
||||||
|
|
@ -2635,19 +2733,30 @@ validatedOrderInfo order_info_id:string shipping_options:vector<shippingOption>
|
||||||
//@description Contains the result of a payment request @success True, if the payment request was successful; otherwise, the verification_url will be non-empty @verification_url URL for additional payment credentials verification
|
//@description Contains the result of a payment request @success True, if the payment request was successful; otherwise, the verification_url will be non-empty @verification_url URL for additional payment credentials verification
|
||||||
paymentResult success:Bool verification_url:string = PaymentResult;
|
paymentResult success:Bool verification_url:string = PaymentResult;
|
||||||
|
|
||||||
//@description Contains information about a successful payment
|
|
||||||
//@title Product title
|
//@class PaymentReceiptType @description Describes type of successful payment
|
||||||
//@param_description Product description
|
|
||||||
//@photo Product photo; may be null
|
//@description The payment was done using a third-party payment provider
|
||||||
//@date Point in time (Unix timestamp) when the payment was made
|
|
||||||
//@seller_bot_user_id User identifier of the seller bot
|
|
||||||
//@payment_provider_user_id User identifier of the payment provider bot
|
//@payment_provider_user_id User identifier of the payment provider bot
|
||||||
//@invoice Information about the invoice
|
//@invoice Information about the invoice
|
||||||
//@order_info Order information; may be null
|
//@order_info Order information; may be null
|
||||||
//@shipping_option Chosen shipping option; may be null
|
//@shipping_option Chosen shipping option; may be null
|
||||||
//@credentials_title Title of the saved credentials chosen by the buyer
|
//@credentials_title Title of the saved credentials chosen by the buyer
|
||||||
//@tip_amount The amount of tip chosen by the buyer in the smallest units of the currency
|
//@tip_amount The amount of tip chosen by the buyer in the smallest units of the currency
|
||||||
paymentReceipt title:string description:formattedText photo:photo date:int32 seller_bot_user_id:int53 payment_provider_user_id:int53 invoice:invoice order_info:orderInfo shipping_option:shippingOption credentials_title:string tip_amount:int53 = PaymentReceipt;
|
paymentReceiptTypeRegular payment_provider_user_id:int53 invoice:invoice order_info:orderInfo shipping_option:shippingOption credentials_title:string tip_amount:int53 = PaymentReceiptType;
|
||||||
|
|
||||||
|
//@description The payment was done using Telegram stars
|
||||||
|
//@star_count Number of stars that were paid
|
||||||
|
//@transaction_id Unique identifier of the transaction that can be used to dispute it
|
||||||
|
paymentReceiptTypeStars star_count:int53 transaction_id:string = PaymentReceiptType;
|
||||||
|
|
||||||
|
|
||||||
|
//@description Contains information about a successful payment
|
||||||
|
//@product_info Information about the product
|
||||||
|
//@date Point in time (Unix timestamp) when the payment was made
|
||||||
|
//@seller_bot_user_id User identifier of the seller bot
|
||||||
|
//@type Type of the payment receipt
|
||||||
|
paymentReceipt product_info:productInfo date:int32 seller_bot_user_id:int53 type:PaymentReceiptType = PaymentReceipt;
|
||||||
|
|
||||||
|
|
||||||
//@class InputInvoice @description Describes an invoice to process
|
//@class InputInvoice @description Describes an invoice to process
|
||||||
|
|
@ -2986,9 +3095,10 @@ messageText text:formattedText web_page:webPage link_preview_options:linkPreview
|
||||||
//@description An animation message (GIF-style).
|
//@description An animation message (GIF-style).
|
||||||
//@animation The animation description
|
//@animation The animation description
|
||||||
//@caption Animation caption
|
//@caption Animation caption
|
||||||
|
//@show_caption_above_media True, if caption must be shown above the animation; otherwise, caption must be shown below the animation
|
||||||
//@has_spoiler True, if the animation preview must be covered by a spoiler animation
|
//@has_spoiler True, if the animation preview must be covered by a spoiler animation
|
||||||
//@is_secret True, if the animation thumbnail must be blurred and the animation must be shown only while tapped
|
//@is_secret True, if the animation thumbnail must be blurred and the animation must be shown only while tapped
|
||||||
messageAnimation animation:animation caption:formattedText has_spoiler:Bool is_secret:Bool = MessageContent;
|
messageAnimation animation:animation caption:formattedText show_caption_above_media:Bool has_spoiler:Bool is_secret:Bool = MessageContent;
|
||||||
|
|
||||||
//@description An audio message @audio The audio description @caption Audio caption
|
//@description An audio message @audio The audio description @caption Audio caption
|
||||||
messageAudio audio:audio caption:formattedText = MessageContent;
|
messageAudio audio:audio caption:formattedText = MessageContent;
|
||||||
|
|
@ -2999,9 +3109,10 @@ messageDocument document:document caption:formattedText = MessageContent;
|
||||||
//@description A photo message
|
//@description A photo message
|
||||||
//@photo The photo
|
//@photo The photo
|
||||||
//@caption Photo caption
|
//@caption Photo caption
|
||||||
|
//@show_caption_above_media True, if caption must be shown above the photo; otherwise, caption must be shown below the photo
|
||||||
//@has_spoiler True, if the photo preview must be covered by a spoiler animation
|
//@has_spoiler True, if the photo preview must be covered by a spoiler animation
|
||||||
//@is_secret True, if the photo must be blurred and must be shown only while tapped
|
//@is_secret True, if the photo must be blurred and must be shown only while tapped
|
||||||
messagePhoto photo:photo caption:formattedText has_spoiler:Bool is_secret:Bool = MessageContent;
|
messagePhoto photo:photo caption:formattedText show_caption_above_media:Bool has_spoiler:Bool is_secret:Bool = MessageContent;
|
||||||
|
|
||||||
//@description A sticker message @sticker The sticker description @is_premium True, if premium animation of the sticker must be played
|
//@description A sticker message @sticker The sticker description @is_premium True, if premium animation of the sticker must be played
|
||||||
messageSticker sticker:sticker is_premium:Bool = MessageContent;
|
messageSticker sticker:sticker is_premium:Bool = MessageContent;
|
||||||
|
|
@ -3009,9 +3120,10 @@ messageSticker sticker:sticker is_premium:Bool = MessageContent;
|
||||||
//@description A video message
|
//@description A video message
|
||||||
//@video The video description
|
//@video The video description
|
||||||
//@caption Video caption
|
//@caption Video caption
|
||||||
|
//@show_caption_above_media True, if caption must be shown above the video; otherwise, caption must be shown below the video
|
||||||
//@has_spoiler True, if the video preview must be covered by a spoiler animation
|
//@has_spoiler True, if the video preview must be covered by a spoiler animation
|
||||||
//@is_secret True, if the video thumbnail must be blurred and the video must be shown only while tapped
|
//@is_secret True, if the video thumbnail must be blurred and the video must be shown only while tapped
|
||||||
messageVideo video:video caption:formattedText has_spoiler:Bool is_secret:Bool = MessageContent;
|
messageVideo video:video caption:formattedText show_caption_above_media:Bool has_spoiler:Bool is_secret:Bool = MessageContent;
|
||||||
|
|
||||||
//@description A video note message @video_note The video note description @is_viewed True, if at least one of the recipients has viewed the video note @is_secret True, if the video note thumbnail must be blurred and the video note must be shown only while tapped
|
//@description A video note message @video_note The video note description @is_viewed True, if at least one of the recipients has viewed the video note @is_secret True, if the video note thumbnail must be blurred and the video note must be shown only while tapped
|
||||||
messageVideoNote video_note:videoNote is_viewed:Bool is_secret:Bool = MessageContent;
|
messageVideoNote video_note:videoNote is_viewed:Bool is_secret:Bool = MessageContent;
|
||||||
|
|
@ -3069,9 +3181,7 @@ messagePoll poll:poll = MessageContent;
|
||||||
messageStory story_sender_chat_id:int53 story_id:int32 via_mention:Bool = MessageContent;
|
messageStory story_sender_chat_id:int53 story_id:int32 via_mention:Bool = MessageContent;
|
||||||
|
|
||||||
//@description A message with an invoice from a bot. Use getInternalLink with internalLinkTypeBotStart to share the invoice
|
//@description A message with an invoice from a bot. Use getInternalLink with internalLinkTypeBotStart to share the invoice
|
||||||
//@title Product title
|
//@product_info Information about the product
|
||||||
//@param_description Product description
|
|
||||||
//@photo Product photo; may be null
|
|
||||||
//@currency Currency for the product price
|
//@currency Currency for the product price
|
||||||
//@total_amount Product total price in the smallest units of the currency
|
//@total_amount Product total price in the smallest units of the currency
|
||||||
//@start_parameter Unique invoice bot start_parameter to be passed to getInternalLink
|
//@start_parameter Unique invoice bot start_parameter to be passed to getInternalLink
|
||||||
|
|
@ -3079,7 +3189,7 @@ messageStory story_sender_chat_id:int53 story_id:int32 via_mention:Bool = Messag
|
||||||
//@need_shipping_address True, if the shipping address must be specified
|
//@need_shipping_address True, if the shipping address must be specified
|
||||||
//@receipt_message_id The identifier of the message with the receipt, after the product has been purchased
|
//@receipt_message_id The identifier of the message with the receipt, after the product has been purchased
|
||||||
//@extended_media Extended media attached to the invoice; may be null
|
//@extended_media Extended media attached to the invoice; may be null
|
||||||
messageInvoice title:string description:formattedText photo:photo currency:string total_amount:int53 start_parameter:string is_test:Bool need_shipping_address:Bool receipt_message_id:int53 extended_media:MessageExtendedMedia = MessageContent;
|
messageInvoice product_info:productInfo currency:string total_amount:int53 start_parameter:string is_test:Bool need_shipping_address:Bool receipt_message_id:int53 extended_media:MessageExtendedMedia = MessageContent;
|
||||||
|
|
||||||
//@description A message with information about an ended call @is_video True, if the call was a video call @discard_reason Reason why the call was discarded @duration Call duration, in seconds
|
//@description A message with information about an ended call @is_video True, if the call was a video call @discard_reason Reason why the call was discarded @duration Call duration, in seconds
|
||||||
messageCall is_video:Bool discard_reason:CallDiscardReason duration:int32 = MessageContent;
|
messageCall is_video:Bool discard_reason:CallDiscardReason duration:int32 = MessageContent;
|
||||||
|
|
@ -3330,9 +3440,12 @@ textEntityTypePre = TextEntityType;
|
||||||
//@description Text that must be formatted as if inside pre, and code HTML tags @language Programming language of the code; as defined by the sender
|
//@description Text that must be formatted as if inside pre, and code HTML tags @language Programming language of the code; as defined by the sender
|
||||||
textEntityTypePreCode language:string = TextEntityType;
|
textEntityTypePreCode language:string = TextEntityType;
|
||||||
|
|
||||||
//@description Text that must be formatted as if inside a blockquote HTML tag
|
//@description Text that must be formatted as if inside a blockquote HTML tag; not supported in secret chats
|
||||||
textEntityTypeBlockQuote = TextEntityType;
|
textEntityTypeBlockQuote = TextEntityType;
|
||||||
|
|
||||||
|
//@description Text that must be formatted as if inside a blockquote HTML tag and collapsed by default to 3 lines with the ability to show full text; not supported in secret chats
|
||||||
|
textEntityTypeExpandableBlockQuote = TextEntityType;
|
||||||
|
|
||||||
//@description A text description shown instead of a raw URL @url HTTP or tg:// URL to be opened when the link is clicked
|
//@description A text description shown instead of a raw URL @url HTTP or tg:// URL to be opened when the link is clicked
|
||||||
textEntityTypeTextUrl url:string = TextEntityType;
|
textEntityTypeTextUrl url:string = TextEntityType;
|
||||||
|
|
||||||
|
|
@ -3377,21 +3490,24 @@ messageSelfDestructTypeImmediately = MessageSelfDestructType;
|
||||||
//@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
|
//@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
|
||||||
|
//@effect_id Identifier of the effect to apply to the message; applicable only to sendMessage and sendMessageAlbum in private chats
|
||||||
//@sending_id Non-persistent identifier, which will be returned back in messageSendingStatePending object and can be used to match sent messages and corresponding updateNewMessage updates
|
//@sending_id Non-persistent identifier, which will be returned back in messageSendingStatePending object and can be used to match sent messages and corresponding updateNewMessage updates
|
||||||
//@only_preview Pass true to get a fake message instead of actually sending them
|
//@only_preview Pass true to get a fake message instead of actually sending them
|
||||||
messageSendOptions disable_notification:Bool from_background:Bool protect_content:Bool update_order_of_installed_sticker_sets:Bool scheduling_state:MessageSchedulingState sending_id:int32 only_preview:Bool = MessageSendOptions;
|
messageSendOptions disable_notification:Bool from_background:Bool protect_content:Bool update_order_of_installed_sticker_sets:Bool scheduling_state:MessageSchedulingState effect_id:int64 sending_id:int32 only_preview:Bool = MessageSendOptions;
|
||||||
|
|
||||||
//@description Options to be used when a message content is copied without reference to the original sender. Service messages, messages with messageInvoice, messagePremiumGiveaway, or messagePremiumGiveawayWinners content can't be copied
|
//@description Options to be used when a message content is copied without reference to the original sender. Service messages, messages with messageInvoice, messagePremiumGiveaway, or messagePremiumGiveawayWinners content can't be copied
|
||||||
//@send_copy True, if content of the message needs to be copied without reference to the original sender. Always true if the message is forwarded to a secret chat or is local
|
//@send_copy True, if content of the message needs to be copied without reference to the original sender. Always true if the message is forwarded to a secret chat or is local
|
||||||
//@replace_caption True, if media caption of the message copy needs to be replaced. Ignored if send_copy is false
|
//@replace_caption True, if media caption of the message copy needs to be replaced. Ignored if send_copy is false
|
||||||
//@new_caption New message caption; pass null to copy message without caption. Ignored if replace_caption is false
|
//@new_caption New message caption; pass null to copy message without caption. Ignored if replace_caption is false
|
||||||
messageCopyOptions send_copy:Bool replace_caption:Bool new_caption:formattedText = MessageCopyOptions;
|
//@new_show_caption_above_media True, if new caption must be shown above the animation; otherwise, new caption must be shown below the animation; not supported in secret chats. Ignored if replace_caption is false
|
||||||
|
messageCopyOptions send_copy:Bool replace_caption:Bool new_caption:formattedText new_show_caption_above_media:Bool = MessageCopyOptions;
|
||||||
|
|
||||||
|
|
||||||
//@class InputMessageContent @description The content of a message to send
|
//@class InputMessageContent @description The content of a message to send
|
||||||
|
|
||||||
//@description A text message
|
//@description A text message
|
||||||
//@text Formatted text to be sent; 0-getOption("message_text_length_max") characters. Only Bold, Italic, Underline, Strikethrough, Spoiler, CustomEmoji, BlockQuote, Code, Pre, PreCode, TextUrl and MentionName entities are allowed to be specified manually
|
//@text Formatted text to be sent; 0-getOption("message_text_length_max") characters. Only Bold, Italic, Underline, Strikethrough, Spoiler, CustomEmoji, BlockQuote, ExpandableBlockQuote,
|
||||||
|
//-Code, Pre, PreCode, TextUrl and MentionName entities are allowed to be specified manually
|
||||||
//@link_preview_options Options to be used for generation of a link preview; may be null if none; pass null to use default link preview options
|
//@link_preview_options Options to be used for generation of a link preview; may be null if none; pass null to use default link preview options
|
||||||
//@clear_draft True, if a chat message draft must be deleted
|
//@clear_draft True, if a chat message draft must be deleted
|
||||||
inputMessageText text:formattedText link_preview_options:linkPreviewOptions clear_draft:Bool = InputMessageContent;
|
inputMessageText text:formattedText link_preview_options:linkPreviewOptions clear_draft:Bool = InputMessageContent;
|
||||||
|
|
@ -3404,8 +3520,9 @@ inputMessageText text:formattedText link_preview_options:linkPreviewOptions clea
|
||||||
//@width Width of the animation; may be replaced by the server
|
//@width Width of the animation; may be replaced by the server
|
||||||
//@height Height of the animation; may be replaced by the server
|
//@height Height of the animation; may be replaced by the server
|
||||||
//@caption Animation caption; pass null to use an empty caption; 0-getOption("message_caption_length_max") characters
|
//@caption Animation caption; pass null to use an empty caption; 0-getOption("message_caption_length_max") characters
|
||||||
|
//@show_caption_above_media True, if caption must be shown above the animation; otherwise, caption must be shown below the animation; not supported in secret chats
|
||||||
//@has_spoiler True, if the animation preview must be covered by a spoiler animation; not supported in secret chats
|
//@has_spoiler True, if the animation preview must be covered by a spoiler animation; not supported in secret chats
|
||||||
inputMessageAnimation animation:InputFile thumbnail:inputThumbnail added_sticker_file_ids:vector<int32> duration:int32 width:int32 height:int32 caption:formattedText has_spoiler:Bool = InputMessageContent;
|
inputMessageAnimation animation:InputFile thumbnail:inputThumbnail added_sticker_file_ids:vector<int32> duration:int32 width:int32 height:int32 caption:formattedText show_caption_above_media:Bool has_spoiler:Bool = InputMessageContent;
|
||||||
|
|
||||||
//@description An audio message
|
//@description An audio message
|
||||||
//@audio Audio file to be sent
|
//@audio Audio file to be sent
|
||||||
|
|
@ -3430,9 +3547,10 @@ inputMessageDocument document:InputFile thumbnail:inputThumbnail disable_content
|
||||||
//@width Photo width
|
//@width Photo width
|
||||||
//@height Photo height
|
//@height Photo height
|
||||||
//@caption Photo caption; pass null to use an empty caption; 0-getOption("message_caption_length_max") characters
|
//@caption Photo caption; pass null to use an empty caption; 0-getOption("message_caption_length_max") characters
|
||||||
|
//@show_caption_above_media True, if caption must be shown above the photo; otherwise, caption must be shown below the photo; not supported in secret chats
|
||||||
//@self_destruct_type Photo self-destruct type; pass null if none; private chats only
|
//@self_destruct_type Photo self-destruct type; pass null if none; private chats only
|
||||||
//@has_spoiler True, if the photo preview must be covered by a spoiler animation; not supported in secret chats
|
//@has_spoiler True, if the photo preview must be covered by a spoiler animation; not supported in secret chats
|
||||||
inputMessagePhoto photo:InputFile thumbnail:inputThumbnail added_sticker_file_ids:vector<int32> width:int32 height:int32 caption:formattedText self_destruct_type:MessageSelfDestructType has_spoiler:Bool = InputMessageContent;
|
inputMessagePhoto photo:InputFile thumbnail:inputThumbnail added_sticker_file_ids:vector<int32> width:int32 height:int32 caption:formattedText show_caption_above_media:Bool self_destruct_type:MessageSelfDestructType has_spoiler:Bool = InputMessageContent;
|
||||||
|
|
||||||
//@description A sticker message
|
//@description A sticker message
|
||||||
//@sticker Sticker to be sent
|
//@sticker Sticker to be sent
|
||||||
|
|
@ -3451,9 +3569,10 @@ inputMessageSticker sticker:InputFile thumbnail:inputThumbnail width:int32 heigh
|
||||||
//@height Video height
|
//@height Video height
|
||||||
//@supports_streaming True, if the video is supposed to be streamed
|
//@supports_streaming True, if the video is supposed to be streamed
|
||||||
//@caption Video caption; pass null to use an empty caption; 0-getOption("message_caption_length_max") characters
|
//@caption Video caption; pass null to use an empty caption; 0-getOption("message_caption_length_max") characters
|
||||||
|
//@show_caption_above_media True, if caption must be shown above the video; otherwise, caption must be shown below the video; not supported in secret chats
|
||||||
//@self_destruct_type Video self-destruct type; pass null if none; private chats only
|
//@self_destruct_type Video self-destruct type; pass null if none; private chats only
|
||||||
//@has_spoiler True, if the video preview must be covered by a spoiler animation; not supported in secret chats
|
//@has_spoiler True, if the video preview must be covered by a spoiler animation; not supported in secret chats
|
||||||
inputMessageVideo video:InputFile thumbnail:inputThumbnail added_sticker_file_ids:vector<int32> duration:int32 width:int32 height:int32 supports_streaming:Bool caption:formattedText self_destruct_type:MessageSelfDestructType has_spoiler:Bool = InputMessageContent;
|
inputMessageVideo video:InputFile thumbnail:inputThumbnail added_sticker_file_ids:vector<int32> duration:int32 width:int32 height:int32 supports_streaming:Bool caption:formattedText show_caption_above_media:Bool self_destruct_type:MessageSelfDestructType has_spoiler:Bool = InputMessageContent;
|
||||||
|
|
||||||
//@description A video note message
|
//@description A video note message
|
||||||
//@video_note Video note to be sent
|
//@video_note Video note to be sent
|
||||||
|
|
@ -3499,7 +3618,7 @@ inputMessageGame bot_user_id:int53 game_short_name:string = InputMessageContent;
|
||||||
//@photo_width Product photo width
|
//@photo_width Product photo width
|
||||||
//@photo_height Product photo height
|
//@photo_height Product photo height
|
||||||
//@payload The invoice payload
|
//@payload The invoice payload
|
||||||
//@provider_token Payment provider token
|
//@provider_token Payment provider token; may be empty for payments in Telegram Stars
|
||||||
//@provider_data JSON-encoded data about the invoice, which will be shared with the payment provider
|
//@provider_data JSON-encoded data about the invoice, which will be shared with the payment provider
|
||||||
//@start_parameter Unique invoice bot deep link parameter for the generation of this invoice. If empty, it would be possible to pay directly from forwards of the invoice message
|
//@start_parameter Unique invoice bot deep link parameter for the generation of this invoice. If empty, it would be possible to pay directly from forwards of the invoice message
|
||||||
//@extended_media_content The content of extended media attached to the invoice. The content of the message to be sent. Must be one of the following types: inputMessagePhoto, inputMessageVideo
|
//@extended_media_content The content of extended media attached to the invoice. The content of the message to be sent. Must be one of the following types: inputMessagePhoto, inputMessageVideo
|
||||||
|
|
@ -3713,7 +3832,7 @@ trendingStickerSets total_count:int32 sets:vector<stickerSetInfo> is_premium:Boo
|
||||||
//@emojis List of emojis for search for
|
//@emojis List of emojis for search for
|
||||||
emojiCategorySourceSearch emojis:vector<string> = EmojiCategorySource;
|
emojiCategorySourceSearch emojis:vector<string> = EmojiCategorySource;
|
||||||
|
|
||||||
//@description The category contains Premium stickers that must be found by getPremiumStickers
|
//@description The category contains premium stickers that must be found by getPremiumStickers
|
||||||
emojiCategorySourcePremium = EmojiCategorySource;
|
emojiCategorySourcePremium = EmojiCategorySource;
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -3733,7 +3852,7 @@ emojiCategories categories:vector<emojiCategory> = EmojiCategories;
|
||||||
//@description The category must be used by default (e.g., for custom emoji or animation search)
|
//@description The category must be used by default (e.g., for custom emoji or animation search)
|
||||||
emojiCategoryTypeDefault = EmojiCategoryType;
|
emojiCategoryTypeDefault = EmojiCategoryType;
|
||||||
|
|
||||||
//@description The category must be used by default for regular sticker selection. It may contain greeting emoji category and Premium stickers
|
//@description The category must be used by default for regular sticker selection. It may contain greeting emoji category and premium stickers
|
||||||
emojiCategoryTypeRegularStickers = EmojiCategoryType;
|
emojiCategoryTypeRegularStickers = EmojiCategoryType;
|
||||||
|
|
||||||
//@description The category must be used for emoji status selection
|
//@description The category must be used for emoji status selection
|
||||||
|
|
@ -4095,6 +4214,16 @@ chatBoostSlot slot_id:int32 currently_boosted_chat_id:int53 start_date:int32 exp
|
||||||
chatBoostSlots slots:vector<chatBoostSlot> = ChatBoostSlots;
|
chatBoostSlots slots:vector<chatBoostSlot> = ChatBoostSlots;
|
||||||
|
|
||||||
|
|
||||||
|
//@class ResendCodeReason @description Describes the reason why a code needs to be re-sent
|
||||||
|
|
||||||
|
//@description The user requested to resend the code
|
||||||
|
resendCodeReasonUserRequest = ResendCodeReason;
|
||||||
|
|
||||||
|
//@description The code is re-sent, because device verification has failed
|
||||||
|
//@error_message Cause of the verification failure, for example, PLAY_SERVICES_NOT_AVAILABLE, APNS_RECEIVE_TIMEOUT, APNS_INIT_FAILED, etc.
|
||||||
|
resendCodeReasonVerificationFailed error_message:string = ResendCodeReason;
|
||||||
|
|
||||||
|
|
||||||
//@class CallDiscardReason @description Describes the reason why a call was discarded
|
//@class CallDiscardReason @description Describes the reason why a call was discarded
|
||||||
|
|
||||||
//@description The call wasn't discarded, or the reason is unknown
|
//@description The call wasn't discarded, or the reason is unknown
|
||||||
|
|
@ -4687,7 +4816,7 @@ inlineQueryResultVideo id:string video:video title:string description:string = I
|
||||||
inlineQueryResultVoiceNote id:string voice_note:voiceNote title:string = InlineQueryResult;
|
inlineQueryResultVoiceNote id:string voice_note:voiceNote title:string = InlineQueryResult;
|
||||||
|
|
||||||
|
|
||||||
//@class InlineQueryResultsButtonType @description Represents a type of button in results of inline query
|
//@class InlineQueryResultsButtonType @description Represents type of button in results of inline query
|
||||||
|
|
||||||
//@description Describes the button that opens a private chat with the bot and sends a start message to the bot with the given parameter @parameter The parameter for the bot start message
|
//@description Describes the button that opens a private chat with the bot and sends a start message to the bot with the given parameter @parameter The parameter for the bot start message
|
||||||
inlineQueryResultsButtonTypeStartBot parameter:string = InlineQueryResultsButtonType;
|
inlineQueryResultsButtonTypeStartBot parameter:string = InlineQueryResultsButtonType;
|
||||||
|
|
@ -5225,6 +5354,12 @@ storePaymentPurposePremiumGiftCodes boosted_chat_id:int53 currency:string amount
|
||||||
//@amount Paid amount, in the smallest units of the currency
|
//@amount Paid amount, in the smallest units of the currency
|
||||||
storePaymentPurposePremiumGiveaway parameters:premiumGiveawayParameters currency:string amount:int53 = StorePaymentPurpose;
|
storePaymentPurposePremiumGiveaway parameters:premiumGiveawayParameters currency:string amount:int53 = StorePaymentPurpose;
|
||||||
|
|
||||||
|
//@description The user buying Telegram stars
|
||||||
|
//@currency ISO 4217 currency code of the payment currency
|
||||||
|
//@amount Paid amount, in the smallest units of the currency
|
||||||
|
//@star_count Number of bought stars
|
||||||
|
storePaymentPurposeStars currency:string amount:int53 star_count:int53 = StorePaymentPurpose;
|
||||||
|
|
||||||
|
|
||||||
//@class TelegramPaymentPurpose @description Describes a purpose of a payment toward Telegram
|
//@class TelegramPaymentPurpose @description Describes a purpose of a payment toward Telegram
|
||||||
|
|
||||||
|
|
@ -5244,6 +5379,12 @@ telegramPaymentPurposePremiumGiftCodes boosted_chat_id:int53 currency:string amo
|
||||||
//@month_count Number of months the Telegram Premium subscription will be active for the users
|
//@month_count Number of months the Telegram Premium subscription will be active for the users
|
||||||
telegramPaymentPurposePremiumGiveaway parameters:premiumGiveawayParameters currency:string amount:int53 winner_count:int32 month_count:int32 = TelegramPaymentPurpose;
|
telegramPaymentPurposePremiumGiveaway parameters:premiumGiveawayParameters currency:string amount:int53 winner_count:int32 month_count:int32 = TelegramPaymentPurpose;
|
||||||
|
|
||||||
|
//@description The user buying Telegram stars
|
||||||
|
//@currency ISO 4217 currency code of the payment currency
|
||||||
|
//@amount Paid amount, in the smallest units of the currency
|
||||||
|
//@star_count Number of bought stars
|
||||||
|
telegramPaymentPurposeStars currency:string amount:int53 star_count:int53 = TelegramPaymentPurpose;
|
||||||
|
|
||||||
|
|
||||||
//@class DeviceToken @description Represents a data needed to subscribe for push notifications through registerDevice method. To use specific push notification service, the correct application platform must be specified and a valid server authentication data must be uploaded at https://my.telegram.org
|
//@class DeviceToken @description Represents a data needed to subscribe for push notifications through registerDevice method. To use specific push notification service, the correct application platform must be specified and a valid server authentication data must be uploaded at https://my.telegram.org
|
||||||
|
|
||||||
|
|
@ -6115,7 +6256,7 @@ internalLinkTypeProxy server:string port:int32 type:ProxyType = InternalLinkType
|
||||||
|
|
||||||
//@description The link is a link to a chat by its username. Call searchPublicChat with the given chat username to process the link
|
//@description The link is a link to a chat by its username. Call searchPublicChat with the given chat username to process the link
|
||||||
//-If the chat is found, open its profile information screen or the chat itself.
|
//-If the chat is found, open its profile information screen or the chat itself.
|
||||||
//-If draft text isn't empty and the chat is a private chat, then put the draft text in the input field
|
//-If draft text isn't empty and the chat is a private chat with a regular user, then put the draft text in the input field
|
||||||
//@chat_username Username of the chat
|
//@chat_username Username of the chat
|
||||||
//@draft_text Draft text for message to send in the chat
|
//@draft_text Draft text for message to send in the chat
|
||||||
internalLinkTypePublicChat chat_username:string draft_text:string = InternalLinkType;
|
internalLinkTypePublicChat chat_username:string draft_text:string = InternalLinkType;
|
||||||
|
|
@ -6210,7 +6351,7 @@ chatBoostLink link:string is_public:Bool = ChatBoostLink;
|
||||||
chatBoostLinkInfo is_public:Bool chat_id:int53 = ChatBoostLinkInfo;
|
chatBoostLinkInfo is_public:Bool chat_id:int53 = ChatBoostLinkInfo;
|
||||||
|
|
||||||
|
|
||||||
//@class BlockList @description Describes a type of block list
|
//@class BlockList @description Describes type of block list
|
||||||
|
|
||||||
//@description The main block list that disallows writing messages to the current user, receiving their status and photo, viewing of stories, and some other actions
|
//@description The main block list that disallows writing messages to the current user, receiving their status and photo, viewing of stories, and some other actions
|
||||||
blockListMain = BlockList;
|
blockListMain = BlockList;
|
||||||
|
|
@ -6786,7 +6927,7 @@ botCommandScopeChatMember chat_id:int53 user_id:int53 = BotCommandScope;
|
||||||
|
|
||||||
//@class PhoneNumberCodeType @description Describes type of the request for which a code is sent to a phone number
|
//@class PhoneNumberCodeType @description Describes type of the request for which a code is sent to a phone number
|
||||||
|
|
||||||
//@description Checks ownership of a new phone number to change the user's authentication phone number; for official Android and iOS applications only.
|
//@description Checks ownership of a new phone number to change the user's authentication phone number; for official Android and iOS applications only
|
||||||
phoneNumberCodeTypeChange = PhoneNumberCodeType;
|
phoneNumberCodeTypeChange = PhoneNumberCodeType;
|
||||||
|
|
||||||
//@description Verifies ownership of a phone number to be added to the user's Telegram Passport
|
//@description Verifies ownership of a phone number to be added to the user's Telegram Passport
|
||||||
|
|
@ -6849,6 +6990,12 @@ updateMessageMentionRead chat_id:int53 message_id:int53 unread_mention_count:int
|
||||||
//@unread_reaction_count The new number of messages with unread reactions left in the chat
|
//@unread_reaction_count The new number of messages with unread reactions left in the chat
|
||||||
updateMessageUnreadReactions chat_id:int53 message_id:int53 unread_reactions:vector<unreadReaction> unread_reaction_count:int32 = Update;
|
updateMessageUnreadReactions chat_id:int53 message_id:int53 unread_reactions:vector<unreadReaction> unread_reaction_count:int32 = Update;
|
||||||
|
|
||||||
|
//@description A fact-check added to a message was changed
|
||||||
|
//@chat_id Chat identifier
|
||||||
|
//@message_id Message identifier
|
||||||
|
//@fact_check The new fact-check
|
||||||
|
updateMessageFactCheck chat_id:int53 message_id:int53 fact_check:factCheck = Update;
|
||||||
|
|
||||||
//@description A message with a live location was viewed. When the update is received, the application is supposed to update the live location
|
//@description A message with a live location was viewed. When the update is received, the application is supposed to update the live location
|
||||||
//@chat_id Identifier of the chat with the live location message
|
//@chat_id Identifier of the chat with the live location message
|
||||||
//@message_id Identifier of the message with live location
|
//@message_id Identifier of the message with live location
|
||||||
|
|
@ -7110,6 +7257,13 @@ updateFileDownload file_id:int32 complete_date:int32 is_paused:Bool counts:downl
|
||||||
//@description A file was removed from the file download list. This update is sent only after file download list is loaded for the first time @file_id File identifier @counts New number of being downloaded and recently downloaded files found
|
//@description A file was removed from the file download list. This update is sent only after file download list is loaded for the first time @file_id File identifier @counts New number of being downloaded and recently downloaded files found
|
||||||
updateFileRemovedFromDownloads file_id:int32 counts:downloadedFileCounts = Update;
|
updateFileRemovedFromDownloads file_id:int32 counts:downloadedFileCounts = Update;
|
||||||
|
|
||||||
|
//@description A request can't be completed unless application verification is performed; for official mobile applications only.
|
||||||
|
//-The method setApplicationVerificationToken must be called once the verification is completed or failed
|
||||||
|
//@verification_id Unique identifier for the verification process
|
||||||
|
//@nonce Unique nonce for the classic Play Integrity verification (https://developer.android.com/google/play/integrity/classic) for Android,
|
||||||
|
//-or a unique string to compare with verify_nonce field from a push notification for iOS
|
||||||
|
updateApplicationVerificationRequired verification_id:int53 nonce:string = Update;
|
||||||
|
|
||||||
//@description New call was created or information about a call was updated @call New data about a call
|
//@description New call was created or information about a call was updated @call New data about a call
|
||||||
updateCall call:call = Update;
|
updateCall call:call = Update;
|
||||||
|
|
||||||
|
|
@ -7234,6 +7388,11 @@ updateWebAppMessageSent web_app_launch_id:int64 = Update;
|
||||||
//@description The list of active emoji reactions has changed @emojis The new list of active emoji reactions
|
//@description The list of active emoji reactions has changed @emojis The new list of active emoji reactions
|
||||||
updateActiveEmojiReactions emojis:vector<string> = Update;
|
updateActiveEmojiReactions emojis:vector<string> = Update;
|
||||||
|
|
||||||
|
//@description The list of available message effects has changed
|
||||||
|
//@reaction_effect_ids The new list of available message effects from emoji reactions
|
||||||
|
//@sticker_effect_ids The new list of available message effects from Premium stickers
|
||||||
|
updateAvailableMessageEffects reaction_effect_ids:vector<int64> sticker_effect_ids:vector<int64> = Update;
|
||||||
|
|
||||||
//@description The type of default reaction has changed @reaction_type The new type of the default reaction
|
//@description The type of default reaction has changed @reaction_type The new type of the default reaction
|
||||||
updateDefaultReactionType reaction_type:ReactionType = Update;
|
updateDefaultReactionType reaction_type:ReactionType = Update;
|
||||||
|
|
||||||
|
|
@ -7242,8 +7401,13 @@ updateDefaultReactionType reaction_type:ReactionType = Update;
|
||||||
//@tags The new tags
|
//@tags The new tags
|
||||||
updateSavedMessagesTags saved_messages_topic_id:int53 tags:savedMessagesTags = Update;
|
updateSavedMessagesTags saved_messages_topic_id:int53 tags:savedMessagesTags = Update;
|
||||||
|
|
||||||
|
//@description The number of Telegram stars owned by the current user has changed @star_count The new number of Telegram stars owned
|
||||||
|
updateOwnedStarCount star_count:int53 = Update;
|
||||||
|
|
||||||
//@description The revenue earned from sponsored messages in a chat has changed. If chat revenue screen is opened, then getChatRevenueTransactions may be called to fetch new transactions
|
//@description The revenue earned from sponsored messages in a chat has changed. If chat revenue screen is opened, then getChatRevenueTransactions may be called to fetch new transactions
|
||||||
updateChatRevenueAmount = Update;
|
//@chat_id Identifier of the chat
|
||||||
|
//@revenue_amount New amount of earned revenue
|
||||||
|
updateChatRevenueAmount chat_id:int53 revenue_amount:chatRevenueAmount = Update;
|
||||||
|
|
||||||
//@description The parameters of speech recognition without Telegram Premium subscription has changed
|
//@description The parameters of speech recognition without Telegram Premium subscription has changed
|
||||||
//@max_media_duration The maximum allowed duration of media for speech recognition without Telegram Premium subscription, in seconds
|
//@max_media_duration The maximum allowed duration of media for speech recognition without Telegram Premium subscription, in seconds
|
||||||
|
|
@ -7476,9 +7640,10 @@ setAuthenticationPhoneNumber phone_number:string settings:phoneNumberAuthenticat
|
||||||
//@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
|
//@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;
|
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,
|
//@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
|
||||||
//-or when the current authorization state is authorizationStateWaitEmailCode
|
//-and the server-specified timeout has passed, or when the current authorization state is authorizationStateWaitEmailCode
|
||||||
resendAuthenticationCode = Ok;
|
//@reason Reason of code resending; pass null if unknown
|
||||||
|
resendAuthenticationCode reason:ResendCodeReason = Ok;
|
||||||
|
|
||||||
//@description Checks the authentication of an email address. Works only when the current authorization state is authorizationStateWaitEmailCode @code Email address authentication to check
|
//@description Checks the authentication of an email address. Works only when the current authorization state is authorizationStateWaitEmailCode @code Email address authentication to check
|
||||||
checkAuthenticationEmailCode code:EmailAddressAuthentication = Ok;
|
checkAuthenticationEmailCode code:EmailAddressAuthentication = Ok;
|
||||||
|
|
@ -7517,10 +7682,10 @@ checkAuthenticationPasswordRecoveryCode recovery_code:string = Ok;
|
||||||
recoverAuthenticationPassword recovery_code:string new_password:string new_hint:string = Ok;
|
recoverAuthenticationPassword recovery_code:string new_password:string new_hint:string = Ok;
|
||||||
|
|
||||||
//@description Sends Firebase Authentication SMS to the phone number of the user. Works only when the current authorization state is authorizationStateWaitCode and the server returned code of the type authenticationCodeTypeFirebaseAndroid or authenticationCodeTypeFirebaseIos
|
//@description Sends Firebase Authentication SMS to the phone number of the user. Works only when the current authorization state is authorizationStateWaitCode and the server returned code of the type authenticationCodeTypeFirebaseAndroid or authenticationCodeTypeFirebaseIos
|
||||||
//@token SafetyNet Attestation API token for the Android application, or secret from push notification for the iOS application
|
//@token Play Integrity API or SafetyNet Attestation API token for the Android application, or secret from push notification for the iOS application
|
||||||
sendAuthenticationFirebaseSms token:string = Ok;
|
sendAuthenticationFirebaseSms token:string = Ok;
|
||||||
|
|
||||||
//@description Reports that authentication code wasn't delivered via SMS; for official mobile apps only. Works only when the current authorization state is authorizationStateWaitCode @mobile_network_code Current mobile network code
|
//@description Reports that authentication code wasn't delivered via SMS; for official mobile applications only. Works only when the current authorization state is authorizationStateWaitCode @mobile_network_code Current mobile network code
|
||||||
reportAuthenticationCodeMissing mobile_network_code:string = Ok;
|
reportAuthenticationCodeMissing mobile_network_code:string = Ok;
|
||||||
|
|
||||||
//@description Checks the authentication token of a bot; to log in as a bot. Works only when the current authorization state is authorizationStateWaitPhoneNumber. Can be used instead of setAuthenticationPhoneNumber and checkAuthenticationCode to log in @token The bot token
|
//@description Checks the authentication token of a bot; to log in as a bot. Works only when the current authorization state is authorizationStateWaitPhoneNumber. Can be used instead of setAuthenticationPhoneNumber and checkAuthenticationCode to log in @token The bot token
|
||||||
|
|
@ -7906,6 +8071,21 @@ searchCallMessages offset:string limit:int32 only_missed:Bool = FoundMessages;
|
||||||
//@limit The maximum number of messages to be returned; up to 100
|
//@limit The maximum number of messages to be returned; up to 100
|
||||||
searchOutgoingDocumentMessages query:string limit:int32 = FoundMessages;
|
searchOutgoingDocumentMessages query:string limit:int32 = FoundMessages;
|
||||||
|
|
||||||
|
//@description Searches for public channel posts with the given hashtag. For optimal performance, the number of returned messages is chosen by TDLib and can be smaller than the specified limit
|
||||||
|
//@hashtag Hashtag to search for
|
||||||
|
//@offset Offset of the first entry to return as received from the previous request; use empty string to get the first chunk of results
|
||||||
|
//@limit The maximum number of messages to be returned; up to 100. For optimal performance, the number of returned messages is chosen by TDLib and can be smaller than the specified limit
|
||||||
|
searchPublicHashtagMessages hashtag:string offset:string limit:int32 = FoundMessages;
|
||||||
|
|
||||||
|
//@description Returns recently searched for hashtags by their prefix @prefix Prefix of hashtags to return @limit The maximum number of hashtags to be returned
|
||||||
|
getSearchedForHashtags prefix:string limit:int32 = Hashtags;
|
||||||
|
|
||||||
|
//@description Removes a hashtag from the list of recently searched for hashtags @hashtag Hashtag to delete
|
||||||
|
removeSearchedForHashtag hashtag:string = Ok;
|
||||||
|
|
||||||
|
//@description Clears the list of recently searched for hashtags
|
||||||
|
clearSearchedForHashtags = Ok;
|
||||||
|
|
||||||
//@description Deletes all call messages @revoke Pass true to delete the messages for all users
|
//@description Deletes all call messages @revoke Pass true to delete the messages for all users
|
||||||
deleteAllCallMessages revoke:Bool = Ok;
|
deleteAllCallMessages revoke:Bool = Ok;
|
||||||
|
|
||||||
|
|
@ -8041,7 +8221,7 @@ sendMessage chat_id:int53 message_thread_id:int53 reply_to:InputMessageReplyTo o
|
||||||
//@message_thread_id If not 0, the message thread identifier in which the messages will be sent
|
//@message_thread_id If not 0, the message thread identifier in which the messages will be sent
|
||||||
//@reply_to Information about the message or story to be replied; pass null if none
|
//@reply_to Information about the message or story to be replied; pass null if none
|
||||||
//@options Options to be used to send the messages; pass null to use default options
|
//@options Options to be used to send the messages; pass null to use default options
|
||||||
//@input_message_contents Contents of messages to be sent. At most 10 messages can be added to an album
|
//@input_message_contents Contents of messages to be sent. At most 10 messages can be added to an album. All messages must have the same value of show_caption_above_media
|
||||||
sendMessageAlbum chat_id:int53 message_thread_id:int53 reply_to:InputMessageReplyTo options:messageSendOptions input_message_contents:vector<InputMessageContent> = Messages;
|
sendMessageAlbum chat_id:int53 message_thread_id:int53 reply_to:InputMessageReplyTo options:messageSendOptions input_message_contents:vector<InputMessageContent> = Messages;
|
||||||
|
|
||||||
//@description Invites a bot to a chat (if it is not yet a member) and sends it the /start command; requires can_invite_users member right. Bots can't be invited to a private chat other than the chat with the bot.
|
//@description Invites a bot to a chat (if it is not yet a member) and sends it the /start command; requires can_invite_users member right. Bots can't be invited to a private chat other than the chat with the bot.
|
||||||
|
|
@ -8109,14 +8289,16 @@ deleteChatMessagesBySender chat_id:int53 sender_id:MessageSender = Ok;
|
||||||
deleteChatMessagesByDate chat_id:int53 min_date:int32 max_date:int32 revoke:Bool = Ok;
|
deleteChatMessagesByDate chat_id:int53 min_date:int32 max_date:int32 revoke:Bool = Ok;
|
||||||
|
|
||||||
|
|
||||||
//@description Edits the text of a message (or a text of a game message). Returns the edited message after the edit is completed on the server side
|
//@description Edits the text of a message (or a text of a game message). Returns the edited message after the edit is completed on the server side.
|
||||||
|
//-Can be used only if message.can_be_edited == true
|
||||||
//@chat_id The chat the message belongs to
|
//@chat_id The chat the message belongs to
|
||||||
//@message_id Identifier of the message
|
//@message_id Identifier of the message
|
||||||
//@reply_markup The new message reply markup; pass null if none; for bots only
|
//@reply_markup The new message reply markup; pass null if none; for bots only
|
||||||
//@input_message_content New text content of the message. Must be of type inputMessageText
|
//@input_message_content New text content of the message. Must be of type inputMessageText
|
||||||
editMessageText chat_id:int53 message_id:int53 reply_markup:ReplyMarkup input_message_content:InputMessageContent = Message;
|
editMessageText chat_id:int53 message_id:int53 reply_markup:ReplyMarkup input_message_content:InputMessageContent = Message;
|
||||||
|
|
||||||
//@description Edits the message content of a live location. Messages can be edited for a limited period of time specified in the live location. Returns the edited message after the edit is completed on the server side
|
//@description Edits the message content of a live location. Messages can be edited for a limited period of time specified in the live location.
|
||||||
|
//-Returns the edited message after the edit is completed on the server side. Can be used only if message.can_be_edited == true
|
||||||
//@chat_id The chat the message belongs to
|
//@chat_id The chat the message belongs to
|
||||||
//@message_id Identifier of the message
|
//@message_id Identifier of the message
|
||||||
//@reply_markup The new message reply markup; pass null if none; for bots only
|
//@reply_markup The new message reply markup; pass null if none; for bots only
|
||||||
|
|
@ -8128,21 +8310,25 @@ editMessageText chat_id:int53 message_id:int53 reply_markup:ReplyMarkup input_me
|
||||||
editMessageLiveLocation chat_id:int53 message_id:int53 reply_markup:ReplyMarkup location:location live_period:int32 heading:int32 proximity_alert_radius:int32 = Message;
|
editMessageLiveLocation chat_id:int53 message_id:int53 reply_markup:ReplyMarkup location:location live_period:int32 heading:int32 proximity_alert_radius:int32 = Message;
|
||||||
|
|
||||||
//@description Edits the content of a message with an animation, an audio, a document, a photo or a video, including message caption. If only the caption needs to be edited, use editMessageCaption instead.
|
//@description Edits the content of a message with an animation, an audio, a document, a photo or a video, including message caption. If only the caption needs to be edited, use editMessageCaption instead.
|
||||||
//-The media can't be edited if the message was set to self-destruct or to a self-destructing media. The type of message content in an album can't be changed with exception of replacing a photo with a video or vice versa. Returns the edited message after the edit is completed on the server side
|
//-The media can't be edited if the message was set to self-destruct or to a self-destructing media. The type of message content in an album can't be changed with exception of replacing a photo with a video or vice versa.
|
||||||
|
//-Returns the edited message after the edit is completed on the server side. Can be used only if message.can_be_edited == true
|
||||||
//@chat_id The chat the message belongs to
|
//@chat_id The chat the message belongs to
|
||||||
//@message_id Identifier of the message
|
//@message_id Identifier of the message
|
||||||
//@reply_markup The new message reply markup; pass null if none; for bots only
|
//@reply_markup The new message reply markup; pass null if none; for bots only
|
||||||
//@input_message_content New content of the message. Must be one of the following types: inputMessageAnimation, inputMessageAudio, inputMessageDocument, inputMessagePhoto or inputMessageVideo
|
//@input_message_content New content of the message. Must be one of the following types: inputMessageAnimation, inputMessageAudio, inputMessageDocument, inputMessagePhoto or inputMessageVideo
|
||||||
editMessageMedia chat_id:int53 message_id:int53 reply_markup:ReplyMarkup input_message_content:InputMessageContent = Message;
|
editMessageMedia chat_id:int53 message_id:int53 reply_markup:ReplyMarkup input_message_content:InputMessageContent = Message;
|
||||||
|
|
||||||
//@description Edits the message content caption. Returns the edited message after the edit is completed on the server side
|
//@description Edits the message content caption. Returns the edited message after the edit is completed on the server side.
|
||||||
|
//-Can be used only if message.can_be_edited == true
|
||||||
//@chat_id The chat the message belongs to
|
//@chat_id The chat the message belongs to
|
||||||
//@message_id Identifier of the message
|
//@message_id Identifier of the message
|
||||||
//@reply_markup The new message reply markup; pass null if none; for bots only
|
//@reply_markup The new message reply markup; pass null if none; for bots only
|
||||||
//@caption New message content caption; 0-getOption("message_caption_length_max") characters; pass null to remove caption
|
//@caption New message content caption; 0-getOption("message_caption_length_max") characters; pass null to remove caption
|
||||||
editMessageCaption chat_id:int53 message_id:int53 reply_markup:ReplyMarkup caption:formattedText = Message;
|
//@show_caption_above_media Pass true to show the caption above the media; otherwise, caption will be shown below the media. Can be true only for animation, photo, and video messages
|
||||||
|
editMessageCaption chat_id:int53 message_id:int53 reply_markup:ReplyMarkup caption:formattedText show_caption_above_media:Bool = Message;
|
||||||
|
|
||||||
//@description Edits the message reply markup; for bots only. Returns the edited message after the edit is completed on the server side
|
//@description Edits the message reply markup; for bots only. Returns the edited message after the edit is completed on the server side.
|
||||||
|
//-Can be used only if message.can_be_edited == true
|
||||||
//@chat_id The chat the message belongs to
|
//@chat_id The chat the message belongs to
|
||||||
//@message_id Identifier of the message
|
//@message_id Identifier of the message
|
||||||
//@reply_markup The new message reply markup; pass null if none
|
//@reply_markup The new message reply markup; pass null if none
|
||||||
|
|
@ -8174,7 +8360,8 @@ editInlineMessageMedia inline_message_id:string reply_markup:ReplyMarkup input_m
|
||||||
//@inline_message_id Inline message identifier
|
//@inline_message_id Inline message identifier
|
||||||
//@reply_markup The new message reply markup; pass null if none
|
//@reply_markup The new message reply markup; pass null if none
|
||||||
//@caption New message content caption; pass null to remove caption; 0-getOption("message_caption_length_max") characters
|
//@caption New message content caption; pass null to remove caption; 0-getOption("message_caption_length_max") characters
|
||||||
editInlineMessageCaption inline_message_id:string reply_markup:ReplyMarkup caption:formattedText = Ok;
|
//@show_caption_above_media Pass true to show the caption above the media; otherwise, caption will be shown below the media. Can be true only for animation, photo, and video messages
|
||||||
|
editInlineMessageCaption inline_message_id:string reply_markup:ReplyMarkup caption:formattedText show_caption_above_media:Bool = Ok;
|
||||||
|
|
||||||
//@description Edits the reply markup of an inline message sent via a bot; for bots only
|
//@description Edits the reply markup of an inline message sent via a bot; for bots only
|
||||||
//@inline_message_id Inline message identifier
|
//@inline_message_id Inline message identifier
|
||||||
|
|
@ -8187,6 +8374,12 @@ editInlineMessageReplyMarkup inline_message_id:string reply_markup:ReplyMarkup =
|
||||||
//@scheduling_state The new message scheduling state; pass null to send the message immediately
|
//@scheduling_state The new message scheduling state; pass null to send the message immediately
|
||||||
editMessageSchedulingState chat_id:int53 message_id:int53 scheduling_state:MessageSchedulingState = Ok;
|
editMessageSchedulingState chat_id:int53 message_id:int53 scheduling_state:MessageSchedulingState = Ok;
|
||||||
|
|
||||||
|
//@description Changes the fact-check of a message. Can be only used if getOption("can_edit_fact_check") == true
|
||||||
|
//@chat_id The channel chat the message belongs to
|
||||||
|
//@message_id Identifier of the message
|
||||||
|
//@text New text of the fact-check; 0-getOption("fact_check_length_max") characters; pass null to remove it. Only Bold, Italic, and TextUrl entities with https://t.me/ links are supported
|
||||||
|
setMessageFactCheck chat_id:int53 message_id:int53 text:formattedText = Ok;
|
||||||
|
|
||||||
|
|
||||||
//@description Sends a message on behalf of a business account; for bots only. Returns the message after it was sent
|
//@description Sends a message on behalf of a business account; for bots only. Returns the message after it was sent
|
||||||
//@business_connection_id Unique identifier of business connection on behalf of which to send the request
|
//@business_connection_id Unique identifier of business connection on behalf of which to send the request
|
||||||
|
|
@ -8194,9 +8387,10 @@ editMessageSchedulingState chat_id:int53 message_id:int53 scheduling_state:Messa
|
||||||
//@reply_to Information about the message to be replied; pass null if none
|
//@reply_to Information about the message to be replied; pass null if none
|
||||||
//@disable_notification Pass true to disable notification for the message
|
//@disable_notification Pass true to disable notification for the message
|
||||||
//@protect_content Pass true if the content of the message must be protected from forwarding and saving
|
//@protect_content Pass true if the content of the message must be protected from forwarding and saving
|
||||||
|
//@effect_id Identifier of the effect to apply to the message
|
||||||
//@reply_markup Markup for replying to the message; pass null if none
|
//@reply_markup Markup for replying to the message; pass null if none
|
||||||
//@input_message_content The content of the message to be sent
|
//@input_message_content The content of the message to be sent
|
||||||
sendBusinessMessage business_connection_id:string chat_id:int53 reply_to:InputMessageReplyTo disable_notification:Bool protect_content:Bool reply_markup:ReplyMarkup input_message_content:InputMessageContent = BusinessMessage;
|
sendBusinessMessage business_connection_id:string chat_id:int53 reply_to:InputMessageReplyTo disable_notification:Bool protect_content:Bool effect_id:int64 reply_markup:ReplyMarkup input_message_content:InputMessageContent = BusinessMessage;
|
||||||
|
|
||||||
//@description Sends 2-10 messages grouped together into an album on behalf of a business account; for bots only. Currently, only audio, document, photo and video messages can be grouped into an album.
|
//@description Sends 2-10 messages grouped together into an album on behalf of a business account; for bots only. Currently, only audio, document, photo and video messages can be grouped into an album.
|
||||||
//-Documents and audio files can be only grouped in an album with messages of the same type. Returns sent messages
|
//-Documents and audio files can be only grouped in an album with messages of the same type. Returns sent messages
|
||||||
|
|
@ -8205,8 +8399,9 @@ sendBusinessMessage business_connection_id:string chat_id:int53 reply_to:InputMe
|
||||||
//@reply_to Information about the message to be replied; pass null if none
|
//@reply_to Information about the message to be replied; pass null if none
|
||||||
//@disable_notification Pass true to disable notification for the message
|
//@disable_notification Pass true to disable notification for the message
|
||||||
//@protect_content Pass true if the content of the message must be protected from forwarding and saving
|
//@protect_content Pass true if the content of the message must be protected from forwarding and saving
|
||||||
//@input_message_contents Contents of messages to be sent. At most 10 messages can be added to an album
|
//@effect_id Identifier of the effect to apply to the message
|
||||||
sendBusinessMessageAlbum business_connection_id:string chat_id:int53 reply_to:InputMessageReplyTo disable_notification:Bool protect_content:Bool input_message_contents:vector<InputMessageContent> = BusinessMessages;
|
//@input_message_contents Contents of messages to be sent. At most 10 messages can be added to an album. All messages must have the same value of show_caption_above_media
|
||||||
|
sendBusinessMessageAlbum business_connection_id:string chat_id:int53 reply_to:InputMessageReplyTo disable_notification:Bool protect_content:Bool effect_id:int64 input_message_contents:vector<InputMessageContent> = BusinessMessages;
|
||||||
|
|
||||||
|
|
||||||
//@description Checks validness of a name for a quick reply shortcut. Can be called synchronously @name The name of the shortcut; 1-32 characters
|
//@description Checks validness of a name for a quick reply shortcut. Can be called synchronously @name The name of the shortcut; 1-32 characters
|
||||||
|
|
@ -8253,7 +8448,7 @@ addQuickReplyShortcutInlineQueryResultMessage shortcut_name:string reply_to_mess
|
||||||
//-Documents and audio files can be only grouped in an album with messages of the same type. Returns sent messages
|
//-Documents and audio files can be only grouped in an album with messages of the same type. Returns sent messages
|
||||||
//@shortcut_name Name of the target shortcut
|
//@shortcut_name Name of the target shortcut
|
||||||
//@reply_to_message_id Identifier of a quick reply message in the same shortcut to be replied; pass 0 if none
|
//@reply_to_message_id Identifier of a quick reply message in the same shortcut to be replied; pass 0 if none
|
||||||
//@input_message_contents Contents of messages to be sent. At most 10 messages can be added to an album
|
//@input_message_contents Contents of messages to be sent. At most 10 messages can be added to an album. All messages must have the same value of show_caption_above_media
|
||||||
addQuickReplyShortcutMessageAlbum shortcut_name:string reply_to_message_id:int53 input_message_contents:vector<InputMessageContent> = QuickReplyMessages;
|
addQuickReplyShortcutMessageAlbum shortcut_name:string reply_to_message_id:int53 input_message_contents:vector<InputMessageContent> = QuickReplyMessages;
|
||||||
|
|
||||||
//@description Readds quick reply messages which failed to add. Can be called only for messages for which messageSendingStateFailed.can_retry is true and after specified in messageSendingStateFailed.retry_after time passed.
|
//@description Readds quick reply messages which failed to add. Can be called only for messages for which messageSendingStateFailed.can_retry is true and after specified in messageSendingStateFailed.retry_after time passed.
|
||||||
|
|
@ -8388,6 +8583,9 @@ getSavedMessagesTags saved_messages_topic_id:int53 = SavedMessagesTags;
|
||||||
//@description Changes label of a Saved Messages tag; for Telegram Premium users only @tag The tag which label will be changed @label New label for the tag; 0-12 characters
|
//@description Changes label of a Saved Messages tag; for Telegram Premium users only @tag The tag which label will be changed @label New label for the tag; 0-12 characters
|
||||||
setSavedMessagesTagLabel tag:ReactionType label:string = Ok;
|
setSavedMessagesTagLabel tag:ReactionType label:string = Ok;
|
||||||
|
|
||||||
|
//@description Returns information about a message effect. Returns a 404 error if the effect is not found @effect_id Unique identifier of the effect
|
||||||
|
getMessageEffect effect_id:int64 = MessageEffect;
|
||||||
|
|
||||||
|
|
||||||
//@description Searches for a given quote in a text. Returns found quote start position in UTF-16 code units. Returns a 404 error if the quote is not found. Can be called synchronously
|
//@description Searches for a given quote in a text. Returns found quote start position in UTF-16 code units. Returns a 404 error if the quote is not found. Can be called synchronously
|
||||||
//@text Text in which to search for the quote
|
//@text Text in which to search for the quote
|
||||||
|
|
@ -8398,7 +8596,10 @@ searchQuote text:formattedText quote:formattedText quote_position:int32 = FoundP
|
||||||
//@description Returns all entities (mentions, hashtags, cashtags, bot commands, bank card numbers, URLs, and email addresses) found in the text. Can be called synchronously @text The text in which to look for entities
|
//@description Returns all entities (mentions, hashtags, cashtags, bot commands, bank card numbers, URLs, and email addresses) found in the text. Can be called synchronously @text The text in which to look for entities
|
||||||
getTextEntities text:string = TextEntities;
|
getTextEntities text:string = TextEntities;
|
||||||
|
|
||||||
//@description Parses Bold, Italic, Underline, Strikethrough, Spoiler, CustomEmoji, BlockQuote, Code, Pre, PreCode, TextUrl and MentionName entities from a marked-up text. Can be called synchronously @text The text to parse @parse_mode Text parse mode
|
//@description Parses Bold, Italic, Underline, Strikethrough, Spoiler, CustomEmoji, BlockQuote, ExpandableBlockQuote, Code, Pre, PreCode, TextUrl
|
||||||
|
//-and MentionName entities from a marked-up text. Can be called synchronously
|
||||||
|
//@text The text to parse
|
||||||
|
//@parse_mode Text parse mode
|
||||||
parseTextEntities text:string parse_mode:TextParseMode = FormattedText;
|
parseTextEntities text:string parse_mode:TextParseMode = FormattedText;
|
||||||
|
|
||||||
//@description Parses Markdown entities in a human-friendly format, ignoring markup errors. Can be called synchronously
|
//@description Parses Markdown entities in a human-friendly format, ignoring markup errors. Can be called synchronously
|
||||||
|
|
@ -9329,6 +9530,13 @@ removeAllFilesFromDownloads only_active:Bool only_completed:Bool delete_from_cac
|
||||||
searchFileDownloads query:string only_active:Bool only_completed:Bool offset:string limit:int32 = FoundFileDownloads;
|
searchFileDownloads query:string only_active:Bool only_completed:Bool offset:string limit:int32 = FoundFileDownloads;
|
||||||
|
|
||||||
|
|
||||||
|
//@description Application verification has been completed. Can be called before authorization
|
||||||
|
//@verification_id Unique identifier for the verification process as received from updateApplicationVerificationRequired
|
||||||
|
//@token Play Integrity API token for the Android application, or secret from push notification for the iOS application;
|
||||||
|
//-pass an empty string to abort verification and receive error VERIFICATION_FAILED for the request
|
||||||
|
setApplicationVerificationToken verification_id:int53 token:string = Ok;
|
||||||
|
|
||||||
|
|
||||||
//@description Returns information about a file with messages exported from another application @message_file_head Beginning of the message file; up to 100 first lines
|
//@description Returns information about a file with messages exported from another application @message_file_head Beginning of the message file; up to 100 first lines
|
||||||
getMessageFileType message_file_head:string = MessageFileType;
|
getMessageFileType message_file_head:string = MessageFileType;
|
||||||
|
|
||||||
|
|
@ -9655,8 +9863,10 @@ setUserPersonalProfilePhoto user_id:int53 photo:InputChatPhoto = Ok;
|
||||||
suggestUserProfilePhoto user_id:int53 photo:InputChatPhoto = Ok;
|
suggestUserProfilePhoto user_id:int53 photo:InputChatPhoto = Ok;
|
||||||
|
|
||||||
|
|
||||||
//@description Searches a user by their phone number. Returns a 404 error if the user can't be found @phone_number Phone number to search for
|
//@description Searches a user by their phone number. Returns a 404 error if the user can't be found
|
||||||
searchUserByPhoneNumber phone_number:string = User;
|
//@phone_number Phone number to search for
|
||||||
|
//@only_local Pass true to get only locally available information without sending network requests
|
||||||
|
searchUserByPhoneNumber phone_number:string only_local:Bool = User;
|
||||||
|
|
||||||
//@description Shares the phone number of the current user with a mutual contact. Supposed to be called when the user clicks on chatActionBarSharePhoneNumber @user_id Identifier of the user with whom to share the phone number. The user must be a mutual contact
|
//@description Shares the phone number of the current user with a mutual contact. Supposed to be called when the user clicks on chatActionBarSharePhoneNumber @user_id Identifier of the user with whom to share the phone number. The user must be a mutual contact
|
||||||
sharePhoneNumber user_id:int53 = Ok;
|
sharePhoneNumber user_id:int53 = Ok;
|
||||||
|
|
@ -9904,14 +10114,15 @@ setBusinessStartPage start_page:inputBusinessStartPage = Ok;
|
||||||
sendPhoneNumberCode phone_number:string settings:phoneNumberAuthenticationSettings type:PhoneNumberCodeType = AuthenticationCodeInfo;
|
sendPhoneNumberCode phone_number:string settings:phoneNumberAuthenticationSettings type:PhoneNumberCodeType = AuthenticationCodeInfo;
|
||||||
|
|
||||||
//@description Sends Firebase Authentication SMS to the specified phone number. Works only when received a code of the type authenticationCodeTypeFirebaseAndroid or authenticationCodeTypeFirebaseIos
|
//@description Sends Firebase Authentication SMS to the specified phone number. Works only when received a code of the type authenticationCodeTypeFirebaseAndroid or authenticationCodeTypeFirebaseIos
|
||||||
//@token SafetyNet Attestation API token for the Android application, or secret from push notification for the iOS application
|
//@token Play Integrity API or SafetyNet Attestation API token for the Android application, or secret from push notification for the iOS application
|
||||||
sendPhoneNumberFirebaseSms token:string = Ok;
|
sendPhoneNumberFirebaseSms token:string = Ok;
|
||||||
|
|
||||||
//@description Reports that authentication code wasn't delivered via SMS to the specified phone number; for official mobile apps only @mobile_network_code Current mobile network code
|
//@description Reports that authentication code wasn't delivered via SMS to the specified phone number; for official mobile applications only @mobile_network_code Current mobile network code
|
||||||
reportPhoneNumberCodeMissing mobile_network_code:string = Ok;
|
reportPhoneNumberCodeMissing mobile_network_code:string = Ok;
|
||||||
|
|
||||||
//@description Resends the authentication code sent to a phone number. 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 a phone number. Works only if the previously received authenticationCodeInfo next_code_type was not null and the server-specified timeout has passed
|
||||||
resendPhoneNumberCode = AuthenticationCodeInfo;
|
//@reason Reason of code resending; pass null if unknown
|
||||||
|
resendPhoneNumberCode reason:ResendCodeReason = AuthenticationCodeInfo;
|
||||||
|
|
||||||
//@description Check the authentication code and completes the request for which the code was sent if appropriate @code Authentication code to check
|
//@description Check the authentication code and completes the request for which the code was sent if appropriate @code Authentication code to check
|
||||||
checkPhoneNumberCode code:string = Ok;
|
checkPhoneNumberCode code:string = Ok;
|
||||||
|
|
@ -10117,10 +10328,14 @@ setSupergroupUnrestrictBoostCount supergroup_id:int53 unrestrict_boost_count:int
|
||||||
//@description Toggles whether sender signature is added to sent messages in a channel; requires can_change_info member right @supergroup_id Identifier of the channel @sign_messages New value of sign_messages
|
//@description Toggles whether sender signature is added to sent messages in a channel; requires can_change_info member right @supergroup_id Identifier of the channel @sign_messages New value of sign_messages
|
||||||
toggleSupergroupSignMessages supergroup_id:int53 sign_messages:Bool = Ok;
|
toggleSupergroupSignMessages supergroup_id:int53 sign_messages:Bool = Ok;
|
||||||
|
|
||||||
//@description Toggles whether joining is mandatory to send messages to a discussion supergroup; requires can_restrict_members administrator right @supergroup_id Identifier of the supergroup @join_to_send_messages New value of join_to_send_messages
|
//@description Toggles whether joining is mandatory to send messages to a discussion supergroup; requires can_restrict_members administrator right
|
||||||
|
//@supergroup_id Identifier of the supergroup that isn't a broadcast group
|
||||||
|
//@join_to_send_messages New value of join_to_send_messages
|
||||||
toggleSupergroupJoinToSendMessages supergroup_id:int53 join_to_send_messages:Bool = Ok;
|
toggleSupergroupJoinToSendMessages supergroup_id:int53 join_to_send_messages:Bool = Ok;
|
||||||
|
|
||||||
//@description Toggles whether all users directly joining the supergroup need to be approved by supergroup administrators; requires can_restrict_members administrator right @supergroup_id Identifier of the channel @join_by_request New value of join_by_request
|
//@description Toggles whether all users directly joining the supergroup need to be approved by supergroup administrators; requires can_restrict_members administrator right
|
||||||
|
//@supergroup_id Identifier of the supergroup that isn't a broadcast group
|
||||||
|
//@join_by_request New value of join_by_request
|
||||||
toggleSupergroupJoinByRequest supergroup_id:int53 join_by_request:Bool = Ok;
|
toggleSupergroupJoinByRequest supergroup_id:int53 join_by_request:Bool = Ok;
|
||||||
|
|
||||||
//@description Toggles whether the message history of a supergroup is available to new members; requires can_change_info member right @supergroup_id The identifier of the supergroup @is_all_history_available The new value of is_all_history_available
|
//@description Toggles whether the message history of a supergroup is available to new members; requires can_change_info member right @supergroup_id The identifier of the supergroup @is_all_history_available The new value of is_all_history_available
|
||||||
|
|
@ -10197,7 +10412,7 @@ validateOrderInfo input_invoice:InputInvoice order_info:orderInfo allow_save:Boo
|
||||||
//@payment_form_id Payment form identifier returned by getPaymentForm
|
//@payment_form_id Payment form identifier returned by getPaymentForm
|
||||||
//@order_info_id Identifier returned by validateOrderInfo, or an empty string
|
//@order_info_id Identifier returned by validateOrderInfo, or an empty string
|
||||||
//@shipping_option_id Identifier of a chosen shipping option, if applicable
|
//@shipping_option_id Identifier of a chosen shipping option, if applicable
|
||||||
//@credentials The credentials chosen by user for payment
|
//@credentials The credentials chosen by user for payment; pass null for a payment in Telegram stars
|
||||||
//@tip_amount Chosen by the user amount of tip in the smallest units of the currency
|
//@tip_amount Chosen by the user amount of tip in the smallest units of the currency
|
||||||
sendPaymentForm input_invoice:InputInvoice payment_form_id:int64 order_info_id:string shipping_option_id:string credentials:InputCredentials tip_amount:int53 = PaymentResult;
|
sendPaymentForm input_invoice:InputInvoice payment_form_id:int64 order_info_id:string shipping_option_id:string credentials:InputCredentials tip_amount:int53 = PaymentResult;
|
||||||
|
|
||||||
|
|
@ -10217,6 +10432,11 @@ deleteSavedCredentials = Ok;
|
||||||
//@description Creates a link for the given invoice; for bots only @invoice Information about the invoice of the type inputMessageInvoice
|
//@description Creates a link for the given invoice; for bots only @invoice Information about the invoice of the type inputMessageInvoice
|
||||||
createInvoiceLink invoice:InputMessageContent = HttpUrl;
|
createInvoiceLink invoice:InputMessageContent = HttpUrl;
|
||||||
|
|
||||||
|
//@description Refunds a previously done payment in Telegram Stars
|
||||||
|
//@user_id Identifier of the user that did the payment
|
||||||
|
//@telegram_payment_charge_id Telegram payment identifier
|
||||||
|
refundStarPayment user_id:int53 telegram_payment_charge_id:string = Ok;
|
||||||
|
|
||||||
|
|
||||||
//@description Returns a user that can be contacted to get support
|
//@description Returns a user that can be contacted to get support
|
||||||
getSupportUser = User;
|
getSupportUser = User;
|
||||||
|
|
@ -10655,8 +10875,16 @@ launchPrepaidPremiumGiveaway giveaway_id:int64 parameters:premiumGiveawayParamet
|
||||||
//@message_id Identifier of the giveaway or a giveaway winners message in the chat
|
//@message_id Identifier of the giveaway or a giveaway winners message in the chat
|
||||||
getPremiumGiveawayInfo chat_id:int53 message_id:int53 = PremiumGiveawayInfo;
|
getPremiumGiveawayInfo chat_id:int53 message_id:int53 = PremiumGiveawayInfo;
|
||||||
|
|
||||||
//@description Checks whether Telegram Premium purchase is possible. Must be called before in-store Premium purchase @purpose Transaction purpose
|
//@description Returns available options for Telegram stars purchase
|
||||||
canPurchasePremium purpose:StorePaymentPurpose = Ok;
|
getStarPaymentOptions = StarPaymentOptions;
|
||||||
|
|
||||||
|
//@description Returns the list of Telegram star transactions for the current user
|
||||||
|
//@offset Offset of the first transaction to return as received from the previous request; use empty string to get the first chunk of results
|
||||||
|
//@direction Direction of the transactions to receive; pass null to get all transactions
|
||||||
|
getStarTransactions offset:string direction:StarTransactionDirection = StarTransactions;
|
||||||
|
|
||||||
|
//@description Checks whether an in-store purchase is possible. Must be called before any in-store purchase @purpose Transaction purpose
|
||||||
|
canPurchaseFromStore purpose:StorePaymentPurpose = Ok;
|
||||||
|
|
||||||
//@description Informs server about a purchase through App Store. For official applications only @receipt App Store receipt @purpose Transaction purpose
|
//@description Informs server about a purchase through App Store. For official applications only @receipt App Store receipt @purpose Transaction purpose
|
||||||
assignAppStoreTransaction receipt:bytes purpose:StorePaymentPurpose = Ok;
|
assignAppStoreTransaction receipt:bytes purpose:StorePaymentPurpose = Ok;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue