From 3a2564f29edb9ca27f8eb1c410370ce54fe86c4f Mon Sep 17 00:00:00 2001 From: Aleksandr Razumov Date: Sun, 24 Dec 2023 13:06:40 +0300 Subject: [PATCH] feat(docs): update embedded docs --- go.mod | 2 +- go.sum | 4 +- tg/tl_account_update_color_gen.go | 2 +- tg/tl_account_update_profile_gen.go | 1 - tg/tl_account_update_status_gen.go | 4 - tg/tl_attach_menu_bot_gen.go | 5 +- tg/tl_boost_gen.go | 42 +++++++--- tg/tl_bot_inline_message_gen.go | 21 +++-- tg/tl_channels_edit_location_gen.go | 2 +- ...hannels_get_channel_recommendations_gen.go | 6 +- tg/tl_channels_join_channel_gen.go | 1 - ...nnels_toggle_view_forum_as_messages_gen.go | 28 ++++++- tg/tl_chat_full_gen.go | 10 ++- tg/tl_chat_gen.go | 7 +- tg/tl_chat_invite_gen.go | 5 +- tg/tl_dialog_gen.go | 10 ++- tg/tl_draft_message_gen.go | 5 +- tg/tl_errors_gen.go | 42 ++++++++-- tg/tl_help_get_peer_colors_gen.go | 4 +- tg/tl_help_get_peer_profile_colors_gen.go | 4 +- tg/tl_help_peer_color_option_gen.go | 16 +++- tg/tl_help_peer_color_set_gen.go | 19 ++++- tg/tl_help_peer_colors_gen.go | 10 ++- tg/tl_input_bot_inline_message_gen.go | 17 ++-- tg/tl_input_invoice_gen.go | 23 +++++- tg/tl_input_media_gen.go | 13 ++- tg/tl_input_reply_to_gen.go | 12 ++- tg/tl_input_store_payment_purpose_gen.go | 80 ++++++++++++++++--- tg/tl_message_action_gen.go | 61 +++++++++++--- tg/tl_message_media_gen.go | 39 ++++++--- tg/tl_message_reply_header_gen.go | 17 ++-- tg/tl_messages_bot_app_gen.go | 2 +- tg/tl_messages_request_web_view_gen.go | 5 ++ ..._messages_search_emoji_sticker_sets_gen.go | 12 ++- tg/tl_messages_send_media_gen.go | 4 + tg/tl_messages_send_message_gen.go | 4 +- tg/tl_messages_send_reaction_gen.go | 2 +- ...ssages_send_screenshot_notification_gen.go | 2 +- tg/tl_messages_set_chat_wall_paper_gen.go | 2 +- tg/tl_messages_transcribed_audio_gen.go | 14 +++- tg/tl_messages_update_dialog_filter_gen.go | 2 +- tg/tl_messages_web_page_gen.go | 7 +- tg/tl_my_boost_gen.go | 22 +++-- tg/tl_payments_apply_gift_code_gen.go | 10 ++- tg/tl_payments_check_gift_code_gen.go | 12 ++- tg/tl_payments_checked_gift_code_gen.go | 28 ++++--- tg/tl_payments_get_giveaway_info_gen.go | 15 +++- tg/tl_payments_get_payment_form_gen.go | 3 + ...ments_get_premium_gift_code_options_gen.go | 10 ++- tg/tl_payments_giveaway_info_gen.go | 56 +++++++++---- tg/tl_payments_launch_prepaid_giveaway_gen.go | 14 +++- tg/tl_peer_color_gen.go | 14 +++- tg/tl_post_interaction_counters_gen.go | 24 +++--- tg/tl_premium_apply_boost_gen.go | 17 +++- tg/tl_premium_boosts_list_gen.go | 18 ++++- tg/tl_premium_boosts_status_gen.go | 41 +++++++--- tg/tl_premium_get_boosts_list_gen.go | 16 +++- tg/tl_premium_get_boosts_status_gen.go | 10 ++- tg/tl_premium_get_my_boosts_gen.go | 12 +++ tg/tl_premium_get_user_boosts_gen.go | 8 +- tg/tl_premium_gift_code_option_gen.go | 28 +++++-- tg/tl_premium_my_boosts_gen.go | 11 ++- tg/tl_prepaid_giveaway_gen.go | 18 ++++- tg/tl_public_forward_gen.go | 14 +++- tg/tl_sponsored_message_gen.go | 7 +- tg/tl_stats_broadcast_stats_gen.go | 45 +++++++---- tg/tl_stats_get_story_public_forwards_gen.go | 22 ++++- tg/tl_stats_get_story_stats_gen.go | 16 +++- tg/tl_stats_message_stats_gen.go | 2 +- tg/tl_stats_public_forwards_gen.go | 18 +++-- tg/tl_stats_story_stats_gen.go | 10 ++- tg/tl_sticker_set_gen.go | 4 +- tg/tl_stories_get_peer_max_ids_gen.go | 4 +- tg/tl_stories_get_story_views_list_gen.go | 1 + tg/tl_stories_read_stories_gen.go | 1 + tg/tl_stories_send_story_gen.go | 11 ++- tg/tl_story_fwd_header_gen.go | 12 ++- tg/tl_story_item_gen.go | 5 +- tg/tl_story_views_gen.go | 6 +- tg/tl_update_gen.go | 47 ++++++++--- tg/tl_updates_get_difference_gen.go | 4 +- tg/tl_user_gen.go | 12 ++- tg/tl_web_page_gen.go | 6 +- 83 files changed, 925 insertions(+), 277 deletions(-) diff --git a/go.mod b/go.mod index 4645d7e09f..d27b0a6aa6 100644 --- a/go.mod +++ b/go.mod @@ -8,7 +8,7 @@ require ( github.com/go-faster/jx v1.1.0 github.com/go-faster/xor v1.0.0 github.com/go-openapi/inflect v0.19.0 - github.com/gotd/getdoc v0.37.0 + github.com/gotd/getdoc v0.38.0 github.com/gotd/ige v0.2.2 github.com/gotd/neo v0.1.5 github.com/gotd/tl v0.4.0 diff --git a/go.sum b/go.sum index b110d4b635..6bc7a2f70e 100644 --- a/go.sum +++ b/go.sum @@ -20,8 +20,8 @@ github.com/go-openapi/inflect v0.19.0 h1:9jCH9scKIbHeV9m12SmPilScz6krDxKRasNNSNP github.com/go-openapi/inflect v0.19.0/go.mod h1:lHpZVlpIQqLyKwJ4N+YSc9hchQy/i12fJykb83CRBH4= github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= -github.com/gotd/getdoc v0.37.0 h1:tnw5xHZZTU8vXgT5K/lBtLQxmRx730Lv+hMQ7gEMn+Y= -github.com/gotd/getdoc v0.37.0/go.mod h1:yS2cctXnMY1Ju3QZaUxSzHlgOpqsUB+MkhA7r1hm2o0= +github.com/gotd/getdoc v0.38.0 h1:BPrcITTIRwabFJ5EVh7fJYrm4i0ZRuhbBLD4iE8I03Q= +github.com/gotd/getdoc v0.38.0/go.mod h1:nJwLqv5cBIre9AfVje+ui4hNEXmCt7OMLtl4I/QZjv8= github.com/gotd/ige v0.2.2 h1:XQ9dJZwBfDnOGSTxKXBGP4gMud3Qku2ekScRjDWWfEk= github.com/gotd/ige v0.2.2/go.mod h1:tuCRb+Y5Y3eNTo3ypIfNpQ4MFjrnONiL2jN2AKZXmb0= github.com/gotd/neo v0.1.5 h1:oj0iQfMbGClP8xI59x7fE/uHoTJD7NZH9oV1WNuPukQ= diff --git a/tg/tl_account_update_color_gen.go b/tg/tl_account_update_color_gen.go index d058b934f9..80e6679e1b 100644 --- a/tg/tl_account_update_color_gen.go +++ b/tg/tl_account_update_color_gen.go @@ -302,7 +302,7 @@ func (u *AccountUpdateColorRequest) GetBackgroundEmojiID() (value int64, ok bool // // Possible errors: // -// 400 COLOR_INVALID: +// 400 COLOR_INVALID: The specified color palette ID was invalid. // // See https://core.telegram.org/method/account.updateColor for reference. func (c *Client) AccountUpdateColor(ctx context.Context, request *AccountUpdateColorRequest) (bool, error) { diff --git a/tg/tl_account_update_profile_gen.go b/tg/tl_account_update_profile_gen.go index c0efea6c08..bc7968e19d 100644 --- a/tg/tl_account_update_profile_gen.go +++ b/tg/tl_account_update_profile_gen.go @@ -305,7 +305,6 @@ func (u *AccountUpdateProfileRequest) GetAbout() (value string, ok bool) { // Possible errors: // // 400 ABOUT_TOO_LONG: About string too long. -// 403 CHAT_WRITE_FORBIDDEN: You can't write in this chat. // 400 FIRSTNAME_INVALID: The first name is invalid. // // See https://core.telegram.org/method/account.updateProfile for reference. diff --git a/tg/tl_account_update_status_gen.go b/tg/tl_account_update_status_gen.go index edcfb1bea8..26bb8ee889 100644 --- a/tg/tl_account_update_status_gen.go +++ b/tg/tl_account_update_status_gen.go @@ -168,10 +168,6 @@ func (u *AccountUpdateStatusRequest) GetOffline() (value bool) { // AccountUpdateStatus invokes method account.updateStatus#6628562c returning error if any. // Updates online user status. // -// Possible errors: -// -// 403 CHAT_WRITE_FORBIDDEN: You can't write in this chat. -// // See https://core.telegram.org/method/account.updateStatus for reference. func (c *Client) AccountUpdateStatus(ctx context.Context, offline bool) (bool, error) { var result BoolBox diff --git a/tg/tl_attach_menu_bot_gen.go b/tg/tl_attach_menu_bot_gen.go index b60db30793..a61290bfc6 100644 --- a/tg/tl_attach_menu_bot_gen.go +++ b/tg/tl_attach_menu_bot_gen.go @@ -53,10 +53,7 @@ type AttachMenuBot struct { // Links: // 1) https://core.telegram.org/method/messages.toggleBotInAttachMenu Inactive bool - // True, if the bot supports the "settings_button_pressed" event »¹ - // - // Links: - // 1) https://core.telegram.org/api/bots/webapps#settings-button-pressed + // Deprecated flag, can be ignored. HasSettings bool // Whether the bot would like to send messages to the user. RequestWriteAccess bool diff --git a/tg/tl_boost_gen.go b/tg/tl_boost_gen.go index 822c154c91..d7d873a16d 100644 --- a/tg/tl_boost_gen.go +++ b/tg/tl_boost_gen.go @@ -32,6 +32,10 @@ var ( ) // Boost represents TL type `boost#2a1c8c71`. +// Info about one or more boosts¹ applied by a specific user. +// +// Links: +// 1. https://core.telegram.org/api/boost // // See https://core.telegram.org/constructor/boost for reference. type Boost struct { @@ -40,31 +44,49 @@ type Boost struct { // Links: // 1) https://core.telegram.org/mtproto/TL-combinators#conditional-fields Flags bin.Fields - // Gift field of Boost. + // Whether this boost was applied because the channel directly gifted a subscription to + // the user¹. + // + // Links: + // 1) https://core.telegram.org/api/giveaways Gift bool - // Giveaway field of Boost. + // Whether this boost was applied because the user was chosen in a giveaway started by + // the channel¹. + // + // Links: + // 1) https://core.telegram.org/api/giveaways Giveaway bool - // Unclaimed field of Boost. + // If set, the user hasn't yet invoked payments.applyGiftCode¹ to claim a subscription + // gifted directly or in a giveaway by the channel². + // + // Links: + // 1) https://core.telegram.org/method/payments.applyGiftCode + // 2) https://core.telegram.org/api/giveaways Unclaimed bool - // ID field of Boost. + // Unique ID for this set of boosts. ID string - // UserID field of Boost. + // ID of the user that applied the boost. // // Use SetUserID and GetUserID helpers. UserID int64 - // GiveawayMsgID field of Boost. + // The message ID of the giveaway¹ + // + // Links: + // 1) https://core.telegram.org/api/giveaways // // Use SetGiveawayMsgID and GetGiveawayMsgID helpers. GiveawayMsgID int - // Date field of Boost. + // When was the boost applied Date int - // Expires field of Boost. + // When does the boost expire Expires int - // UsedGiftSlug field of Boost. + // The created Telegram Premium gift code, only set if either gift or giveaway are set + // AND it is either a gift code for the currently logged in user or if it was already + // claimed. // // Use SetUsedGiftSlug and GetUsedGiftSlug helpers. UsedGiftSlug string - // Multiplier field of Boost. + // If set, this boost counts as multiplier boosts, otherwise it counts as a single boost. // // Use SetMultiplier and GetMultiplier helpers. Multiplier int diff --git a/tg/tl_bot_inline_message_gen.go b/tg/tl_bot_inline_message_gen.go index 8fa3309193..b781852ee6 100644 --- a/tg/tl_bot_inline_message_gen.go +++ b/tg/tl_bot_inline_message_gen.go @@ -2141,6 +2141,8 @@ func (b *BotInlineMessageMediaInvoice) GetReplyMarkup() (value ReplyMarkupClass, } // BotInlineMessageMediaWebPage represents TL type `botInlineMessageMediaWebPage#809ad9a6`. +// Specifies options that must be used to generate the link preview for the message, or +// even a standalone link preview without an attached message. // // See https://core.telegram.org/constructor/botInlineMessageMediaWebPage for reference. type BotInlineMessageMediaWebPage struct { @@ -2152,15 +2154,20 @@ type BotInlineMessageMediaWebPage struct { // If set, any eventual webpage preview will be shown on top of the message instead of at // the bottom. InvertMedia bool - // ForceLargeMedia field of BotInlineMessageMediaWebPage. + // If set, specifies that a large media preview should be used. ForceLargeMedia bool - // ForceSmallMedia field of BotInlineMessageMediaWebPage. + // If set, specifies that a small media preview should be used. ForceSmallMedia bool - // Manual field of BotInlineMessageMediaWebPage. + // If set, indicates that the URL used for the webpage preview was specified manually + // using inputMediaWebPage¹, and may not be related to any of the URLs specified in the + // message. + // + // Links: + // 1) https://core.telegram.org/constructor/inputMediaWebPage Manual bool - // Safe field of BotInlineMessageMediaWebPage. + // If set, the link can be opened directly without user confirmation. Safe bool - // Message field of BotInlineMessageMediaWebPage. + // The message, can be empty. Message string // Message entities for styled text¹ // @@ -2169,9 +2176,9 @@ type BotInlineMessageMediaWebPage struct { // // Use SetEntities and GetEntities helpers. Entities []MessageEntityClass - // URL field of BotInlineMessageMediaWebPage. + // The URL to use for the link preview. URL string - // ReplyMarkup field of BotInlineMessageMediaWebPage. + // Reply markup for sending bot buttons // // Use SetReplyMarkup and GetReplyMarkup helpers. ReplyMarkup ReplyMarkupClass diff --git a/tg/tl_channels_edit_location_gen.go b/tg/tl_channels_edit_location_gen.go index dc7a6a2567..cff623baa9 100644 --- a/tg/tl_channels_edit_location_gen.go +++ b/tg/tl_channels_edit_location_gen.go @@ -251,7 +251,7 @@ func (e *ChannelsEditLocationRequest) GetGeoPointAsNotEmpty() (*InputGeoPoint, b // // 400 CHAT_ADMIN_REQUIRED: You must be an admin in this chat to do this. // 400 CHAT_NOT_MODIFIED: No changes were made to chat information because the new information you passed is identical to the current information. -// 400 MEGAGROUP_GEO_REQUIRED: +// 400 MEGAGROUP_GEO_REQUIRED: This method can only be invoked on a geogroup. // 400 MEGAGROUP_REQUIRED: You can only use this method on a supergroup. // // See https://core.telegram.org/method/channels.editLocation for reference. diff --git a/tg/tl_channels_get_channel_recommendations_gen.go b/tg/tl_channels_get_channel_recommendations_gen.go index 17fb50ac5e..a011abf524 100644 --- a/tg/tl_channels_get_channel_recommendations_gen.go +++ b/tg/tl_channels_get_channel_recommendations_gen.go @@ -32,10 +32,12 @@ var ( ) // ChannelsGetChannelRecommendationsRequest represents TL type `channels.getChannelRecommendations#83b70d97`. +// Obtain a list of similarly themed public channels, selected based on similarities in +// their subscriber bases. // // See https://core.telegram.org/method/channels.getChannelRecommendations for reference. type ChannelsGetChannelRecommendationsRequest struct { - // Channel field of ChannelsGetChannelRecommendationsRequest. + // The method will return channels related to the passed channel. Channel InputChannelClass } @@ -171,6 +173,8 @@ func (g *ChannelsGetChannelRecommendationsRequest) GetChannelAsNotEmpty() (NotEm } // ChannelsGetChannelRecommendations invokes method channels.getChannelRecommendations#83b70d97 returning error if any. +// Obtain a list of similarly themed public channels, selected based on similarities in +// their subscriber bases. // // Possible errors: // diff --git a/tg/tl_channels_join_channel_gen.go b/tg/tl_channels_join_channel_gen.go index c143265978..e0f08bc098 100644 --- a/tg/tl_channels_join_channel_gen.go +++ b/tg/tl_channels_join_channel_gen.go @@ -184,7 +184,6 @@ func (j *ChannelsJoinChannelRequest) GetChannelAsNotEmpty() (NotEmptyInputChanne // 406 INVITE_HASH_EXPIRED: The invite link has expired. // 400 INVITE_HASH_INVALID: The invite hash is invalid. // 400 INVITE_REQUEST_SENT: You have successfully requested to join this chat or channel. -// 500 MEMBER_CHAT_ADD_FAILED: // 400 MSG_ID_INVALID: Invalid message ID provided. // 400 PEER_ID_INVALID: The provided peer id is invalid. // 400 USERS_TOO_MUCH: The maximum number of users has been exceeded (to create a chat, for example). diff --git a/tg/tl_channels_toggle_view_forum_as_messages_gen.go b/tg/tl_channels_toggle_view_forum_as_messages_gen.go index a2dec87b85..432ed8a06b 100644 --- a/tg/tl_channels_toggle_view_forum_as_messages_gen.go +++ b/tg/tl_channels_toggle_view_forum_as_messages_gen.go @@ -32,12 +32,24 @@ var ( ) // ChannelsToggleViewForumAsMessagesRequest represents TL type `channels.toggleViewForumAsMessages#9738bb15`. +// Users may also choose to display messages from all topics of a forum¹ as if they were +// sent to a normal group, using a "View as messages" setting in the local client: this +// setting only affects the current account, and is synced to other logged in sessions +// using this method. +// Invoking this method will update the value of the view_forum_as_messages flag of +// channelFull¹ or dialog² and emit an updateChannelViewForumAsMessages³. +// +// Links: +// 1. https://core.telegram.org/api/forum +// 2. https://core.telegram.org/constructor/channelFull +// 3. https://core.telegram.org/constructor/dialog +// 4. https://core.telegram.org/constructor/updateChannelViewForumAsMessages // // See https://core.telegram.org/method/channels.toggleViewForumAsMessages for reference. type ChannelsToggleViewForumAsMessagesRequest struct { - // Channel field of ChannelsToggleViewForumAsMessagesRequest. + // The forum Channel InputChannelClass - // Enabled field of ChannelsToggleViewForumAsMessagesRequest. + // The new value of the view_forum_as_messages flag. Enabled bool } @@ -198,6 +210,18 @@ func (t *ChannelsToggleViewForumAsMessagesRequest) GetChannelAsNotEmpty() (NotEm } // ChannelsToggleViewForumAsMessages invokes method channels.toggleViewForumAsMessages#9738bb15 returning error if any. +// Users may also choose to display messages from all topics of a forum¹ as if they were +// sent to a normal group, using a "View as messages" setting in the local client: this +// setting only affects the current account, and is synced to other logged in sessions +// using this method. +// Invoking this method will update the value of the view_forum_as_messages flag of +// channelFull¹ or dialog² and emit an updateChannelViewForumAsMessages³. +// +// Links: +// 1. https://core.telegram.org/api/forum +// 2. https://core.telegram.org/constructor/channelFull +// 3. https://core.telegram.org/constructor/dialog +// 4. https://core.telegram.org/constructor/updateChannelViewForumAsMessages // // Possible errors: // diff --git a/tg/tl_chat_full_gen.go b/tg/tl_chat_full_gen.go index b46ddb4f39..9c7604a797 100644 --- a/tg/tl_chat_full_gen.go +++ b/tg/tl_chat_full_gen.go @@ -1092,7 +1092,15 @@ type ChannelFull struct { // Links: // 1) https://core.telegram.org/api/stories#pinned-or-archived-stories StoriesPinnedAvailable bool - // ViewForumAsMessages field of ChannelFull. + // Users may also choose to display messages from all topics of a forum¹ as if they were + // sent to a normal group, using a "View as messages" setting in the local client. This + // setting only affects the current account, and is synced to other logged in sessions + // using the channels.toggleViewForumAsMessages² method; invoking this method will + // update the value of this flag. + // + // Links: + // 1) https://core.telegram.org/api/forum + // 2) https://core.telegram.org/method/channels.toggleViewForumAsMessages ViewForumAsMessages bool // ID of the channel ID int64 diff --git a/tg/tl_chat_gen.go b/tg/tl_chat_gen.go index 664f32b5b6..2a2671f287 100644 --- a/tg/tl_chat_gen.go +++ b/tg/tl_chat_gen.go @@ -1093,7 +1093,7 @@ type Channel struct { // Links: // 1) https://core.telegram.org/method/channels.getChannels StoriesHiddenMin bool - // StoriesUnavailable field of Channel. + // No stories from the channel are visible. StoriesUnavailable bool // ID of the channel ID int64 @@ -1152,7 +1152,10 @@ type Channel struct { // // Use SetStoriesMaxID and GetStoriesMaxID helpers. StoriesMaxID int - // Color field of Channel. + // The channel's accent color¹. + // + // Links: + // 1) https://core.telegram.org/api/colors // // Use SetColor and GetColor helpers. Color PeerColor diff --git a/tg/tl_chat_invite_gen.go b/tg/tl_chat_invite_gen.go index 142dc4c9b3..d0b4082e5d 100644 --- a/tg/tl_chat_invite_gen.go +++ b/tg/tl_chat_invite_gen.go @@ -228,7 +228,10 @@ type ChatInvite struct { // // Use SetParticipants and GetParticipants helpers. Participants []UserClass - // Color field of ChatInvite. + // Profile color palette ID¹ + // + // Links: + // 1) https://core.telegram.org/api/colors Color int } diff --git a/tg/tl_dialog_gen.go b/tg/tl_dialog_gen.go index 328d1d22a4..c1a038e583 100644 --- a/tg/tl_dialog_gen.go +++ b/tg/tl_dialog_gen.go @@ -45,7 +45,15 @@ type Dialog struct { Pinned bool // Whether the chat was manually marked as unread UnreadMark bool - // ViewForumAsMessages field of Dialog. + // Users may also choose to display messages from all topics of a forum¹ as if they were + // sent to a normal group, using a "View as messages" setting in the local client. This + // setting only affects the current account, and is synced to other logged in sessions + // using the channels.toggleViewForumAsMessages² method; invoking this method will + // update the value of this flag. + // + // Links: + // 1) https://core.telegram.org/api/forum + // 2) https://core.telegram.org/method/channels.toggleViewForumAsMessages ViewForumAsMessages bool // The chat Peer PeerClass diff --git a/tg/tl_draft_message_gen.go b/tg/tl_draft_message_gen.go index e30390efe0..471f544063 100644 --- a/tg/tl_draft_message_gen.go +++ b/tg/tl_draft_message_gen.go @@ -226,7 +226,8 @@ type DraftMessage struct { // If set, any eventual webpage preview will be shown on top of the message instead of at // the bottom. InvertMedia bool - // ReplyTo field of DraftMessage. + // If set, indicates that the message should be sent in reply to the specified message or + // story. // // Use SetReplyTo and GetReplyTo helpers. ReplyTo InputReplyToClass @@ -239,7 +240,7 @@ type DraftMessage struct { // // Use SetEntities and GetEntities helpers. Entities []MessageEntityClass - // Media field of DraftMessage. + // Media. // // Use SetMedia and GetMedia helpers. Media InputMediaClass diff --git a/tg/tl_errors_gen.go b/tg/tl_errors_gen.go index 67a411a58b..2357773ff7 100644 --- a/tg/tl_errors_gen.go +++ b/tg/tl_errors_gen.go @@ -60,7 +60,9 @@ const ( ErrAutoarchiveNotAvailable = "AUTOARCHIVE_NOT_AVAILABLE" ErrBankCardNumberInvalid = "BANK_CARD_NUMBER_INVALID" ErrBannedRightsInvalid = "BANNED_RIGHTS_INVALID" + ErrBoostsEmpty = "BOOSTS_EMPTY" ErrBoostsRequired = "BOOSTS_REQUIRED" + ErrBoostPeerInvalid = "BOOST_PEER_INVALID" ErrBotsTooMuch = "BOTS_TOO_MUCH" ErrBotAppInvalid = "BOT_APP_INVALID" ErrBotChannelsNa = "BOT_CHANNELS_NA" @@ -277,7 +279,6 @@ const ( ErrMegagroupIDInvalid = "MEGAGROUP_ID_INVALID" ErrMegagroupPrehistoryHidden = "MEGAGROUP_PREHISTORY_HIDDEN" ErrMegagroupRequired = "MEGAGROUP_REQUIRED" - ErrMemberChatAddFailed = "MEMBER_CHAT_ADD_FAILED" ErrMemberNotFound = "MEMBER_NOT_FOUND" ErrMessageAuthorRequired = "MESSAGE_AUTHOR_REQUIRED" ErrMessageDeleteForbidden = "MESSAGE_DELETE_FORBIDDEN" @@ -418,8 +419,10 @@ const ( ErrShortNameInvalid = "SHORT_NAME_INVALID" ErrShortNameOccupied = "SHORT_NAME_OCCUPIED" ErrSignInFailed = "SIGN_IN_FAILED" + ErrSlotsEmpty = "SLOTS_EMPTY" ErrSlowmodeMultiMsgsDisabled = "SLOWMODE_MULTI_MSGS_DISABLED" ErrSlowmodeWait = "SLOWMODE_WAIT" + ErrSlugInvalid = "SLUG_INVALID" ErrSMSCodeCreateFailed = "SMS_CODE_CREATE_FAILED" ErrSRPIDInvalid = "SRP_ID_INVALID" ErrSRPPasswordChanged = "SRP_PASSWORD_CHANGED" @@ -537,6 +540,8 @@ const ( ErrWebdocumentURLInvalid = "WEBDOCUMENT_URL_INVALID" ErrWebpageCurlFailed = "WEBPAGE_CURL_FAILED" ErrWebpageMediaEmpty = "WEBPAGE_MEDIA_EMPTY" + ErrWebpageNotFound = "WEBPAGE_NOT_FOUND" + ErrWebpageURLInvalid = "WEBPAGE_URL_INVALID" ErrWebpushAuthInvalid = "WEBPUSH_AUTH_INVALID" ErrWebpushKeyInvalid = "WEBPUSH_KEY_INVALID" ErrWebpushTokenInvalid = "WEBPUSH_TOKEN_INVALID" @@ -678,11 +683,21 @@ func IsBannedRightsInvalid(err error) bool { return tgerr.Is(err, ErrBannedRightsInvalid) } +// IsBoostsEmpty reports whether err is BOOSTS_EMPTY. +func IsBoostsEmpty(err error) bool { + return tgerr.Is(err, ErrBoostsEmpty) +} + // IsBoostsRequired reports whether err is BOOSTS_REQUIRED. func IsBoostsRequired(err error) bool { return tgerr.Is(err, ErrBoostsRequired) } +// IsBoostPeerInvalid reports whether err is BOOST_PEER_INVALID. +func IsBoostPeerInvalid(err error) bool { + return tgerr.Is(err, ErrBoostPeerInvalid) +} + // IsBotsTooMuch reports whether err is BOTS_TOO_MUCH. func IsBotsTooMuch(err error) bool { return tgerr.Is(err, ErrBotsTooMuch) @@ -1763,11 +1778,6 @@ func IsMegagroupRequired(err error) bool { return tgerr.Is(err, ErrMegagroupRequired) } -// IsMemberChatAddFailed reports whether err is MEMBER_CHAT_ADD_FAILED. -func IsMemberChatAddFailed(err error) bool { - return tgerr.Is(err, ErrMemberChatAddFailed) -} - // IsMemberNotFound reports whether err is MEMBER_NOT_FOUND. func IsMemberNotFound(err error) bool { return tgerr.Is(err, ErrMemberNotFound) @@ -2468,6 +2478,11 @@ func IsSignInFailed(err error) bool { return tgerr.Is(err, ErrSignInFailed) } +// IsSlotsEmpty reports whether err is SLOTS_EMPTY. +func IsSlotsEmpty(err error) bool { + return tgerr.Is(err, ErrSlotsEmpty) +} + // IsSlowmodeMultiMsgsDisabled reports whether err is SLOWMODE_MULTI_MSGS_DISABLED. func IsSlowmodeMultiMsgsDisabled(err error) bool { return tgerr.Is(err, ErrSlowmodeMultiMsgsDisabled) @@ -2478,6 +2493,11 @@ func IsSlowmodeWait(err error) bool { return tgerr.Is(err, ErrSlowmodeWait) } +// IsSlugInvalid reports whether err is SLUG_INVALID. +func IsSlugInvalid(err error) bool { + return tgerr.Is(err, ErrSlugInvalid) +} + // IsSMSCodeCreateFailed reports whether err is SMS_CODE_CREATE_FAILED. func IsSMSCodeCreateFailed(err error) bool { return tgerr.Is(err, ErrSMSCodeCreateFailed) @@ -3063,6 +3083,16 @@ func IsWebpageMediaEmpty(err error) bool { return tgerr.Is(err, ErrWebpageMediaEmpty) } +// IsWebpageNotFound reports whether err is WEBPAGE_NOT_FOUND. +func IsWebpageNotFound(err error) bool { + return tgerr.Is(err, ErrWebpageNotFound) +} + +// IsWebpageURLInvalid reports whether err is WEBPAGE_URL_INVALID. +func IsWebpageURLInvalid(err error) bool { + return tgerr.Is(err, ErrWebpageURLInvalid) +} + // IsWebpushAuthInvalid reports whether err is WEBPUSH_AUTH_INVALID. func IsWebpushAuthInvalid(err error) bool { return tgerr.Is(err, ErrWebpushAuthInvalid) diff --git a/tg/tl_help_get_peer_colors_gen.go b/tg/tl_help_get_peer_colors_gen.go index ca028929da..d7138309ae 100644 --- a/tg/tl_help_get_peer_colors_gen.go +++ b/tg/tl_help_get_peer_colors_gen.go @@ -32,7 +32,7 @@ var ( ) // HelpGetPeerColorsRequest represents TL type `help.getPeerColors#da80f42f`. -// Get the set of accent color palettes »¹ that can be used for messages +// Get the set of accent color palettes »¹ that can be used for message accents. // // Links: // 1. https://core.telegram.org/api/colors @@ -168,7 +168,7 @@ func (g *HelpGetPeerColorsRequest) GetHash() (value int) { } // HelpGetPeerColors invokes method help.getPeerColors#da80f42f returning error if any. -// Get the set of accent color palettes »¹ that can be used for messages +// Get the set of accent color palettes »¹ that can be used for message accents. // // Links: // 1. https://core.telegram.org/api/colors diff --git a/tg/tl_help_get_peer_profile_colors_gen.go b/tg/tl_help_get_peer_profile_colors_gen.go index 8b9e472d32..13ea44dc03 100644 --- a/tg/tl_help_get_peer_profile_colors_gen.go +++ b/tg/tl_help_get_peer_profile_colors_gen.go @@ -32,7 +32,7 @@ var ( ) // HelpGetPeerProfileColorsRequest represents TL type `help.getPeerProfileColors#abcfa9fd`. -// Get the set of accent color palettes »¹ that can be used for profiles +// Get the set of accent color palettes »¹ that can be used in profile page backgrounds. // // Links: // 1. https://core.telegram.org/api/colors @@ -168,7 +168,7 @@ func (g *HelpGetPeerProfileColorsRequest) GetHash() (value int) { } // HelpGetPeerProfileColors invokes method help.getPeerProfileColors#abcfa9fd returning error if any. -// Get the set of accent color palettes »¹ that can be used for profiles +// Get the set of accent color palettes »¹ that can be used in profile page backgrounds. // // Links: // 1. https://core.telegram.org/api/colors diff --git a/tg/tl_help_peer_color_option_gen.go b/tg/tl_help_peer_color_option_gen.go index 0560d3da11..df1e72cc84 100644 --- a/tg/tl_help_peer_color_option_gen.go +++ b/tg/tl_help_peer_color_option_gen.go @@ -32,6 +32,10 @@ var ( ) // HelpPeerColorOption represents TL type `help.peerColorOption#ef8430ab`. +// Contains info about a color palette »¹. +// +// Links: +// 1. https://core.telegram.org/api/colors // // See https://core.telegram.org/constructor/help.peerColorOption for reference. type HelpPeerColorOption struct { @@ -40,15 +44,19 @@ type HelpPeerColorOption struct { // Links: // 1) https://core.telegram.org/mtproto/TL-combinators#conditional-fields Flags bin.Fields - // Hidden field of HelpPeerColorOption. + // Whether this palette should not be displayed as an option to the user when choosing a + // palette to apply to profile pages or message accents. Hidden bool - // ColorID field of HelpPeerColorOption. + // Palette ID. ColorID int - // Colors field of HelpPeerColorOption. + // Light mode palette. Will be empty for IDs 0 to 6 inclusive, in which case a palette + // containing a single color from the following colors should be used: red, orange, + // violet, green, cyan, blue, pink for indexes 0 to 6. // // Use SetColors and GetColors helpers. Colors HelpPeerColorSetClass - // DarkColors field of HelpPeerColorOption. + // Dark mode palette. Optional, defaults to the palette in colors (or the autogenerated + // palette for IDs 0 to 6) if absent. // // Use SetDarkColors and GetDarkColors helpers. DarkColors HelpPeerColorSetClass diff --git a/tg/tl_help_peer_color_set_gen.go b/tg/tl_help_peer_color_set_gen.go index 2ba295dfea..86f2a1d323 100644 --- a/tg/tl_help_peer_color_set_gen.go +++ b/tg/tl_help_peer_color_set_gen.go @@ -32,10 +32,14 @@ var ( ) // HelpPeerColorSet represents TL type `help.peerColorSet#26219a58`. +// Represents a color palette that can be used in message accents »¹. +// +// Links: +// 1. https://core.telegram.org/api/colors // // See https://core.telegram.org/constructor/help.peerColorSet for reference. type HelpPeerColorSet struct { - // Colors field of HelpPeerColorSet. + // A list of 1-3 colors in RGB format, describing the accent color. Colors []int } @@ -179,14 +183,21 @@ func (p *HelpPeerColorSet) GetColors() (value []int) { } // HelpPeerColorProfileSet represents TL type `help.peerColorProfileSet#767d61eb`. +// Represents a color palette that can be used in profile pages »¹. +// +// Links: +// 1. https://core.telegram.org/api/colors // // See https://core.telegram.org/constructor/help.peerColorProfileSet for reference. type HelpPeerColorProfileSet struct { - // PaletteColors field of HelpPeerColorProfileSet. + // A list of 1-2 colors in RGB format, shown in the color palette settings to describe + // the current palette. PaletteColors []int - // BgColors field of HelpPeerColorProfileSet. + // A list of 1-2 colors in RGB format describing the colors used to generate the actual + // background used in the profile page. BgColors []int - // StoryColors field of HelpPeerColorProfileSet. + // A list of 2 colors in RGB format describing the colors of the gradient used for the + // unread active story indicator around the profile photo. StoryColors []int } diff --git a/tg/tl_help_peer_colors_gen.go b/tg/tl_help_peer_colors_gen.go index 30edef648d..9946c7a19a 100644 --- a/tg/tl_help_peer_colors_gen.go +++ b/tg/tl_help_peer_colors_gen.go @@ -32,6 +32,7 @@ var ( ) // HelpPeerColorsNotModified represents TL type `help.peerColorsNotModified#2ba1f5ce`. +// The list of color palettes has not changed. // // See https://core.telegram.org/constructor/help.peerColorsNotModified for reference. type HelpPeerColorsNotModified struct { @@ -133,6 +134,10 @@ func (p *HelpPeerColorsNotModified) DecodeBare(b *bin.Buffer) error { } // HelpPeerColors represents TL type `help.peerColors#f8ed08`. +// Contains info about multiple color palettes »¹. +// +// Links: +// 1. https://core.telegram.org/api/colors // // See https://core.telegram.org/constructor/help.peerColors for reference. type HelpPeerColors struct { @@ -141,7 +146,10 @@ type HelpPeerColors struct { // Links: // 1) https://core.telegram.org/api/offsets#hash-generation Hash int - // Colors field of HelpPeerColors. + // Usable color palettes¹. + // + // Links: + // 1) https://core.telegram.org/api/colors Colors []HelpPeerColorOption } diff --git a/tg/tl_input_bot_inline_message_gen.go b/tg/tl_input_bot_inline_message_gen.go index 2fae14bdc7..f121ac24f5 100644 --- a/tg/tl_input_bot_inline_message_gen.go +++ b/tg/tl_input_bot_inline_message_gen.go @@ -2296,6 +2296,8 @@ func (i *InputBotInlineMessageMediaInvoice) GetReplyMarkup() (value ReplyMarkupC } // InputBotInlineMessageMediaWebPage represents TL type `inputBotInlineMessageMediaWebPage#bddcc510`. +// Specifies options that will be used to generate the link preview for the message, or +// even a standalone link preview without an attached message. // // See https://core.telegram.org/constructor/inputBotInlineMessageMediaWebPage for reference. type InputBotInlineMessageMediaWebPage struct { @@ -2307,13 +2309,16 @@ type InputBotInlineMessageMediaWebPage struct { // If set, any eventual webpage preview will be shown on top of the message instead of at // the bottom. InvertMedia bool - // ForceLargeMedia field of InputBotInlineMessageMediaWebPage. + // If set, specifies that a large media preview should be used. ForceLargeMedia bool - // ForceSmallMedia field of InputBotInlineMessageMediaWebPage. + // If set, specifies that a small media preview should be used. ForceSmallMedia bool - // Optional field of InputBotInlineMessageMediaWebPage. + // If not set, a WEBPAGE_NOT_FOUND RPC error will be emitted if a webpage preview cannot + // be generated for the specified url; otherwise, no error will be emitted (unless the + // provided message is also empty, in which case a MESSAGE_EMPTY will be emitted, + // instead). Optional bool - // Message field of InputBotInlineMessageMediaWebPage. + // The message, can be empty. Message string // Message entities for styled text¹ // @@ -2322,9 +2327,9 @@ type InputBotInlineMessageMediaWebPage struct { // // Use SetEntities and GetEntities helpers. Entities []MessageEntityClass - // URL field of InputBotInlineMessageMediaWebPage. + // The URL to use for the link preview. URL string - // ReplyMarkup field of InputBotInlineMessageMediaWebPage. + // Inline keyboard // // Use SetReplyMarkup and GetReplyMarkup helpers. ReplyMarkup ReplyMarkupClass diff --git a/tg/tl_input_invoice_gen.go b/tg/tl_input_invoice_gen.go index a1b47fd85b..7f58050651 100644 --- a/tg/tl_input_invoice_gen.go +++ b/tg/tl_input_invoice_gen.go @@ -342,12 +342,31 @@ func (i *InputInvoiceSlug) GetSlug() (value string) { } // InputInvoicePremiumGiftCode represents TL type `inputInvoicePremiumGiftCode#98986c0d`. +// Used if the user wishes to start a channel giveaway¹ or send some giftcodes² to +// members of a channel, in exchange for boosts³. +// +// Links: +// 1. https://core.telegram.org/api/giveaways +// 2. https://core.telegram.org/api/giveaways +// 3. https://core.telegram.org/api/boost // // See https://core.telegram.org/constructor/inputInvoicePremiumGiftCode for reference. type InputInvoicePremiumGiftCode struct { - // Purpose field of InputInvoicePremiumGiftCode. + // Should be populated with inputStorePaymentPremiumGiveaway¹ for giveaways² and + // inputStorePaymentPremiumGiftCode³ for gifts⁴. + // + // Links: + // 1) https://core.telegram.org/constructor/inputStorePaymentPremiumGiveaway + // 2) https://core.telegram.org/api/giveaways + // 3) https://core.telegram.org/constructor/inputStorePaymentPremiumGiftCode + // 4) https://core.telegram.org/api/giveaways Purpose InputStorePaymentPurposeClass - // Option field of InputInvoicePremiumGiftCode. + // Should be populated with one of the giveaway options returned by payments + // getPremiumGiftCodeOptions¹, see the giveaways »² documentation for more info. + // + // Links: + // 1) https://core.telegram.org/method/payments.getPremiumGiftCodeOptions + // 2) https://core.telegram.org/api/giveaways Option PremiumGiftCodeOption } diff --git a/tg/tl_input_media_gen.go b/tg/tl_input_media_gen.go index b812ed02ac..928f4b5fff 100644 --- a/tg/tl_input_media_gen.go +++ b/tg/tl_input_media_gen.go @@ -4218,6 +4218,8 @@ func (i *InputMediaStory) GetID() (value int) { } // InputMediaWebPage represents TL type `inputMediaWebPage#c21b8849`. +// Specifies options that will be used to generate the link preview for the caption, or +// even a standalone link preview without an attached message. // // See https://core.telegram.org/constructor/inputMediaWebPage for reference. type InputMediaWebPage struct { @@ -4226,13 +4228,16 @@ type InputMediaWebPage struct { // Links: // 1) https://core.telegram.org/mtproto/TL-combinators#conditional-fields Flags bin.Fields - // ForceLargeMedia field of InputMediaWebPage. + // If set, specifies that a large media preview should be used. ForceLargeMedia bool - // ForceSmallMedia field of InputMediaWebPage. + // If set, specifies that a small media preview should be used. ForceSmallMedia bool - // Optional field of InputMediaWebPage. + // If not set, a WEBPAGE_NOT_FOUND RPC error will be emitted if a webpage preview cannot + // be generated for the specified url; otherwise, no error will be emitted (unless the + // provided message is also empty, in which case a MESSAGE_EMPTY will be emitted, + // instead). Optional bool - // URL field of InputMediaWebPage. + // The URL to use for the link preview. URL string } diff --git a/tg/tl_input_reply_to_gen.go b/tg/tl_input_reply_to_gen.go index a07df294be..e5efa9b198 100644 --- a/tg/tl_input_reply_to_gen.go +++ b/tg/tl_input_reply_to_gen.go @@ -51,22 +51,26 @@ type InputReplyToMessage struct { // // Use SetTopMsgID and GetTopMsgID helpers. TopMsgID int - // ReplyToPeerID field of InputReplyToMessage. + // Used to reply to messages sent to another chat (specified here), can only be used for + // non-protected chats and messages. // // Use SetReplyToPeerID and GetReplyToPeerID helpers. ReplyToPeerID InputPeerClass - // QuoteText field of InputReplyToMessage. + // Used to quote-reply to only a certain section (specified here) of the original message. // // Use SetQuoteText and GetQuoteText helpers. QuoteText string - // Message entities for styled text¹ + // Message entities for styled text¹ from the quote_text field. // // Links: // 1) https://core.telegram.org/api/entities // // Use SetQuoteEntities and GetQuoteEntities helpers. QuoteEntities []MessageEntityClass - // QuoteOffset field of InputReplyToMessage. + // Offset of the message quote_text within the original message (in UTF-16 code units¹). + // + // Links: + // 1) https://core.telegram.org/api/entities#entity-length // // Use SetQuoteOffset and GetQuoteOffset helpers. QuoteOffset int diff --git a/tg/tl_input_store_payment_purpose_gen.go b/tg/tl_input_store_payment_purpose_gen.go index 20ad545a2a..31b8cfdc27 100644 --- a/tg/tl_input_store_payment_purpose_gen.go +++ b/tg/tl_input_store_payment_purpose_gen.go @@ -435,6 +435,12 @@ func (i *InputStorePaymentGiftPremium) GetAmount() (value int64) { } // InputStorePaymentPremiumGiftCode represents TL type `inputStorePaymentPremiumGiftCode#a3805f3f`. +// Used to gift Telegram Premium¹ subscriptions only to some specific subscribers of a +// channel or to some of our contacts, see here »² for more info on giveaways and gifts. +// +// Links: +// 1. https://core.telegram.org/api/premium +// 2. https://core.telegram.org/api/giveaways // // See https://core.telegram.org/constructor/inputStorePaymentPremiumGiftCode for reference. type InputStorePaymentPremiumGiftCode struct { @@ -443,15 +449,35 @@ type InputStorePaymentPremiumGiftCode struct { // Links: // 1) https://core.telegram.org/mtproto/TL-combinators#conditional-fields Flags bin.Fields - // Users field of InputStorePaymentPremiumGiftCode. + // The users that will receive the Telegram Premium¹ subscriptions. + // + // Links: + // 1) https://core.telegram.org/api/premium Users []InputUserClass - // BoostPeer field of InputStorePaymentPremiumGiftCode. + // If set, the gifts will be sent on behalf of a channel we are an admin of, which will + // also assign some boosts¹ to it. Otherwise, the gift will be sent directly from the + // currently logged in users, and we will gain some extra boost slots². See here »³ + // for more info on giveaways and gifts. + // + // Links: + // 1) https://core.telegram.org/api/boost + // 2) https://core.telegram.org/api/boost + // 3) https://core.telegram.org/api/giveaways // // Use SetBoostPeer and GetBoostPeer helpers. BoostPeer InputPeerClass - // Currency field of InputStorePaymentPremiumGiftCode. + // Three-letter ISO 4217 currency¹ code + // + // Links: + // 1) https://core.telegram.org/bots/payments#supported-currencies Currency string - // Amount field of InputStorePaymentPremiumGiftCode. + // Total price in the smallest units of the currency (integer, not float/double). For + // example, for a price of US$ 1.45 pass amount = 145. See the exp parameter in + // currencies.json¹, it shows the number of digits past the decimal point for each + // currency (2 for the majority of currencies). + // + // Links: + // 1) https://core.telegram.org/bots/payments/currencies.json Amount int64 } @@ -720,6 +746,10 @@ func (i *InputStorePaymentPremiumGiftCode) MapUsers() (value InputUserClassArray } // InputStorePaymentPremiumGiveaway represents TL type `inputStorePaymentPremiumGiveaway#160544ca`. +// Used to pay for a giveaway, see here »¹ for more info. +// +// Links: +// 1. https://core.telegram.org/api/giveaways // // See https://core.telegram.org/constructor/inputStorePaymentPremiumGiveaway for reference. type InputStorePaymentPremiumGiveaway struct { @@ -728,17 +758,29 @@ type InputStorePaymentPremiumGiveaway struct { // Links: // 1) https://core.telegram.org/mtproto/TL-combinators#conditional-fields Flags bin.Fields - // OnlyNewSubscribers field of InputStorePaymentPremiumGiveaway. + // If set, only new subscribers starting from the giveaway creation date will be able to + // participate to the giveaway. OnlyNewSubscribers bool // WinnersAreVisible field of InputStorePaymentPremiumGiveaway. WinnersAreVisible bool - // BoostPeer field of InputStorePaymentPremiumGiveaway. + // The channel starting the giveaway, that the user must join to participate, that will + // receive the giveaway boosts¹; see here »² for more info on giveaways. + // + // Links: + // 1) https://core.telegram.org/api/boost + // 2) https://core.telegram.org/api/giveaways BoostPeer InputPeerClass - // AdditionalPeers field of InputStorePaymentPremiumGiveaway. + // Additional channels that the user must join to participate to the giveaway can be + // specified here. // // Use SetAdditionalPeers and GetAdditionalPeers helpers. AdditionalPeers []InputPeerClass - // CountriesISO2 field of InputStorePaymentPremiumGiveaway. + // The set of users that can participate to the giveaway can be restricted by passing + // here an explicit whitelist of up to giveaway_countries_max¹ countries, specified as + // two-letter ISO 3166-1 alpha-2 country codes. + // + // Links: + // 1) https://core.telegram.org/api/config#giveaway-countries-max // // Use SetCountriesISO2 and GetCountriesISO2 helpers. CountriesISO2 []string @@ -746,13 +788,27 @@ type InputStorePaymentPremiumGiveaway struct { // // Use SetPrizeDescription and GetPrizeDescription helpers. PrizeDescription string - // RandomID field of InputStorePaymentPremiumGiveaway. + // Random ID to avoid resending the giveaway RandomID int64 - // UntilDate field of InputStorePaymentPremiumGiveaway. + // The end date of the giveaway, must be at most giveaway_period_max¹ seconds in the + // future; see here »² for more info on giveaways. + // + // Links: + // 1) https://core.telegram.org/api/config#giveaway-period-max + // 2) https://core.telegram.org/api/giveaways UntilDate int - // Currency field of InputStorePaymentPremiumGiveaway. + // Three-letter ISO 4217 currency¹ code + // + // Links: + // 1) https://core.telegram.org/bots/payments#supported-currencies Currency string - // Amount field of InputStorePaymentPremiumGiveaway. + // Total price in the smallest units of the currency (integer, not float/double). For + // example, for a price of US$ 1.45 pass amount = 145. See the exp parameter in + // currencies.json¹, it shows the number of digits past the decimal point for each + // currency (2 for the majority of currencies). + // + // Links: + // 1) https://core.telegram.org/bots/payments/currencies.json Amount int64 } diff --git a/tg/tl_message_action_gen.go b/tg/tl_message_action_gen.go index 29aa3ac695..020c1bb98c 100644 --- a/tg/tl_message_action_gen.go +++ b/tg/tl_message_action_gen.go @@ -6657,9 +6657,21 @@ type MessageActionSetChatWallPaper struct { // Links: // 1) https://core.telegram.org/mtproto/TL-combinators#conditional-fields Flags bin.Fields - // Same field of MessageActionSetChatWallPaper. + // If set, indicates the user applied a wallpaper »¹ previously sent by the other user + // in a messageActionSetChatWallPaper² message. + // + // Links: + // 1) https://core.telegram.org/api/wallpapers + // 2) https://core.telegram.org/constructor/messageActionSetChatWallPaper Same bool - // ForBoth field of MessageActionSetChatWallPaper. + // If set, indicates the wallpaper was forcefully applied for both sides, without + // explicit confirmation from the other side. If the message is incoming, and we did not + // like the new wallpaper the other user has chosen for us, we can re-set our previous + // wallpaper just on our side, by invoking messages.setChatWallPaper¹, providing only + // the revert flag (and obviously the peer parameter). + // + // Links: + // 1) https://core.telegram.org/method/messages.setChatWallPaper ForBoth bool // New wallpaper¹ // @@ -6882,6 +6894,10 @@ func (m *MessageActionSetChatWallPaper) GetWallpaper() (value WallPaperClass) { } // MessageActionGiftCode represents TL type `messageActionGiftCode#678c2e09`. +// Contains a Telegram Premium giftcode link¹. +// +// Links: +// 1. https://core.telegram.org/api/links#premium-giftcode-links // // See https://core.telegram.org/constructor/messageActionGiftCode for reference. type MessageActionGiftCode struct { @@ -6890,17 +6906,36 @@ type MessageActionGiftCode struct { // Links: // 1) https://core.telegram.org/mtproto/TL-combinators#conditional-fields Flags bin.Fields - // ViaGiveaway field of MessageActionGiftCode. + // If set, this gift code was received from a giveaway »¹ started by a channel we're + // subscribed to. + // + // Links: + // 1) https://core.telegram.org/api/giveaways ViaGiveaway bool - // Unclaimed field of MessageActionGiftCode. + // If set, the link was not redeemed¹ yet. + // + // Links: + // 1) https://core.telegram.org/api/links#premium-giftcode-links Unclaimed bool - // BoostPeer field of MessageActionGiftCode. + // Identifier of the channel that created the gift code either directly or through a + // giveaway¹: if we import this giftcode link, we will also automatically boost² this + // channel. + // + // Links: + // 1) https://core.telegram.org/api/giveaways + // 2) https://core.telegram.org/api/boost // // Use SetBoostPeer and GetBoostPeer helpers. BoostPeer PeerClass - // Months field of MessageActionGiftCode. + // Duration in months of the gifted Telegram Premium subscription¹. + // + // Links: + // 1) https://core.telegram.org/api/premium Months int - // Slug field of MessageActionGiftCode. + // Slug of the Telegram Premium giftcode link¹ + // + // Links: + // 1) https://core.telegram.org/api/links#premium-giftcode-links Slug string // Currency field of MessageActionGiftCode. // @@ -7379,6 +7414,10 @@ func (m *MessageActionGiftCode) GetCryptoAmount() (value int64, ok bool) { } // MessageActionGiveawayLaunch represents TL type `messageActionGiveawayLaunch#332ba9ed`. +// A giveaway¹ was started. +// +// Links: +// 1. https://core.telegram.org/api/giveaways // // See https://core.telegram.org/constructor/messageActionGiveawayLaunch for reference. type MessageActionGiveawayLaunch struct { @@ -7480,12 +7519,16 @@ func (m *MessageActionGiveawayLaunch) DecodeBare(b *bin.Buffer) error { } // MessageActionGiveawayResults represents TL type `messageActionGiveawayResults#2a9fadc5`. +// A giveaway¹ has ended. +// +// Links: +// 1. https://core.telegram.org/api/giveaways // // See https://core.telegram.org/constructor/messageActionGiveawayResults for reference. type MessageActionGiveawayResults struct { - // WinnersCount field of MessageActionGiveawayResults. + // Number of winners in the giveaway WinnersCount int - // UnclaimedCount field of MessageActionGiveawayResults. + // Number of undistributed prizes UnclaimedCount int } diff --git a/tg/tl_message_media_gen.go b/tg/tl_message_media_gen.go index 2638cd9c9a..dc104e0ffb 100644 --- a/tg/tl_message_media_gen.go +++ b/tg/tl_message_media_gen.go @@ -1249,13 +1249,19 @@ type MessageMediaWebPage struct { // Links: // 1) https://core.telegram.org/mtproto/TL-combinators#conditional-fields Flags bin.Fields - // ForceLargeMedia field of MessageMediaWebPage. + // If set, specifies that a large media preview should be used. ForceLargeMedia bool - // ForceSmallMedia field of MessageMediaWebPage. + // If set, specifies that a small media preview should be used. ForceSmallMedia bool - // Manual field of MessageMediaWebPage. + // If set, indicates that the URL used for the webpage preview was specified manually + // using inputMediaWebPage¹, and may not be related to any of the URLs specified in the + // message. + // + // Links: + // 1) https://core.telegram.org/constructor/inputMediaWebPage Manual bool - // Safe field of MessageMediaWebPage. + // If set, the webpage can be opened directly without user confirmation; otherwise, user + // confirmation is required, showing the exact URL that will be opened. Safe bool // Webpage preview Webpage WebPageClass @@ -3365,6 +3371,10 @@ func (m *MessageMediaStory) GetStory() (value StoryItemClass, ok bool) { } // MessageMediaGiveaway represents TL type `messageMediaGiveaway#daad85b0`. +// Contains info about a giveaway, see here »¹ for more info. +// +// Links: +// 1. https://core.telegram.org/api/giveaways // // See https://core.telegram.org/constructor/messageMediaGiveaway for reference. type MessageMediaGiveaway struct { @@ -3373,13 +3383,16 @@ type MessageMediaGiveaway struct { // Links: // 1) https://core.telegram.org/mtproto/TL-combinators#conditional-fields Flags bin.Fields - // OnlyNewSubscribers field of MessageMediaGiveaway. + // If set, only new subscribers starting from the giveaway creation date will be able to + // participate to the giveaway. OnlyNewSubscribers bool // WinnersAreVisible field of MessageMediaGiveaway. WinnersAreVisible bool - // Channels field of MessageMediaGiveaway. + // The channels that the user must join to participate in the giveaway. Channels []int64 - // CountriesISO2 field of MessageMediaGiveaway. + // If set, only users residing in these countries can participate in the giveaway, + // (specified as a list of two-letter ISO 3166-1 alpha-2 country codes); otherwise there + // are no country-based limitations. // // Use SetCountriesISO2 and GetCountriesISO2 helpers. CountriesISO2 []string @@ -3387,11 +3400,17 @@ type MessageMediaGiveaway struct { // // Use SetPrizeDescription and GetPrizeDescription helpers. PrizeDescription string - // Quantity field of MessageMediaGiveaway. + // Number of Telegram Premium¹ subscriptions given away. + // + // Links: + // 1) https://core.telegram.org/api/premium Quantity int - // Months field of MessageMediaGiveaway. + // Duration in months of each Telegram Premium¹ subscription in the giveaway. + // + // Links: + // 1) https://core.telegram.org/api/premium Months int - // UntilDate field of MessageMediaGiveaway. + // The end date of the giveaway. UntilDate int } diff --git a/tg/tl_message_reply_header_gen.go b/tg/tl_message_reply_header_gen.go index d3452eac90..8d3de3ba02 100644 --- a/tg/tl_message_reply_header_gen.go +++ b/tg/tl_message_reply_header_gen.go @@ -51,7 +51,7 @@ type MessageReplyHeader struct { // Links: // 1) https://core.telegram.org/api/forum#forum-topics ForumTopic bool - // Quote field of MessageReplyHeader. + // Whether this message is quoting a part of another message. Quote bool // ID of message to which this message is replying // @@ -65,11 +65,13 @@ type MessageReplyHeader struct { // // Use SetReplyToPeerID and GetReplyToPeerID helpers. ReplyToPeerID PeerClass - // ReplyFrom field of MessageReplyHeader. + // When replying to a message sent by a certain peer to another chat, contains info about + // the peer that originally sent the message to that other chat. // // Use SetReplyFrom and GetReplyFrom helpers. ReplyFrom MessageFwdHeader - // ReplyMedia field of MessageReplyHeader. + // When replying to a media sent by a certain peer to another chat, contains the media of + // the replied-to message. // // Use SetReplyMedia and GetReplyMedia helpers. ReplyMedia MessageMediaClass @@ -80,18 +82,21 @@ type MessageReplyHeader struct { // // Use SetReplyToTopID and GetReplyToTopID helpers. ReplyToTopID int - // QuoteText field of MessageReplyHeader. + // Used to quote-reply to only a certain section (specified here) of the original message. // // Use SetQuoteText and GetQuoteText helpers. QuoteText string - // Message entities for styled text¹ + // Message entities for styled text¹ from the quote_text field. // // Links: // 1) https://core.telegram.org/api/entities // // Use SetQuoteEntities and GetQuoteEntities helpers. QuoteEntities []MessageEntityClass - // QuoteOffset field of MessageReplyHeader. + // Offset of the message quote_text within the original message (in UTF-16 code units¹). + // + // Links: + // 1) https://core.telegram.org/api/entities#entity-length // // Use SetQuoteOffset and GetQuoteOffset helpers. QuoteOffset int diff --git a/tg/tl_messages_bot_app_gen.go b/tg/tl_messages_bot_app_gen.go index 3ef091cca7..5990a12f07 100644 --- a/tg/tl_messages_bot_app_gen.go +++ b/tg/tl_messages_bot_app_gen.go @@ -53,7 +53,7 @@ type MessagesBotApp struct { // Links: // 1) https://core.telegram.org/method/messages.requestAppWebView RequestWriteAccess bool - // HasSettings field of MessagesBotApp. + // Deprecated flag, can be ignored. HasSettings bool // Bot app information App BotAppClass diff --git a/tg/tl_messages_request_web_view_gen.go b/tg/tl_messages_request_web_view_gen.go index f4dae1624e..45e7ed4e67 100644 --- a/tg/tl_messages_request_web_view_gen.go +++ b/tg/tl_messages_request_web_view_gen.go @@ -612,6 +612,11 @@ func (r *MessagesRequestWebViewRequest) GetSendAs() (value InputPeerClass, ok bo // 1. https://core.telegram.org/bots/webapps // 2. https://core.telegram.org/method/messages.prolongWebView // +// Possible errors: +// +// 400 BOT_INVALID: This is not a valid bot. +// 400 PEER_ID_INVALID: The provided peer id is invalid. +// // See https://core.telegram.org/method/messages.requestWebView for reference. func (c *Client) MessagesRequestWebView(ctx context.Context, request *MessagesRequestWebViewRequest) (*WebViewResultURL, error) { var result WebViewResultURL diff --git a/tg/tl_messages_search_emoji_sticker_sets_gen.go b/tg/tl_messages_search_emoji_sticker_sets_gen.go index 9a0cca4258..6c1e7d9981 100644 --- a/tg/tl_messages_search_emoji_sticker_sets_gen.go +++ b/tg/tl_messages_search_emoji_sticker_sets_gen.go @@ -32,6 +32,10 @@ var ( ) // MessagesSearchEmojiStickerSetsRequest represents TL type `messages.searchEmojiStickerSets#92b4494c`. +// Search for custom emoji stickersets »¹ +// +// Links: +// 1. https://core.telegram.org/api/custom-emoji // // See https://core.telegram.org/method/messages.searchEmojiStickerSets for reference. type MessagesSearchEmojiStickerSetsRequest struct { @@ -40,9 +44,9 @@ type MessagesSearchEmojiStickerSetsRequest struct { // Links: // 1) https://core.telegram.org/mtproto/TL-combinators#conditional-fields Flags bin.Fields - // ExcludeFeatured field of MessagesSearchEmojiStickerSetsRequest. + // Exclude featured stickersets from results ExcludeFeatured bool - // Q field of MessagesSearchEmojiStickerSetsRequest. + // Query string Q string // Hash for pagination, for more info click here¹ // @@ -247,6 +251,10 @@ func (s *MessagesSearchEmojiStickerSetsRequest) GetHash() (value int64) { } // MessagesSearchEmojiStickerSets invokes method messages.searchEmojiStickerSets#92b4494c returning error if any. +// Search for custom emoji stickersets »¹ +// +// Links: +// 1. https://core.telegram.org/api/custom-emoji // // See https://core.telegram.org/method/messages.searchEmojiStickerSets for reference. func (c *Client) MessagesSearchEmojiStickerSets(ctx context.Context, request *MessagesSearchEmojiStickerSetsRequest) (MessagesFoundStickerSetsClass, error) { diff --git a/tg/tl_messages_send_media_gen.go b/tg/tl_messages_send_media_gen.go index 95d708e248..13abe0833d 100644 --- a/tg/tl_messages_send_media_gen.go +++ b/tg/tl_messages_send_media_gen.go @@ -800,6 +800,7 @@ func (s *MessagesSendMediaRequest) MapEntities() (value MessageEntityClassArray, // 403 CHAT_SEND_GIFS_FORBIDDEN: You can't send gifs in this chat. // 403 CHAT_SEND_MEDIA_FORBIDDEN: You can't send media in this chat. // 403 CHAT_SEND_PHOTOS_FORBIDDEN: You can't send photos in this chat. +// 403 CHAT_SEND_PLAIN_FORBIDDEN: You can't send non-media (text) messages in this chat. // 403 CHAT_SEND_POLL_FORBIDDEN: You can't send polls in this chat. // 403 CHAT_SEND_STICKERS_FORBIDDEN: You can't send stickers in this chat. // 403 CHAT_SEND_VIDEOS_FORBIDDEN: You can't send videos in this chat. @@ -821,6 +822,7 @@ func (s *MessagesSendMediaRequest) MapEntities() (value MessageEntityClassArray, // 400 MEDIA_CAPTION_TOO_LONG: The caption is too long. // 400 MEDIA_EMPTY: The provided media object is invalid. // 400 MEDIA_INVALID: Media invalid. +// 400 MESSAGE_EMPTY: The provided message is empty. // 400 MSG_ID_INVALID: Invalid message ID provided. // 400 PAYMENT_PROVIDER_INVALID: The specified payment provider is invalid. // 400 PEER_ID_INVALID: The provided peer id is invalid. @@ -857,6 +859,8 @@ func (s *MessagesSendMediaRequest) MapEntities() (value MessageEntityClassArray, // 400 WEBDOCUMENT_MIME_INVALID: Invalid webdocument mime type provided. // 400 WEBPAGE_CURL_FAILED: Failure while fetching the webpage with cURL. // 400 WEBPAGE_MEDIA_EMPTY: Webpage media empty. +// 400 WEBPAGE_NOT_FOUND: A preview for the specified webpage url could not be generated. +// 400 WEBPAGE_URL_INVALID: The specified webpage url is invalid. // 400 YOU_BLOCKED_USER: You blocked this user. // // See https://core.telegram.org/method/messages.sendMedia for reference. diff --git a/tg/tl_messages_send_message_gen.go b/tg/tl_messages_send_message_gen.go index 125396043c..940b30d99a 100644 --- a/tg/tl_messages_send_message_gen.go +++ b/tg/tl_messages_send_message_gen.go @@ -821,14 +821,14 @@ func (s *MessagesSendMessageRequest) MapEntities() (value MessageEntityClassArra // 400 REPLY_MARKUP_INVALID: The provided reply markup is invalid. // 400 REPLY_MARKUP_TOO_LONG: The specified reply_markup is too long. // 400 REPLY_TO_INVALID: The specified reply_to field is invalid. -// 400 REPLY_TO_USER_INVALID: +// 400 REPLY_TO_USER_INVALID: The replied-to user is invalid. // 400 SCHEDULE_BOT_NOT_ALLOWED: Bots cannot schedule messages. // 400 SCHEDULE_DATE_TOO_LATE: You can't schedule a message this far in the future. // 400 SCHEDULE_STATUS_PRIVATE: Can't schedule until user is online, if the user's last seen timestamp is hidden by their privacy settings. // 400 SCHEDULE_TOO_MUCH: There are too many scheduled messages. // 400 SEND_AS_PEER_INVALID: You can't send messages as the specified peer. // 420 SLOWMODE_WAIT_%d: Slowmode is enabled in this chat: wait %d seconds before sending another message to this chat. -// 400 STORY_ID_INVALID: +// 400 STORY_ID_INVALID: The specified story ID is invalid. // 406 TOPIC_CLOSED: This topic was closed, you can't send messages to it anymore. // 406 TOPIC_DELETED: The specified topic was deleted. // 400 USER_BANNED_IN_CHANNEL: You're banned from sending messages in supergroups/channels. diff --git a/tg/tl_messages_send_reaction_gen.go b/tg/tl_messages_send_reaction_gen.go index 62c334c80b..a3cacad82c 100644 --- a/tg/tl_messages_send_reaction_gen.go +++ b/tg/tl_messages_send_reaction_gen.go @@ -380,7 +380,7 @@ func (s *MessagesSendReactionRequest) MapReaction() (value ReactionClassArray, o // 400 CHANNEL_INVALID: The provided channel is invalid. // 400 CHANNEL_PRIVATE: You haven't joined this channel/supergroup. // 403 CHAT_WRITE_FORBIDDEN: You can't write in this chat. -// 400 CUSTOM_REACTIONS_TOO_MANY: +// 400 CUSTOM_REACTIONS_TOO_MANY: Too many custom reactions were specified. // 400 MESSAGE_ID_INVALID: The provided message id is invalid. // 400 MESSAGE_NOT_MODIFIED: The provided message data is identical to the previous message data, the message wasn't modified. // 400 MSG_ID_INVALID: Invalid message ID provided. diff --git a/tg/tl_messages_send_screenshot_notification_gen.go b/tg/tl_messages_send_screenshot_notification_gen.go index cc8f190de1..7596eabf15 100644 --- a/tg/tl_messages_send_screenshot_notification_gen.go +++ b/tg/tl_messages_send_screenshot_notification_gen.go @@ -233,7 +233,7 @@ func (s *MessagesSendScreenshotNotificationRequest) GetRandomID() (value int64) // // 400 INPUT_USER_DEACTIVATED: The specified user was deleted. // 400 PEER_ID_INVALID: The provided peer id is invalid. -// 400 STORY_ID_INVALID: +// 400 STORY_ID_INVALID: The specified story ID is invalid. // 400 YOU_BLOCKED_USER: You blocked this user. // // See https://core.telegram.org/method/messages.sendScreenshotNotification for reference. diff --git a/tg/tl_messages_set_chat_wall_paper_gen.go b/tg/tl_messages_set_chat_wall_paper_gen.go index 3a8ca7e4a0..613f8eb2f2 100644 --- a/tg/tl_messages_set_chat_wall_paper_gen.go +++ b/tg/tl_messages_set_chat_wall_paper_gen.go @@ -441,7 +441,7 @@ func (s *MessagesSetChatWallPaperRequest) GetID() (value int, ok bool) { // // 400 PEER_ID_INVALID: The provided peer id is invalid. // 400 WALLPAPER_INVALID: The specified wallpaper is invalid. -// 400 WALLPAPER_NOT_FOUND: +// 400 WALLPAPER_NOT_FOUND: The specified wallpaper could not be found. // // See https://core.telegram.org/method/messages.setChatWallPaper for reference. // Can be used by bots. diff --git a/tg/tl_messages_transcribed_audio_gen.go b/tg/tl_messages_transcribed_audio_gen.go index 730565dacd..ac2e083eb7 100644 --- a/tg/tl_messages_transcribed_audio_gen.go +++ b/tg/tl_messages_transcribed_audio_gen.go @@ -55,11 +55,21 @@ type MessagesTranscribedAudio struct { TranscriptionID int64 // Transcripted text Text string - // TrialRemainsNum field of MessagesTranscribedAudio. + // For non-Premium¹ users, this flag will be set, indicating the remaining + // transcriptions in the free trial period. + // + // Links: + // 1) https://core.telegram.org/api/premium // // Use SetTrialRemainsNum and GetTrialRemainsNum helpers. TrialRemainsNum int - // TrialRemainsUntilDate field of MessagesTranscribedAudio. + // For non-Premium¹ users, this flag will be set, indicating the date when the + // trial_remains_num counter will be reset to the maximum value of + // transcribe_audio_trial_weekly_number². + // + // Links: + // 1) https://core.telegram.org/api/premium + // 2) https://core.telegram.org/api/config#transcribe-audio-trial-weekly-number // // Use SetTrialRemainsUntilDate and GetTrialRemainsUntilDate helpers. TrialRemainsUntilDate int diff --git a/tg/tl_messages_update_dialog_filter_gen.go b/tg/tl_messages_update_dialog_filter_gen.go index 8d37704ca0..92120c93d3 100644 --- a/tg/tl_messages_update_dialog_filter_gen.go +++ b/tg/tl_messages_update_dialog_filter_gen.go @@ -252,7 +252,7 @@ func (u *MessagesUpdateDialogFilterRequest) GetFilter() (value DialogFilterClass // // Possible errors: // -// 400 CHATLIST_EXCLUDE_INVALID: +// 400 CHATLIST_EXCLUDE_INVALID: The specified exclude_peers are invalid. // 400 CHAT_ID_INVALID: The provided chat id is invalid. // 400 FILTER_ID_INVALID: The specified filter ID is invalid. // 400 FILTER_INCLUDE_EMPTY: The include_peers vector of the filter is empty. diff --git a/tg/tl_messages_web_page_gen.go b/tg/tl_messages_web_page_gen.go index 2849bc7bec..12c41738c0 100644 --- a/tg/tl_messages_web_page_gen.go +++ b/tg/tl_messages_web_page_gen.go @@ -32,14 +32,15 @@ var ( ) // MessagesWebPage represents TL type `messages.webPage#fd5e12bd`. +// Represents an Instant View webpage. // // See https://core.telegram.org/constructor/messages.webPage for reference. type MessagesWebPage struct { - // Webpage field of MessagesWebPage. + // The instant view webpage. Webpage WebPageClass - // Chats field of MessagesWebPage. + // Chats mentioned in the webpage. Chats []ChatClass - // Users field of MessagesWebPage. + // Users mentioned in the webpage. Users []UserClass } diff --git a/tg/tl_my_boost_gen.go b/tg/tl_my_boost_gen.go index d43b6abef0..94d0fdb202 100644 --- a/tg/tl_my_boost_gen.go +++ b/tg/tl_my_boost_gen.go @@ -32,6 +32,10 @@ var ( ) // MyBoost represents TL type `myBoost#c448415c`. +// Contains information about a single boost slot »¹. +// +// Links: +// 1. https://core.telegram.org/api/boost // // See https://core.telegram.org/constructor/myBoost for reference. type MyBoost struct { @@ -40,17 +44,25 @@ type MyBoost struct { // Links: // 1) https://core.telegram.org/mtproto/TL-combinators#conditional-fields Flags bin.Fields - // Slot field of MyBoost. + // Boost slot ID »¹ + // + // Links: + // 1) https://core.telegram.org/api/boost Slot int - // Peer field of MyBoost. + // If set, indicates this slot is currently occupied, i.e. we are boosting¹ this peer. + // Note that we can assign multiple boost slots to the same peer. + // + // Links: + // 1) https://core.telegram.org/api/boost // // Use SetPeer and GetPeer helpers. Peer PeerClass - // Date field of MyBoost. + // When (unixtime) we started boosting the peer, 0 otherwise. Date int - // Expires field of MyBoost. + // Indicates the (unixtime) expiration date of the boost in peer (0 if peer is not set). Expires int - // CooldownUntilDate field of MyBoost. + // If peer is set, indicates the (unixtime) date after which this boost can be reassigned + // to another channel. // // Use SetCooldownUntilDate and GetCooldownUntilDate helpers. CooldownUntilDate int diff --git a/tg/tl_payments_apply_gift_code_gen.go b/tg/tl_payments_apply_gift_code_gen.go index ecf94ec85f..69bf582b1c 100644 --- a/tg/tl_payments_apply_gift_code_gen.go +++ b/tg/tl_payments_apply_gift_code_gen.go @@ -32,10 +32,14 @@ var ( ) // PaymentsApplyGiftCodeRequest represents TL type `payments.applyGiftCode#f6e26854`. +// Apply a Telegram Premium giftcode »¹ +// +// Links: +// 1. https://core.telegram.org/api/giveaways // // See https://core.telegram.org/method/payments.applyGiftCode for reference. type PaymentsApplyGiftCodeRequest struct { - // Slug field of PaymentsApplyGiftCodeRequest. + // The code to apply Slug string } @@ -161,6 +165,10 @@ func (a *PaymentsApplyGiftCodeRequest) GetSlug() (value string) { } // PaymentsApplyGiftCode invokes method payments.applyGiftCode#f6e26854 returning error if any. +// Apply a Telegram Premium giftcode »¹ +// +// Links: +// 1. https://core.telegram.org/api/giveaways // // Possible errors: // diff --git a/tg/tl_payments_check_gift_code_gen.go b/tg/tl_payments_check_gift_code_gen.go index 6b88d94907..e60e57b0e0 100644 --- a/tg/tl_payments_check_gift_code_gen.go +++ b/tg/tl_payments_check_gift_code_gen.go @@ -32,10 +32,14 @@ var ( ) // PaymentsCheckGiftCodeRequest represents TL type `payments.checkGiftCode#8e51b4c1`. +// Obtain information about a Telegram Premium giftcode »¹ +// +// Links: +// 1. https://core.telegram.org/api/giveaways // // See https://core.telegram.org/method/payments.checkGiftCode for reference. type PaymentsCheckGiftCodeRequest struct { - // Slug field of PaymentsCheckGiftCodeRequest. + // The giftcode to check Slug string } @@ -161,10 +165,14 @@ func (c *PaymentsCheckGiftCodeRequest) GetSlug() (value string) { } // PaymentsCheckGiftCode invokes method payments.checkGiftCode#8e51b4c1 returning error if any. +// Obtain information about a Telegram Premium giftcode »¹ +// +// Links: +// 1. https://core.telegram.org/api/giveaways // // Possible errors: // -// 400 GIFT_SLUG_INVALID: +// 400 GIFT_SLUG_INVALID: The specified slug is invalid. // // See https://core.telegram.org/method/payments.checkGiftCode for reference. func (c *Client) PaymentsCheckGiftCode(ctx context.Context, slug string) (*PaymentsCheckedGiftCode, error) { diff --git a/tg/tl_payments_checked_gift_code_gen.go b/tg/tl_payments_checked_gift_code_gen.go index 812f77e411..04dae9314a 100644 --- a/tg/tl_payments_checked_gift_code_gen.go +++ b/tg/tl_payments_checked_gift_code_gen.go @@ -32,6 +32,10 @@ var ( ) // PaymentsCheckedGiftCode represents TL type `payments.checkedGiftCode#284a1096`. +// Contains info about a Telegram Premium giftcode link¹. +// +// Links: +// 1. https://core.telegram.org/api/links#premium-giftcode-links // // See https://core.telegram.org/constructor/payments.checkedGiftCode for reference. type PaymentsCheckedGiftCode struct { @@ -40,31 +44,37 @@ type PaymentsCheckedGiftCode struct { // Links: // 1) https://core.telegram.org/mtproto/TL-combinators#conditional-fields Flags bin.Fields - // ViaGiveaway field of PaymentsCheckedGiftCode. + // Whether this giftcode was created by a giveaway¹. + // + // Links: + // 1) https://core.telegram.org/api/giveaways ViaGiveaway bool - // FromID field of PaymentsCheckedGiftCode. + // The peer that created the gift code. // // Use SetFromID and GetFromID helpers. FromID PeerClass - // GiveawayMsgID field of PaymentsCheckedGiftCode. + // Message ID of the giveaway in the channel specified in from_id. // // Use SetGiveawayMsgID and GetGiveawayMsgID helpers. GiveawayMsgID int - // ToID field of PaymentsCheckedGiftCode. + // The destination user of the gift. // // Use SetToID and GetToID helpers. ToID int64 - // Date field of PaymentsCheckedGiftCode. + // Creation date of the gift code. Date int - // Months field of PaymentsCheckedGiftCode. + // Duration in months of the gifted Telegram Premium¹ subscription. + // + // Links: + // 1) https://core.telegram.org/api/premium Months int - // UsedDate field of PaymentsCheckedGiftCode. + // When was the giftcode imported, if it was imported. // // Use SetUsedDate and GetUsedDate helpers. UsedDate int - // Chats field of PaymentsCheckedGiftCode. + // Mentioned chats Chats []ChatClass - // Users field of PaymentsCheckedGiftCode. + // Mentioned users Users []UserClass } diff --git a/tg/tl_payments_get_giveaway_info_gen.go b/tg/tl_payments_get_giveaway_info_gen.go index 7e6ec8604f..0c3496d87a 100644 --- a/tg/tl_payments_get_giveaway_info_gen.go +++ b/tg/tl_payments_get_giveaway_info_gen.go @@ -32,12 +32,19 @@ var ( ) // PaymentsGetGiveawayInfoRequest represents TL type `payments.getGiveawayInfo#f4239425`. +// Obtain information about a Telegram Premium giveaway »¹. +// +// Links: +// 1. https://core.telegram.org/api/giveaways // // See https://core.telegram.org/method/payments.getGiveawayInfo for reference. type PaymentsGetGiveawayInfoRequest struct { - // Peer field of PaymentsGetGiveawayInfoRequest. + // The peer where the giveaway was posted. Peer InputPeerClass - // MsgID field of PaymentsGetGiveawayInfoRequest. + // Message ID of the messageActionGiveawayLaunch¹ service message + // + // Links: + // 1) https://core.telegram.org/constructor/messageActionGiveawayLaunch MsgID int } @@ -193,6 +200,10 @@ func (g *PaymentsGetGiveawayInfoRequest) GetMsgID() (value int) { } // PaymentsGetGiveawayInfo invokes method payments.getGiveawayInfo#f4239425 returning error if any. +// Obtain information about a Telegram Premium giveaway »¹. +// +// Links: +// 1. https://core.telegram.org/api/giveaways // // Possible errors: // diff --git a/tg/tl_payments_get_payment_form_gen.go b/tg/tl_payments_get_payment_form_gen.go index 3730887696..0e2ab59d7a 100644 --- a/tg/tl_payments_get_payment_form_gen.go +++ b/tg/tl_payments_get_payment_form_gen.go @@ -244,7 +244,10 @@ func (g *PaymentsGetPaymentFormRequest) GetThemeParams() (value DataJSON, ok boo // // Possible errors: // +// 400 BOOST_PEER_INVALID: The specified boost_peer is invalid. // 400 MESSAGE_ID_INVALID: The provided message id is invalid. +// 400 SLUG_INVALID: The specified invoice slug is invalid. +// 400 UNTIL_DATE_INVALID: Invalid until date provided. // // See https://core.telegram.org/method/payments.getPaymentForm for reference. func (c *Client) PaymentsGetPaymentForm(ctx context.Context, request *PaymentsGetPaymentFormRequest) (*PaymentsPaymentForm, error) { diff --git a/tg/tl_payments_get_premium_gift_code_options_gen.go b/tg/tl_payments_get_premium_gift_code_options_gen.go index ac63eb45f0..e2b566ebd5 100644 --- a/tg/tl_payments_get_premium_gift_code_options_gen.go +++ b/tg/tl_payments_get_premium_gift_code_options_gen.go @@ -32,6 +32,10 @@ var ( ) // PaymentsGetPremiumGiftCodeOptionsRequest represents TL type `payments.getPremiumGiftCodeOptions#2757ba54`. +// Obtain a list of Telegram Premium giveaway/gift code »¹ options. +// +// Links: +// 1. https://core.telegram.org/api/giveaways // // See https://core.telegram.org/method/payments.getPremiumGiftCodeOptions for reference. type PaymentsGetPremiumGiftCodeOptionsRequest struct { @@ -40,7 +44,7 @@ type PaymentsGetPremiumGiftCodeOptionsRequest struct { // Links: // 1) https://core.telegram.org/mtproto/TL-combinators#conditional-fields Flags bin.Fields - // BoostPeer field of PaymentsGetPremiumGiftCodeOptionsRequest. + // The channel that will start the giveaway // // Use SetBoostPeer and GetBoostPeer helpers. BoostPeer InputPeerClass @@ -208,6 +212,10 @@ func (g *PaymentsGetPremiumGiftCodeOptionsRequest) GetBoostPeer() (value InputPe } // PaymentsGetPremiumGiftCodeOptions invokes method payments.getPremiumGiftCodeOptions#2757ba54 returning error if any. +// Obtain a list of Telegram Premium giveaway/gift code »¹ options. +// +// Links: +// 1. https://core.telegram.org/api/giveaways // // See https://core.telegram.org/method/payments.getPremiumGiftCodeOptions for reference. func (c *Client) PaymentsGetPremiumGiftCodeOptions(ctx context.Context, request *PaymentsGetPremiumGiftCodeOptionsRequest) ([]PremiumGiftCodeOption, error) { diff --git a/tg/tl_payments_giveaway_info_gen.go b/tg/tl_payments_giveaway_info_gen.go index 47bce0dc8e..b5ba745431 100644 --- a/tg/tl_payments_giveaway_info_gen.go +++ b/tg/tl_payments_giveaway_info_gen.go @@ -32,6 +32,15 @@ var ( ) // PaymentsGiveawayInfo represents TL type `payments.giveawayInfo#4367daa0`. +// Contains info about an ongoing giveaway¹. +// If neither the participating, joined_too_early_date, admin_disallowed_chat_id or +// disallowed_country flags are set, the user is not currently participating in the +// giveaway but could participate by joining all the channels specified in the +// messageMediaGiveaway¹.channels field. +// +// Links: +// 1. https://core.telegram.org/api/giveaways +// 2. https://core.telegram.org/constructor/messageMediaGiveaway // // See https://core.telegram.org/constructor/payments.giveawayInfo for reference. type PaymentsGiveawayInfo struct { @@ -40,21 +49,27 @@ type PaymentsGiveawayInfo struct { // Links: // 1) https://core.telegram.org/mtproto/TL-combinators#conditional-fields Flags bin.Fields - // Participating field of PaymentsGiveawayInfo. + // The current user is participating in the giveaway. Participating bool - // PreparingResults field of PaymentsGiveawayInfo. + // If set, the giveaway has ended and the results are being prepared. PreparingResults bool - // StartDate field of PaymentsGiveawayInfo. + // When was the giveaway started StartDate int - // JoinedTooEarlyDate field of PaymentsGiveawayInfo. + // The current user can't participate in the giveaway, because they were already a member + // of the channel when the giveaway started, and the only_new_subscribers was set when + // starting the giveaway. // // Use SetJoinedTooEarlyDate and GetJoinedTooEarlyDate helpers. JoinedTooEarlyDate int - // AdminDisallowedChatID field of PaymentsGiveawayInfo. + // If set, the current user can't participate in the giveaway, because they are an + // administrator in one of the channels (ID specified in this flag) that created the + // giveaway. // // Use SetAdminDisallowedChatID and GetAdminDisallowedChatID helpers. AdminDisallowedChatID int64 - // DisallowedCountry field of PaymentsGiveawayInfo. + // If set, the current user can't participate in this giveaway, because their phone + // number is from the specified disallowed country (specified as a two-letter ISO 3166-1 + // alpha-2 country code). // // Use SetDisallowedCountry and GetDisallowedCountry helpers. DisallowedCountry string @@ -401,6 +416,10 @@ func (g *PaymentsGiveawayInfo) GetDisallowedCountry() (value string, ok bool) { } // PaymentsGiveawayInfoResults represents TL type `payments.giveawayInfoResults#cd5570`. +// A giveaway¹ has ended. +// +// Links: +// 1. https://core.telegram.org/api/giveaways // // See https://core.telegram.org/constructor/payments.giveawayInfoResults for reference. type PaymentsGiveawayInfoResults struct { @@ -409,21 +428,30 @@ type PaymentsGiveawayInfoResults struct { // Links: // 1) https://core.telegram.org/mtproto/TL-combinators#conditional-fields Flags bin.Fields - // Winner field of PaymentsGiveawayInfoResults. + // Whether we're one of the winners of this giveaway. Winner bool - // Refunded field of PaymentsGiveawayInfoResults. + // Whether the giveaway was canceled and was fully refunded. Refunded bool - // StartDate field of PaymentsGiveawayInfoResults. + // Start date of the giveaway StartDate int - // GiftCodeSlug field of PaymentsGiveawayInfoResults. + // If we're one of the winners of this giveaway, contains the Premium gift code¹, see + // here »² for more info on the full giveaway flow. + // + // Links: + // 1) https://core.telegram.org/api/links#premium-giftcode-links + // 2) https://core.telegram.org/api/giveaways // // Use SetGiftCodeSlug and GetGiftCodeSlug helpers. GiftCodeSlug string - // FinishDate field of PaymentsGiveawayInfoResults. + // End date of the giveaway. May be bigger than the end date specified in parameters of + // the giveaway. FinishDate int - // WinnersCount field of PaymentsGiveawayInfoResults. + // Number of winners in the giveaway WinnersCount int - // ActivatedCount field of PaymentsGiveawayInfoResults. + // Number of winners, which activated their gift codes¹. + // + // Links: + // 1) https://core.telegram.org/api/links#premium-giftcode-links ActivatedCount int } @@ -790,7 +818,7 @@ type PaymentsGiveawayInfoClass interface { // Zero returns true if current object has a zero value. Zero() bool - // StartDate field of PaymentsGiveawayInfo. + // When was the giveaway started GetStartDate() (value int) } diff --git a/tg/tl_payments_launch_prepaid_giveaway_gen.go b/tg/tl_payments_launch_prepaid_giveaway_gen.go index ce847fae98..e8752ec552 100644 --- a/tg/tl_payments_launch_prepaid_giveaway_gen.go +++ b/tg/tl_payments_launch_prepaid_giveaway_gen.go @@ -32,14 +32,18 @@ var ( ) // PaymentsLaunchPrepaidGiveawayRequest represents TL type `payments.launchPrepaidGiveaway#5ff58f20`. +// Launch a prepaid giveaway »¹. +// +// Links: +// 1. https://core.telegram.org/api/giveaways // // See https://core.telegram.org/method/payments.launchPrepaidGiveaway for reference. type PaymentsLaunchPrepaidGiveawayRequest struct { - // Peer field of PaymentsLaunchPrepaidGiveawayRequest. + // The peer where to launch the giveaway. Peer InputPeerClass - // GiveawayID field of PaymentsLaunchPrepaidGiveawayRequest. + // The prepaid giveaway ID. GiveawayID int64 - // Purpose field of PaymentsLaunchPrepaidGiveawayRequest. + // Giveway parameters Purpose InputStorePaymentPurposeClass } @@ -225,6 +229,10 @@ func (l *PaymentsLaunchPrepaidGiveawayRequest) GetPurpose() (value InputStorePay } // PaymentsLaunchPrepaidGiveaway invokes method payments.launchPrepaidGiveaway#5ff58f20 returning error if any. +// Launch a prepaid giveaway »¹. +// +// Links: +// 1. https://core.telegram.org/api/giveaways // // Possible errors: // diff --git a/tg/tl_peer_color_gen.go b/tg/tl_peer_color_gen.go index a0d5c32701..643fe84434 100644 --- a/tg/tl_peer_color_gen.go +++ b/tg/tl_peer_color_gen.go @@ -32,6 +32,10 @@ var ( ) // PeerColor represents TL type `peerColor#b54b5acf`. +// Represents a color palette »¹. +// +// Links: +// 1. https://core.telegram.org/api/colors // // See https://core.telegram.org/constructor/peerColor for reference. type PeerColor struct { @@ -40,11 +44,17 @@ type PeerColor struct { // Links: // 1) https://core.telegram.org/mtproto/TL-combinators#conditional-fields Flags bin.Fields - // Color field of PeerColor. + // Color palette ID, see here »¹ for more info. + // + // Links: + // 1) https://core.telegram.org/api/colors // // Use SetColor and GetColor helpers. Color int - // BackgroundEmojiID field of PeerColor. + // Custom emoji ID¹ used to generate the pattern. + // + // Links: + // 1) https://core.telegram.org/api/custom-emoji // // Use SetBackgroundEmojiID and GetBackgroundEmojiID helpers. BackgroundEmojiID int64 diff --git a/tg/tl_post_interaction_counters_gen.go b/tg/tl_post_interaction_counters_gen.go index 025ff5b2f0..5b2671f4f3 100644 --- a/tg/tl_post_interaction_counters_gen.go +++ b/tg/tl_post_interaction_counters_gen.go @@ -32,16 +32,17 @@ var ( ) // PostInteractionCountersMessage represents TL type `postInteractionCountersMessage#e7058e7f`. +// Interaction counters for a message. // // See https://core.telegram.org/constructor/postInteractionCountersMessage for reference. type PostInteractionCountersMessage struct { - // MsgID field of PostInteractionCountersMessage. + // Message ID MsgID int - // Views field of PostInteractionCountersMessage. + // Number of views Views int - // Forwards field of PostInteractionCountersMessage. + // Number of forwards to public channels Forwards int - // Reactions field of PostInteractionCountersMessage. + // Number of reactions Reactions int } @@ -247,16 +248,17 @@ func (p *PostInteractionCountersMessage) GetReactions() (value int) { } // PostInteractionCountersStory represents TL type `postInteractionCountersStory#8a480e27`. +// Interaction counters for a story. // // See https://core.telegram.org/constructor/postInteractionCountersStory for reference. type PostInteractionCountersStory struct { - // StoryID field of PostInteractionCountersStory. + // Story ID StoryID int - // Views field of PostInteractionCountersStory. + // Number of views Views int - // Forwards field of PostInteractionCountersStory. + // Number of forwards and reposts to public chats and channels Forwards int - // Reactions field of PostInteractionCountersStory. + // Number of reactions Reactions int } @@ -497,13 +499,13 @@ type PostInteractionCountersClass interface { // Zero returns true if current object has a zero value. Zero() bool - // Views field of PostInteractionCountersMessage. + // Number of views GetViews() (value int) - // Forwards field of PostInteractionCountersMessage. + // Number of forwards to public channels GetForwards() (value int) - // Reactions field of PostInteractionCountersMessage. + // Number of reactions GetReactions() (value int) } diff --git a/tg/tl_premium_apply_boost_gen.go b/tg/tl_premium_apply_boost_gen.go index b651ebd192..9135a61c47 100644 --- a/tg/tl_premium_apply_boost_gen.go +++ b/tg/tl_premium_apply_boost_gen.go @@ -32,6 +32,10 @@ var ( ) // PremiumApplyBoostRequest represents TL type `premium.applyBoost#6b7da746`. +// Apply one or more boosts »¹ to a peer. +// +// Links: +// 1. https://core.telegram.org/api/boost // // See https://core.telegram.org/method/premium.applyBoost for reference. type PremiumApplyBoostRequest struct { @@ -40,11 +44,14 @@ type PremiumApplyBoostRequest struct { // Links: // 1) https://core.telegram.org/mtproto/TL-combinators#conditional-fields Flags bin.Fields - // Slots field of PremiumApplyBoostRequest. + // Which boost slots¹ to assign to this peer. + // + // Links: + // 1) https://core.telegram.org/api/boost // // Use SetSlots and GetSlots helpers. Slots []int - // Peer field of PremiumApplyBoostRequest. + // The peer to boost. Peer InputPeerClass } @@ -248,10 +255,16 @@ func (a *PremiumApplyBoostRequest) GetPeer() (value InputPeerClass) { } // PremiumApplyBoost invokes method premium.applyBoost#6b7da746 returning error if any. +// Apply one or more boosts »¹ to a peer. +// +// Links: +// 1. https://core.telegram.org/api/boost // // Possible errors: // +// 400 BOOSTS_EMPTY: No boost slots were specified. // 400 PEER_ID_INVALID: The provided peer id is invalid. +// 400 SLOTS_EMPTY: The specified slot list is empty. // // See https://core.telegram.org/method/premium.applyBoost for reference. func (c *Client) PremiumApplyBoost(ctx context.Context, request *PremiumApplyBoostRequest) (*PremiumMyBoosts, error) { diff --git a/tg/tl_premium_boosts_list_gen.go b/tg/tl_premium_boosts_list_gen.go index 27bf994aed..90f4a54480 100644 --- a/tg/tl_premium_boosts_list_gen.go +++ b/tg/tl_premium_boosts_list_gen.go @@ -32,6 +32,10 @@ var ( ) // PremiumBoostsList represents TL type `premium.boostsList#86f8613c`. +// List of boosts¹ that were applied to a peer by multiple users. +// +// Links: +// 1. https://core.telegram.org/api/boost // // See https://core.telegram.org/constructor/premium.boostsList for reference. type PremiumBoostsList struct { @@ -40,15 +44,21 @@ type PremiumBoostsList struct { // Links: // 1) https://core.telegram.org/mtproto/TL-combinators#conditional-fields Flags bin.Fields - // Count field of PremiumBoostsList. + // Total number of results Count int - // Boosts field of PremiumBoostsList. + // Boosts¹ + // + // Links: + // 1) https://core.telegram.org/api/boost Boosts []Boost - // NextOffset field of PremiumBoostsList. + // Offset that can be used for pagination¹. + // + // Links: + // 1) https://core.telegram.org/api/offsets // // Use SetNextOffset and GetNextOffset helpers. NextOffset string - // Users field of PremiumBoostsList. + // Mentioned users Users []UserClass } diff --git a/tg/tl_premium_boosts_status_gen.go b/tg/tl_premium_boosts_status_gen.go index af958a191a..605d14ec1d 100644 --- a/tg/tl_premium_boosts_status_gen.go +++ b/tg/tl_premium_boosts_status_gen.go @@ -32,6 +32,10 @@ var ( ) // PremiumBoostsStatus represents TL type `premium.boostsStatus#4959427a`. +// Contains info about the current boost status¹ of a peer. +// +// Links: +// 1. https://core.telegram.org/api/boost // // See https://core.telegram.org/constructor/premium.boostsStatus for reference. type PremiumBoostsStatus struct { @@ -40,33 +44,50 @@ type PremiumBoostsStatus struct { // Links: // 1) https://core.telegram.org/mtproto/TL-combinators#conditional-fields Flags bin.Fields - // MyBoost field of PremiumBoostsStatus. + // Whether we're currently boosting this channel, my_boost_slots will also be set. MyBoost bool - // Level field of PremiumBoostsStatus. + // The current boost level of the channel. Level int - // CurrentLevelBoosts field of PremiumBoostsStatus. + // The number of boosts acquired so far in the current level. CurrentLevelBoosts int - // Boosts field of PremiumBoostsStatus. + // Total number of boosts acquired so far. Boosts int - // GiftBoosts field of PremiumBoostsStatus. + // The number of boosts acquired from created Telegram Premium gift codes¹ and + // giveaways²; only returned to channel admins. + // + // Links: + // 1) https://core.telegram.org/api/giveaways + // 2) https://core.telegram.org/api/giveaways // // Use SetGiftBoosts and GetGiftBoosts helpers. GiftBoosts int - // NextLevelBoosts field of PremiumBoostsStatus. + // Total number of boosts needed to reach the next level; if absent, the next level isn't + // available. // // Use SetNextLevelBoosts and GetNextLevelBoosts helpers. NextLevelBoosts int - // PremiumAudience field of PremiumBoostsStatus. + // Only returned to channel admins: contains the approximated number of Premium users + // subscribed to the channel, related to the total number of subscribers. // // Use SetPremiumAudience and GetPremiumAudience helpers. PremiumAudience StatsPercentValue - // BoostURL field of PremiumBoostsStatus. + // Boost deep link »¹ that can be used to boost the chat. + // + // Links: + // 1) https://core.telegram.org/api/links#boost-links BoostURL string - // PrepaidGiveaways field of PremiumBoostsStatus. + // A list of prepaid giveaways¹ available for the chat; only returned to channel admins. + // + // Links: + // 1) https://core.telegram.org/api/giveaways // // Use SetPrepaidGiveaways and GetPrepaidGiveaways helpers. PrepaidGiveaways []PrepaidGiveaway - // MyBoostSlots field of PremiumBoostsStatus. + // Indicates which of our boost slots¹ we've assigned to this peer (populated if + // my_boost is set). + // + // Links: + // 1) https://core.telegram.org/api/boost // // Use SetMyBoostSlots and GetMyBoostSlots helpers. MyBoostSlots []int diff --git a/tg/tl_premium_get_boosts_list_gen.go b/tg/tl_premium_get_boosts_list_gen.go index 6d7649442e..ec6fb97e1b 100644 --- a/tg/tl_premium_get_boosts_list_gen.go +++ b/tg/tl_premium_get_boosts_list_gen.go @@ -32,6 +32,7 @@ var ( ) // PremiumGetBoostsListRequest represents TL type `premium.getBoostsList#60f67660`. +// Obtains info about the boosts that were applied to a certain channel (admins only) // // See https://core.telegram.org/method/premium.getBoostsList for reference. type PremiumGetBoostsListRequest struct { @@ -40,11 +41,18 @@ type PremiumGetBoostsListRequest struct { // Links: // 1) https://core.telegram.org/mtproto/TL-combinators#conditional-fields Flags bin.Fields - // Gifts field of PremiumGetBoostsListRequest. + // Whether to return only info about boosts received from gift codes and giveaways + // created by the channel »¹ + // + // Links: + // 1) https://core.telegram.org/api/giveaways Gifts bool - // Peer field of PremiumGetBoostsListRequest. + // The channel Peer InputPeerClass - // Offset field of PremiumGetBoostsListRequest. + // Offset for pagination, obtained from premium.boostsList¹.next_offset + // + // Links: + // 1) https://core.telegram.org/constructor/premium.boostsList Offset string // Maximum number of results to return, see pagination¹ // @@ -279,9 +287,11 @@ func (g *PremiumGetBoostsListRequest) GetLimit() (value int) { } // PremiumGetBoostsList invokes method premium.getBoostsList#60f67660 returning error if any. +// Obtains info about the boosts that were applied to a certain channel (admins only) // // Possible errors: // +// 400 CHAT_ADMIN_REQUIRED: You must be an admin in this chat to do this. // 400 PEER_ID_INVALID: The provided peer id is invalid. // // See https://core.telegram.org/method/premium.getBoostsList for reference. diff --git a/tg/tl_premium_get_boosts_status_gen.go b/tg/tl_premium_get_boosts_status_gen.go index 2a2e995961..21ea527c42 100644 --- a/tg/tl_premium_get_boosts_status_gen.go +++ b/tg/tl_premium_get_boosts_status_gen.go @@ -32,10 +32,14 @@ var ( ) // PremiumGetBoostsStatusRequest represents TL type `premium.getBoostsStatus#42f1f61`. +// Gets the current number of boosts¹ of a channel. +// +// Links: +// 1. https://core.telegram.org/api/boost // // See https://core.telegram.org/method/premium.getBoostsStatus for reference. type PremiumGetBoostsStatusRequest struct { - // Peer field of PremiumGetBoostsStatusRequest. + // The peer. Peer InputPeerClass } @@ -166,6 +170,10 @@ func (g *PremiumGetBoostsStatusRequest) GetPeer() (value InputPeerClass) { } // PremiumGetBoostsStatus invokes method premium.getBoostsStatus#42f1f61 returning error if any. +// Gets the current number of boosts¹ of a channel. +// +// Links: +// 1. https://core.telegram.org/api/boost // // Possible errors: // diff --git a/tg/tl_premium_get_my_boosts_gen.go b/tg/tl_premium_get_my_boosts_gen.go index d13cc44e6c..0b7cd65dfa 100644 --- a/tg/tl_premium_get_my_boosts_gen.go +++ b/tg/tl_premium_get_my_boosts_gen.go @@ -32,6 +32,12 @@ var ( ) // PremiumGetMyBoostsRequest represents TL type `premium.getMyBoosts#be77b4a`. +// Obtain which peers are we currently boosting¹, and how many boost slots² we have +// left. +// +// Links: +// 1. https://core.telegram.org/api/boost +// 2. https://core.telegram.org/api/boost // // See https://core.telegram.org/method/premium.getMyBoosts for reference. type PremiumGetMyBoostsRequest struct { @@ -128,6 +134,12 @@ func (g *PremiumGetMyBoostsRequest) DecodeBare(b *bin.Buffer) error { } // PremiumGetMyBoosts invokes method premium.getMyBoosts#be77b4a returning error if any. +// Obtain which peers are we currently boosting¹, and how many boost slots² we have +// left. +// +// Links: +// 1. https://core.telegram.org/api/boost +// 2. https://core.telegram.org/api/boost // // See https://core.telegram.org/method/premium.getMyBoosts for reference. func (c *Client) PremiumGetMyBoosts(ctx context.Context) (*PremiumMyBoosts, error) { diff --git a/tg/tl_premium_get_user_boosts_gen.go b/tg/tl_premium_get_user_boosts_gen.go index bf38056a55..bd5b4edec3 100644 --- a/tg/tl_premium_get_user_boosts_gen.go +++ b/tg/tl_premium_get_user_boosts_gen.go @@ -32,12 +32,14 @@ var ( ) // PremiumGetUserBoostsRequest represents TL type `premium.getUserBoosts#39854d1f`. +// Returns the lists of boost that were applied to a channel by a specific user (admins +// only) // // See https://core.telegram.org/method/premium.getUserBoosts for reference. type PremiumGetUserBoostsRequest struct { - // Peer field of PremiumGetUserBoostsRequest. + // The channel Peer InputPeerClass - // UserID field of PremiumGetUserBoostsRequest. + // The user UserID InputUserClass } @@ -198,6 +200,8 @@ func (g *PremiumGetUserBoostsRequest) GetUserID() (value InputUserClass) { } // PremiumGetUserBoosts invokes method premium.getUserBoosts#39854d1f returning error if any. +// Returns the lists of boost that were applied to a channel by a specific user (admins +// only) // // Possible errors: // diff --git a/tg/tl_premium_gift_code_option_gen.go b/tg/tl_premium_gift_code_option_gen.go index 48637b969e..9f5c906899 100644 --- a/tg/tl_premium_gift_code_option_gen.go +++ b/tg/tl_premium_gift_code_option_gen.go @@ -32,6 +32,10 @@ var ( ) // PremiumGiftCodeOption represents TL type `premiumGiftCodeOption#257e962b`. +// Contains info about a giveaway/gift¹ option. +// +// Links: +// 1. https://core.telegram.org/api/giveaways // // See https://core.telegram.org/constructor/premiumGiftCodeOption for reference. type PremiumGiftCodeOption struct { @@ -40,21 +44,33 @@ type PremiumGiftCodeOption struct { // Links: // 1) https://core.telegram.org/mtproto/TL-combinators#conditional-fields Flags bin.Fields - // Users field of PremiumGiftCodeOption. + // Number of users which will be able to activate the gift codes. Users int - // Months field of PremiumGiftCodeOption. + // Duration in months of each gifted Telegram Premium¹ subscription. + // + // Links: + // 1) https://core.telegram.org/api/premium Months int - // StoreProduct field of PremiumGiftCodeOption. + // Identifier of the store product associated with the option, official apps only. // // Use SetStoreProduct and GetStoreProduct helpers. StoreProduct string - // StoreQuantity field of PremiumGiftCodeOption. + // Number of times the store product must be paid // // Use SetStoreQuantity and GetStoreQuantity helpers. StoreQuantity int - // Currency field of PremiumGiftCodeOption. + // Three-letter ISO 4217 currency¹ code + // + // Links: + // 1) https://core.telegram.org/bots/payments#supported-currencies Currency string - // Amount field of PremiumGiftCodeOption. + // Total price in the smallest units of the currency (integer, not float/double). For + // example, for a price of US$ 1.45 pass amount = 145. See the exp parameter in + // currencies.json¹, it shows the number of digits past the decimal point for each + // currency (2 for the majority of currencies). + // + // Links: + // 1) https://core.telegram.org/bots/payments/currencies.json Amount int64 } diff --git a/tg/tl_premium_my_boosts_gen.go b/tg/tl_premium_my_boosts_gen.go index ac54cbd9f0..15fbc56930 100644 --- a/tg/tl_premium_my_boosts_gen.go +++ b/tg/tl_premium_my_boosts_gen.go @@ -32,14 +32,19 @@ var ( ) // PremiumMyBoosts represents TL type `premium.myBoosts#9ae228e2`. +// A list of peers we are currently boosting¹, and how many boost slots² we have left. +// +// Links: +// 1. https://core.telegram.org/api/boost +// 2. https://core.telegram.org/api/boost // // See https://core.telegram.org/constructor/premium.myBoosts for reference. type PremiumMyBoosts struct { - // MyBoosts field of PremiumMyBoosts. + // Info about boosted peers and remaining boost slots. MyBoosts []MyBoost - // Chats field of PremiumMyBoosts. + // Referenced chats Chats []ChatClass - // Users field of PremiumMyBoosts. + // Referenced users Users []UserClass } diff --git a/tg/tl_prepaid_giveaway_gen.go b/tg/tl_prepaid_giveaway_gen.go index 55aa8eab93..a1a7a6fd44 100644 --- a/tg/tl_prepaid_giveaway_gen.go +++ b/tg/tl_prepaid_giveaway_gen.go @@ -32,16 +32,26 @@ var ( ) // PrepaidGiveaway represents TL type `prepaidGiveaway#b2539d54`. +// Contains info about a prepaid giveaway »¹. +// +// Links: +// 1. https://core.telegram.org/api/giveaways // // See https://core.telegram.org/constructor/prepaidGiveaway for reference. type PrepaidGiveaway struct { - // ID field of PrepaidGiveaway. + // Prepaid giveaway ID. ID int64 - // Months field of PrepaidGiveaway. + // Duration in months of each gifted Telegram Premium¹ subscription. + // + // Links: + // 1) https://core.telegram.org/api/premium Months int - // Quantity field of PrepaidGiveaway. + // Number of given away Telegram Premium¹ subscriptions. + // + // Links: + // 1) https://core.telegram.org/api/premium Quantity int - // Date field of PrepaidGiveaway. + // Payment date. Date int } diff --git a/tg/tl_public_forward_gen.go b/tg/tl_public_forward_gen.go index 950d344eb8..6d22e990b5 100644 --- a/tg/tl_public_forward_gen.go +++ b/tg/tl_public_forward_gen.go @@ -32,10 +32,14 @@ var ( ) // PublicForwardMessage represents TL type `publicForwardMessage#1f2bf4a`. +// Contains info about a forward of a story¹ as a message. +// +// Links: +// 1. https://core.telegram.org/api/stories // // See https://core.telegram.org/constructor/publicForwardMessage for reference. type PublicForwardMessage struct { - // Message field of PublicForwardMessage. + // Info about the message with the reposted story. Message MessageClass } @@ -171,12 +175,16 @@ func (p *PublicForwardMessage) GetMessage() (value MessageClass) { } // PublicForwardStory represents TL type `publicForwardStory#edf3add0`. +// Contains info about a forward of a story¹ as a repost by a public channel. +// +// Links: +// 1. https://core.telegram.org/api/stories // // See https://core.telegram.org/constructor/publicForwardStory for reference. type PublicForwardStory struct { - // Peer field of PublicForwardStory. + // The channel that reposted the story. Peer PeerClass - // Story field of PublicForwardStory. + // The reposted story (may be different from the original story). Story StoryItemClass } diff --git a/tg/tl_sponsored_message_gen.go b/tg/tl_sponsored_message_gen.go index 7ada2e947d..8442cd4603 100644 --- a/tg/tl_sponsored_message_gen.go +++ b/tg/tl_sponsored_message_gen.go @@ -76,7 +76,10 @@ type SponsoredMessage struct { // // Use SetWebpage and GetWebpage helpers. Webpage SponsoredWebPage - // App field of SponsoredMessage. + // Mini App »¹ to open when the sponsored message is clicked. + // + // Links: + // 1) https://core.telegram.org/api/bots/webapps // // Use SetApp and GetApp helpers. App BotAppClass @@ -89,7 +92,7 @@ type SponsoredMessage struct { // // Use SetEntities and GetEntities helpers. Entities []MessageEntityClass - // ButtonText field of SponsoredMessage. + // Text of the sponsored message button. // // Use SetButtonText and GetButtonText helpers. ButtonText string diff --git a/tg/tl_stats_broadcast_stats_gen.go b/tg/tl_stats_broadcast_stats_gen.go index 08d7e9038f..2493a27355 100644 --- a/tg/tl_stats_broadcast_stats_gen.go +++ b/tg/tl_stats_broadcast_stats_gen.go @@ -43,23 +43,35 @@ type StatsBroadcastStats struct { Period StatsDateRangeDays // Follower count change for period in consideration Followers StatsAbsValueAndPrev - // total_viewcount/postcount, for posts posted during the period in consideration - // (views_per_post). Note that in this case, current refers to the period in - // consideration (min_date till max_date), and prev refers to the previous period - // ((min_date - (max_date - min_date)) till min_date). + // total_viewcount/postcount, for posts posted during the period in consideration. Note + // that in this case, current refers to the period in consideration (min_date till + // max_date), and prev refers to the previous period ((min_date - (max_date - min_date)) + // till min_date). ViewsPerPost StatsAbsValueAndPrev - // total_viewcount/postcount, for posts posted during the period in consideration - // (views_per_post). Note that in this case, current refers to the period in - // consideration (min_date till max_date), and prev refers to the previous period - // ((min_date - (max_date - min_date)) till min_date) + // total_sharecount/postcount, for posts posted during the period in consideration. Note + // that in this case, current refers to the period in consideration (min_date till + // max_date), and prev refers to the previous period ((min_date - (max_date - min_date)) + // till min_date) SharesPerPost StatsAbsValueAndPrev - // ReactionsPerPost field of StatsBroadcastStats. + // total_reactions/postcount, for posts posted during the period in consideration. Note + // that in this case, current refers to the period in consideration (min_date till + // max_date), and prev refers to the previous period ((min_date - (max_date - min_date)) + // till min_date) ReactionsPerPost StatsAbsValueAndPrev - // ViewsPerStory field of StatsBroadcastStats. + // total_views/storycount, for posts posted during the period in consideration. Note that + // in this case, current refers to the period in consideration (min_date till max_date), + // and prev refers to the previous period ((min_date - (max_date - min_date)) till + // min_date) ViewsPerStory StatsAbsValueAndPrev - // SharesPerStory field of StatsBroadcastStats. + // total_shares/storycount, for posts posted during the period in consideration. Note + // that in this case, current refers to the period in consideration (min_date till + // max_date), and prev refers to the previous period ((min_date - (max_date - min_date)) + // till min_date) SharesPerStory StatsAbsValueAndPrev - // ReactionsPerStory field of StatsBroadcastStats. + // total_reactions/storycount, for posts posted during the period in consideration. Note + // that in this case, current refers to the period in consideration (min_date till + // max_date), and prev refers to the previous period ((min_date - (max_date - min_date)) + // till min_date) ReactionsPerStory StatsAbsValueAndPrev // Percentage of subscribers with enabled notifications EnabledNotifications StatsPercentValue @@ -81,13 +93,14 @@ type StatsBroadcastStats struct { NewFollowersBySourceGraph StatsGraphClass // Subscriber language graph (pie chart) LanguagesGraph StatsGraphClass - // ReactionsByEmotionGraph field of StatsBroadcastStats. + // A graph containing the number of reactions on posts categorized by emotion ReactionsByEmotionGraph StatsGraphClass - // StoryInteractionsGraph field of StatsBroadcastStats. + // A graph containing the number of story views and shares StoryInteractionsGraph StatsGraphClass - // StoryReactionsByEmotionGraph field of StatsBroadcastStats. + // A graph containing the number of reactions on stories categorized by emotion StoryReactionsByEmotionGraph StatsGraphClass - // RecentPostsInteractions field of StatsBroadcastStats. + // Detailed statistics about number of views and shares of recently sent messages and + // stories RecentPostsInteractions []PostInteractionCountersClass } diff --git a/tg/tl_stats_get_story_public_forwards_gen.go b/tg/tl_stats_get_story_public_forwards_gen.go index 8446cf8756..a1bc0549b8 100644 --- a/tg/tl_stats_get_story_public_forwards_gen.go +++ b/tg/tl_stats_get_story_public_forwards_gen.go @@ -32,14 +32,25 @@ var ( ) // StatsGetStoryPublicForwardsRequest represents TL type `stats.getStoryPublicForwards#a6437ef6`. +// Obtain forwards of a story¹ as a message to public chats and reposts by public +// channels. +// +// Links: +// 1. https://core.telegram.org/api/stories // // See https://core.telegram.org/method/stats.getStoryPublicForwards for reference. type StatsGetStoryPublicForwardsRequest struct { - // Peer field of StatsGetStoryPublicForwardsRequest. + // Peer where the story was originally posted Peer InputPeerClass - // ID field of StatsGetStoryPublicForwardsRequest. + // Story¹ ID + // + // Links: + // 1) https://core.telegram.org/api/stories ID int - // Offset field of StatsGetStoryPublicForwardsRequest. + // Offset for pagination, from stats.PublicForwards¹.next_offset. + // + // Links: + // 1) https://core.telegram.org/constructor/stats.publicForwards Offset string // Maximum number of results to return, see pagination¹ // @@ -250,6 +261,11 @@ func (g *StatsGetStoryPublicForwardsRequest) GetLimit() (value int) { } // StatsGetStoryPublicForwards invokes method stats.getStoryPublicForwards#a6437ef6 returning error if any. +// Obtain forwards of a story¹ as a message to public chats and reposts by public +// channels. +// +// Links: +// 1. https://core.telegram.org/api/stories // // Possible errors: // diff --git a/tg/tl_stats_get_story_stats_gen.go b/tg/tl_stats_get_story_stats_gen.go index d9841cfc97..588b8e4328 100644 --- a/tg/tl_stats_get_story_stats_gen.go +++ b/tg/tl_stats_get_story_stats_gen.go @@ -32,6 +32,11 @@ var ( ) // StatsGetStoryStatsRequest represents TL type `stats.getStoryStats#374fef40`. +// Get statistics¹ for a certain story². +// +// Links: +// 1. https://core.telegram.org/api/stats +// 2. https://core.telegram.org/api/stories // // See https://core.telegram.org/method/stats.getStoryStats for reference. type StatsGetStoryStatsRequest struct { @@ -40,11 +45,11 @@ type StatsGetStoryStatsRequest struct { // Links: // 1) https://core.telegram.org/mtproto/TL-combinators#conditional-fields Flags bin.Fields - // Dark field of StatsGetStoryStatsRequest. + // Whether to enable the dark theme for graph colors Dark bool - // Peer field of StatsGetStoryStatsRequest. + // The peer that posted the story Peer InputPeerClass - // ID field of StatsGetStoryStatsRequest. + // Story ID ID int } @@ -249,6 +254,11 @@ func (g *StatsGetStoryStatsRequest) GetID() (value int) { } // StatsGetStoryStats invokes method stats.getStoryStats#374fef40 returning error if any. +// Get statistics¹ for a certain story². +// +// Links: +// 1. https://core.telegram.org/api/stats +// 2. https://core.telegram.org/api/stories // // Possible errors: // diff --git a/tg/tl_stats_message_stats_gen.go b/tg/tl_stats_message_stats_gen.go index 7e3609e25b..dcc4420f61 100644 --- a/tg/tl_stats_message_stats_gen.go +++ b/tg/tl_stats_message_stats_gen.go @@ -38,7 +38,7 @@ var ( type StatsMessageStats struct { // Message view graph ViewsGraph StatsGraphClass - // ReactionsByEmotionGraph field of StatsMessageStats. + // A graph containing the number of reactions on stories categorized by emotion ReactionsByEmotionGraph StatsGraphClass } diff --git a/tg/tl_stats_public_forwards_gen.go b/tg/tl_stats_public_forwards_gen.go index b9924e292a..112aea64bf 100644 --- a/tg/tl_stats_public_forwards_gen.go +++ b/tg/tl_stats_public_forwards_gen.go @@ -32,6 +32,11 @@ var ( ) // StatsPublicForwards represents TL type `stats.publicForwards#93037e20`. +// Contains info about the forwards of a story¹ as a message to public chats and reposts +// by public channels. +// +// Links: +// 1. https://core.telegram.org/api/stories // // See https://core.telegram.org/constructor/stats.publicForwards for reference. type StatsPublicForwards struct { @@ -40,17 +45,20 @@ type StatsPublicForwards struct { // Links: // 1) https://core.telegram.org/mtproto/TL-combinators#conditional-fields Flags bin.Fields - // Count field of StatsPublicForwards. + // Total number of results Count int - // Forwards field of StatsPublicForwards. + // Info about the forwards of a story. Forwards []PublicForwardClass - // NextOffset field of StatsPublicForwards. + // Offset used for pagination¹. + // + // Links: + // 1) https://core.telegram.org/api/offsets // // Use SetNextOffset and GetNextOffset helpers. NextOffset string - // Chats field of StatsPublicForwards. + // Mentioned chats Chats []ChatClass - // Users field of StatsPublicForwards. + // Mentioned users Users []UserClass } diff --git a/tg/tl_stats_story_stats_gen.go b/tg/tl_stats_story_stats_gen.go index e3d69ddef1..1fa0c77b18 100644 --- a/tg/tl_stats_story_stats_gen.go +++ b/tg/tl_stats_story_stats_gen.go @@ -32,12 +32,18 @@ var ( ) // StatsStoryStats represents TL type `stats.storyStats#50cd067c`. +// Contains statistics¹ about a story². +// +// Links: +// 1. https://core.telegram.org/api/stats +// 2. https://core.telegram.org/api/stories // // See https://core.telegram.org/constructor/stats.storyStats for reference. type StatsStoryStats struct { - // ViewsGraph field of StatsStoryStats. + // A graph containing the number of story views and shares ViewsGraph StatsGraphClass - // ReactionsByEmotionGraph field of StatsStoryStats. + // A bar graph containing the number of story reactions categorized by "emotion" (i.e. + // Positive, Negative, Other, etc...) ReactionsByEmotionGraph StatsGraphClass } diff --git a/tg/tl_sticker_set_gen.go b/tg/tl_sticker_set_gen.go index 7f4871eec1..7250ac627b 100644 --- a/tg/tl_sticker_set_gen.go +++ b/tg/tl_sticker_set_gen.go @@ -54,7 +54,9 @@ type StickerSet struct { Videos bool // This is a custom emoji stickerset Emojis bool - // TextColor field of StickerSet. + // Whether the color of this TGS custom emoji stickerset should be changed to the text + // color when used in messages, the accent color if used as emoji status, white on chat + // photos, or another appropriate color based on context. TextColor bool // ChannelEmojiStatus field of StickerSet. ChannelEmojiStatus bool diff --git a/tg/tl_stories_get_peer_max_ids_gen.go b/tg/tl_stories_get_peer_max_ids_gen.go index dafacc8c1d..cb95d029ec 100644 --- a/tg/tl_stories_get_peer_max_ids_gen.go +++ b/tg/tl_stories_get_peer_max_ids_gen.go @@ -32,10 +32,11 @@ var ( ) // StoriesGetPeerMaxIDsRequest represents TL type `stories.getPeerMaxIDs#535983c3`. +// Get the IDs of the maximum read stories for a set of peers. // // See https://core.telegram.org/method/stories.getPeerMaxIDs for reference. type StoriesGetPeerMaxIDsRequest struct { - // ID field of StoriesGetPeerMaxIDsRequest. + // Peers ID []InputPeerClass } @@ -184,6 +185,7 @@ func (g *StoriesGetPeerMaxIDsRequest) MapID() (value InputPeerClassArray) { } // StoriesGetPeerMaxIDs invokes method stories.getPeerMaxIDs#535983c3 returning error if any. +// Get the IDs of the maximum read stories for a set of peers. // // See https://core.telegram.org/method/stories.getPeerMaxIDs for reference. func (c *Client) StoriesGetPeerMaxIDs(ctx context.Context, id []InputPeerClass) ([]int, error) { diff --git a/tg/tl_stories_get_story_views_list_gen.go b/tg/tl_stories_get_story_views_list_gen.go index c5ee8af8b5..0d8d1cce86 100644 --- a/tg/tl_stories_get_story_views_list_gen.go +++ b/tg/tl_stories_get_story_views_list_gen.go @@ -448,6 +448,7 @@ func (g *StoriesGetStoryViewsListRequest) GetLimit() (value int) { // Possible errors: // // 400 PEER_ID_INVALID: The provided peer id is invalid. +// 400 STORY_ID_INVALID: The specified story ID is invalid. // // See https://core.telegram.org/method/stories.getStoryViewsList for reference. func (c *Client) StoriesGetStoryViewsList(ctx context.Context, request *StoriesGetStoryViewsListRequest) (*StoriesStoryViewsList, error) { diff --git a/tg/tl_stories_read_stories_gen.go b/tg/tl_stories_read_stories_gen.go index 5b23070325..4be9148313 100644 --- a/tg/tl_stories_read_stories_gen.go +++ b/tg/tl_stories_read_stories_gen.go @@ -208,6 +208,7 @@ func (r *StoriesReadStoriesRequest) GetMaxID() (value int) { // // 400 MAX_ID_INVALID: The provided max ID is invalid. // 400 PEER_ID_INVALID: The provided peer id is invalid. +// 400 STORIES_NEVER_CREATED: // // See https://core.telegram.org/method/stories.readStories for reference. func (c *Client) StoriesReadStories(ctx context.Context, request *StoriesReadStoriesRequest) ([]int, error) { diff --git a/tg/tl_stories_send_story_gen.go b/tg/tl_stories_send_story_gen.go index fc5259fe97..13074ba86f 100644 --- a/tg/tl_stories_send_story_gen.go +++ b/tg/tl_stories_send_story_gen.go @@ -52,7 +52,8 @@ type StoriesSendStoryRequest struct { Pinned bool // If set, disables forwards, screenshots, and downloads. Noforwards bool - // FwdModified field of StoriesSendStoryRequest. + // Set this flag when reposting stories with fwd_from_id+fwd_from_id, if the media was + // modified before reposting. FwdModified bool // The peer to send the story as. Peer InputPeerClass @@ -92,11 +93,13 @@ type StoriesSendStoryRequest struct { // // Use SetPeriod and GetPeriod helpers. Period int - // FwdFromID field of StoriesSendStoryRequest. + // If set, indicates that this story is a repost of story with ID fwd_from_story posted + // by the peer in fwd_from_id. // // Use SetFwdFromID and GetFwdFromID helpers. FwdFromID InputPeerClass - // FwdFromStory field of StoriesSendStoryRequest. + // If set, indicates that this story is a repost of story with ID fwd_from_story posted + // by the peer in fwd_from_id. // // Use SetFwdFromStory and GetFwdFromStory helpers. FwdFromStory int @@ -784,7 +787,7 @@ func (s *StoriesSendStoryRequest) MapPrivacyRules() (value InputPrivacyRuleClass // 400 PREMIUM_ACCOUNT_REQUIRED: A premium account is required to execute this action. // 400 STORIES_TOO_MUCH: You have hit the maximum active stories limit as specified by the story_expiring_limit_* client configuration parameters: you should buy a Premium subscription, delete an active story, or wait for the oldest story to expire. // 400 STORY_PERIOD_INVALID: The specified story period is invalid for this account. -// 400 VENUE_ID_INVALID: +// 400 VENUE_ID_INVALID: The specified venue ID is invalid. // // See https://core.telegram.org/method/stories.sendStory for reference. func (c *Client) StoriesSendStory(ctx context.Context, request *StoriesSendStoryRequest) (UpdatesClass, error) { diff --git a/tg/tl_story_fwd_header_gen.go b/tg/tl_story_fwd_header_gen.go index 23a8bb6020..bfd4b68e98 100644 --- a/tg/tl_story_fwd_header_gen.go +++ b/tg/tl_story_fwd_header_gen.go @@ -32,6 +32,7 @@ var ( ) // StoryFwdHeader represents TL type `storyFwdHeader#b826e150`. +// Contains info about the original poster of a reposted story. // // See https://core.telegram.org/constructor/storyFwdHeader for reference. type StoryFwdHeader struct { @@ -40,17 +41,20 @@ type StoryFwdHeader struct { // Links: // 1) https://core.telegram.org/mtproto/TL-combinators#conditional-fields Flags bin.Fields - // Modified field of StoryFwdHeader. + // Whether the story media was modified before reposting it (for example by overlaying a + // round video with a reaction). Modified bool - // From field of StoryFwdHeader. + // Peer that originally posted the story; will be empty for stories forwarded from a user + // with forwards privacy enabled, in which case from_name will be set, instead. // // Use SetFrom and GetFrom helpers. From PeerClass - // FromName field of StoryFwdHeader. + // Will be set for stories forwarded from a user with forwards privacy enabled, in which + // case from will also be empty. // // Use SetFromName and GetFromName helpers. FromName string - // StoryID field of StoryFwdHeader. + // , contains the story ID // // Use SetStoryID and GetStoryID helpers. StoryID int diff --git a/tg/tl_story_item_gen.go b/tg/tl_story_item_gen.go index 5f6115ab24..4cf670a190 100644 --- a/tg/tl_story_item_gen.go +++ b/tg/tl_story_item_gen.go @@ -468,7 +468,10 @@ type StoryItem struct { ID int // When was the story posted. Date int - // FwdFrom field of StoryItem. + // For reposted stories »¹, contains info about the original story. + // + // Links: + // 1) https://core.telegram.org/api/stories#reposting-stories // // Use SetFwdFrom and GetFwdFrom helpers. FwdFrom StoryFwdHeader diff --git a/tg/tl_story_views_gen.go b/tg/tl_story_views_gen.go index a51150878d..6afcd4b2cf 100644 --- a/tg/tl_story_views_gen.go +++ b/tg/tl_story_views_gen.go @@ -44,7 +44,11 @@ type StoryViews struct { // Links: // 1) https://core.telegram.org/mtproto/TL-combinators#conditional-fields Flags bin.Fields - // HasViewers field of StoryViews. + // If set, indicates that the viewers list is currently viewable, and was not yet deleted + // because the story has expired while the user didn't have a Premium¹ account. + // + // Links: + // 1) https://core.telegram.org/api/premium HasViewers bool // View counter of the story ViewsCount int diff --git a/tg/tl_update_gen.go b/tg/tl_update_gen.go index ad6d9c40b6..a58f8d853d 100644 --- a/tg/tl_update_gen.go +++ b/tg/tl_update_gen.go @@ -4799,7 +4799,7 @@ type UpdateReadMessagesContents struct { // Links: // 1) https://core.telegram.org/api/updates PtsCount int - // Date field of UpdateReadMessagesContents. + // When was the last message in messages marked as read. // // Use SetDate and GetDate helpers. Date int @@ -23538,14 +23538,21 @@ func (u *UpdateSentStoryReaction) GetReaction() (value ReactionClass) { } // UpdateBotChatBoost represents TL type `updateBotChatBoost#904dd49c`. +// A channel boost¹ has changed (bots only) +// +// Links: +// 1. https://core.telegram.org/api/boost // // See https://core.telegram.org/constructor/updateBotChatBoost for reference. type UpdateBotChatBoost struct { - // Peer field of UpdateBotChatBoost. + // Channel Peer PeerClass - // Boost field of UpdateBotChatBoost. + // New boost information Boost Boost - // Qts field of UpdateBotChatBoost. + // QTS¹ event sequence identifier + // + // Links: + // 1) https://core.telegram.org/api/updates Qts int } @@ -23731,12 +23738,24 @@ func (u *UpdateBotChatBoost) GetQts() (value int) { } // UpdateChannelViewForumAsMessages represents TL type `updateChannelViewForumAsMessages#7b68920`. +// Users may also choose to display messages from all topics as if they were sent to a +// normal group, using a "View as messages" setting in the local client. +// This setting only affects the current account, and is synced to other logged in +// sessions using the channels.toggleViewForumAsMessages¹ method; invoking this method +// will update the value of the view_forum_as_messages flag of channelFull² or dialog³ +// and emit an updateChannelViewForumAsMessages⁴. +// +// Links: +// 1. https://core.telegram.org/method/channels.toggleViewForumAsMessages +// 2. https://core.telegram.org/constructor/channelFull +// 3. https://core.telegram.org/constructor/dialog +// 4. https://core.telegram.org/constructor/updateChannelViewForumAsMessages // // See https://core.telegram.org/constructor/updateChannelViewForumAsMessages for reference. type UpdateChannelViewForumAsMessages struct { - // ChannelID field of UpdateChannelViewForumAsMessages. + // The forum ID ChannelID int64 - // Enabled field of UpdateChannelViewForumAsMessages. + // The new value of the toggle. Enabled bool } @@ -23892,6 +23911,10 @@ func (u *UpdateChannelViewForumAsMessages) GetEnabled() (value bool) { } // UpdatePeerWallpaper represents TL type `updatePeerWallpaper#ae3f101d`. +// The wallpaper »¹ of a given peer has changed. +// +// Links: +// 1. https://core.telegram.org/api/wallpapers // // See https://core.telegram.org/constructor/updatePeerWallpaper for reference. type UpdatePeerWallpaper struct { @@ -23900,11 +23923,17 @@ type UpdatePeerWallpaper struct { // Links: // 1) https://core.telegram.org/mtproto/TL-combinators#conditional-fields Flags bin.Fields - // WallpaperOverridden field of UpdatePeerWallpaper. + // Whether the other user has chosen a custom wallpaper for us using messages + // setChatWallPaper¹ and the for_both flag, see here »² for more info. + // + // Links: + // 1) https://core.telegram.org/method/messages.setChatWallPaper + // 2) https://core.telegram.org/api/wallpapers#installing-wallpapers-in-a-specific-chat WallpaperOverridden bool - // Peer field of UpdatePeerWallpaper. + // The peer where the wallpaper has changed. Peer PeerClass - // Wallpaper field of UpdatePeerWallpaper. + // The new wallpaper, if none the wallpaper was removed and the default wallpaper should + // be used. // // Use SetWallpaper and GetWallpaper helpers. Wallpaper WallPaperClass diff --git a/tg/tl_updates_get_difference_gen.go b/tg/tl_updates_get_difference_gen.go index 55586bb725..82d9c1c6ed 100644 --- a/tg/tl_updates_get_difference_gen.go +++ b/tg/tl_updates_get_difference_gen.go @@ -49,7 +49,7 @@ type UpdatesGetDifferenceRequest struct { // Links: // 1) https://core.telegram.org/api/updates Pts int - // PtsLimit field of UpdatesGetDifferenceRequest. + // PTS limit // // Use SetPtsLimit and GetPtsLimit helpers. PtsLimit int @@ -73,7 +73,7 @@ type UpdatesGetDifferenceRequest struct { // Links: // 1) https://core.telegram.org/api/updates Qts int - // QtsLimit field of UpdatesGetDifferenceRequest. + // QTS limit // // Use SetQtsLimit and GetQtsLimit helpers. QtsLimit int diff --git a/tg/tl_user_gen.go b/tg/tl_user_gen.go index 8bf68f9440..473e28d5dd 100644 --- a/tg/tl_user_gen.go +++ b/tg/tl_user_gen.go @@ -240,7 +240,7 @@ type User struct { // Links: // 1) https://core.telegram.org/api/stories#hiding-stories-of-other-users StoriesHidden bool - // StoriesUnavailable field of User. + // No stories from this user are visible. StoriesUnavailable bool // ID of the user ID int64 @@ -309,11 +309,17 @@ type User struct { // // Use SetStoriesMaxID and GetStoriesMaxID helpers. StoriesMaxID int - // Color field of User. + // The user's accent color¹. + // + // Links: + // 1) https://core.telegram.org/api/colors // // Use SetColor and GetColor helpers. Color PeerColor - // ProfileColor field of User. + // The user's profile color¹. + // + // Links: + // 1) https://core.telegram.org/api/colors // // Use SetProfileColor and GetProfileColor helpers. ProfileColor PeerColor diff --git a/tg/tl_web_page_gen.go b/tg/tl_web_page_gen.go index fe1c4fef0a..92bbb3f5ab 100644 --- a/tg/tl_web_page_gen.go +++ b/tg/tl_web_page_gen.go @@ -43,7 +43,7 @@ type WebPageEmpty struct { Flags bin.Fields // Preview ID ID int64 - // URL field of WebPageEmpty. + // URL of the webpage. // // Use SetURL and GetURL helpers. URL string @@ -247,7 +247,7 @@ type WebPagePending struct { Flags bin.Fields // ID of preview ID int64 - // URL field of WebPagePending. + // URL of the webpage // // Use SetURL and GetURL helpers. URL string @@ -476,7 +476,7 @@ type WebPage struct { // Links: // 1) https://core.telegram.org/mtproto/TL-combinators#conditional-fields Flags bin.Fields - // HasLargeMedia field of WebPage. + // Whether the size of the media in the preview can be changed. HasLargeMedia bool // Preview ID ID int64