From 7d388e6e75eca148f66ab1135bbe6a510bac35b2 Mon Sep 17 00:00:00 2001 From: Wizou <11647984+wiz0u@users.noreply.github.com> Date: Wed, 1 May 2024 11:13:28 +0200 Subject: [PATCH] API Layer 179 (changed): emoji categories --- .github/dev.yml | 2 +- README.md | 2 +- src/TL.Schema.cs | 47 +++++++++++++++++++++++++++++++++++++------ src/TL.SchemaFuncs.cs | 14 +++++++++++++ src/TL.Table.cs | 7 +++++-- 5 files changed, 62 insertions(+), 10 deletions(-) diff --git a/.github/dev.yml b/.github/dev.yml index b418590..f2ef2db 100644 --- a/.github/dev.yml +++ b/.github/dev.yml @@ -1,7 +1,7 @@ pr: none trigger: [ master ] -name: 4.1.1-dev.$(Rev:r) +name: 4.1.2-dev.$(Rev:r) pool: vmImage: ubuntu-latest diff --git a/README.md b/README.md index a96d7a3..f452bc6 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ [![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) -## _Telegram Client API library written 100% in C# and .NET_ +## *_Telegram Client API library written 100% in C# and .NET_* This library allows you to connect to Telegram and control a user programmatically (or a bot, but [Telegram.Bot](https://github.com/TelegramBots/Telegram.Bot) is much easier for that). All the Telegram Client APIs (MTProto) are supported so you can do everything the user could do with a full Telegram GUI client. diff --git a/src/TL.Schema.cs b/src/TL.Schema.cs index 14444f9..5c2a947 100644 --- a/src/TL.Schema.cs +++ b/src/TL.Schema.cs @@ -15620,9 +15620,17 @@ namespace TL public long[] document_id; } + /// Represents an emoji category. See Derived classes: + public abstract partial class EmojiGroupBase : IObject + { + /// Category name, i.e. "Animals", "Flags", "Faces" and so on... + public virtual string Title => default; + /// A single custom emoji used as preview for the category. + public virtual long IconEmojiId => default; + } /// Represents an emoji category. See [TLDef(0x7A9ABDA9)] - public sealed partial class EmojiGroup : IObject + public partial class EmojiGroup : EmojiGroupBase { /// Category name, i.e. "Animals", "Flags", "Faces" and so on... public string title; @@ -15630,6 +15638,26 @@ namespace TL public long icon_emoji_id; /// A list of UTF-8 emojis, matching the category. public string[] emoticons; + + /// Category name, i.e. "Animals", "Flags", "Faces" and so on... + public override string Title => title; + /// A single custom emoji used as preview for the category. + public override long IconEmojiId => icon_emoji_id; + } + /// See + [TLDef(0x80D26CC7)] + public sealed partial class EmojiGroupGreeting : EmojiGroup + { + } + /// See + [TLDef(0x093BCF34)] + public sealed partial class EmojiGroupPremium : EmojiGroupBase + { + public string title; + public long icon_emoji_id; + + public override string Title => title; + public override long IconEmojiId => icon_emoji_id; } /// Represents a list of emoji categories. See @@ -15640,7 +15668,7 @@ namespace TL /// Hash for pagination, for more info click here public int hash; /// A list of emoji categories. - public EmojiGroup[] groups; + public EmojiGroupBase[] groups; } /// Styled text with message entities See @@ -17771,14 +17799,12 @@ namespace TL public sealed partial class Channels_SponsoredMessageReportResultReported : Channels_SponsoredMessageReportResult { } /// See - [TLDef(0xD07B4BAD)] + [TLDef(0x5407E297)] public sealed partial class Stats_BroadcastRevenueStats : IObject { public StatsGraphBase top_hours_graph; public StatsGraphBase revenue_graph; - public long current_balance; - public long available_balance; - public long overall_revenue; + public BroadcastRevenueBalances balances; public double usd_rate; } @@ -17859,4 +17885,13 @@ namespace TL has_stories_notify_from = 0x2, } } + + /// See + [TLDef(0x8438F1C6)] + public sealed partial class BroadcastRevenueBalances : IObject + { + public long current_balance; + public long available_balance; + public long overall_revenue; + } } diff --git a/src/TL.SchemaFuncs.cs b/src/TL.SchemaFuncs.cs index 72fcf64..d872175 100644 --- a/src/TL.SchemaFuncs.cs +++ b/src/TL.SchemaFuncs.cs @@ -4136,6 +4136,14 @@ namespace TL limit = limit, }); + /// See + /// a null value means messages.emojiGroupsNotModified + public static Task Messages_GetEmojiStickerGroups(this Client client, int hash = default) + => client.Invoke(new Messages_GetEmojiStickerGroups + { + hash = hash, + }); + /// Returns a current state of updates. See [bots: ✓] public static Task Updates_GetState(this Client client) => client.Invoke(new Updates_GetState @@ -10202,6 +10210,12 @@ namespace TL.Methods public int limit; } + [TLDef(0x1DD840F5)] + public sealed partial class Messages_GetEmojiStickerGroups : IMethod + { + public int hash; + } + [TLDef(0xEDD4882A)] public sealed partial class Updates_GetState : IMethod { } diff --git a/src/TL.Table.cs b/src/TL.Table.cs index 01842c9..84b9dee 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 = 179; // fetched 27/04/2024 11:14:23 + public const int Version = 179; // fetched 01/05/2024 09:06:44 internal const int SecretChats = 144; internal const int MTProto2 = 73; internal const uint VectorCtor = 0x1CB5C415; @@ -1119,6 +1119,8 @@ namespace TL [0x481EADFA] = null,//EmojiListNotModified [0x7A1E11D1] = typeof(EmojiList), [0x7A9ABDA9] = typeof(EmojiGroup), + [0x80D26CC7] = typeof(EmojiGroupGreeting), + [0x093BCF34] = typeof(EmojiGroupPremium), [0x6FB4AD87] = null,//Messages_EmojiGroupsNotModified [0x881FB94B] = typeof(Messages_EmojiGroups), [0x751F3146] = typeof(TextWithEntities), @@ -1259,13 +1261,14 @@ namespace TL [0x846F9E42] = typeof(Channels_SponsoredMessageReportResultChooseOption), [0x3E3BCF2F] = typeof(Channels_SponsoredMessageReportResultAdsHidden), [0xAD798849] = typeof(Channels_SponsoredMessageReportResultReported), - [0xD07B4BAD] = typeof(Stats_BroadcastRevenueStats), + [0x5407E297] = typeof(Stats_BroadcastRevenueStats), [0xEC659737] = typeof(Stats_BroadcastRevenueWithdrawalUrl), [0x557E2CC4] = typeof(BroadcastRevenueTransactionProceeds), [0x5A590978] = typeof(BroadcastRevenueTransactionWithdrawal), [0x42D30D2E] = typeof(BroadcastRevenueTransactionRefund), [0x87158466] = typeof(Stats_BroadcastRevenueTransactions), [0x56E34970] = typeof(ReactionsNotifySettings), + [0x8438F1C6] = typeof(BroadcastRevenueBalances), // from TL.Secret: [0x6ABD9782] = typeof(Layer143.DecryptedMessageMediaDocument), [0x91CC4674] = typeof(Layer73.DecryptedMessage),