Skip to content

Commit

Permalink
API Layer 190: Text attached to gifts
Browse files Browse the repository at this point in the history
  • Loading branch information
wiz0u committed Oct 15, 2024
1 parent e4d6692 commit 75f5832
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 9 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[![API Layer](https://img.shields.io/badge/API_Layer-189-blueviolet)](https://corefork.telegram.org/methods)
[![API Layer](https://img.shields.io/badge/API_Layer-190-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://buymeacoffee.com/wizou)
Expand Down
15 changes: 12 additions & 3 deletions src/TL.Schema.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2541,7 +2541,7 @@ public partial class MessageActionWebViewDataSent : MessageAction
public string text;
}
/// <summary>Info about a gifted Telegram Premium subscription <para>See <a href="https://corefork.telegram.org/constructor/messageActionGiftPremium"/></para></summary>
[TLDef(0xC83D6AEC)]
[TLDef(0x6C6274FA)]
public sealed partial class MessageActionGiftPremium : MessageAction
{
/// <summary>Extra bits of information, use <c>flags.HasFlag(...)</c> to test for those</summary>
Expand All @@ -2556,11 +2556,14 @@ public sealed partial class MessageActionGiftPremium : MessageAction
[IfFlag(0)] public string crypto_currency;
/// <summary>If the gift was bought using a cryptocurrency, price of the gift in the smallest units of a cryptocurrency.</summary>
[IfFlag(0)] public long crypto_amount;
[IfFlag(1)] public TextWithEntities message;

[Flags] public enum Flags : uint
{
/// <summary>Fields <see cref="crypto_currency"/> and <see cref="crypto_amount"/> have a value</summary>
has_crypto_currency = 0x1,
/// <summary>Field <see cref="message"/> has a value</summary>
has_message = 0x2,
}
}
/// <summary>A <a href="https://corefork.telegram.org/api/forum#forum-topics">forum topic</a> was created. <para>See <a href="https://corefork.telegram.org/constructor/messageActionTopicCreate"/></para></summary>
Expand Down Expand Up @@ -2643,7 +2646,7 @@ public sealed partial class MessageActionSetChatWallPaper : MessageAction
}
}
/// <summary>Contains a <a href="https://corefork.telegram.org/api/links#premium-giftcode-links">Telegram Premium giftcode link</a>. <para>See <a href="https://corefork.telegram.org/constructor/messageActionGiftCode"/></para></summary>
[TLDef(0x678C2E09)]
[TLDef(0x56D03994)]
public sealed partial class MessageActionGiftCode : MessageAction
{
/// <summary>Extra bits of information, use <c>flags.HasFlag(...)</c> to test for those</summary>
Expand All @@ -2662,6 +2665,7 @@ public sealed partial class MessageActionGiftCode : MessageAction
[IfFlag(3)] public string crypto_currency;
/// <summary>If <c>crypto_currency</c> is set, contains the paid amount, in the smallest units of the cryptocurrency.</summary>
[IfFlag(3)] public long crypto_amount;
[IfFlag(4)] public TextWithEntities message;

[Flags] public enum Flags : uint
{
Expand All @@ -2673,6 +2677,8 @@ public sealed partial class MessageActionGiftCode : MessageAction
unclaimed = 0x4,
/// <summary>Fields <see cref="crypto_currency"/> and <see cref="crypto_amount"/> have a value</summary>
has_crypto_currency = 0x8,
/// <summary>Field <see cref="message"/> has a value</summary>
has_message = 0x10,
}
}
/// <summary>A <a href="https://corefork.telegram.org/api/giveaways">giveaway</a> was started. <para>See <a href="https://corefork.telegram.org/constructor/messageActionGiveawayLaunch"/></para></summary>
Expand Down Expand Up @@ -15659,7 +15665,7 @@ public sealed partial class InputStorePaymentGiftPremium : InputStorePaymentPurp
public long amount;
}
/// <summary>Used to gift <a href="https://corefork.telegram.org/api/premium">Telegram Premium</a> subscriptions only to some specific subscribers of a channel/supergroup or to some of our contacts, see <a href="https://corefork.telegram.org/api/giveaways">here »</a> for more info on giveaways and gifts. <para>See <a href="https://corefork.telegram.org/constructor/inputStorePaymentPremiumGiftCode"/></para></summary>
[TLDef(0xA3805F3F)]
[TLDef(0xFB790393)]
public sealed partial class InputStorePaymentPremiumGiftCode : InputStorePaymentPurpose
{
/// <summary>Extra bits of information, use <c>flags.HasFlag(...)</c> to test for those</summary>
Expand All @@ -15672,11 +15678,14 @@ public sealed partial class InputStorePaymentPremiumGiftCode : InputStorePayment
public string currency;
/// <summary>Total price in the smallest units of the currency (integer, not float/double). For example, for a price of <c>US$ 1.45</c> pass <c>amount = 145</c>. See the exp parameter in <a href="https://corefork.telegram.org/bots/payments/currencies.json">currencies.json</a>, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies).</summary>
public long amount;
[IfFlag(1)] public TextWithEntities message;

[Flags] public enum Flags : uint
{
/// <summary>Field <see cref="boost_peer"/> has a value</summary>
has_boost_peer = 0x1,
/// <summary>Field <see cref="message"/> has a value</summary>
has_message = 0x2,
}
}
/// <summary>Used to pay for a <a href="https://corefork.telegram.org/api/giveaways">giveaway, see here »</a> for more info. <para>See <a href="https://corefork.telegram.org/constructor/inputStorePaymentPremiumGiveaway"/></para></summary>
Expand Down
8 changes: 4 additions & 4 deletions src/TL.Table.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ namespace TL
{
public static partial class Layer
{
public const int Version = 189; // fetched 07/10/2024 12:32:56
public const int Version = 190; // fetched 15/10/2024 14:49:33
internal const int SecretChats = 144;
internal const int MTProto2 = 73;
internal const uint VectorCtor = 0x1CB5C415;
Expand Down Expand Up @@ -199,13 +199,13 @@ public static partial class Layer
[0xEBBCA3CB] = typeof(MessageActionChatJoinedByRequest),
[0x47DD8079] = typeof(MessageActionWebViewDataSentMe),
[0xB4C38CB5] = typeof(MessageActionWebViewDataSent),
[0xC83D6AEC] = typeof(MessageActionGiftPremium),
[0x6C6274FA] = typeof(MessageActionGiftPremium),
[0x0D999256] = typeof(MessageActionTopicCreate),
[0xC0944820] = typeof(MessageActionTopicEdit),
[0x57DE635E] = typeof(MessageActionSuggestProfilePhoto),
[0x31518E9B] = typeof(MessageActionRequestedPeer),
[0x5060A3F4] = typeof(MessageActionSetChatWallPaper),
[0x678C2E09] = typeof(MessageActionGiftCode),
[0x56D03994] = typeof(MessageActionGiftCode),
[0xA80F51E4] = typeof(MessageActionGiveawayLaunch),
[0x87E2F155] = typeof(MessageActionGiveawayResults),
[0xCC02AA6D] = typeof(MessageActionBoostApply),
Expand Down Expand Up @@ -1098,7 +1098,7 @@ public static partial class Layer
[0x5334759C] = typeof(Help_PremiumPromo),
[0xA6751E66] = typeof(InputStorePaymentPremiumSubscription),
[0x616F7FE8] = typeof(InputStorePaymentGiftPremium),
[0xA3805F3F] = typeof(InputStorePaymentPremiumGiftCode),
[0xFB790393] = typeof(InputStorePaymentPremiumGiftCode),
[0x160544CA] = typeof(InputStorePaymentPremiumGiveaway),
[0xDDDD0F56] = typeof(InputStorePaymentStarsTopup),
[0x1D741EF7] = typeof(InputStorePaymentStarsGift),
Expand Down
2 changes: 1 addition & 1 deletion src/WTelegramClient.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<PackageId>WTelegramClient</PackageId>
<Version>0.0.0</Version>
<Authors>Wizou</Authors>
<Description>Telegram Client API (MTProto) library written 100% in C# and .NET Standard | Latest API layer: 189
<Description>Telegram Client API (MTProto) library written 100% in C# and .NET Standard | Latest API layer: 190

Release Notes:
$(ReleaseNotes.Replace("|", "%0D%0A").Replace(" - ","%0D%0A- ").Replace(" ", "%0D%0A%0D%0A"))</Description>
Expand Down

0 comments on commit 75f5832

Please sign in to comment.