diff --git a/go.mod b/go.mod index 9b21352880..5780ad8233 100644 --- a/go.mod +++ b/go.mod @@ -8,7 +8,7 @@ require ( github.com/go-faster/jx v0.39.0 github.com/go-faster/xor v0.3.0 github.com/go-openapi/inflect v0.19.0 - github.com/gotd/getdoc v0.16.0 + github.com/gotd/getdoc v0.17.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 055ecec54d..81de071b1b 100644 --- a/go.sum +++ b/go.sum @@ -49,8 +49,8 @@ github.com/google/go-cmp v0.5.8/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeN github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/gorilla/websocket v1.4.1 h1:q7AeDBpnBk8AogcD4DSag/Ukw/KV+YhzLj2bP5HvKCM= github.com/gorilla/websocket v1.4.1/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= -github.com/gotd/getdoc v0.16.0 h1:/xuCZvdwC5jwwlKf4rUjIcWKabnNt0Ukp4wgVWSnaIg= -github.com/gotd/getdoc v0.16.0/go.mod h1:+tt6hA1p7ldqydZJqLE33fMi+qjXp/iG2kNZMJoCRxE= +github.com/gotd/getdoc v0.17.0 h1:dVc2hQUKtOT/kgFjcDw0P7Ztc/U22az93eoiUUsYQA0= +github.com/gotd/getdoc v0.17.0/go.mod h1:+tt6hA1p7ldqydZJqLE33fMi+qjXp/iG2kNZMJoCRxE= 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/e2e/tl_input_sticker_set_gen.go b/tg/e2e/tl_input_sticker_set_gen.go index f1883aaa65..d9190ede23 100644 --- a/tg/e2e/tl_input_sticker_set_gen.go +++ b/tg/e2e/tl_input_sticker_set_gen.go @@ -32,11 +32,17 @@ var ( ) // InputStickerSetShortName represents TL type `inputStickerSetShortName#861cc8a0`. -// Stickerset by short name, from tg://addstickers?set=short_name +// Stickerset by short name, from a stickerset deep link »¹ +// +// Links: +// 1. https://core.telegram.org/api/links#stickerset-links // // See https://core.telegram.org/constructor/inputStickerSetShortName for reference. type InputStickerSetShortName struct { - // From tg://addstickers?set=short_name + // Short name from a stickerset deep link »¹ + // + // Links: + // 1) https://core.telegram.org/api/links#stickerset-links ShortName string } diff --git a/tg/tl_attach_menu_bot_gen.go b/tg/tl_attach_menu_bot_gen.go index 21c11769ec..91e0cb63cd 100644 --- a/tg/tl_attach_menu_bot_gen.go +++ b/tg/tl_attach_menu_bot_gen.go @@ -35,7 +35,7 @@ var ( // Represents a bot web app that can be launched from the attachment menu »¹ // // Links: -// 1. https://core.telegram.org/bots/webapps#launching-web-apps-from-the-attachment-menu +// 1. https://core.telegram.org/api/bots/attach // // See https://core.telegram.org/constructor/attachMenuBot for reference. type AttachMenuBot struct { @@ -50,7 +50,10 @@ type AttachMenuBot struct { // Links: // 1) https://core.telegram.org/method/messages.toggleBotInAttachMenu Inactive bool - // True, if the bot supports the "settings_button_pressed" event + // True, if the bot supports the "settings_button_pressed" event »¹ + // + // Links: + // 1) https://core.telegram.org/api/bots/webapps#settings_button_pressed HasSettings bool // Bot ID BotID int64 diff --git a/tg/tl_attach_menu_bot_icon_color_gen.go b/tg/tl_attach_menu_bot_icon_color_gen.go index bb2dd62f34..664dc5b996 100644 --- a/tg/tl_attach_menu_bot_icon_color_gen.go +++ b/tg/tl_attach_menu_bot_icon_color_gen.go @@ -35,7 +35,7 @@ var ( // Represents an attachment menu icon color for bot web apps »¹ // // Links: -// 1. https://core.telegram.org/bots/webapps#launching-web-apps-from-the-attachment-menu +// 1. https://core.telegram.org/api/bots/attach // // See https://core.telegram.org/constructor/attachMenuBotIconColor for reference. type AttachMenuBotIconColor struct { diff --git a/tg/tl_attach_menu_bot_icon_gen.go b/tg/tl_attach_menu_bot_icon_gen.go index ee5dd4e25e..7f22d2402c 100644 --- a/tg/tl_attach_menu_bot_icon_gen.go +++ b/tg/tl_attach_menu_bot_icon_gen.go @@ -35,7 +35,7 @@ var ( // Represents an attachment menu icon for bot web apps »¹ // // Links: -// 1. https://core.telegram.org/bots/webapps#launching-web-apps-from-the-attachment-menu +// 1. https://core.telegram.org/api/bots/attach // // See https://core.telegram.org/constructor/attachMenuBotIcon for reference. type AttachMenuBotIcon struct { diff --git a/tg/tl_attach_menu_bots_bot_gen.go b/tg/tl_attach_menu_bots_bot_gen.go index d097587f6d..5b0c48f777 100644 --- a/tg/tl_attach_menu_bots_bot_gen.go +++ b/tg/tl_attach_menu_bots_bot_gen.go @@ -35,14 +35,14 @@ var ( // Represents a bot web app that can be launched from the attachment menu »¹ // // Links: -// 1. https://core.telegram.org/bots/webapps#launching-web-apps-from-the-attachment-menu +// 1. https://core.telegram.org/api/bots/attach // // See https://core.telegram.org/constructor/attachMenuBotsBot for reference. type AttachMenuBotsBot struct { // Represents a bot web app that can be launched from the attachment menu »¹ // // Links: - // 1) https://core.telegram.org/bots/webapps#launching-web-apps-from-the-attachment-menu + // 1) https://core.telegram.org/api/bots/attach Bot AttachMenuBot // Info about related users and bots Users []UserClass diff --git a/tg/tl_attach_menu_bots_gen.go b/tg/tl_attach_menu_bots_gen.go index b2304b6866..df192ec12d 100644 --- a/tg/tl_attach_menu_bots_gen.go +++ b/tg/tl_attach_menu_bots_gen.go @@ -137,7 +137,7 @@ func (a *AttachMenuBotsNotModified) DecodeBare(b *bin.Buffer) error { // Represents a list of bot web apps that can be launched from the attachment menu »¹ // // Links: -// 1. https://core.telegram.org/bots/webapps#launching-web-apps-from-the-attachment-menu +// 1. https://core.telegram.org/api/bots/attach // // See https://core.telegram.org/constructor/attachMenuBots for reference. type AttachMenuBots struct { @@ -149,7 +149,7 @@ type AttachMenuBots struct { // List of bot web apps that can be launched from the attachment menu »¹ // // Links: - // 1) https://core.telegram.org/bots/webapps#launching-web-apps-from-the-attachment-menu + // 1) https://core.telegram.org/api/bots/attach Bots []AttachMenuBot // Info about related users/bots Users []UserClass diff --git a/tg/tl_auth_export_login_token_gen.go b/tg/tl_auth_export_login_token_gen.go index be8a23190f..0b22616ede 100644 --- a/tg/tl_auth_export_login_token_gen.go +++ b/tg/tl_auth_export_login_token_gen.go @@ -34,12 +34,13 @@ var ( // AuthExportLoginTokenRequest represents TL type `auth.exportLoginToken#b7e085fe`. // Generate a login token, for login via QR code¹. // The generated login token should be encoded using base64url, then shown as a -// tg://login?token=base64encodedtoken URL in the QR code. +// tg://login?token=base64encodedtoken deep link »² in the QR code. // For more info, see login via QR code¹. // // Links: // 1. https://core.telegram.org/api/qr-login -// 2. https://core.telegram.org/api/qr-login +// 2. https://core.telegram.org/api/links#qr-code-login-links +// 3. https://core.telegram.org/api/qr-login // // See https://core.telegram.org/method/auth.exportLoginToken for reference. type AuthExportLoginTokenRequest struct { @@ -244,12 +245,13 @@ func (e *AuthExportLoginTokenRequest) GetExceptIDs() (value []int64) { // AuthExportLoginToken invokes method auth.exportLoginToken#b7e085fe returning error if any. // Generate a login token, for login via QR code¹. // The generated login token should be encoded using base64url, then shown as a -// tg://login?token=base64encodedtoken URL in the QR code. +// tg://login?token=base64encodedtoken deep link »² in the QR code. // For more info, see login via QR code¹. // // Links: // 1. https://core.telegram.org/api/qr-login -// 2. https://core.telegram.org/api/qr-login +// 2. https://core.telegram.org/api/links#qr-code-login-links +// 3. https://core.telegram.org/api/qr-login // // Possible errors: // diff --git a/tg/tl_bot_menu_button_gen.go b/tg/tl_bot_menu_button_gen.go index b8a8c55c7f..ee66190106 100644 --- a/tg/tl_bot_menu_button_gen.go +++ b/tg/tl_bot_menu_button_gen.go @@ -32,6 +32,11 @@ var ( ) // BotMenuButtonDefault represents TL type `botMenuButtonDefault#7533a588`. +// Placeholder bot menu button¹ never returned to users: see the docs for more info². +// +// Links: +// 1. https://core.telegram.org/api/bots/menu +// 2. https://core.telegram.org/api/bots/menu // // See https://core.telegram.org/constructor/botMenuButtonDefault for reference. type BotMenuButtonDefault struct { @@ -133,6 +138,10 @@ func (b *BotMenuButtonDefault) DecodeBare(buf *bin.Buffer) error { } // BotMenuButtonCommands represents TL type `botMenuButtonCommands#4258c205`. +// Bot menu button¹ that opens the bot command list when clicked. +// +// Links: +// 1. https://core.telegram.org/api/bots/menu // // See https://core.telegram.org/constructor/botMenuButtonCommands for reference. type BotMenuButtonCommands struct { @@ -234,10 +243,11 @@ func (b *BotMenuButtonCommands) DecodeBare(buf *bin.Buffer) error { } // BotMenuButton represents TL type `botMenuButton#c7b57ce6`. -// URL of a web app¹ to open when the user clicks on the button +// Bot menu button¹ that opens a web app² when clicked. // // Links: -// 1. https://core.telegram.org/bots/webapps#launching-web-apps-from-the-menu-button +// 1. https://core.telegram.org/api/bots/menu +// 2. https://core.telegram.org/api/bots/webapps // // See https://core.telegram.org/constructor/botMenuButton for reference. type BotMenuButton struct { @@ -246,7 +256,7 @@ type BotMenuButton struct { // URL of a web app¹ to open when the user clicks on the button // // Links: - // 1) https://core.telegram.org/bots/webapps#launching-web-apps-from-the-menu-button + // 1) https://core.telegram.org/api/bots/webapps URL string } diff --git a/tg/tl_bots_set_bot_broadcast_default_admin_rights_gen.go b/tg/tl_bots_set_bot_broadcast_default_admin_rights_gen.go index a26bedbd42..88ca334093 100644 --- a/tg/tl_bots_set_bot_broadcast_default_admin_rights_gen.go +++ b/tg/tl_bots_set_bot_broadcast_default_admin_rights_gen.go @@ -32,7 +32,12 @@ var ( ) // BotsSetBotBroadcastDefaultAdminRightsRequest represents TL type `bots.setBotBroadcastDefaultAdminRights#788464e1`. -// Set the default suggested admin rights for bots being added as admins to channels. +// Set the default suggested admin rights¹ for bots being added as admins to channels, +// see here for more info on how to handle them »². +// +// Links: +// 1. https://core.telegram.org/api/rights#suggested-bot-rights +// 2. https://core.telegram.org/api/rights#suggested-bot-rights // // See https://core.telegram.org/method/bots.setBotBroadcastDefaultAdminRights for reference. type BotsSetBotBroadcastDefaultAdminRightsRequest struct { @@ -162,7 +167,12 @@ func (s *BotsSetBotBroadcastDefaultAdminRightsRequest) GetAdminRights() (value C } // BotsSetBotBroadcastDefaultAdminRights invokes method bots.setBotBroadcastDefaultAdminRights#788464e1 returning error if any. -// Set the default suggested admin rights for bots being added as admins to channels. +// Set the default suggested admin rights¹ for bots being added as admins to channels, +// see here for more info on how to handle them »². +// +// Links: +// 1. https://core.telegram.org/api/rights#suggested-bot-rights +// 2. https://core.telegram.org/api/rights#suggested-bot-rights // // Possible errors: // diff --git a/tg/tl_bots_set_bot_group_default_admin_rights_gen.go b/tg/tl_bots_set_bot_group_default_admin_rights_gen.go index 2f07ff5d2f..28283ab4f0 100644 --- a/tg/tl_bots_set_bot_group_default_admin_rights_gen.go +++ b/tg/tl_bots_set_bot_group_default_admin_rights_gen.go @@ -32,7 +32,12 @@ var ( ) // BotsSetBotGroupDefaultAdminRightsRequest represents TL type `bots.setBotGroupDefaultAdminRights#925ec9ea`. -// Set the default suggested admin rights for bots being added as admins to groups. +// Set the default suggested admin rights¹ for bots being added as admins to groups, see +// here for more info on how to handle them »². +// +// Links: +// 1. https://core.telegram.org/api/rights#suggested-bot-rights +// 2. https://core.telegram.org/api/rights#suggested-bot-rights // // See https://core.telegram.org/method/bots.setBotGroupDefaultAdminRights for reference. type BotsSetBotGroupDefaultAdminRightsRequest struct { @@ -162,7 +167,12 @@ func (s *BotsSetBotGroupDefaultAdminRightsRequest) GetAdminRights() (value ChatA } // BotsSetBotGroupDefaultAdminRights invokes method bots.setBotGroupDefaultAdminRights#925ec9ea returning error if any. -// Set the default suggested admin rights for bots being added as admins to groups. +// Set the default suggested admin rights¹ for bots being added as admins to groups, see +// here for more info on how to handle them »². +// +// Links: +// 1. https://core.telegram.org/api/rights#suggested-bot-rights +// 2. https://core.telegram.org/api/rights#suggested-bot-rights // // Possible errors: // diff --git a/tg/tl_bots_set_bot_menu_button_gen.go b/tg/tl_bots_set_bot_menu_button_gen.go index a1df85bade..10aac06997 100644 --- a/tg/tl_bots_set_bot_menu_button_gen.go +++ b/tg/tl_bots_set_bot_menu_button_gen.go @@ -32,7 +32,10 @@ var ( ) // BotsSetBotMenuButtonRequest represents TL type `bots.setBotMenuButton#4504d54f`. -// Sets the menu button action for a given user or for all users +// Sets the menu button action »¹ for a given user or for all users +// +// Links: +// 1. https://core.telegram.org/api/bots/menu // // See https://core.telegram.org/method/bots.setBotMenuButton for reference. type BotsSetBotMenuButtonRequest struct { @@ -199,7 +202,10 @@ func (s *BotsSetBotMenuButtonRequest) GetButton() (value BotMenuButtonClass) { } // BotsSetBotMenuButton invokes method bots.setBotMenuButton#4504d54f returning error if any. -// Sets the menu button action for a given user or for all users +// Sets the menu button action »¹ for a given user or for all users +// +// Links: +// 1. https://core.telegram.org/api/bots/menu // // Possible errors: // diff --git a/tg/tl_channels_check_username_gen.go b/tg/tl_channels_check_username_gen.go index ca47a7c403..d7c28e6af5 100644 --- a/tg/tl_channels_check_username_gen.go +++ b/tg/tl_channels_check_username_gen.go @@ -208,6 +208,7 @@ func (c *ChannelsCheckUsernameRequest) GetChannelAsNotEmpty() (NotEmptyInputChan // // 400 CHANNELS_ADMIN_PUBLIC_TOO_MUCH: You're admin of too many public channels, make some channels private to change the username of this channel. // 400 CHANNEL_INVALID: The provided channel is invalid. +// 400 CHANNEL_PRIVATE: You haven't joined this channel/supergroup. // 400 CHAT_ID_INVALID: The provided chat id is invalid. // 400 USERNAME_INVALID: The provided username is not valid. // diff --git a/tg/tl_channels_delete_history_gen.go b/tg/tl_channels_delete_history_gen.go index be1e95d659..7e8f43f094 100644 --- a/tg/tl_channels_delete_history_gen.go +++ b/tg/tl_channels_delete_history_gen.go @@ -269,7 +269,7 @@ func (d *ChannelsDeleteHistoryRequest) GetChannelAsNotEmpty() (NotEmptyInputChan // Possible errors: // // 400 CHANNEL_INVALID: The provided channel is invalid. -// 400 CHANNEL_PARICIPANT_MISSING: +// 400 CHANNEL_PARICIPANT_MISSING: The current user is not in the channel. // 400 CHANNEL_PRIVATE: You haven't joined this channel/supergroup. // 400 CHAT_ADMIN_REQUIRED: You must be an admin in this chat to do this. // diff --git a/tg/tl_channels_get_send_as_gen.go b/tg/tl_channels_get_send_as_gen.go index 73a493234f..3798b5f31d 100644 --- a/tg/tl_channels_get_send_as_gen.go +++ b/tg/tl_channels_get_send_as_gen.go @@ -172,6 +172,7 @@ func (g *ChannelsGetSendAsRequest) GetPeer() (value InputPeerClass) { // Possible errors: // // 400 CHANNEL_PRIVATE: You haven't joined this channel/supergroup. +// 400 CHAT_ID_INVALID: The provided chat id is invalid. // 400 PEER_ID_INVALID: The provided peer id is invalid. // // See https://core.telegram.org/method/channels.getSendAs for reference. diff --git a/tg/tl_config_gen.go b/tg/tl_config_gen.go index 6d1f073d53..04dc12e947 100644 --- a/tg/tl_config_gen.go +++ b/tg/tl_config_gen.go @@ -165,9 +165,10 @@ type Config struct { // If during a VoIP call a packet isn't received for the specified period of time, the // call must be aborted CallPacketTimeoutMs int - // The domain to use to parse in-app links.For example t.me indicates that t.me/username - // links should parsed to @username, t.me/addsticker/name should be parsed to the - // appropriate stickerset and so on... + // The domain to use to parse deep links »¹. + // + // Links: + // 1) https://core.telegram.org/api/links MeURLPrefix string // URL to use to auto-update the current app // @@ -196,7 +197,7 @@ type Config struct { // DC ID to use to download webfiles¹ // // Links: - // 1) https://core.telegram.org/api/files + // 1) https://core.telegram.org/api/files#downloading-webfiles WebfileDCID int // Suggested language code // diff --git a/tg/tl_contacts_resolve_phone_gen.go b/tg/tl_contacts_resolve_phone_gen.go index e8f9f3b814..e459e33200 100644 --- a/tg/tl_contacts_resolve_phone_gen.go +++ b/tg/tl_contacts_resolve_phone_gen.go @@ -36,8 +36,11 @@ var ( // // See https://core.telegram.org/method/contacts.resolvePhone for reference. type ContactsResolvePhoneRequest struct { - // Phone number in international format, possibly obtained from a t.me/+number or - // tg://resolve?phone=number URI. + // Phone number in international format, possibly obtained from a phone number deep + // link¹. + // + // Links: + // 1) https://core.telegram.org/api/links#phone-number-links Phone string } @@ -165,6 +168,10 @@ func (r *ContactsResolvePhoneRequest) GetPhone() (value string) { // ContactsResolvePhone invokes method contacts.resolvePhone#8af94344 returning error if any. // Resolve a phone number to get user info, if their privacy settings allow it. // +// Possible errors: +// +// 400 PHONE_NOT_OCCUPIED: No user is associated to the specified phone number. +// // See https://core.telegram.org/method/contacts.resolvePhone for reference. func (c *Client) ContactsResolvePhone(ctx context.Context, phone string) (*ContactsResolvedPeer, error) { var result ContactsResolvedPeer diff --git a/tg/tl_dialog_filter_gen.go b/tg/tl_dialog_filter_gen.go index 2bae074388..8481c2658a 100644 --- a/tg/tl_dialog_filter_gen.go +++ b/tg/tl_dialog_filter_gen.go @@ -738,6 +738,7 @@ func (d *DialogFilter) MapExcludePeers() (value InputPeerClassArray) { } // DialogFilterDefault represents TL type `dialogFilterDefault#363293ae`. +// Used only when reordering folders to indicate the default (all chats) folder. // // See https://core.telegram.org/constructor/dialogFilterDefault for reference. type DialogFilterDefault struct { diff --git a/tg/tl_errors_gen.go b/tg/tl_errors_gen.go index 0c9008b2b8..5b16c86fa2 100644 --- a/tg/tl_errors_gen.go +++ b/tg/tl_errors_gen.go @@ -68,7 +68,6 @@ const ( ErrBotMissing = "BOT_MISSING" ErrBotOnesideNotAvail = "BOT_ONESIDE_NOT_AVAIL" ErrBotPaymentsDisabled = "BOT_PAYMENTS_DISABLED" - ErrBotPollsDisabled = "BOT_POLLS_DISABLED" ErrBotResponseTimeout = "BOT_RESPONSE_TIMEOUT" ErrBotScoreNotModified = "BOT_SCORE_NOT_MODIFIED" ErrBroadcastForbidden = "BROADCAST_FORBIDDEN" @@ -101,7 +100,6 @@ const ( ErrChatAdminInviteRequired = "CHAT_ADMIN_INVITE_REQUIRED" ErrChatAdminRequired = "CHAT_ADMIN_REQUIRED" ErrChatForwardsRestricted = "CHAT_FORWARDS_RESTRICTED" - ErrChatFromCallChanged = "CHAT_FROM_CALL_CHANGED" ErrChatGuestSendForbidden = "CHAT_GUEST_SEND_FORBIDDEN" ErrChatIDEmpty = "CHAT_ID_EMPTY" ErrChatIDGenerateFailed = "CHAT_ID_GENERATE_FAILED" @@ -109,7 +107,6 @@ const ( ErrChatInvalid = "CHAT_INVALID" ErrChatInvitePermanent = "CHAT_INVITE_PERMANENT" ErrChatLinkExists = "CHAT_LINK_EXISTS" - ErrChatMembersChannel = "CHAT_MEMBERS_CHANNEL" ErrChatNotModified = "CHAT_NOT_MODIFIED" ErrChatRestricted = "CHAT_RESTRICTED" ErrChatSendGameForbidden = "CHAT_SEND_GAME_FORBIDDEN" @@ -277,7 +274,6 @@ const ( ErrPasswordRequired = "PASSWORD_REQUIRED" ErrPasswordTooFresh = "PASSWORD_TOO_FRESH" ErrPaymentProviderInvalid = "PAYMENT_PROVIDER_INVALID" - ErrPaymentUnsupported = "PAYMENT_UNSUPPORTED" ErrPeerIDInvalid = "PEER_ID_INVALID" ErrPeerIDNotSupported = "PEER_ID_NOT_SUPPORTED" ErrPersistentTimestampEmpty = "PERSISTENT_TIMESTAMP_EMPTY" @@ -287,6 +283,7 @@ const ( ErrPhoneCodeExpired = "PHONE_CODE_EXPIRED" ErrPhoneCodeHashEmpty = "PHONE_CODE_HASH_EMPTY" ErrPhoneCodeInvalid = "PHONE_CODE_INVALID" + ErrPhoneNotOccupied = "PHONE_NOT_OCCUPIED" ErrPhoneNumberAppSignupForbidden = "PHONE_NUMBER_APP_SIGNUP_FORBIDDEN" ErrPhoneNumberBanned = "PHONE_NUMBER_BANNED" ErrPhoneNumberFlood = "PHONE_NUMBER_FLOOD" @@ -333,6 +330,7 @@ const ( ErrRandomIDInvalid = "RANDOM_ID_INVALID" ErrRandomLengthInvalid = "RANDOM_LENGTH_INVALID" ErrRangesInvalid = "RANGES_INVALID" + ErrReactionsTooMany = "REACTIONS_TOO_MANY" ErrReactionEmpty = "REACTION_EMPTY" ErrReactionInvalid = "REACTION_INVALID" ErrReplyMarkupBuyEmpty = "REPLY_MARKUP_BUY_EMPTY" @@ -361,7 +359,6 @@ const ( ErrSendCodeUnavailable = "SEND_CODE_UNAVAILABLE" ErrSendMessageMediaInvalid = "SEND_MESSAGE_MEDIA_INVALID" ErrSendMessageTypeInvalid = "SEND_MESSAGE_TYPE_INVALID" - ErrSendReactionResult1Invalid = "SEND_REACTION_RESULT1_INVALID" ErrSensitiveChangeForbidden = "SENSITIVE_CHANGE_FORBIDDEN" ErrSessionTooFresh = "SESSION_TOO_FRESH" ErrSettingsInvalid = "SETTINGS_INVALID" @@ -642,11 +639,6 @@ func IsBotPaymentsDisabled(err error) bool { return tgerr.Is(err, ErrBotPaymentsDisabled) } -// IsBotPollsDisabled reports whether err is BOT_POLLS_DISABLED. -func IsBotPollsDisabled(err error) bool { - return tgerr.Is(err, ErrBotPollsDisabled) -} - // IsBotResponseTimeout reports whether err is BOT_RESPONSE_TIMEOUT. func IsBotResponseTimeout(err error) bool { return tgerr.Is(err, ErrBotResponseTimeout) @@ -807,11 +799,6 @@ func IsChatForwardsRestricted(err error) bool { return tgerr.Is(err, ErrChatForwardsRestricted) } -// IsChatFromCallChanged reports whether err is CHAT_FROM_CALL_CHANGED. -func IsChatFromCallChanged(err error) bool { - return tgerr.Is(err, ErrChatFromCallChanged) -} - // IsChatGuestSendForbidden reports whether err is CHAT_GUEST_SEND_FORBIDDEN. func IsChatGuestSendForbidden(err error) bool { return tgerr.Is(err, ErrChatGuestSendForbidden) @@ -847,11 +834,6 @@ func IsChatLinkExists(err error) bool { return tgerr.Is(err, ErrChatLinkExists) } -// IsChatMembersChannel reports whether err is CHAT_MEMBERS_CHANNEL. -func IsChatMembersChannel(err error) bool { - return tgerr.Is(err, ErrChatMembersChannel) -} - // IsChatNotModified reports whether err is CHAT_NOT_MODIFIED. func IsChatNotModified(err error) bool { return tgerr.Is(err, ErrChatNotModified) @@ -1687,11 +1669,6 @@ func IsPaymentProviderInvalid(err error) bool { return tgerr.Is(err, ErrPaymentProviderInvalid) } -// IsPaymentUnsupported reports whether err is PAYMENT_UNSUPPORTED. -func IsPaymentUnsupported(err error) bool { - return tgerr.Is(err, ErrPaymentUnsupported) -} - // IsPeerIDInvalid reports whether err is PEER_ID_INVALID. func IsPeerIDInvalid(err error) bool { return tgerr.Is(err, ErrPeerIDInvalid) @@ -1737,6 +1714,11 @@ func IsPhoneCodeInvalid(err error) bool { return tgerr.Is(err, ErrPhoneCodeInvalid) } +// IsPhoneNotOccupied reports whether err is PHONE_NOT_OCCUPIED. +func IsPhoneNotOccupied(err error) bool { + return tgerr.Is(err, ErrPhoneNotOccupied) +} + // IsPhoneNumberAppSignupForbidden reports whether err is PHONE_NUMBER_APP_SIGNUP_FORBIDDEN. func IsPhoneNumberAppSignupForbidden(err error) bool { return tgerr.Is(err, ErrPhoneNumberAppSignupForbidden) @@ -1967,6 +1949,11 @@ func IsRangesInvalid(err error) bool { return tgerr.Is(err, ErrRangesInvalid) } +// IsReactionsTooMany reports whether err is REACTIONS_TOO_MANY. +func IsReactionsTooMany(err error) bool { + return tgerr.Is(err, ErrReactionsTooMany) +} + // IsReactionEmpty reports whether err is REACTION_EMPTY. func IsReactionEmpty(err error) bool { return tgerr.Is(err, ErrReactionEmpty) @@ -2107,11 +2094,6 @@ func IsSendMessageTypeInvalid(err error) bool { return tgerr.Is(err, ErrSendMessageTypeInvalid) } -// IsSendReactionResult1Invalid reports whether err is SEND_REACTION_RESULT1_INVALID. -func IsSendReactionResult1Invalid(err error) bool { - return tgerr.Is(err, ErrSendReactionResult1Invalid) -} - // IsSensitiveChangeForbidden reports whether err is SENSITIVE_CHANGE_FORBIDDEN. func IsSensitiveChangeForbidden(err error) bool { return tgerr.Is(err, ErrSensitiveChangeForbidden) diff --git a/tg/tl_help_deep_link_info_gen.go b/tg/tl_help_deep_link_info_gen.go index a34a29637a..012649045f 100644 --- a/tg/tl_help_deep_link_info_gen.go +++ b/tg/tl_help_deep_link_info_gen.go @@ -134,7 +134,10 @@ func (d *HelpDeepLinkInfoEmpty) DecodeBare(b *bin.Buffer) error { } // HelpDeepLinkInfo represents TL type `help.deepLinkInfo#6a4ee832`. -// Deep linking info +// Deep link info, see the here for more details¹ +// +// Links: +// 1. https://core.telegram.org/api/links#unsupported-links // // See https://core.telegram.org/constructor/help.deepLinkInfo for reference. type HelpDeepLinkInfo struct { diff --git a/tg/tl_help_get_deep_link_info_gen.go b/tg/tl_help_get_deep_link_info_gen.go index 86193a9298..014aec9fa8 100644 --- a/tg/tl_help_get_deep_link_info_gen.go +++ b/tg/tl_help_get_deep_link_info_gen.go @@ -32,11 +32,14 @@ var ( ) // HelpGetDeepLinkInfoRequest represents TL type `help.getDeepLinkInfo#3fedc75f`. -// Get info about a t.me link +// Get info about an unsupported deep link, see here for more info »¹. +// +// Links: +// 1. https://core.telegram.org/api/links#unsupported-links // // See https://core.telegram.org/method/help.getDeepLinkInfo for reference. type HelpGetDeepLinkInfoRequest struct { - // Path in t.me/path + // Path component of a tg: link Path string } @@ -162,7 +165,10 @@ func (g *HelpGetDeepLinkInfoRequest) GetPath() (value string) { } // HelpGetDeepLinkInfo invokes method help.getDeepLinkInfo#3fedc75f returning error if any. -// Get info about a t.me link +// Get info about an unsupported deep link, see here for more info »¹. +// +// Links: +// 1. https://core.telegram.org/api/links#unsupported-links // // See https://core.telegram.org/method/help.getDeepLinkInfo for reference. func (c *Client) HelpGetDeepLinkInfo(ctx context.Context, path string) (HelpDeepLinkInfoClass, error) { diff --git a/tg/tl_input_document_gen.go b/tg/tl_input_document_gen.go index 78f5cf175f..c3182f1eae 100644 --- a/tg/tl_input_document_gen.go +++ b/tg/tl_input_document_gen.go @@ -134,7 +134,7 @@ func (i *InputDocumentEmpty) DecodeBare(b *bin.Buffer) error { } // InputDocument represents TL type `inputDocument#1abfb575`. -// Defines a video for subsequent interaction. +// Defines a document for subsequent interaction. // // See https://core.telegram.org/constructor/inputDocument for reference. type InputDocument struct { diff --git a/tg/tl_input_invoice_gen.go b/tg/tl_input_invoice_gen.go index a7869084ac..4bc800c52d 100644 --- a/tg/tl_input_invoice_gen.go +++ b/tg/tl_input_invoice_gen.go @@ -202,11 +202,12 @@ func (i *InputInvoiceMessage) GetMsgID() (value int) { } // InputInvoiceSlug represents TL type `inputInvoiceSlug#c326caef`. -// An invoice slug taken from a t.me/invoice/ link or from the premium_invoice_slug app -// config parameter »¹ +// An invoice slug taken from an invoice deep link¹ or from the premium_invoice_slug app +// config parameter »² // // Links: -// 1. https://core.telegram.org/api/config#client-configuration +// 1. https://core.telegram.org/api/links#invoice-links +// 2. https://core.telegram.org/api/config#client-configuration // // See https://core.telegram.org/constructor/inputInvoiceSlug for reference. type InputInvoiceSlug struct { diff --git a/tg/tl_input_media_gen.go b/tg/tl_input_media_gen.go index 9d4ea701a6..7623f8cf3f 100644 --- a/tg/tl_input_media_gen.go +++ b/tg/tl_input_media_gen.go @@ -2587,7 +2587,15 @@ type InputMediaInvoice struct { // JSON-encoded data about the invoice, which will be shared with the payment provider. A // detailed description of required fields should be provided by the payment provider. ProviderData DataJSON - // Start parameter + // Unique bot deep links start parameter¹. If present, forwarded copies of the sent + // message will have a URL button with a deep link² to the bot (instead of a Pay button) + // with the value used as the start parameter. If absent, forwarded copies of the sent + // message will have a Pay button, allowing multiple users to pay directly from the + // forwarded message, using the same invoice. + // + // Links: + // 1) https://core.telegram.org/api/links#not-invoice + // 2) https://core.telegram.org/api/links#bot-links // // Use SetStartParam and GetStartParam helpers. StartParam string diff --git a/tg/tl_input_sticker_set_gen.go b/tg/tl_input_sticker_set_gen.go index 8ce29e693e..f16517c8e9 100644 --- a/tg/tl_input_sticker_set_gen.go +++ b/tg/tl_input_sticker_set_gen.go @@ -296,11 +296,17 @@ func (i *InputStickerSetID) GetAccessHash() (value int64) { } // InputStickerSetShortName represents TL type `inputStickerSetShortName#861cc8a0`. -// Stickerset by short name, from tg://addstickers?set=short_name +// Stickerset by short name, from a stickerset deep link »¹ +// +// Links: +// 1. https://core.telegram.org/api/links#stickerset-links // // See https://core.telegram.org/constructor/inputStickerSetShortName for reference. type InputStickerSetShortName struct { - // From tg://addstickers?set=short_name + // Short name from a stickerset deep link »¹ + // + // Links: + // 1) https://core.telegram.org/api/links#stickerset-links ShortName string } diff --git a/tg/tl_input_theme_gen.go b/tg/tl_input_theme_gen.go index bd82d182c0..36f71d7ded 100644 --- a/tg/tl_input_theme_gen.go +++ b/tg/tl_input_theme_gen.go @@ -198,7 +198,10 @@ func (i *InputTheme) GetAccessHash() (value int64) { // // See https://core.telegram.org/constructor/inputThemeSlug for reference. type InputThemeSlug struct { - // Unique theme ID + // Unique theme ID obtained from a theme deep link »¹ + // + // Links: + // 1) https://core.telegram.org/api/links#theme-links Slug string } diff --git a/tg/tl_input_web_file_location_gen.go b/tg/tl_input_web_file_location_gen.go index ff1a275ea5..e6d01c81b5 100644 --- a/tg/tl_input_web_file_location_gen.go +++ b/tg/tl_input_web_file_location_gen.go @@ -194,13 +194,24 @@ func (i *InputWebFileLocation) GetAccessHash() (value int64) { } // InputWebFileGeoPointLocation represents TL type `inputWebFileGeoPointLocation#9f2221c9`. -// Geolocation +// Used to download a server-generated image with the map preview from a geoPoint¹, see +// the webfile docs for more info »². +// +// Links: +// 1. https://core.telegram.org/constructor/geoPoint +// 2. https://core.telegram.org/api/files#downloading-webfiles // // See https://core.telegram.org/constructor/inputWebFileGeoPointLocation for reference. type InputWebFileGeoPointLocation struct { - // Geolocation + // Generated from the lat, long and accuracy_radius parameters of the geoPoint¹ + // + // Links: + // 1) https://core.telegram.org/constructor/geoPoint GeoPoint InputGeoPointClass - // Access hash + // Access hash of the geoPoint¹ + // + // Links: + // 1) https://core.telegram.org/constructor/geoPoint AccessHash int64 // Map width in pixels before applying scale; 16-1024 W int @@ -469,6 +480,12 @@ func (i *InputWebFileGeoPointLocation) GetScale() (value int) { } // InputWebFileAudioAlbumThumbLocation represents TL type `inputWebFileAudioAlbumThumbLocation#f46fe924`. +// Used to download an album cover for any music file using upload.getWebFile¹, see the +// webfile docs for more info »². +// +// Links: +// 1. https://core.telegram.org/method/upload.getWebFile +// 2. https://core.telegram.org/api/files#downloading-webfiles // // See https://core.telegram.org/constructor/inputWebFileAudioAlbumThumbLocation for reference. type InputWebFileAudioAlbumThumbLocation struct { @@ -477,17 +494,20 @@ type InputWebFileAudioAlbumThumbLocation struct { // Links: // 1) https://core.telegram.org/mtproto/TL-combinators#conditional-fields Flags bin.Fields - // + // Used to return a thumbnail with 100x100 resolution (instead of the default 600x600) Small bool - // + // The audio file in question: must NOT be provided in secret chats, provide the title + // and performer fields instead. // // Use SetDocument and GetDocument helpers. Document InputDocumentClass - // + // Song title: should only be used in secret chats, in normal chats provide document + // instead, as it has more lax rate limits. // // Use SetTitle and GetTitle helpers. Title string - // + // Song performer: should only be used in secret chats, in normal chats provide document + // instead, as it has more lax rate limits. // // Use SetPerformer and GetPerformer helpers. Performer string diff --git a/tg/tl_keyboard_button_gen.go b/tg/tl_keyboard_button_gen.go index a05b9e8eb9..6fda6006bb 100644 --- a/tg/tl_keyboard_button_gen.go +++ b/tg/tl_keyboard_button_gen.go @@ -2464,7 +2464,7 @@ func (k *KeyboardButtonUserProfile) GetUserID() (value int64) { // keyboardButtonSimpleWebView¹ for reply keyboards. // // Links: -// 1. https://core.telegram.org/bots/webapps +// 1. https://core.telegram.org/api/bots/webapps // 2. https://core.telegram.org/method/messages.requestWebView // 3. https://core.telegram.org/constructor/keyboardButtonSimpleWebView // @@ -2475,7 +2475,7 @@ type KeyboardButtonWebView struct { // Web app url¹ // // Links: - // 1) https://core.telegram.org/bots/webapps + // 1) https://core.telegram.org/api/bots/webapps URL string } @@ -2637,7 +2637,7 @@ func (k *KeyboardButtonWebView) GetURL() (value string) { // for inline keyboards. // // Links: -// 1. https://core.telegram.org/bots/webapps +// 1. https://core.telegram.org/api/bots/webapps // 2. https://core.telegram.org/method/messages.requestSimpleWebView // 3. https://core.telegram.org/constructor/keyboardButtonWebView // @@ -2648,7 +2648,7 @@ type KeyboardButtonSimpleWebView struct { // Web app URL¹ // // Links: - // 1) https://core.telegram.org/bots/webapps + // 1) https://core.telegram.org/api/bots/webapps URL string } diff --git a/tg/tl_message_action_gen.go b/tg/tl_message_action_gen.go index 7bbbe21c11..6ebc56cf96 100644 --- a/tg/tl_message_action_gen.go +++ b/tg/tl_message_action_gen.go @@ -2346,11 +2346,12 @@ type MessageActionPaymentSent struct { // Links: // 1) https://core.telegram.org/bots/payments/currencies.json TotalAmount int64 - // An invoice slug taken from a t.me/invoice/ link or from the premium_invoice_slug app - // config parameter »¹ + // An invoice slug taken from an invoice deep link¹ or from the premium_invoice_slug app + // config parameter »² // // Links: - // 1) https://core.telegram.org/api/config#client-configuration + // 1) https://core.telegram.org/api/links#invoice-links + // 2) https://core.telegram.org/api/config#client-configuration // // Use SetInvoiceSlug and GetInvoiceSlug helpers. InvoiceSlug string @@ -4866,7 +4867,7 @@ func (m *MessageActionChatJoinedByRequest) DecodeBare(b *bin.Buffer) error { // (bot side service message). // // Links: -// 1. https://core.telegram.org/bots/webapps +// 1. https://core.telegram.org/api/bots/webapps // // See https://core.telegram.org/constructor/messageActionWebViewDataSentMe for reference. type MessageActionWebViewDataSentMe struct { @@ -5035,7 +5036,7 @@ func (m *MessageActionWebViewDataSentMe) GetData() (value string) { // (user side service message). // // Links: -// 1. https://core.telegram.org/bots/webapps +// 1. https://core.telegram.org/api/bots/webapps // // See https://core.telegram.org/constructor/messageActionWebViewDataSent for reference. type MessageActionWebViewDataSent struct { diff --git a/tg/tl_messages_check_chat_invite_gen.go b/tg/tl_messages_check_chat_invite_gen.go index 9098702fbf..ea9b50660d 100644 --- a/tg/tl_messages_check_chat_invite_gen.go +++ b/tg/tl_messages_check_chat_invite_gen.go @@ -36,7 +36,10 @@ var ( // // See https://core.telegram.org/method/messages.checkChatInvite for reference. type MessagesCheckChatInviteRequest struct { - // Invite hash in t.me/joinchat/hash or t.me/+hash + // Invite hash from chat invite deep link »¹. + // + // Links: + // 1) https://core.telegram.org/api/links#chat-invite-links Hash string } @@ -167,7 +170,6 @@ func (c *MessagesCheckChatInviteRequest) GetHash() (value string) { // Possible errors: // // 406 CHANNEL_PRIVATE: You haven't joined this channel/supergroup. -// 500 CHAT_MEMBERS_CHANNEL: // 400 INVITE_HASH_EMPTY: The invite hash is empty. // 406 INVITE_HASH_EXPIRED: The invite link has expired. // 400 INVITE_HASH_INVALID: The invite hash is invalid. diff --git a/tg/tl_messages_edit_exported_chat_invite_gen.go b/tg/tl_messages_edit_exported_chat_invite_gen.go index 0dbc424545..6ecdffa915 100644 --- a/tg/tl_messages_edit_exported_chat_invite_gen.go +++ b/tg/tl_messages_edit_exported_chat_invite_gen.go @@ -447,7 +447,7 @@ func (e *MessagesEditExportedChatInviteRequest) GetTitle() (value string, ok boo // // Possible errors: // -// 400 CHAT_INVITE_PERMANENT: +// 400 CHAT_INVITE_PERMANENT: You can't set an expiration date on permanent invite links. // 403 EDIT_BOT_INVITE_FORBIDDEN: Normal users can't edit invites that were created by bots. // 400 PEER_ID_INVALID: The provided peer id is invalid. // diff --git a/tg/tl_messages_get_all_drafts_gen.go b/tg/tl_messages_get_all_drafts_gen.go index 8e01fd0c70..379bb543aa 100644 --- a/tg/tl_messages_get_all_drafts_gen.go +++ b/tg/tl_messages_get_all_drafts_gen.go @@ -32,10 +32,12 @@ var ( ) // MessagesGetAllDraftsRequest represents TL type `messages.getAllDrafts#6a3f8d65`. -// Save get all message drafts¹. +// Return all message drafts¹. +// Returns all the latest updateDraftMessage² updates related to all chats with drafts. // // Links: // 1. https://core.telegram.org/api/drafts +// 2. https://core.telegram.org/constructor/updateDraftMessage // // See https://core.telegram.org/method/messages.getAllDrafts for reference. type MessagesGetAllDraftsRequest struct { @@ -132,10 +134,12 @@ func (g *MessagesGetAllDraftsRequest) DecodeBare(b *bin.Buffer) error { } // MessagesGetAllDrafts invokes method messages.getAllDrafts#6a3f8d65 returning error if any. -// Save get all message drafts¹. +// Return all message drafts¹. +// Returns all the latest updateDraftMessage² updates related to all chats with drafts. // // Links: // 1. https://core.telegram.org/api/drafts +// 2. https://core.telegram.org/constructor/updateDraftMessage // // See https://core.telegram.org/method/messages.getAllDrafts for reference. func (c *Client) MessagesGetAllDrafts(ctx context.Context) (UpdatesClass, error) { diff --git a/tg/tl_messages_get_attach_menu_bot_gen.go b/tg/tl_messages_get_attach_menu_bot_gen.go index 8545409abe..d21107b757 100644 --- a/tg/tl_messages_get_attach_menu_bot_gen.go +++ b/tg/tl_messages_get_attach_menu_bot_gen.go @@ -36,7 +36,7 @@ var ( // attachment menu »¹ // // Links: -// 1. https://core.telegram.org/bots/webapps#launching-web-apps-from-the-attachment-menu +// 1. https://core.telegram.org/api/bots/attach // // See https://core.telegram.org/method/messages.getAttachMenuBot for reference. type MessagesGetAttachMenuBotRequest struct { @@ -175,7 +175,7 @@ func (g *MessagesGetAttachMenuBotRequest) GetBot() (value InputUserClass) { // attachment menu »¹ // // Links: -// 1. https://core.telegram.org/bots/webapps#launching-web-apps-from-the-attachment-menu +// 1. https://core.telegram.org/api/bots/attach // // Possible errors: // diff --git a/tg/tl_messages_get_attach_menu_bots_gen.go b/tg/tl_messages_get_attach_menu_bots_gen.go index c375dba9ac..ef523dd6d4 100644 --- a/tg/tl_messages_get_attach_menu_bots_gen.go +++ b/tg/tl_messages_get_attach_menu_bots_gen.go @@ -35,7 +35,7 @@ var ( // Returns installed attachment menu bot web apps »¹ // // Links: -// 1. https://core.telegram.org/bots/webapps#launching-web-apps-from-the-attachment-menu +// 1. https://core.telegram.org/api/bots/attach // // See https://core.telegram.org/method/messages.getAttachMenuBots for reference. type MessagesGetAttachMenuBotsRequest struct { @@ -171,7 +171,7 @@ func (g *MessagesGetAttachMenuBotsRequest) GetHash() (value int64) { // Returns installed attachment menu bot web apps »¹ // // Links: -// 1. https://core.telegram.org/bots/webapps#launching-web-apps-from-the-attachment-menu +// 1. https://core.telegram.org/api/bots/attach // // See https://core.telegram.org/method/messages.getAttachMenuBots for reference. func (c *Client) MessagesGetAttachMenuBots(ctx context.Context, hash int64) (AttachMenuBotsClass, error) { diff --git a/tg/tl_messages_hide_all_chat_join_requests_gen.go b/tg/tl_messages_hide_all_chat_join_requests_gen.go index fb736cb07c..988156ff15 100644 --- a/tg/tl_messages_hide_all_chat_join_requests_gen.go +++ b/tg/tl_messages_hide_all_chat_join_requests_gen.go @@ -290,7 +290,8 @@ func (h *MessagesHideAllChatJoinRequestsRequest) GetLink() (value string, ok boo // 400 CHANNEL_PRIVATE: You haven't joined this channel/supergroup. // 400 CHAT_ADMIN_REQUIRED: You must be an admin in this chat to do this. // 403 CHAT_WRITE_FORBIDDEN: You can't write in this chat. -// 400 HIDE_REQUESTER_MISSING: +// 400 HIDE_REQUESTER_MISSING: The join request was missing or was already handled. +// 400 PEER_ID_INVALID: The provided peer id is invalid. // 400 USER_CHANNELS_TOO_MUCH: One of the users you tried to add is already in too many channels/supergroups. // // See https://core.telegram.org/method/messages.hideAllChatJoinRequests for reference. diff --git a/tg/tl_messages_hide_chat_join_request_gen.go b/tg/tl_messages_hide_chat_join_request_gen.go index 2b088d2639..ed11f02bf4 100644 --- a/tg/tl_messages_hide_chat_join_request_gen.go +++ b/tg/tl_messages_hide_chat_join_request_gen.go @@ -272,6 +272,7 @@ func (h *MessagesHideChatJoinRequestRequest) GetUserID() (value InputUserClass) // Possible errors: // // 400 PEER_ID_INVALID: The provided peer id is invalid. +// 400 USER_ID_INVALID: The provided user ID is invalid. // // See https://core.telegram.org/method/messages.hideChatJoinRequest for reference. // Can be used by bots. diff --git a/tg/tl_messages_import_chat_invite_gen.go b/tg/tl_messages_import_chat_invite_gen.go index 104e61831c..24540d24f8 100644 --- a/tg/tl_messages_import_chat_invite_gen.go +++ b/tg/tl_messages_import_chat_invite_gen.go @@ -36,7 +36,10 @@ var ( // // See https://core.telegram.org/method/messages.importChatInvite for reference. type MessagesImportChatInviteRequest struct { - // hash from t.me/joinchat/hash + // hash from a chat invite deep link¹ + // + // Links: + // 1) https://core.telegram.org/api/links#chat-invite-links Hash string } diff --git a/tg/tl_messages_prolong_web_view_gen.go b/tg/tl_messages_prolong_web_view_gen.go index 8ed6c7b9d3..2362e5ea33 100644 --- a/tg/tl_messages_prolong_web_view_gen.go +++ b/tg/tl_messages_prolong_web_view_gen.go @@ -53,7 +53,7 @@ type MessagesProlongWebViewRequest struct { // Bot that owns the web app¹ // // Links: - // 1) https://core.telegram.org/bots/webapps + // 1) https://core.telegram.org/api/bots/webapps Bot InputUserClass // Web app interaction ID obtained from messages.requestWebView¹ // diff --git a/tg/tl_messages_rate_transcribed_audio_gen.go b/tg/tl_messages_rate_transcribed_audio_gen.go index 92c983c161..64c077cb9b 100644 --- a/tg/tl_messages_rate_transcribed_audio_gen.go +++ b/tg/tl_messages_rate_transcribed_audio_gen.go @@ -32,7 +32,10 @@ var ( ) // MessagesRateTranscribedAudioRequest represents TL type `messages.rateTranscribedAudio#7f1d072f`. -// Rate transcribed voice message +// Rate transcribed voice message¹ +// +// Links: +// 1. https://core.telegram.org/api/transcribe // // See https://core.telegram.org/method/messages.rateTranscribedAudio for reference. type MessagesRateTranscribedAudioRequest struct { @@ -248,7 +251,10 @@ func (r *MessagesRateTranscribedAudioRequest) GetGood() (value bool) { } // MessagesRateTranscribedAudio invokes method messages.rateTranscribedAudio#7f1d072f returning error if any. -// Rate transcribed voice message +// Rate transcribed voice message¹ +// +// Links: +// 1. https://core.telegram.org/api/transcribe // // See https://core.telegram.org/method/messages.rateTranscribedAudio for reference. func (c *Client) MessagesRateTranscribedAudio(ctx context.Context, request *MessagesRateTranscribedAudioRequest) (bool, error) { diff --git a/tg/tl_messages_read_reactions_gen.go b/tg/tl_messages_read_reactions_gen.go index b44ef0b4e0..b66e406158 100644 --- a/tg/tl_messages_read_reactions_gen.go +++ b/tg/tl_messages_read_reactions_gen.go @@ -175,6 +175,10 @@ func (r *MessagesReadReactionsRequest) GetPeer() (value InputPeerClass) { // Links: // 1. https://core.telegram.org/api/reactions // +// Possible errors: +// +// 400 PEER_ID_INVALID: The provided peer id is invalid. +// // See https://core.telegram.org/method/messages.readReactions for reference. func (c *Client) MessagesReadReactions(ctx context.Context, peer InputPeerClass) (*MessagesAffectedHistory, error) { var result MessagesAffectedHistory diff --git a/tg/tl_messages_received_queue_gen.go b/tg/tl_messages_received_queue_gen.go index 929267ab2f..773db9aa89 100644 --- a/tg/tl_messages_received_queue_gen.go +++ b/tg/tl_messages_received_queue_gen.go @@ -33,6 +33,8 @@ var ( // MessagesReceivedQueueRequest represents TL type `messages.receivedQueue#55a5bb66`. // Confirms receipt of messages in a secret chat by client, cancels push notifications. +// The method returns a list of random_ids of messages for which push notifications were +// cancelled. // // See https://core.telegram.org/method/messages.receivedQueue for reference. type MessagesReceivedQueueRequest struct { @@ -163,6 +165,8 @@ func (r *MessagesReceivedQueueRequest) GetMaxQts() (value int) { // MessagesReceivedQueue invokes method messages.receivedQueue#55a5bb66 returning error if any. // Confirms receipt of messages in a secret chat by client, cancels push notifications. +// The method returns a list of random_ids of messages for which push notifications were +// cancelled. // // Possible errors: // diff --git a/tg/tl_messages_request_simple_web_view_gen.go b/tg/tl_messages_request_simple_web_view_gen.go index f0b9513a8a..655848a7dd 100644 --- a/tg/tl_messages_request_simple_web_view_gen.go +++ b/tg/tl_messages_request_simple_web_view_gen.go @@ -35,7 +35,7 @@ var ( // Open a bot web app¹. // // Links: -// 1. https://core.telegram.org/bots/webapps +// 1. https://core.telegram.org/api/bots/webapps // // See https://core.telegram.org/method/messages.requestSimpleWebView for reference. type MessagesRequestSimpleWebViewRequest struct { @@ -269,7 +269,7 @@ func (r *MessagesRequestSimpleWebViewRequest) GetThemeParams() (value DataJSON, // Open a bot web app¹. // // Links: -// 1. https://core.telegram.org/bots/webapps +// 1. https://core.telegram.org/api/bots/webapps // // See https://core.telegram.org/method/messages.requestSimpleWebView for reference. func (c *Client) MessagesRequestSimpleWebView(ctx context.Context, request *MessagesRequestSimpleWebViewRequest) (*SimpleWebViewResultURL, error) { diff --git a/tg/tl_messages_request_web_view_gen.go b/tg/tl_messages_request_web_view_gen.go index de4e75e737..2709d233f7 100644 --- a/tg/tl_messages_request_web_view_gen.go +++ b/tg/tl_messages_request_web_view_gen.go @@ -47,7 +47,10 @@ type MessagesRequestWebViewRequest struct { // Links: // 1) https://core.telegram.org/mtproto/TL-combinators#conditional-fields Flags bin.Fields - // Whether the webview was opened after clicking on the bot's menu button. + // Whether the webview was opened by clicking on the bot's menu button »¹. + // + // Links: + // 1) https://core.telegram.org/api/bots/menu FromBotMenu bool // Whether the inline message that will be sent by the bot on behalf of the user once the // web app interaction is terminated¹ should be sent silently (no notifications for the @@ -56,24 +59,29 @@ type MessagesRequestWebViewRequest struct { // Links: // 1) https://core.telegram.org/method/messages.sendWebViewResultMessage Silent bool - // Dialog where the web app is being opened + // Dialog where the web app is being opened, and where the resulting message will be sent + // (see the docs for more info »¹). + // + // Links: + // 1) https://core.telegram.org/api/bots/webapps Peer InputPeerClass // Bot that owns the web app¹ // // Links: - // 1) https://core.telegram.org/bots/webapps + // 1) https://core.telegram.org/api/bots/webapps Bot InputUserClass // Web app URL¹ // // Links: - // 1) https://core.telegram.org/bots/webapps + // 1) https://core.telegram.org/api/bots/webapps // // Use SetURL and GetURL helpers. URL string - // If the web app was opened from the attachment menu using a https://t - // me/username?attach=botusername&startattach=data or https://t - // me/botusername?startattach=data link, start_param should contain the data from the - // startattach parameter. + // If the web app was opened from the attachment menu using a attachment menu deep link¹ + // start_param should contain the data from the startattach parameter. + // + // Links: + // 1) https://core.telegram.org/api/links#bot-attachment-menu-links // // Use SetStartParam and GetStartParam helpers. StartParam string @@ -89,7 +97,8 @@ type MessagesRequestWebViewRequest struct { // // Use SetReplyToMsgID and GetReplyToMsgID helpers. ReplyToMsgID int - // Open the web app as the specified peer + // Open the web app as the specified peer, sending the resulting the message as the + // specified peer. // // Use SetSendAs and GetSendAs helpers. SendAs InputPeerClass diff --git a/tg/tl_messages_send_media_gen.go b/tg/tl_messages_send_media_gen.go index 892d4d9045..a2ef1989f6 100644 --- a/tg/tl_messages_send_media_gen.go +++ b/tg/tl_messages_send_media_gen.go @@ -705,7 +705,6 @@ func (s *MessagesSendMediaRequest) MapEntities() (value MessageEntityClassArray, // Possible errors: // // 400 BOT_PAYMENTS_DISABLED: Please enable bot payments in botfather before calling this method. -// 400 BOT_POLLS_DISABLED: // 400 BROADCAST_PUBLIC_VOTERS_FORBIDDEN: You can't forward polls with public voters. // 400 BUTTON_DATA_INVALID: The data of one or more of the buttons you provided is invalid. // 400 BUTTON_TYPE_INVALID: The type of one or more of the buttons you provided is invalid. diff --git a/tg/tl_messages_send_message_gen.go b/tg/tl_messages_send_message_gen.go index b99a9e887c..da684ed264 100644 --- a/tg/tl_messages_send_message_gen.go +++ b/tg/tl_messages_send_message_gen.go @@ -712,7 +712,7 @@ func (s *MessagesSendMessageRequest) MapEntities() (value MessageEntityClassArra // 400 BUTTON_DATA_INVALID: The data of one or more of the buttons you provided is invalid. // 400 BUTTON_TYPE_INVALID: The type of one or more of the buttons you provided is invalid. // 400 BUTTON_URL_INVALID: Button URL invalid. -// 400 BUTTON_USER_PRIVACY_RESTRICTED: +// 400 BUTTON_USER_PRIVACY_RESTRICTED: The privacy setting of the user specified in a inputKeyboardButtonUserProfile button do not allow creating such a button. // 400 CHANNEL_INVALID: The provided channel is invalid. // 400 CHANNEL_PRIVATE: You haven't joined this channel/supergroup. // 400 CHAT_ADMIN_REQUIRED: You must be an admin in this chat to do this. @@ -729,7 +729,6 @@ func (s *MessagesSendMessageRequest) MapEntities() (value MessageEntityClassArra // 400 MESSAGE_EMPTY: The provided message is empty. // 400 MESSAGE_TOO_LONG: The provided message is too long. // 400 MSG_ID_INVALID: Invalid message ID provided. -// 406 PAYMENT_UNSUPPORTED: // 400 PEER_ID_INVALID: The provided peer id is invalid. // 400 PINNED_DIALOGS_TOO_MUCH: Too many pinned dialogs. // 400 POLL_OPTION_INVALID: Invalid poll option provided. diff --git a/tg/tl_messages_send_reaction_gen.go b/tg/tl_messages_send_reaction_gen.go index 4c54002b72..566ac6a777 100644 --- a/tg/tl_messages_send_reaction_gen.go +++ b/tg/tl_messages_send_reaction_gen.go @@ -310,9 +310,9 @@ func (s *MessagesSendReactionRequest) GetReaction() (value string, ok bool) { // 400 MSG_ID_INVALID: Invalid message ID provided. // 400 PEER_ID_INVALID: The provided peer id is invalid. // 403 PREMIUM_ACCOUNT_REQUIRED: A premium account is required to execute this action. +// 400 REACTIONS_TOO_MANY: The message already has exactly reactions_uniq_max reaction emojis, you can't react with a new emoji, see the docs for more info ». // 400 REACTION_EMPTY: Empty reaction provided. // 400 REACTION_INVALID: The specified reaction is invalid. -// 500 SEND_REACTION_RESULT1_INVALID: // 400 USER_BANNED_IN_CHANNEL: You're banned from sending messages in supergroups/channels. // // See https://core.telegram.org/method/messages.sendReaction for reference. diff --git a/tg/tl_messages_send_web_view_data_gen.go b/tg/tl_messages_send_web_view_data_gen.go index 65e9ba0f85..065481d4a3 100644 --- a/tg/tl_messages_send_web_view_data_gen.go +++ b/tg/tl_messages_send_web_view_data_gen.go @@ -36,7 +36,7 @@ var ( // that owns it. // // Links: -// 1. https://core.telegram.org/bots/webapps +// 1. https://core.telegram.org/api/bots/webapps // // See https://core.telegram.org/method/messages.sendWebViewData for reference. type MessagesSendWebViewDataRequest struct { @@ -49,7 +49,10 @@ type MessagesSendWebViewDataRequest struct { // Links: // 1) https://core.telegram.org/constructor/keyboardButtonSimpleWebView ButtonText string - // Data to relay to the bot. + // Data to relay to the bot, obtained from a web_app_data_send JS event¹. + // + // Links: + // 1) https://core.telegram.org/api/web-events#web_app_data_send Data string } @@ -259,7 +262,7 @@ func (s *MessagesSendWebViewDataRequest) GetData() (value string) { // that owns it. // // Links: -// 1. https://core.telegram.org/bots/webapps +// 1. https://core.telegram.org/api/bots/webapps // // See https://core.telegram.org/method/messages.sendWebViewData for reference. func (c *Client) MessagesSendWebViewData(ctx context.Context, request *MessagesSendWebViewDataRequest) (UpdatesClass, error) { diff --git a/tg/tl_messages_toggle_bot_in_attach_menu_gen.go b/tg/tl_messages_toggle_bot_in_attach_menu_gen.go index ec01b9408a..0ca1580a44 100644 --- a/tg/tl_messages_toggle_bot_in_attach_menu_gen.go +++ b/tg/tl_messages_toggle_bot_in_attach_menu_gen.go @@ -35,7 +35,7 @@ var ( // Enable or disable web bot attachment menu »¹ // // Links: -// 1. https://core.telegram.org/bots/webapps#launching-web-apps-from-the-attachment-menu +// 1. https://core.telegram.org/api/bots/attach // // See https://core.telegram.org/method/messages.toggleBotInAttachMenu for reference. type MessagesToggleBotInAttachMenuRequest struct { @@ -200,7 +200,7 @@ func (t *MessagesToggleBotInAttachMenuRequest) GetEnabled() (value bool) { // Enable or disable web bot attachment menu »¹ // // Links: -// 1. https://core.telegram.org/bots/webapps#launching-web-apps-from-the-attachment-menu +// 1. https://core.telegram.org/api/bots/attach // // See https://core.telegram.org/method/messages.toggleBotInAttachMenu for reference. func (c *Client) MessagesToggleBotInAttachMenu(ctx context.Context, request *MessagesToggleBotInAttachMenuRequest) (bool, error) { diff --git a/tg/tl_messages_transcribe_audio_gen.go b/tg/tl_messages_transcribe_audio_gen.go index 8e4aa88b89..c9afd04377 100644 --- a/tg/tl_messages_transcribe_audio_gen.go +++ b/tg/tl_messages_transcribe_audio_gen.go @@ -32,7 +32,10 @@ var ( ) // MessagesTranscribeAudioRequest represents TL type `messages.transcribeAudio#269e9a49`. -// Transcribe voice message +// Transcribe voice message¹ +// +// Links: +// 1. https://core.telegram.org/api/transcribe // // See https://core.telegram.org/method/messages.transcribeAudio for reference. type MessagesTranscribeAudioRequest struct { @@ -194,7 +197,10 @@ func (t *MessagesTranscribeAudioRequest) GetMsgID() (value int) { } // MessagesTranscribeAudio invokes method messages.transcribeAudio#269e9a49 returning error if any. -// Transcribe voice message +// Transcribe voice message¹ +// +// Links: +// 1. https://core.telegram.org/api/transcribe // // See https://core.telegram.org/method/messages.transcribeAudio for reference. func (c *Client) MessagesTranscribeAudio(ctx context.Context, request *MessagesTranscribeAudioRequest) (*MessagesTranscribedAudio, error) { diff --git a/tg/tl_messages_transcribed_audio_gen.go b/tg/tl_messages_transcribed_audio_gen.go index 1869c2be80..e819fe2488 100644 --- a/tg/tl_messages_transcribed_audio_gen.go +++ b/tg/tl_messages_transcribed_audio_gen.go @@ -32,7 +32,10 @@ var ( ) // MessagesTranscribedAudio represents TL type `messages.transcribedAudio#93752c52`. -// Transcribed text from a voice message +// Transcribed text from a voice message »¹ +// +// Links: +// 1. https://core.telegram.org/api/transcribe // // See https://core.telegram.org/constructor/messages.transcribedAudio for reference. type MessagesTranscribedAudio struct { diff --git a/tg/tl_payments_export_invoice_gen.go b/tg/tl_payments_export_invoice_gen.go index b19e4329f4..8fa0e3419d 100644 --- a/tg/tl_payments_export_invoice_gen.go +++ b/tg/tl_payments_export_invoice_gen.go @@ -32,7 +32,10 @@ var ( ) // PaymentsExportInvoiceRequest represents TL type `payments.exportInvoice#f91b065`. -// Export invoice +// Generate an invoice deep link¹ +// +// Links: +// 1. https://core.telegram.org/api/links#invoice-links // // See https://core.telegram.org/method/payments.exportInvoice for reference. type PaymentsExportInvoiceRequest struct { @@ -167,7 +170,10 @@ func (e *PaymentsExportInvoiceRequest) GetInvoiceMedia() (value InputMediaClass) } // PaymentsExportInvoice invokes method payments.exportInvoice#f91b065 returning error if any. -// Export invoice +// Generate an invoice deep link¹ +// +// Links: +// 1. https://core.telegram.org/api/links#invoice-links // // Possible errors: // diff --git a/tg/tl_payments_exported_invoice_gen.go b/tg/tl_payments_exported_invoice_gen.go index d60ff8d6b1..f00fe05011 100644 --- a/tg/tl_payments_exported_invoice_gen.go +++ b/tg/tl_payments_exported_invoice_gen.go @@ -32,11 +32,17 @@ var ( ) // PaymentsExportedInvoice represents TL type `payments.exportedInvoice#aed0cbd9`. -// Exported invoice +// Exported invoice deep link¹ +// +// Links: +// 1. https://core.telegram.org/api/links#invoice-links // // See https://core.telegram.org/constructor/payments.exportedInvoice for reference. type PaymentsExportedInvoice struct { - // Exported invoice URL + // Exported invoice deep link¹ + // + // Links: + // 1) https://core.telegram.org/api/links#invoice-link URL string } diff --git a/tg/tl_phone_check_group_call_gen.go b/tg/tl_phone_check_group_call_gen.go index 0268e7d36e..ff386a3eff 100644 --- a/tg/tl_phone_check_group_call_gen.go +++ b/tg/tl_phone_check_group_call_gen.go @@ -33,7 +33,9 @@ var ( // PhoneCheckGroupCallRequest represents TL type `phone.checkGroupCall#b59cf977`. // Check whether the group call Server Forwarding Unit is currently receiving the streams -// with the specified WebRTC source IDs +// with the specified WebRTC source IDs. +// Returns an intersection of the source IDs specified in sources, and the source IDs +// currently being forwarded by the SFU. // // See https://core.telegram.org/method/phone.checkGroupCall for reference. type PhoneCheckGroupCallRequest struct { @@ -204,7 +206,9 @@ func (c *PhoneCheckGroupCallRequest) GetSources() (value []int) { // PhoneCheckGroupCall invokes method phone.checkGroupCall#b59cf977 returning error if any. // Check whether the group call Server Forwarding Unit is currently receiving the streams -// with the specified WebRTC source IDs +// with the specified WebRTC source IDs. +// Returns an intersection of the source IDs specified in sources, and the source IDs +// currently being forwarded by the SFU. // // Possible errors: // diff --git a/tg/tl_phone_create_group_call_gen.go b/tg/tl_phone_create_group_call_gen.go index c7be2237ca..6d63cd39dc 100644 --- a/tg/tl_phone_create_group_call_gen.go +++ b/tg/tl_phone_create_group_call_gen.go @@ -360,7 +360,6 @@ func (c *PhoneCreateGroupCallRequest) GetScheduleDate() (value int, ok bool) { // // 400 CHANNEL_PRIVATE: You haven't joined this channel/supergroup. // 400 CHAT_ADMIN_REQUIRED: You must be an admin in this chat to do this. -// 500 CHAT_FROM_CALL_CHANGED: // 400 CREATE_CALL_FAILED: An error occurred while creating the call. // 400 PEER_ID_INVALID: The provided peer id is invalid. // 400 SCHEDULE_DATE_INVALID: Invalid schedule date provided. diff --git a/tg/tl_phone_export_group_call_invite_gen.go b/tg/tl_phone_export_group_call_invite_gen.go index 6e9dcb444d..5bb447b083 100644 --- a/tg/tl_phone_export_group_call_invite_gen.go +++ b/tg/tl_phone_export_group_call_invite_gen.go @@ -32,7 +32,10 @@ var ( ) // PhoneExportGroupCallInviteRequest represents TL type `phone.exportGroupCallInvite#e6aa647f`. -// Get an invite link for a group call or livestream +// Get an invite link¹ for a group call or livestream +// +// Links: +// 1. https://core.telegram.org/api/links#voice-chat-video-chat-livestream-links // // See https://core.telegram.org/method/phone.exportGroupCallInvite for reference. type PhoneExportGroupCallInviteRequest struct { @@ -41,8 +44,9 @@ type PhoneExportGroupCallInviteRequest struct { // Links: // 1) https://core.telegram.org/mtproto/TL-combinators#conditional-fields Flags bin.Fields - // For livestreams, if set, users that join using this link will be able to speak without - // explicitly requesting permission by (for example by raising their hand). + // For livestreams or muted group chats, if set, users that join using this link will be + // able to speak without explicitly requesting permission by (for example by raising + // their hand). CanSelfUnmute bool // The group call Call InputGroupCall @@ -219,7 +223,10 @@ func (e *PhoneExportGroupCallInviteRequest) GetCall() (value InputGroupCall) { } // PhoneExportGroupCallInvite invokes method phone.exportGroupCallInvite#e6aa647f returning error if any. -// Get an invite link for a group call or livestream +// Get an invite link¹ for a group call or livestream +// +// Links: +// 1. https://core.telegram.org/api/links#voice-chat-video-chat-livestream-links // // See https://core.telegram.org/method/phone.exportGroupCallInvite for reference. func (c *Client) PhoneExportGroupCallInvite(ctx context.Context, request *PhoneExportGroupCallInviteRequest) (*PhoneExportedGroupCallInvite, error) { diff --git a/tg/tl_phone_join_group_call_gen.go b/tg/tl_phone_join_group_call_gen.go index c8e8ac69dd..3f52ca49bc 100644 --- a/tg/tl_phone_join_group_call_gen.go +++ b/tg/tl_phone_join_group_call_gen.go @@ -49,7 +49,11 @@ type PhoneJoinGroupCallRequest struct { Call InputGroupCall // Join the group call, presenting yourself as the specified user/channel JoinAs InputPeerClass - // The invitation hash from the invite link: https://t.me/username?voicechat=hash + // The invitation hash from the invite link »¹, if provided allows speaking in a + // livestream or muted group chat. + // + // Links: + // 1) https://core.telegram.org/api/links#video-chat-video-chat-livestream-links // // Use SetInviteHash and GetInviteHash helpers. InviteHash string diff --git a/tg/tl_phone_set_call_rating_gen.go b/tg/tl_phone_set_call_rating_gen.go index 34c457bb58..6cf3f8e986 100644 --- a/tg/tl_phone_set_call_rating_gen.go +++ b/tg/tl_phone_set_call_rating_gen.go @@ -32,7 +32,7 @@ var ( ) // PhoneSetCallRatingRequest represents TL type `phone.setCallRating#59ead627`. -// Rate a call +// Rate a call, returns info about the rating message sent to the official VoIP bot. // // See https://core.telegram.org/method/phone.setCallRating for reference. type PhoneSetCallRatingRequest struct { @@ -272,7 +272,7 @@ func (s *PhoneSetCallRatingRequest) GetComment() (value string) { } // PhoneSetCallRating invokes method phone.setCallRating#59ead627 returning error if any. -// Rate a call +// Rate a call, returns info about the rating message sent to the official VoIP bot. // // Possible errors: // diff --git a/tg/tl_photos_delete_photos_gen.go b/tg/tl_photos_delete_photos_gen.go index 105cd31c90..d7f78cbd7c 100644 --- a/tg/tl_photos_delete_photos_gen.go +++ b/tg/tl_photos_delete_photos_gen.go @@ -32,7 +32,7 @@ var ( ) // PhotosDeletePhotosRequest represents TL type `photos.deletePhotos#87cf7f2f`. -// Deletes profile photos. +// Deletes profile photos. The method returns a list of successfully deleted photo IDs. // // See https://core.telegram.org/method/photos.deletePhotos for reference. type PhotosDeletePhotosRequest struct { @@ -185,7 +185,7 @@ func (d *PhotosDeletePhotosRequest) MapID() (value InputPhotoClassArray) { } // PhotosDeletePhotos invokes method photos.deletePhotos#87cf7f2f returning error if any. -// Deletes profile photos. +// Deletes profile photos. The method returns a list of successfully deleted photo IDs. // // See https://core.telegram.org/method/photos.deletePhotos for reference. func (c *Client) PhotosDeletePhotos(ctx context.Context, id []InputPhotoClass) ([]int64, error) { diff --git a/tg/tl_premium_gift_option_gen.go b/tg/tl_premium_gift_option_gen.go index 294388658b..772779a8b3 100644 --- a/tg/tl_premium_gift_option_gen.go +++ b/tg/tl_premium_gift_option_gen.go @@ -56,8 +56,11 @@ type PremiumGiftOption struct { // Links: // 1) https://core.telegram.org/bots/payments/currencies.json Amount int64 - // A t.me/$invoice link to an invoice for in-app payment, using the official Premium bot; - // may be empty if direct payment isn't available. + // An invoice deep link »¹ to an invoice for in-app payment, using the official Premium + // bot; may be empty if direct payment isn't available. + // + // Links: + // 1) https://core.telegram.org/api/links#invoice-links BotURL string // An identifier for the App Store/Play Store product associated with the Premium gift. // diff --git a/tg/tl_sticker_set_covered_gen.go b/tg/tl_sticker_set_covered_gen.go index e14d0ec9e5..b9bebe1f9b 100644 --- a/tg/tl_sticker_set_covered_gen.go +++ b/tg/tl_sticker_set_covered_gen.go @@ -385,8 +385,8 @@ func (s *StickerSetMultiCovered) MapCovers() (value DocumentClassArray) { // StickerSetFullCovered represents TL type `stickerSetFullCovered#1aed5ee5`. // Stickerset preview with all stickers of the stickerset included. -// Used when there are only a few stickers in the stickerset, to avoid a further call to -// messages.getStickerSet¹. +// Currently used only for custom emoji stickersets, to avoid a further call to messages +// getStickerSet¹. // // Links: // 1. https://core.telegram.org/method/messages.getStickerSet diff --git a/tg/tl_sticker_set_gen.go b/tg/tl_sticker_set_gen.go index 0d601fd691..9c4df53638 100644 --- a/tg/tl_sticker_set_gen.go +++ b/tg/tl_sticker_set_gen.go @@ -64,7 +64,10 @@ type StickerSet struct { AccessHash int64 // Title of stickerset Title string - // Short name of stickerset to use in tg://addstickers?set=short_name + // Short name of stickerset, used when sharing stickerset using stickerset deep links¹. + // + // Links: + // 1) https://core.telegram.org/api/links#stickerset-links ShortName string // Stickerset thumbnail // diff --git a/tg/tl_stickers_create_sticker_set_gen.go b/tg/tl_stickers_create_sticker_set_gen.go index 8d950a77ed..4bf9be296a 100644 --- a/tg/tl_stickers_create_sticker_set_gen.go +++ b/tg/tl_stickers_create_sticker_set_gen.go @@ -51,8 +51,13 @@ type StickersCreateStickerSetRequest struct { UserID InputUserClass // Stickerset name, 1-64 chars Title string - // Sticker set name. Can contain only English letters, digits and underscores. Must end - // with "by" ( is case insensitive); 1-64 characters + // Short name of sticker set, to be used in sticker deep links »¹. Can contain only + // english letters, digits and underscores. Must begin with a letter, can't contain + // consecutive underscores and must end in "_by_". is case + // insensitive. 1-64 characters. + // + // Links: + // 1) https://core.telegram.org/api/links#stickerset-links ShortName string // Thumbnail // @@ -519,12 +524,12 @@ func (c *StickersCreateStickerSetRequest) GetThumbAsNotEmpty() (*InputDocument, // 400 STICKER_GIF_DIMENSIONS: The specified video sticker has invalid dimensions. // 400 STICKER_PNG_DIMENSIONS: Sticker png dimensions invalid. // 400 STICKER_PNG_NOPNG: One of the specified stickers is not a valid PNG file. -// 400 STICKER_TGS_NODOC: Incorrect document type for sticker. +// 400 STICKER_TGS_NODOC: You must send the animated sticker as a document. // 400 STICKER_TGS_NOTGS: Invalid TGS sticker provided. // 400 STICKER_THUMB_PNG_NOPNG: Incorrect stickerset thumb file provided, PNG / WEBP expected. // 400 STICKER_THUMB_TGS_NOTGS: Incorrect stickerset TGS thumb file provided. // 400 STICKER_VIDEO_BIG: The specified video sticker is too big. -// 400 STICKER_VIDEO_NODOC: +// 400 STICKER_VIDEO_NODOC: You must send the video sticker as a document. // 400 STICKER_VIDEO_NOWEBM: The specified video sticker is not in webm format. // 400 USER_ID_INVALID: The provided user ID is invalid. // diff --git a/tg/tl_update_gen.go b/tg/tl_update_gen.go index b4f438ae20..f1081be1f6 100644 --- a/tg/tl_update_gen.go +++ b/tg/tl_update_gen.go @@ -19463,11 +19463,11 @@ func (u *UpdateMessageReactions) GetReactions() (value MessageReactions) { } // UpdateAttachMenuBots represents TL type `updateAttachMenuBots#17b7a20b`. -// The list of added bot web apps »¹ has changed, use messages.getAttachMenuBots² to -// fetch the updated list. +// The list of installed attachment menu entries »¹ has changed, use messages +// getAttachMenuBots² to fetch the updated list. // // Links: -// 1. https://core.telegram.org/bots/webapps#launching-web-apps-from-the-attachment-menu +// 1. https://core.telegram.org/api/bots/attach // 2. https://core.telegram.org/method/messages.getAttachMenuBots // // See https://core.telegram.org/constructor/updateAttachMenuBots for reference. @@ -19982,10 +19982,12 @@ func (u *UpdateSavedRingtones) DecodeBare(b *bin.Buffer) error { } // UpdateTranscribedAudio represents TL type `updateTranscribedAudio#84cd5a`. -// A pending transcription initiated with messages.transcribeAudio¹ was updated. +// A pending voice message transcription »¹ initiated with messages.transcribeAudio² +// was updated. // // Links: -// 1. https://core.telegram.org/method/messages.transcribeAudio +// 1. https://core.telegram.org/api/transcribe +// 2. https://core.telegram.org/method/messages.transcribeAudio // // See https://core.telegram.org/constructor/updateTranscribedAudio for reference. type UpdateTranscribedAudio struct { diff --git a/tg/tl_upload_file_gen.go b/tg/tl_upload_file_gen.go index 03457e2877..b33c88d3f1 100644 --- a/tg/tl_upload_file_gen.go +++ b/tg/tl_upload_file_gen.go @@ -38,7 +38,7 @@ var ( type UploadFile struct { // File type Type StorageFileTypeClass - // Modification type + // Modification time Mtime int // Binary data, file content Bytes []byte diff --git a/tg/tl_user_full_gen.go b/tg/tl_user_full_gen.go index 125e321578..167afa916b 100644 --- a/tg/tl_user_full_gen.go +++ b/tg/tl_user_full_gen.go @@ -106,15 +106,21 @@ type UserFull struct { // // Use SetPrivateForwardName and GetPrivateForwardName helpers. PrivateForwardName string - // A suggested default set of administrator rights for the bot, to be shown when adding - // the bot as admin to a supergroup (only a suggestion, the admin right set may be - // modified by the user before adding the bot as admin) + // A suggested set of administrator rights¹ for the bot, to be shown when adding the bot + // as admin to a group, see here for more info on how to handle them »². + // + // Links: + // 1) https://core.telegram.org/api/rights#suggested-bot-rights + // 2) https://core.telegram.org/api/rights#suggested-bot-rights // // Use SetBotGroupAdminRights and GetBotGroupAdminRights helpers. BotGroupAdminRights ChatAdminRights - // A suggested default set of administrator rights for the bot, to be shown when adding - // the bot as admin to a channel (only a suggestion, the admin right set may be modified - // by the user before adding the bot as admin) + // A suggested set of administrator rights¹ for the bot, to be shown when adding the bot + // as admin to a channel, see here for more info on how to handle them »². + // + // Links: + // 1) https://core.telegram.org/api/rights#suggested-bot-rights + // 2) https://core.telegram.org/api/rights#suggested-bot-rights // // Use SetBotBroadcastAdminRights and GetBotBroadcastAdminRights helpers. BotBroadcastAdminRights ChatAdminRights diff --git a/tg/tl_user_gen.go b/tg/tl_user_gen.go index ee69d78c9a..e31121e626 100644 --- a/tg/tl_user_gen.go +++ b/tg/tl_user_gen.go @@ -213,14 +213,14 @@ type User struct { // Whether this bot offers an attachment menu web app¹ // // Links: - // 1) https://core.telegram.org/bots/webapps#launching-web-apps-from-the-attachment-menu + // 1) https://core.telegram.org/api/bots/attach BotAttachMenu bool // Whether this user is a Telegram Premium user Premium bool // Whether we installed the attachment menu web app¹ offered by this bot // // Links: - // 1) https://core.telegram.org/bots/webapps#launching-web-apps-from-the-attachment-menu + // 1) https://core.telegram.org/api/bots/attach AttachMenuEnabled bool // ID of the user ID int64 diff --git a/tg/tl_users_set_secure_value_errors_gen.go b/tg/tl_users_set_secure_value_errors_gen.go index e28db2df7c..ace98c989d 100644 --- a/tg/tl_users_set_secure_value_errors_gen.go +++ b/tg/tl_users_set_secure_value_errors_gen.go @@ -240,6 +240,7 @@ func (s *UsersSetSecureValueErrorsRequest) MapErrors() (value SecureValueErrorCl // Possible errors: // // 403 USER_BOT_INVALID: This method can only be called by a bot. +// 400 USER_BOT_REQUIRED: This method can only be called by a bot. // 400 USER_ID_INVALID: The provided user ID is invalid. // // See https://core.telegram.org/method/users.setSecureValueErrors for reference. diff --git a/tg/tl_wall_paper_settings_gen.go b/tg/tl_wall_paper_settings_gen.go index 3018dc0db8..14e9118a2c 100644 --- a/tg/tl_wall_paper_settings_gen.go +++ b/tg/tl_wall_paper_settings_gen.go @@ -52,12 +52,12 @@ type WallPaperSettings struct { Blur bool // If set, the background needs to be slightly moved when the device is rotated. Motion bool - // Used for solid »¹, [gradient »]/api/wallpapers#gradient-fill) and freeform gradient - // »² fills. + // Used for solid »¹, gradient »² and freeform gradient »³ fills. // // Links: // 1) https://core.telegram.org/api/wallpapers#solid-fill - // 2) https://core.telegram.org/api/wallpapers#freeform-gradient-fill + // 2) https://core.telegram.org/api/wallpapers#gradient-fill + // 3) https://core.telegram.org/api/wallpapers#freeform-gradient-fill // // Use SetBackgroundColor and GetBackgroundColor helpers. BackgroundColor int