From e5c6086e1199c947131c2ef44b526ef51501cd67 Mon Sep 17 00:00:00 2001 From: Wizou <11647984+wiz0u@users.noreply.github.com> Date: Wed, 31 Jul 2024 19:35:34 +0200 Subject: [PATCH] API Layer 185: Bot stuff, Main Mini App, Stars payment stuff & more... --- README.md | 2 +- src/TL.Schema.cs | 118 ++++++++++++++--- src/TL.SchemaFuncs.cs | 252 ++++++++++++++++++++++++++++++------- src/TL.Table.cs | 17 ++- src/WTelegramClient.csproj | 2 +- 5 files changed, 323 insertions(+), 68 deletions(-) diff --git a/README.md b/README.md index a3e0daf..ffeec94 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -[![API Layer](https://img.shields.io/badge/API_Layer-184-blueviolet)](https://corefork.telegram.org/methods) +[![API Layer](https://img.shields.io/badge/API_Layer-185-blueviolet)](https://corefork.telegram.org/methods) [![NuGet version](https://img.shields.io/nuget/v/WTelegramClient?color=00508F)](https://www.nuget.org/packages/WTelegramClient/) [![NuGet prerelease](https://img.shields.io/nuget/vpre/WTelegramClient?color=C09030&label=dev+nuget)](https://www.nuget.org/packages/WTelegramClient/absoluteLatest) [![Donate](https://img.shields.io/badge/Help_this_project:-Donate-ff4444)](https://www.buymeacoffee.com/wizou) diff --git a/src/TL.Schema.cs b/src/TL.Schema.cs index 171d176..53e163c 100644 --- a/src/TL.Schema.cs +++ b/src/TL.Schema.cs @@ -753,7 +753,7 @@ namespace TL public long id; } /// Indicates info about a certain user. See - [TLDef(0x215C4438)] + [TLDef(0x83314FCA)] public sealed partial class User : UserBase { /// Extra bits of information, use flags.HasFlag(...) to test for those @@ -794,6 +794,7 @@ namespace TL [IfFlag(40)] public PeerColor color; /// The user's profile color. [IfFlag(41)] public PeerColor profile_color; + [IfFlag(44)] public int bot_active_users; [Flags] public enum Flags : uint { @@ -877,6 +878,9 @@ namespace TL contact_require_premium = 0x400, /// Whether this bot can be connected to a user as specified here ». bot_business = 0x800, + /// Field has a value + has_bot_active_users = 0x1000, + bot_has_main_app = 0x2000, } } @@ -2700,6 +2704,24 @@ namespace TL has_payload = 0x1, } } + /// See + [TLDef(0x45D5B021)] + public sealed partial class MessageActionGiftStars : MessageAction + { + public Flags flags; + public string currency; + public long amount; + public long stars; + [IfFlag(0)] public string crypto_currency; + [IfFlag(0)] public long crypto_amount; + [IfFlag(1)] public string transaction_id; + + [Flags] public enum Flags : uint + { + has_crypto_currency = 0x1, + has_transaction_id = 0x2, + } + } /// Chat info. See Derived classes: , public abstract partial class DialogBase : IObject @@ -6789,7 +6811,7 @@ namespace TL } } /// Defines a video See - [TLDef(0xD38FF1C2)] + [TLDef(0x17399FAD)] public sealed partial class DocumentAttributeVideo : DocumentAttribute { /// Extra bits of information, use flags.HasFlag(...) to test for those @@ -6802,6 +6824,7 @@ namespace TL public int h; /// Number of bytes to preload when preloading videos (particularly video stories). [IfFlag(2)] public int preload_prefix_size; + [IfFlag(4)] public double video_start_ts; [Flags] public enum Flags : uint { @@ -6813,6 +6836,8 @@ namespace TL has_preload_prefix_size = 0x4, /// Whether the specified document is a video file with no audio tracks (a GIF animation (even as MPEG4), for example) nosound = 0x8, + /// Field has a value + has_video_start_ts = 0x10, } } /// Represents an audio file See @@ -7507,6 +7532,7 @@ namespace TL has_description_photo = 0x10, /// Field has a value has_description_document = 0x20, + has_preview_medias = 0x40, } } @@ -9326,6 +9352,8 @@ namespace TL ForwardUsers = 0xA8406CA9, ///Chats to which the users often forwards messages to ForwardChats = 0xFBEEC0F0, + ///See + BotsApp = 0xFD9E7BEC, } /// Top peer category See @@ -15376,11 +15404,10 @@ namespace TL public PremiumGiftCodeOption option; } /// Used to top up the current account's Telegram Stars balance. See - [TLDef(0x1DA33AD8)] + [TLDef(0x65F00CE3)] public sealed partial class InputInvoiceStars : InputInvoice { - /// Top up option, obtained as described here ». - public StarsTopupOption option; + public InputStorePaymentPurpose purpose; } /// Exported invoice deep link See @@ -15519,22 +15546,22 @@ namespace TL has_prize_description = 0x10, } } - /// Used to top up the Telegram Stars balance using the Play Store/App Store flow (official apps only). See - [TLDef(0x4F0EE8DF)] - public sealed partial class InputStorePaymentStars : InputStorePaymentPurpose + /// See + [TLDef(0xDDDD0F56)] + public sealed partial class InputStorePaymentStarsTopup : InputStorePaymentPurpose { - /// Extra bits of information, use flags.HasFlag(...) to test for those - public Flags flags; - /// Amount of stars to topup public long stars; - /// Three-letter ISO 4217 currency code public string currency; - /// 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). public long amount; - - [Flags] public enum Flags : uint - { - } + } + /// See + [TLDef(0x1D741EF7)] + public sealed partial class InputStorePaymentStarsGift : InputStorePaymentPurpose + { + public InputUserBase user_id; + public long stars; + public string currency; + public long amount; } /// Telegram Premium gift option See @@ -16961,6 +16988,15 @@ namespace TL public MediaAreaCoordinates coordinates; public string url; } + /// See + [TLDef(0x49A6549C)] + public sealed partial class MediaAreaWeather : MediaArea + { + public MediaAreaCoordinates coordinates; + public string emoji; + public double temperature_c; + public int color; + } /// Stories associated to a peer See [TLDef(0x9A35E999)] @@ -18721,6 +18757,7 @@ namespace TL has_msg_id = 0x100, /// Field has a value has_extended_media = 0x200, + gift = 0x400, } } @@ -18847,4 +18884,51 @@ namespace TL refund = 0x1, } } + + /// See + [TLDef(0x5E0589F1)] + public sealed partial class StarsGiftOption : IObject + { + public Flags flags; + public long stars; + [IfFlag(0)] public string store_product; + public string currency; + public long amount; + + [Flags] public enum Flags : uint + { + has_store_product = 0x1, + extended = 0x2, + } + } + + /// See + [TLDef(0x1991B13B)] + public sealed partial class Bots_PopularAppBots : IObject + { + public Flags flags; + [IfFlag(0)] public string next_offset; + public Dictionary users; + + [Flags] public enum Flags : uint + { + has_next_offset = 0x1, + } + } + + /// See + [TLDef(0x23E91BA3)] + public sealed partial class BotPreviewMedia : IObject + { + public DateTime date; + public MessageMedia media; + } + + /// See + [TLDef(0x0CA71D64)] + public sealed partial class Bots_PreviewInfo : IObject + { + public BotPreviewMedia[] media; + public string[] lang_codes; + } } diff --git a/src/TL.SchemaFuncs.cs b/src/TL.SchemaFuncs.cs index 6ed2e97..1c5ddc9 100644 --- a/src/TL.SchemaFuncs.cs +++ b/src/TL.SchemaFuncs.cs @@ -453,7 +453,7 @@ namespace TL }); /// Returns a list of available wallpapers. See - /// Hash used for caching, for more info click here.
Note: the usual hash generation algorithm cannot be used in this case, please re-use the .hash field returned by a previous call to the method, or pass 0 if this is the first call. + /// Hash used for caching, for more info click here. /// a null value means account.wallPapersNotModified public static Task Account_GetWallPapers(this Client client, long hash = default) => client.Invoke(new Account_GetWallPapers @@ -972,7 +972,7 @@ namespace TL /// Get installed themes See /// Theme format, a string that identifies the theming engines supported by the client - /// Hash used for caching, for more info click here.
Note: the usual hash generation algorithm cannot be used in this case, please re-use the .hash field returned by a previous call to the method, or pass 0 if this is the first call. + /// Hash used for caching, for more info click here. /// a null value means account.themesNotModified public static Task Account_GetThemes(this Client client, string format, long hash = default) => client.Invoke(new Account_GetThemes @@ -1044,7 +1044,7 @@ namespace TL }); /// Get all available chat themes ». See - /// Hash used for caching, for more info click here.
Note: the usual hash generation algorithm cannot be used in this case, please re-use the .hash field returned by a previous call to the method, or pass 0 if this is the first call. + /// Hash used for caching, for more info click here. /// a null value means account.themesNotModified public static Task Account_GetChatThemes(this Client client, long hash = default) => client.Invoke(new Account_GetChatThemes @@ -1075,7 +1075,7 @@ namespace TL }); /// Fetch saved notification sounds See - /// Hash used for caching, for more info click here.
Note: the usual hash generation algorithm cannot be used in this case, please re-use the .hash field returned by a previous call to the method, or pass 0 if this is the first call. + /// Hash used for caching, for more info click here. /// a null value means account.savedRingtonesNotModified public static Task Account_GetSavedRingtones(this Client client, long hash = default) => client.Invoke(new Account_GetSavedRingtones @@ -1114,7 +1114,7 @@ namespace TL }); /// Get a list of default suggested emoji statuses See - /// Hash used for caching, for more info click here.
Note: the usual hash generation algorithm cannot be used in this case, please re-use the .hash field returned by a previous call to the method, or pass 0 if this is the first call. + /// Hash used for caching, for more info click here. /// a null value means account.emojiStatusesNotModified public static Task Account_GetDefaultEmojiStatuses(this Client client, long hash = default) => client.Invoke(new Account_GetDefaultEmojiStatuses @@ -1123,7 +1123,7 @@ namespace TL }); /// Get recently used emoji statuses See - /// Hash used for caching, for more info click here.
Note: the usual hash generation algorithm cannot be used in this case, please re-use the .hash field returned by a previous call to the method, or pass 0 if this is the first call. + /// Hash used for caching, for more info click here. /// a null value means account.emojiStatusesNotModified public static Task Account_GetRecentEmojiStatuses(this Client client, long hash = default) => client.Invoke(new Account_GetRecentEmojiStatuses @@ -1156,7 +1156,7 @@ namespace TL }); /// Get a set of suggested custom emoji stickers that can be used as profile picture See - /// Hash used for caching, for more info click here.
Note: the usual hash generation algorithm cannot be used in this case, please re-use the .hash field returned by a previous call to the method, or pass 0 if this is the first call. + /// Hash used for caching, for more info click here. /// a null value means emojiListNotModified public static Task Account_GetDefaultProfilePhotoEmojis(this Client client, long hash = default) => client.Invoke(new Account_GetDefaultProfilePhotoEmojis @@ -1165,7 +1165,7 @@ namespace TL }); /// Get a set of suggested custom emoji stickers that can be used as group picture See - /// Hash used for caching, for more info click here.
Note: the usual hash generation algorithm cannot be used in this case, please re-use the .hash field returned by a previous call to the method, or pass 0 if this is the first call. + /// Hash used for caching, for more info click here. /// a null value means emojiListNotModified public static Task Account_GetDefaultGroupPhotoEmojis(this Client client, long hash = default) => client.Invoke(new Account_GetDefaultGroupPhotoEmojis @@ -1220,7 +1220,7 @@ namespace TL }); /// Get a set of suggested custom emoji stickers that can be used in an accent color pattern. See - /// Hash used for caching, for more info click here.
Note: the usual hash generation algorithm cannot be used in this case, please re-use the .hash field returned by a previous call to the method, or pass 0 if this is the first call. + /// Hash used for caching, for more info click here. /// a null value means emojiListNotModified public static Task Account_GetDefaultBackgroundEmojis(this Client client, long hash = default) => client.Invoke(new Account_GetDefaultBackgroundEmojis @@ -1229,7 +1229,7 @@ namespace TL }); /// Get a list of default suggested channel emoji statuses. See - /// Hash used for caching, for more info click here.
Note: the usual hash generation algorithm cannot be used in this case, please re-use the .hash field returned by a previous call to the method, or pass 0 if this is the first call. + /// Hash used for caching, for more info click here. /// a null value means account.emojiStatusesNotModified public static Task Account_GetChannelDefaultEmojiStatuses(this Client client, long hash = default) => client.Invoke(new Account_GetChannelDefaultEmojiStatuses @@ -1238,7 +1238,7 @@ namespace TL }); /// Returns fetch the full list of custom emoji IDs » that cannot be used in channel emoji statuses ». See - /// Hash used for caching, for more info click here.
Note: the usual hash generation algorithm cannot be used in this case, please re-use the .hash field returned by a previous call to the method, or pass 0 if this is the first call. + /// Hash used for caching, for more info click here. /// a null value means emojiListNotModified public static Task Account_GetChannelRestrictedStatusEmojis(this Client client, long hash = default) => client.Invoke(new Account_GetChannelRestrictedStatusEmojis @@ -1561,10 +1561,10 @@ namespace TL /// Maximum number of results to return, see pagination /// Hash used for caching, for more info click here /// a null value means contacts.topPeersNotModified - public static Task Contacts_GetTopPeers(this Client client, int offset = default, int limit = int.MaxValue, long hash = default, bool correspondents = false, bool bots_pm = false, bool bots_inline = false, bool phone_calls = false, bool forward_users = false, bool forward_chats = false, bool groups = false, bool channels = false) + public static Task Contacts_GetTopPeers(this Client client, int offset = default, int limit = int.MaxValue, long hash = default, bool correspondents = false, bool bots_pm = false, bool bots_inline = false, bool phone_calls = false, bool forward_users = false, bool forward_chats = false, bool groups = false, bool channels = false, bool bots_app = false) => client.Invoke(new Contacts_GetTopPeers { - flags = (Contacts_GetTopPeers.Flags)((correspondents ? 0x1 : 0) | (bots_pm ? 0x2 : 0) | (bots_inline ? 0x4 : 0) | (phone_calls ? 0x8 : 0) | (forward_users ? 0x10 : 0) | (forward_chats ? 0x20 : 0) | (groups ? 0x400 : 0) | (channels ? 0x8000 : 0)), + flags = (Contacts_GetTopPeers.Flags)((correspondents ? 0x1 : 0) | (bots_pm ? 0x2 : 0) | (bots_inline ? 0x4 : 0) | (phone_calls ? 0x8 : 0) | (forward_users ? 0x10 : 0) | (forward_chats ? 0x20 : 0) | (groups ? 0x400 : 0) | (channels ? 0x8000 : 0) | (bots_app ? 0x10000 : 0)), offset = offset, limit = limit, hash = hash, @@ -2174,7 +2174,7 @@ namespace TL /// Get stickers by emoji See Possible codes: 400 (details) /// The emoji - /// Hash used for caching, for more info click here.
Note: the usual hash generation algorithm cannot be used in this case, please re-use the .hash field returned by a previous call to the method, or pass 0 if this is the first call. + /// Hash used for caching, for more info click here. /// a null value means messages.stickersNotModified public static Task Messages_GetStickers(this Client client, string emoticon, long hash = default) => client.Invoke(new Messages_GetStickers @@ -2184,7 +2184,7 @@ namespace TL }); /// Get all installed stickers See - /// Hash used for caching, for more info click here.
Note: the usual hash generation algorithm cannot be used in this case, please re-use the .hash field returned by a previous call to the method, or pass 0 if this is the first call. + /// Hash used for caching, for more info click here. /// a null value means messages.allStickersNotModified public static Task Messages_GetAllStickers(this Client client, long hash = default) => client.Invoke(new Messages_GetAllStickers @@ -2362,7 +2362,7 @@ namespace TL }); /// Get saved GIFs. See - /// Hash used for caching, for more info click here.
Note: the usual hash generation algorithm cannot be used in this case, please re-use the .hash field returned by a previous call to the method, or pass 0 if this is the first call. + /// Hash used for caching, for more info click here. /// a null value means messages.savedGifsNotModified public static Task Messages_GetSavedGifs(this Client client, long hash = default) => client.Invoke(new Messages_GetSavedGifs @@ -2566,7 +2566,7 @@ namespace TL }); /// Get featured stickers See - /// Hash used for caching, for more info click here.
Note: the usual hash generation algorithm cannot be used in this case, please re-use the .hash field returned by a previous call to the method, or pass 0 if this is the first call. + /// Hash used for caching, for more info click here. public static Task Messages_GetFeaturedStickers(this Client client, long hash = default) => client.Invoke(new Messages_GetFeaturedStickers { @@ -2583,7 +2583,7 @@ namespace TL /// Get recent stickers See /// Get stickers recently attached to photo or video files - /// Hash used for caching, for more info click here.
Note: the usual hash generation algorithm cannot be used in this case, please re-use the .hash field returned by a previous call to the method, or pass 0 if this is the first call. + /// Hash used for caching, for more info click here. /// a null value means messages.recentStickersNotModified public static Task Messages_GetRecentStickers(this Client client, long hash = default, bool attached = false) => client.Invoke(new Messages_GetRecentStickers @@ -2626,7 +2626,7 @@ namespace TL }); /// Get installed mask stickers See - /// Hash used for caching, for more info click here.
Note: the usual hash generation algorithm cannot be used in this case, please re-use the .hash field returned by a previous call to the method, or pass 0 if this is the first call. + /// Hash used for caching, for more info click here. /// a null value means messages.allStickersNotModified public static Task Messages_GetMaskStickers(this Client client, long hash = default) => client.Invoke(new Messages_GetMaskStickers @@ -2800,7 +2800,7 @@ namespace TL }); /// Get faved stickers See - /// Hash used for caching, for more info click here.
Note: the usual hash generation algorithm cannot be used in this case, please re-use the .hash field returned by a previous call to the method, or pass 0 if this is the first call. + /// Hash used for caching, for more info click here. /// a null value means messages.favedStickersNotModified public static Task Messages_GetFavedStickers(this Client client, long hash = default) => client.Invoke(new Messages_GetFavedStickers @@ -2903,7 +2903,7 @@ namespace TL /// Search for stickersets See /// Exclude featured stickersets from results /// Query string - /// Hash used for caching, for more info click here.
Note: the usual hash generation algorithm cannot be used in this case, please re-use the .hash field returned by a previous call to the method, or pass 0 if this is the first call. + /// Hash used for caching, for more info click here. /// a null value means messages.foundStickerSetsNotModified public static Task Messages_SearchStickerSets(this Client client, string q, long hash = default, bool exclude_featured = false) => client.Invoke(new Messages_SearchStickerSets @@ -3198,7 +3198,7 @@ namespace TL /// Method for fetching previously featured stickers See /// Offset /// Maximum number of results to return, see pagination - /// Hash used for caching, for more info click here.
Note: the usual hash generation algorithm cannot be used in this case, please re-use the .hash field returned by a previous call to the method, or pass 0 if this is the first call. + /// Hash used for caching, for more info click here. public static Task Messages_GetOldFeaturedStickers(this Client client, int offset = default, int limit = int.MaxValue, long hash = default) => client.Invoke(new Messages_GetOldFeaturedStickers { @@ -3593,7 +3593,7 @@ namespace TL }); /// Obtain available message reactions » See - /// Hash used for caching, for more info click here.
Note: the usual hash generation algorithm cannot be used in this case, please re-use the .hash field returned by a previous call to the method, or pass 0 if this is the first call. + /// Hash used for caching, for more info click here. /// a null value means messages.availableReactionsNotModified public static Task Messages_GetAvailableReactions(this Client client, int hash = default) => client.Invoke(new Messages_GetAvailableReactions @@ -3669,7 +3669,7 @@ namespace TL }); /// Returns installed attachment menu bot mini apps » See - /// Hash used for caching, for more info click here.
Note: the usual hash generation algorithm cannot be used in this case, please re-use the .hash field returned by a previous call to the method, or pass 0 if this is the first call. + /// Hash used for caching, for more info click here. /// a null value means attachMenuBotsNotModified public static Task Messages_GetAttachMenuBots(this Client client, long hash = default) => client.Invoke(new Messages_GetAttachMenuBots @@ -3816,7 +3816,7 @@ namespace TL }); /// Gets the list of currently installed custom emoji stickersets. See - /// Hash used for caching, for more info click here.
Note: the usual hash generation algorithm cannot be used in this case, please re-use the .hash field returned by a previous call to the method, or pass 0 if this is the first call. + /// Hash used for caching, for more info click here. /// a null value means messages.allStickersNotModified public static Task Messages_GetEmojiStickers(this Client client, long hash = default) => client.Invoke(new Messages_GetEmojiStickers @@ -3825,7 +3825,7 @@ namespace TL }); /// Gets featured custom emoji stickersets. See - /// Hash used for caching, for more info click here.
Note: the usual hash generation algorithm cannot be used in this case, please re-use the .hash field returned by a previous call to the method, or pass 0 if this is the first call. + /// Hash used for caching, for more info click here. public static Task Messages_GetFeaturedEmojiStickers(this Client client, long hash = default) => client.Invoke(new Messages_GetFeaturedEmojiStickers { @@ -3846,7 +3846,7 @@ namespace TL /// Got popular message reactions See /// Maximum number of results to return, see pagination - /// Hash used for caching, for more info click here.
Note: the usual hash generation algorithm cannot be used in this case, please re-use the .hash field returned by a previous call to the method, or pass 0 if this is the first call. + /// Hash used for caching, for more info click here. /// a null value means messages.reactionsNotModified public static Task Messages_GetTopReactions(this Client client, int limit = int.MaxValue, long hash = default) => client.Invoke(new Messages_GetTopReactions @@ -3857,7 +3857,7 @@ namespace TL /// Get recently used message reactions See /// Maximum number of results to return, see pagination - /// Hash used for caching, for more info click here.
Note: the usual hash generation algorithm cannot be used in this case, please re-use the .hash field returned by a previous call to the method, or pass 0 if this is the first call. + /// Hash used for caching, for more info click here. /// a null value means messages.reactionsNotModified public static Task Messages_GetRecentReactions(this Client client, int limit = int.MaxValue, long hash = default) => client.Invoke(new Messages_GetRecentReactions @@ -3911,7 +3911,7 @@ namespace TL }); /// Represents a list of emoji categories. See - /// Hash used for caching, for more info click here.
Note: the usual hash generation algorithm cannot be used in this case, please re-use the .hash field returned by a previous call to the method, or pass 0 if this is the first call. + /// Hash used for caching, for more info click here. /// a null value means messages.emojiGroupsNotModified public static Task Messages_GetEmojiGroups(this Client client, int hash = default) => client.Invoke(new Messages_GetEmojiGroups @@ -3920,7 +3920,7 @@ namespace TL }); /// Represents a list of emoji categories, to be used when selecting custom emojis to set as custom emoji status. See - /// Hash used for caching, for more info click here.
Note: the usual hash generation algorithm cannot be used in this case, please re-use the .hash field returned by a previous call to the method, or pass 0 if this is the first call. + /// Hash used for caching, for more info click here. /// a null value means messages.emojiGroupsNotModified public static Task Messages_GetEmojiStatusGroups(this Client client, int hash = default) => client.Invoke(new Messages_GetEmojiStatusGroups @@ -3929,7 +3929,7 @@ namespace TL }); /// Represents a list of emoji categories, to be used when selecting custom emojis to set as profile picture. See - /// Hash used for caching, for more info click here.
Note: the usual hash generation algorithm cannot be used in this case, please re-use the .hash field returned by a previous call to the method, or pass 0 if this is the first call. + /// Hash used for caching, for more info click here. /// a null value means messages.emojiGroupsNotModified public static Task Messages_GetEmojiProfilePhotoGroups(this Client client, int hash = default) => client.Invoke(new Messages_GetEmojiProfilePhotoGroups @@ -3939,7 +3939,7 @@ namespace TL /// Look for custom emojis associated to a UTF8 emoji See Possible codes: 400 (details) /// The emoji - /// Hash used for caching, for more info click here.
Note: the usual hash generation algorithm cannot be used in this case, please re-use the .hash field returned by a previous call to the method, or pass 0 if this is the first call. + /// Hash used for caching, for more info click here. /// a null value means emojiListNotModified public static Task Messages_SearchCustomEmoji(this Client client, string emoticon, long hash = default) => client.Invoke(new Messages_SearchCustomEmoji @@ -4006,7 +4006,7 @@ namespace TL /// Search for custom emoji stickersets » See /// Exclude featured stickersets from results /// Query string - /// Hash used for caching, for more info click here.
Note: the usual hash generation algorithm cannot be used in this case, please re-use the .hash field returned by a previous call to the method, or pass 0 if this is the first call. + /// Hash used for caching, for more info click here. /// a null value means messages.foundStickerSetsNotModified public static Task Messages_SearchEmojiStickerSets(this Client client, string q, long hash = default, bool exclude_featured = false) => client.Invoke(new Messages_SearchEmojiStickerSets @@ -4099,7 +4099,7 @@ namespace TL /// Fetch the full list of saved message tags created by the user. See /// If set, returns tags only used in the specified saved message dialog. - /// Hash used for caching, for more info click here.
Note: the usual hash generation algorithm cannot be used in this case, please re-use the .hash field returned by a previous call to the method, or pass 0 if this is the first call. + /// Hash used for caching, for more info click here. /// a null value means messages.savedReactionTagsNotModified public static Task Messages_GetSavedReactionTags(this Client client, long hash = default, InputPeer peer = null) => client.Invoke(new Messages_GetSavedReactionTags @@ -4121,7 +4121,7 @@ namespace TL }); /// Fetch a default recommended list of saved message tag reactions. See - /// Hash used for caching, for more info click here.
Note: the usual hash generation algorithm cannot be used in this case, please re-use the .hash field returned by a previous call to the method, or pass 0 if this is the first call. + /// Hash used for caching, for more info click here. /// a null value means messages.reactionsNotModified public static Task Messages_GetDefaultTagReactions(this Client client, long hash = default) => client.Invoke(new Messages_GetDefaultTagReactions @@ -4238,7 +4238,7 @@ namespace TL }); /// Represents a list of emoji categories, to be used when choosing a sticker. See - /// Hash used for caching, for more info click here.
Note: the usual hash generation algorithm cannot be used in this case, please re-use the .hash field returned by a previous call to the method, or pass 0 if this is the first call. + /// Hash used for caching, for more info click here. /// a null value means messages.emojiGroupsNotModified public static Task Messages_GetEmojiStickerGroups(this Client client, int hash = default) => client.Invoke(new Messages_GetEmojiStickerGroups @@ -4247,7 +4247,7 @@ namespace TL }); /// Fetch the full list of usable animated message effects ». See - /// Hash used for caching, for more info click here.
Note: the usual hash generation algorithm cannot be used in this case, please re-use the .hash field returned by a previous call to the method, or pass 0 if this is the first call. + /// Hash used for caching, for more info click here. /// a null value means messages.availableEffectsNotModified public static Task Messages_GetAvailableEffects(this Client client, int hash = default) => client.Invoke(new Messages_GetAvailableEffects @@ -4287,6 +4287,18 @@ namespace TL msg_id = msg_id, }); + /// See + public static Task Messages_RequestMainWebView(this Client client, InputPeer peer, InputUserBase bot, string platform, DataJSON theme_params = null, string start_param = null, bool compact = false) + => client.Invoke(new Messages_RequestMainWebView + { + flags = (Messages_RequestMainWebView.Flags)((theme_params != null ? 0x1 : 0) | (start_param != null ? 0x2 : 0) | (compact ? 0x80 : 0)), + peer = peer, + bot = bot, + start_param = start_param, + theme_params = theme_params, + platform = platform, + }); + /// Returns a current state of updates. See [bots: ✓] public static Task Updates_GetState(this Client client) => client.Invoke(new Updates_GetState @@ -4575,7 +4587,7 @@ namespace TL }); /// Get app-specific configuration, see client configuration for more info on the result. See - /// Hash used for caching, for more info click here.
Note: the usual hash generation algorithm cannot be used in this case, please re-use the .hash field returned by a previous call to the method, or pass 0 if this is the first call. + /// Hash used for caching, for more info click here. /// a null value means help.appConfigNotModified public static Task Help_GetAppConfig(this Client client, int hash = default) => client.Invoke(new Help_GetAppConfig @@ -4592,7 +4604,7 @@ namespace TL }); /// Get passport configuration See - /// Hash used for caching, for more info click here.
Note: the usual hash generation algorithm cannot be used in this case, please re-use the .hash field returned by a previous call to the method, or pass 0 if this is the first call. + /// Hash used for caching, for more info click here. /// a null value means help.passportConfigNotModified public static Task Help_GetPassportConfig(this Client client, int hash = default) => client.Invoke(new Help_GetPassportConfig @@ -4654,7 +4666,7 @@ namespace TL /// Get name, ISO code, localized name and phone codes/patterns of all available countries See /// Language code of the current user - /// Hash used for caching, for more info click here.
Note: the usual hash generation algorithm cannot be used in this case, please re-use the .hash field returned by a previous call to the method, or pass 0 if this is the first call. + /// Hash used for caching, for more info click here. /// a null value means help.countriesListNotModified public static Task Help_GetCountriesList(this Client client, string lang_code, int hash = default) => client.Invoke(new Help_GetCountriesList @@ -4670,7 +4682,7 @@ namespace TL }); /// Get the set of accent color palettes » that can be used for message accents. See - /// Hash used for caching, for more info click here.
Note: the usual hash generation algorithm cannot be used in this case, please re-use the .hash field returned by a previous call to the method, or pass 0 if this is the first call. + /// Hash used for caching, for more info click here. /// a null value means help.peerColorsNotModified public static Task Help_GetPeerColors(this Client client, int hash = default) => client.Invoke(new Help_GetPeerColors @@ -4679,7 +4691,7 @@ namespace TL }); /// Get the set of accent color palettes » that can be used in profile page backgrounds. See - /// Hash used for caching, for more info click here.
Note: the usual hash generation algorithm cannot be used in this case, please re-use the .hash field returned by a previous call to the method, or pass 0 if this is the first call. + /// Hash used for caching, for more info click here. /// a null value means help.peerColorsNotModified public static Task Help_GetPeerProfileColors(this Client client, int hash = default) => client.Invoke(new Help_GetPeerProfileColors @@ -4688,7 +4700,7 @@ namespace TL }); /// Returns timezone information that may be used elsewhere in the API, such as to set Telegram Business opening hours ». See - /// Hash used for caching, for more info click here.
Note: the usual hash generation algorithm cannot be used in this case, please re-use the .hash field returned by a previous call to the method, or pass 0 if this is the first call. + /// Hash used for caching, for more info click here. /// a null value means help.timezonesListNotModified public static Task Help_GetTimezonesList(this Client client, int hash = default) => client.Invoke(new Help_GetTimezonesList @@ -5574,6 +5586,66 @@ namespace TL params_ = params_, }); + /// See + public static Task Bots_GetPopularAppBots(this Client client, string offset, int limit = int.MaxValue) + => client.Invoke(new Bots_GetPopularAppBots + { + offset = offset, + limit = limit, + }); + + /// See + public static Task Bots_AddPreviewMedia(this Client client, InputUserBase bot, string lang_code, InputMedia media) + => client.Invoke(new Bots_AddPreviewMedia + { + bot = bot, + lang_code = lang_code, + media = media, + }); + + /// See + public static Task Bots_EditPreviewMedia(this Client client, InputUserBase bot, string lang_code, InputMedia media, InputMedia new_media) + => client.Invoke(new Bots_EditPreviewMedia + { + bot = bot, + lang_code = lang_code, + media = media, + new_media = new_media, + }); + + /// See + public static Task Bots_DeletePreviewMedia(this Client client, InputUserBase bot, string lang_code, params InputMedia[] media) + => client.Invoke(new Bots_DeletePreviewMedia + { + bot = bot, + lang_code = lang_code, + media = media, + }); + + /// See + public static Task Bots_ReorderPreviewMedias(this Client client, InputUserBase bot, string lang_code, params InputMedia[] order) + => client.Invoke(new Bots_ReorderPreviewMedias + { + bot = bot, + lang_code = lang_code, + order = order, + }); + + /// See + public static Task Bots_GetPreviewInfo(this Client client, InputUserBase bot, string lang_code) + => client.Invoke(new Bots_GetPreviewInfo + { + bot = bot, + lang_code = lang_code, + }); + + /// See + public static Task Bots_GetPreviewMedias(this Client client, InputUserBase bot) + => client.Invoke(new Bots_GetPreviewMedias + { + bot = bot, + }); + /// Get a payment form See Possible codes: 400 (details) /// Invoice /// A JSON object with the following keys, containing color theme information (integers, RGB24) to pass to the payment provider, to apply in eventual verification pages:
bg_color - Background color
text_color - Text color
hint_color - Hint text color
link_color - Link color
button_color - Button color
button_text_color - Button text color @@ -5813,6 +5885,14 @@ namespace TL id = id, }); + /// See + public static Task Payments_GetStarsGiftOptions(this Client client, InputUserBase user_id = null) + => client.Invoke(new Payments_GetStarsGiftOptions + { + flags = (Payments_GetStarsGiftOptions.Flags)(user_id != null ? 0x1 : 0), + user_id = user_id, + }); + /// Create a stickerset, bots only. See [bots: ✓] Possible codes: 400 (details) /// Whether this is a mask stickerset /// Whether this is a custom emoji stickerset. @@ -6234,7 +6314,7 @@ namespace TL subscribed = subscribed, }); - /// Start a scheduled group call. See Possible codes: 400 (details) + /// Start a scheduled group call. See Possible codes: 400,403 (details) /// The scheduled group call public static Task Phone_StartScheduledGroupCall(this Client client, InputGroupCall call) => client.Invoke(new Phone_StartScheduledGroupCall @@ -8242,6 +8322,7 @@ namespace TL.Methods forward_chats = 0x20, groups = 0x400, channels = 0x8000, + bots_app = 0x10000, } } @@ -10558,6 +10639,24 @@ namespace TL.Methods public int[] msg_id; } + [TLDef(0xC9E01E7B)] + public sealed partial class Messages_RequestMainWebView : IMethod + { + public Flags flags; + public InputPeer peer; + public InputUserBase bot; + [IfFlag(1)] public string start_param; + [IfFlag(0)] public DataJSON theme_params; + public string platform; + + [Flags] public enum Flags : uint + { + has_theme_params = 0x1, + has_start_param = 0x2, + compact = 0x80, + } + } + [TLDef(0xEDD4882A)] public sealed partial class Updates_GetState : IMethod { } @@ -11543,6 +11642,59 @@ namespace TL.Methods public DataJSON params_; } + [TLDef(0xC2510192)] + public sealed partial class Bots_GetPopularAppBots : IMethod + { + public string offset; + public int limit; + } + + [TLDef(0x17AEB75A)] + public sealed partial class Bots_AddPreviewMedia : IMethod + { + public InputUserBase bot; + public string lang_code; + public InputMedia media; + } + + [TLDef(0x8525606F)] + public sealed partial class Bots_EditPreviewMedia : IMethod + { + public InputUserBase bot; + public string lang_code; + public InputMedia media; + public InputMedia new_media; + } + + [TLDef(0x2D0135B3)] + public sealed partial class Bots_DeletePreviewMedia : IMethod + { + public InputUserBase bot; + public string lang_code; + public InputMedia[] media; + } + + [TLDef(0xB627F3AA)] + public sealed partial class Bots_ReorderPreviewMedias : IMethod + { + public InputUserBase bot; + public string lang_code; + public InputMedia[] order; + } + + [TLDef(0x423AB3AD)] + public sealed partial class Bots_GetPreviewInfo : IMethod + { + public InputUserBase bot; + public string lang_code; + } + + [TLDef(0xA2A5594D)] + public sealed partial class Bots_GetPreviewMedias : IMethod + { + public InputUserBase bot; + } + [TLDef(0x37148DBB)] public sealed partial class Payments_GetPaymentForm : IMethod { @@ -11758,6 +11910,18 @@ namespace TL.Methods public InputStarsTransaction[] id; } + [TLDef(0xD3C96BC8)] + public sealed partial class Payments_GetStarsGiftOptions : IMethod + { + public Flags flags; + [IfFlag(0)] public InputUserBase user_id; + + [Flags] public enum Flags : uint + { + has_user_id = 0x1, + } + } + [TLDef(0x9021AB67)] public sealed partial class Stickers_CreateStickerSet : IMethod { diff --git a/src/TL.Table.cs b/src/TL.Table.cs index f1ec34a..c3d993d 100644 --- a/src/TL.Table.cs +++ b/src/TL.Table.cs @@ -6,7 +6,7 @@ namespace TL { public static partial class Layer { - public const int Version = 184; // fetched 17/07/2024 09:17:31 + public const int Version = 185; // fetched 31/07/2024 17:28:03 internal const int SecretChats = 144; internal const int MTProto2 = 73; internal const uint VectorCtor = 0x1CB5C415; @@ -123,7 +123,7 @@ namespace TL [0x36C6019A] = typeof(PeerChat), [0xA2A5371E] = typeof(PeerChannel), [0xD3BC4B7A] = typeof(UserEmpty), - [0x215C4438] = typeof(User), + [0x83314FCA] = typeof(User), [0x4F11BAE1] = null,//UserProfilePhotoEmpty [0x82D1F706] = typeof(UserProfilePhoto), [0x09D05049] = null,//UserStatusEmpty @@ -210,6 +210,7 @@ namespace TL [0xCC02AA6D] = typeof(MessageActionBoostApply), [0x93B31848] = typeof(MessageActionRequestedPeerSentMe), [0x41B3E202] = typeof(MessageActionPaymentRefunded), + [0x45D5B021] = typeof(MessageActionGiftStars), [0xD58A08C6] = typeof(Dialog), [0x71BD134C] = typeof(DialogFolder), [0x2331B22D] = typeof(PhotoEmpty), @@ -508,7 +509,7 @@ namespace TL [0x6C37C15C] = typeof(DocumentAttributeImageSize), [0x11B58939] = typeof(DocumentAttributeAnimated), [0x6319D612] = typeof(DocumentAttributeSticker), - [0xD38FF1C2] = typeof(DocumentAttributeVideo), + [0x17399FAD] = typeof(DocumentAttributeVideo), [0x9852F9C6] = typeof(DocumentAttributeAudio), [0x15590068] = typeof(DocumentAttributeFilename), [0x9801D2F7] = typeof(DocumentAttributeHasStickers), @@ -1080,7 +1081,7 @@ namespace TL [0xC5B56859] = typeof(InputInvoiceMessage), [0xC326CAEF] = typeof(InputInvoiceSlug), [0x98986C0D] = typeof(InputInvoicePremiumGiftCode), - [0x1DA33AD8] = typeof(InputInvoiceStars), + [0x65F00CE3] = typeof(InputInvoiceStars), [0xAED0CBD9] = typeof(Payments_ExportedInvoice), [0xCFB9D957] = typeof(Messages_TranscribedAudio), [0x5334759C] = typeof(Help_PremiumPromo), @@ -1088,7 +1089,8 @@ namespace TL [0x616F7FE8] = typeof(InputStorePaymentGiftPremium), [0xA3805F3F] = typeof(InputStorePaymentPremiumGiftCode), [0x160544CA] = typeof(InputStorePaymentPremiumGiveaway), - [0x4F0EE8DF] = typeof(InputStorePaymentStars), + [0xDDDD0F56] = typeof(InputStorePaymentStarsTopup), + [0x1D741EF7] = typeof(InputStorePaymentStarsGift), [0x74C34319] = typeof(PremiumGiftOption), [0x88F8F21B] = typeof(PaymentFormMethod), [0x2DE11AAE] = null,//EmojiStatusEmpty @@ -1182,6 +1184,7 @@ namespace TL [0x770416AF] = typeof(MediaAreaChannelPost), [0x2271F2BF] = typeof(InputMediaAreaChannelPost), [0x37381085] = typeof(MediaAreaUrl), + [0x49A6549C] = typeof(MediaAreaWeather), [0x9A35E999] = typeof(PeerStories), [0xCAE68768] = typeof(Stories_PeerStories), [0xFD5E12BD] = typeof(Messages_WebPage), @@ -1301,6 +1304,10 @@ namespace TL [0x1DAB80B7] = typeof(Payments_StarsRevenueWithdrawalUrl), [0x394E7F21] = typeof(Payments_StarsRevenueAdsAccountUrl), [0x206AE6D1] = typeof(InputStarsTransaction), + [0x5E0589F1] = typeof(StarsGiftOption), + [0x1991B13B] = typeof(Bots_PopularAppBots), + [0x23E91BA3] = typeof(BotPreviewMedia), + [0x0CA71D64] = typeof(Bots_PreviewInfo), // from TL.Secret: [0x6ABD9782] = typeof(Layer143.DecryptedMessageMediaDocument), [0x020DF5D0] = typeof(Layer101.MessageEntityBlockquote), diff --git a/src/WTelegramClient.csproj b/src/WTelegramClient.csproj index c8d1dcc..9b4353c 100644 --- a/src/WTelegramClient.csproj +++ b/src/WTelegramClient.csproj @@ -13,7 +13,7 @@ WTelegramClient 0.0.0 Wizou - Telegram Client API (MTProto) library written 100% in C# and .NET Standard | Latest API layer: 184 + Telegram Client API (MTProto) library written 100% in C# and .NET Standard | Latest API layer: 185 Release Notes: $(ReleaseNotes.Replace("|", "%0D%0A").Replace(" - ","%0D%0A- ").Replace(" ", "%0D%0A%0D%0A"))