From 9208d0b92c09da36b235a67517ed27a29adfe4df Mon Sep 17 00:00:00 2001
From: Wizou <11647984+wiz0u@users.noreply.github.com>
Date: Mon, 18 Nov 2024 14:17:28 +0100
Subject: [PATCH] API Layer 193: fullscreen mini-apps, Bot API 8.0
---
README.md | 2 +-
src/TL.Schema.cs | 219 ++++++++++++++++++++++++++++++++-----
src/TL.SchemaFuncs.cs | 170 +++++++++++++++++++++++++---
src/TL.Table.cs | 18 ++-
src/WTelegramClient.csproj | 2 +-
5 files changed, 363 insertions(+), 48 deletions(-)
diff --git a/README.md b/README.md
index 2783d1e..85dd472 100644
--- a/README.md
+++ b/README.md
@@ -1,4 +1,4 @@
-[![API Layer](https://img.shields.io/badge/API_Layer-192-blueviolet)](https://corefork.telegram.org/methods)
+[![API Layer](https://img.shields.io/badge/API_Layer-193-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)
diff --git a/src/TL.Schema.cs b/src/TL.Schema.cs
index 97a5fdd..643ed25 100644
--- a/src/TL.Schema.cs
+++ b/src/TL.Schema.cs
@@ -1090,6 +1090,7 @@ public sealed partial class Channel : ChatBase
[IfFlag(41)] public EmojiStatus emoji_status;
/// Boost level.
Changes to this flag should invalidate the local cache for this channel/supergroup ID, see here » for more info.
[IfFlag(42)] public int level;
+ /// Expiration date of the Telegram Star subscription » the current user has bought to gain access to this channel.
[IfFlag(43)] public DateTime subscription_until_date;
[Flags] public enum Flags : uint
@@ -1170,6 +1171,7 @@ public sealed partial class Channel : ChatBase
has_level = 0x400,
/// Field has a value
has_subscription_until_date = 0x800,
+ /// If set, messages sent by admins to this channel will link to the admin's profile (just like with groups).
signature_profiles = 0x1000,
}
@@ -1544,6 +1546,7 @@ public sealed partial class ChannelFull : ChatFullBase
paid_media_allowed = 0x4000,
/// If set, this user can view Telegram Star revenue statistics » for this channel.
can_view_stars_revenue = 0x8000,
+ /// If set, users may send paid Telegram Star reactions » to messages of this channel.
paid_reactions_available = 0x10000,
}
@@ -2166,6 +2169,7 @@ public sealed partial class MessageMediaGiveaway : MessageMedia
public int quantity;
/// Duration in months of each Telegram Premium subscription in the giveaway.
[IfFlag(4)] public int months;
+ /// For Telegram Star giveaways, the total number of Telegram Stars being given away.
[IfFlag(5)] public long stars;
/// The end date of the giveaway.
public DateTime until_date;
@@ -2206,6 +2210,7 @@ public sealed partial class MessageMediaGiveawayResults : MessageMedia
public long[] winners;
/// Duration in months of each Telegram Premium subscription in the giveaway.
[IfFlag(4)] public int months;
+ /// For Telegram Star giveaways, the total number of Telegram Stars being given away.
[IfFlag(5)] public long stars;
/// Can contain a textual description of additional giveaway prizes.
[IfFlag(1)] public string prize_description;
@@ -2689,6 +2694,7 @@ public sealed partial class MessageActionGiveawayLaunch : MessageAction
{
/// Extra bits of information, use flags.HasFlag(...) to test for those
public Flags flags;
+ /// For Telegram Star giveaways, the total number of Telegram Stars being given away.
[IfFlag(0)] public long stars;
[Flags] public enum Flags : uint
@@ -2710,6 +2716,7 @@ public sealed partial class MessageActionGiveawayResults : MessageAction
[Flags] public enum Flags : uint
{
+ /// If set, this is a Telegram Star giveaway
stars = 0x1,
}
}
@@ -2779,15 +2786,17 @@ public sealed partial class MessageActionGiftStars : MessageAction
has_transaction_id = 0x2,
}
}
- /// See
+ /// You won some Telegram Stars in a Telegram Star giveaway ». See
[TLDef(0xB00C47A2)]
public sealed partial class MessageActionPrizeStars : MessageAction
{
/// Extra bits of information, use flags.HasFlag(...) to test for those
public Flags flags;
+ /// The number of Telegram Stars you won
public long stars;
public string transaction_id;
public Peer boost_peer;
+ /// ID of the message containing the
public int giveaway_msg_id;
[Flags] public enum Flags : uint
@@ -2796,14 +2805,14 @@ public sealed partial class MessageActionPrizeStars : MessageAction
}
}
/// See
- [TLDef(0x9BB3EF44)]
+ [TLDef(0x08557637)]
public sealed partial class MessageActionStarGift : MessageAction
{
/// Extra bits of information, use flags.HasFlag(...) to test for those
public Flags flags;
public StarGift gift;
[IfFlag(1)] public TextWithEntities message;
- public long convert_stars;
+ [IfFlag(4)] public long convert_stars;
[Flags] public enum Flags : uint
{
@@ -2812,6 +2821,8 @@ public sealed partial class MessageActionStarGift : MessageAction
has_message = 0x2,
saved = 0x4,
converted = 0x8,
+ /// Field has a value
+ has_convert_stars = 0x10,
}
}
@@ -3563,6 +3574,7 @@ public sealed partial class UserFull : IObject
has_stargifts_count = 0x100,
/// If set, this user can view ad revenue statistics » for this bot.
can_view_revenue = 0x200,
+ bot_can_manage_emoji_status = 0x400,
}
}
@@ -5614,12 +5626,25 @@ public sealed partial class UpdateBotPurchasedPaidMedia : Update
public override (long, int, int) GetMBox() => (-1, qts, 1);
}
- /// See
+ /// Contains the current default paid reaction privacy, see here »: for more info. See
[TLDef(0x51CA7AEC)]
public sealed partial class UpdatePaidReactionPrivacy : Update
{
+ /// Whether paid reaction privacy is enabled or disabled.
public bool private_;
}
+ /// See
+ [TLDef(0x2D13C6EE)]
+ public sealed partial class UpdateBotSubscriptionExpire : Update
+ {
+ public long user_id;
+ public string payload;
+ public string invoice_slug;
+ public DateTime until_date;
+ public int qts;
+
+ public override (long, int, int) GetMBox() => (-1, qts, 1);
+ }
/// Updates state. See
[TLDef(0xA56C2A3E)]
@@ -6760,6 +6785,8 @@ public enum InputPrivacyKey : uint
About = 0x3823CC40,
///Whether the user can see our birthday.
Birthday = 0xD65A11CC,
+ ///See
+ StarGiftsAutoSave = 0xE1732341,
}
/// Privacy keys together with privacy rules » indicate what can or can't someone do and are specified by a constructor, and its input counterpart . See
@@ -6787,6 +6814,8 @@ public enum PrivacyKey : uint
About = 0xA486B761,
///Whether the user can see our birthday.
Birthday = 0x2000A518,
+ ///See
+ StarGiftsAutoSave = 0x2CA4FDF8,
}
/// Privacy rules indicate who can or can't do something and are specified by a , and its input counterpart . See Derived classes: , , , , , , , , ,
@@ -6837,6 +6866,12 @@ public sealed partial class InputPrivacyValueAllowCloseFriends : InputPrivacyRul
/// Allow only users with a Premium subscription », currently only usable for . See
[TLDef(0x77CDC9F1)]
public sealed partial class InputPrivacyValueAllowPremium : InputPrivacyRule { }
+ /// See
+ [TLDef(0x5A4FCCE5)]
+ public sealed partial class InputPrivacyValueAllowBots : InputPrivacyRule { }
+ /// See
+ [TLDef(0xC4E57915)]
+ public sealed partial class InputPrivacyValueDisallowBots : InputPrivacyRule { }
/// Privacy rules together with privacy keys indicate what can or can't someone do and are specified by a constructor, and its input counterpart . See Derived classes: , , , , , , , , ,
public abstract partial class PrivacyRule : IObject { }
@@ -6886,6 +6921,12 @@ public sealed partial class PrivacyValueAllowCloseFriends : PrivacyRule { }
/// Allow only users with a Premium subscription », currently only usable for . See
[TLDef(0xECE9814B)]
public sealed partial class PrivacyValueAllowPremium : PrivacyRule { }
+ /// See
+ [TLDef(0x21461B5D)]
+ public sealed partial class PrivacyValueAllowBots : PrivacyRule { }
+ /// See
+ [TLDef(0xF6A5F82F)]
+ public sealed partial class PrivacyValueDisallowBots : PrivacyRule { }
/// Privacy rules See
[TLDef(0x50A04E45)]
@@ -7419,9 +7460,11 @@ public sealed partial class ChatInviteExported : ExportedChatInvite
[IfFlag(3)] public int usage;
/// Number of users that have already used this link to join
[IfFlag(7)] public int requested;
+ /// For Telegram Star subscriptions », contains the number of chat members which have already joined the chat using the link, but have already left due to expiration of their subscription.
[IfFlag(10)] public int subscription_expired;
/// Custom description for the invite link, visible only to admins
[IfFlag(8)] public string title;
+ /// For Telegram Star subscriptions », contains the pricing of the subscription the user must activate to join the private channel.
[IfFlag(9)] public StarsSubscriptionPricing subscription_pricing;
[Flags] public enum Flags : uint
@@ -7481,7 +7524,9 @@ public sealed partial class ChatInvite : ChatInviteBase
[IfFlag(4)] public UserBase[] participants;
/// Profile color palette ID
public int color;
+ /// For Telegram Star subscriptions », contains the pricing of the subscription the user must activate to join the private channel.
[IfFlag(10)] public StarsSubscriptionPricing subscription_pricing;
+ /// For Telegram Star subscriptions », the ID of the payment form for the subscription.
[IfFlag(12)] public long subscription_form_id;
[Flags] public enum Flags : uint
@@ -7508,6 +7553,7 @@ public sealed partial class ChatInvite : ChatInviteBase
fake = 0x200,
/// Field has a value
has_subscription_pricing = 0x400,
+ /// If set, indicates that the user has already paid for the associated Telegram Star subscriptions » and it hasn't expired yet, so they may re-join the channel using Messages_ImportChatInvite without repeating the payment.
can_refulfill_subscription = 0x800,
/// Field has a value
has_subscription_form_id = 0x1000,
@@ -7651,7 +7697,7 @@ public sealed partial class BotCommand : IObject
}
/// Info about bots (available bot commands, etc) See
- [TLDef(0x82437E74)]
+ [TLDef(0x36607333)]
public sealed partial class BotInfo : IObject
{
/// Extra bits of information, use flags.HasFlag(...) to test for those
@@ -7668,7 +7714,9 @@ public sealed partial class BotInfo : IObject
[IfFlag(2)] public BotCommand[] commands;
/// Indicates the action to execute when pressing the in-UI menu button for bots
[IfFlag(3)] public BotMenuButtonBase menu_button;
+ /// The HTTP link to the privacy policy of the bot. If not set, then the /privacy command must be used, if supported by the bot (i.e. if it's present in the commands vector). If it isn't supported, then https://telegram.org/privacy-tpa must be opened, instead.
[IfFlag(7)] public string privacy_policy_url;
+ [IfFlag(8)] public BotAppSettings app_settings;
[Flags] public enum Flags : uint
{
@@ -7688,6 +7736,8 @@ public sealed partial class BotInfo : IObject
has_preview_medias = 0x40,
/// Field has a value
has_privacy_policy_url = 0x80,
+ /// Field has a value
+ has_app_settings = 0x100,
}
}
@@ -8268,6 +8318,7 @@ public sealed partial class ChannelParticipant : ChannelParticipantBase
public long user_id;
/// Date joined
public DateTime date;
+ /// If set, contains the expiration date of the current Telegram Star subscription period » for the specified participant.
[IfFlag(0)] public DateTime subscription_until_date;
[Flags] public enum Flags : uint
@@ -8288,6 +8339,7 @@ public sealed partial class ChannelParticipantSelf : ChannelParticipantBase
public long inviter_id;
/// When did I join the channel/supergroup
public DateTime date;
+ /// If set, contains the expiration date of the current Telegram Star subscription period » for the specified participant.
[IfFlag(1)] public DateTime subscription_until_date;
[Flags] public enum Flags : uint
@@ -10308,7 +10360,7 @@ public sealed partial class LabeledPrice : IObject
}
/// Invoice See
- [TLDef(0x5DB95A15)]
+ [TLDef(0x049EE584)]
public sealed partial class Invoice : IObject
{
/// Extra bits of information, use flags.HasFlag(...) to test for those
@@ -10323,6 +10375,7 @@ public sealed partial class Invoice : IObject
[IfFlag(8)] public long[] suggested_tip_amounts;
/// Terms of service URL
[IfFlag(10)] public string terms_url;
+ [IfFlag(11)] public int subscription_period;
[Flags] public enum Flags : uint
{
@@ -10348,6 +10401,8 @@ public sealed partial class Invoice : IObject
recurring = 0x200,
/// Field has a value
has_terms_url = 0x400,
+ /// Field has a value
+ has_subscription_period = 0x800,
}
}
@@ -11842,10 +11897,10 @@ public sealed partial class ChannelAdminLogEventActionChangeEmojiStatus : Channe
/// The supergroup's custom emoji stickerset was changed. See
[TLDef(0x46D840AB)]
public sealed partial class ChannelAdminLogEventActionChangeEmojiStickerSet : ChannelAdminLogEventActionChangeStickerSet { }
- /// See
+ /// Channel signature profiles were enabled/disabled. See
[TLDef(0x60A79C79)]
public sealed partial class ChannelAdminLogEventActionToggleSignatureProfiles : ChannelAdminLogEventActionToggleSignatures { }
- /// See
+ /// A paid subscriber has extended their Telegram Star subscription ». See
[TLDef(0x64642DB3)]
public sealed partial class ChannelAdminLogEventActionParticipantSubExtend : ChannelAdminLogEventAction
{
@@ -11926,6 +11981,7 @@ public sealed partial class ChannelAdminLogEventsFilter : IObject
send = 0x10000,
/// Forum-related events
forums = 0x20000,
+ /// Telegram Star subscription extension events »
sub_extend = 0x40000,
}
}
@@ -15207,6 +15263,7 @@ public sealed partial class MessageReactions : IObject
public ReactionCount[] results;
/// List of recent peers and their reactions
[IfFlag(1)] public MessagePeerReaction[] recent_reactions;
+ /// Paid Telegram Star reactions leaderboard » for this message.
[IfFlag(4)] public MessageReactor[] top_reactors;
[Flags] public enum Flags : uint
@@ -15455,6 +15512,7 @@ public sealed partial class WebViewResultUrl : WebViewResult
has_query_id = 0x1,
/// If set, the app must be opened in fullsize mode instead of compact mode.
fullsize = 0x2,
+ fullscreen = 0x4,
}
}
@@ -15577,17 +15635,18 @@ public sealed partial class InputInvoicePremiumGiftCode : InputInvoice
/// Should be populated with one of the giveaway options returned by Payments_GetPremiumGiftCodeOptions, see the giveaways » documentation for more info.
public PremiumGiftCodeOption option;
}
- /// Used to top up the Telegram Stars balance of the current account or someone else's account. See
+ /// Used to top up the Telegram Stars balance of the current account or someone else's account, or to start a Telegram Star giveaway ». See
[TLDef(0x65F00CE3)]
public sealed partial class InputInvoiceStars : InputInvoice
{
- /// Either an or an .
+ /// An , or .
public InputStorePaymentPurpose purpose;
}
- /// See
+ /// Used to pay for a Telegram Star subscription ». See
[TLDef(0x34E793F1)]
public sealed partial class InputInvoiceChatInviteSubscription : InputInvoice
{
+ /// The invitation link of the Telegram Star subscription »
public string hash;
}
/// See
@@ -15771,30 +15830,42 @@ public sealed partial class InputStorePaymentStarsGift : InputStorePaymentPurpos
/// 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;
}
- /// See
+ /// Used to pay for a star giveaway, see here » for more info. See
[TLDef(0x751F08FA)]
public sealed partial class InputStorePaymentStarsGiveaway : InputStorePaymentPurpose
{
/// Extra bits of information, use flags.HasFlag(...) to test for those
public Flags flags;
+ /// Total number of Telegram Stars being given away (each user will receive stars/users stars).
public long stars;
+ /// The channel/supergroup starting the giveaway, that the user must join to participate, that will receive the giveaway boosts; see here » for more info on giveaways.
public InputPeer boost_peer;
+ /// Additional channels that the user must join to participate to the giveaway can be specified here.
[IfFlag(1)] public InputPeer[] additional_peers;
+ /// The set of users that can participate to the giveaway can be restricted by passing here an explicit whitelist of up to giveaway_countries_max countries, specified as two-letter ISO 3166-1 alpha-2 country codes.
[IfFlag(2)] public string[] countries_iso2;
+ /// Can contain a textual description of additional giveaway prizes.
[IfFlag(4)] public string prize_description;
+ /// Random ID to avoid resending the giveaway
public long random_id;
+ /// The end date of the giveaway, must be at most giveaway_period_max seconds in the future; see here » for more info on giveaways.
public DateTime until_date;
+ /// 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;
+ /// Number of winners.
public int users;
[Flags] public enum Flags : uint
{
+ /// If set, only new subscribers starting from the giveaway creation date will be able to participate to the giveaway.
only_new_subscribers = 0x1,
/// Field has a value
has_additional_peers = 0x2,
/// Field has a value
has_countries_iso2 = 0x4,
+ /// If set, giveaway winners are public and will be listed in a message that will be automatically sent to the channel once the giveaway ends.
winners_are_visible = 0x8,
/// Field has a value
has_prize_description = 0x10,
@@ -15879,7 +15950,7 @@ public sealed partial class ReactionCustomEmoji : Reaction
/// Custom emoji document ID
public long document_id;
}
- /// See
+ /// Represents a paid Telegram Star reaction ». See
[TLDef(0x523DA4EB)]
public sealed partial class ReactionPaid : Reaction { }
@@ -17468,18 +17539,26 @@ public sealed partial class PrepaidGiveaway : PrepaidGiveawayBase
/// Payment date.
public override DateTime Date => date;
}
- /// See
+ /// Contains info about a prepaid Telegram Star giveaway ». See
[TLDef(0x9A9D77E0)]
public sealed partial class PrepaidStarsGiveaway : PrepaidGiveawayBase
{
+ /// Prepaid giveaway ID.
public long id;
+ /// Number of given away Telegram Stars »
public long stars;
+ /// Number of giveaway winners
public int quantity;
+ /// Number of boosts the channel will gain by launching the giveaway.
public int boosts;
+ /// When was the giveaway paid for
public DateTime date;
+ /// Prepaid giveaway ID.
public override long ID => id;
+ /// Number of giveaway winners
public override int Quantity => quantity;
+ /// When was the giveaway paid for
public override DateTime Date => date;
}
@@ -18890,6 +18969,7 @@ public sealed partial class BroadcastRevenueBalances : IObject
[Flags] public enum Flags : uint
{
+ /// If set, the available balance can be withdrawn ».
withdrawal_enabled = 0x1,
}
}
@@ -18984,7 +19064,7 @@ public sealed partial class StarsTransactionPeer : StarsTransactionPeerBase
/// Describes a Telegram Star transaction used to pay for Telegram ads as specified here ». See
[TLDef(0x60682812)]
public sealed partial class StarsTransactionPeerAds : StarsTransactionPeerBase { }
- /// See
+ /// Describes a Telegram Star transaction used to pay for paid API usage, such as paid bot broadcasts. See
[TLDef(0xF9677AAD)]
public sealed partial class StarsTransactionPeerAPI : StarsTransactionPeerBase { }
@@ -19042,9 +19122,11 @@ public sealed partial class StarsTransaction : IObject
[IfFlag(8)] public int msg_id;
/// The purchased paid media ».
[IfFlag(9)] public MessageMedia[] extended_media;
+ /// The number of seconds between consecutive Telegram Star debiting for Telegram Star subscriptions ».
[IfFlag(12)] public int subscription_period;
[IfFlag(13)] public int giveaway_post_id;
[IfFlag(14)] public StarGift stargift;
+ /// This transaction is payment for paid bot broadcasts.
Paid broadcasts are only allowed if the allow_paid_floodskip parameter of Messages_SendMessage and other message sending methods is set while trying to broadcast more than 30 messages per second to bot users.
The integer value returned by this flag indicates the number of billed API calls.
[IfFlag(15)] public int floodskip_number;
[Flags] public enum Flags : uint
@@ -19071,6 +19153,7 @@ public sealed partial class StarsTransaction : IObject
has_extended_media = 0x200,
/// This transaction was a gift from the user in peer.peer.
gift = 0x400,
+ /// This transaction is a paid reaction ».
reaction = 0x800,
/// Field has a value
has_subscription_period = 0x1000,
@@ -19083,7 +19166,7 @@ public sealed partial class StarsTransaction : IObject
}
}
- /// Info about the current Telegram Star balance and transaction history ». See
+ /// Info about the current Telegram Star subscriptions, balance and transaction history ». See
[TLDef(0xBBFA316C)]
public sealed partial class Payments_StarsStatus : IObject, IPeerResolver
{
@@ -19091,8 +19174,11 @@ public sealed partial class Payments_StarsStatus : IObject, IPeerResolver
public Flags flags;
/// Current Telegram Star balance.
public long balance;
+ /// Info about current Telegram Star subscriptions, only returned when invoking Payments_GetStarsTransactions and Payments_GetStarsSubscriptions.
[IfFlag(1)] public StarsSubscription[] subscriptions;
+ /// Offset for pagination of subscriptions: only usable with Payments_GetStarsSubscriptions, returned when invoking Payments_GetStarsTransactions and Payments_GetStarsSubscriptions.
[IfFlag(2)] public string subscriptions_next_offset;
+ /// The number of Telegram Stars the user should buy to be able to extend expired subscriptions soon (i.e. the current balance is not enough to extend all expired subscriptions).
[IfFlag(4)] public long subscriptions_missing_balance;
/// List of Telegram Star transactions (partial if next_offset is set).
[IfFlag(3)] public StarsTransaction[] history;
@@ -19312,71 +19398,104 @@ public sealed partial class Bots_PreviewInfo : IObject
public string[] lang_codes;
}
- /// See
+ /// Pricing of a Telegram Star subscription ». See
[TLDef(0x05416D58)]
public sealed partial class StarsSubscriptionPricing : IObject
{
+ /// The user should pay amount stars every period seconds to gain and maintain access to the channel.
Currently the only allowed subscription period is 30*24*60*60, i.e. the user will be debited amount stars every month.
public int period;
+ /// Price of the subscription in Telegram Stars.
public long amount;
}
- /// See
- [TLDef(0x538ECF18)]
+ /// Represents a Telegram Star subscription ». See
+ [TLDef(0x2E6EAB1A)]
public sealed partial class StarsSubscription : IObject
{
/// Extra bits of information, use flags.HasFlag(...) to test for those
public Flags flags;
+ /// Subscription ID.
public string id;
+ /// Identifier of the associated private chat.
public Peer peer;
+ /// Expiration date of the current subscription period.
public DateTime until_date;
+ /// Pricing of the subscription in Telegram Stars.
public StarsSubscriptionPricing pricing;
+ /// Invitation link, used to renew the subscription after cancellation or expiration.
[IfFlag(3)] public string chat_invite_hash;
+ [IfFlag(4)] public string title;
+ [IfFlag(5)] public WebDocumentBase photo;
+ [IfFlag(6)] public string invoice_slug;
[Flags] public enum Flags : uint
{
+ /// Whether this subscription was cancelled.
canceled = 0x1,
+ /// Whether we left the associated private channel, but we can still rejoin it using Payments_FulfillStarsSubscription because the current subscription period hasn't expired yet.
can_refulfill = 0x2,
+ /// Whether this subscription has expired because there are not enough stars on the user's balance to extend it.
missing_balance = 0x4,
/// Field has a value
has_chat_invite_hash = 0x8,
+ /// Field has a value
+ has_title = 0x10,
+ /// Field has a value
+ has_photo = 0x20,
+ /// Field has a value
+ has_invoice_slug = 0x40,
+ bot_canceled = 0x80,
}
}
- /// See
+ /// Info about a user in the paid Star reactions leaderboard for a message. See
[TLDef(0x4BA3A95A)]
public sealed partial class MessageReactor : IObject
{
/// Extra bits of information, use flags.HasFlag(...) to test for those
public Flags flags;
+ /// Identifier of the peer that reacted: may be unset for anonymous reactors different from the current user (i.e. if the current user sent an anonymous reaction anonymous will be set but this field will also be set).
[IfFlag(3)] public Peer peer_id;
+ /// The number of sent Telegram Stars.
public int count;
[Flags] public enum Flags : uint
{
+ /// If set, the reactor is one of the most active reactors; may be unset if the reactor is the current user.
top = 0x1,
+ /// If set, this reactor is the current user.
my = 0x2,
+ /// If set, the reactor is anonymous.
anonymous = 0x4,
/// Field has a value
has_peer_id = 0x8,
}
}
- /// See
+ /// Contains info about a Telegram Star giveaway option. See
[TLDef(0x94CE852A)]
public sealed partial class StarsGiveawayOption : IObject
{
/// Extra bits of information, use flags.HasFlag(...) to test for those
public Flags flags;
+ /// The number of Telegram Stars that will be distributed among winners
public long stars;
+ /// Number of times the chat will be boosted for one year if the .boost_peer flag is populated
public int yearly_boosts;
+ /// Identifier of the store product associated with the option, official apps only.
[IfFlag(2)] public string store_product;
+ /// 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;
+ /// Allowed options for the number of giveaway winners.
public StarsGiveawayWinnersOption[] winners;
[Flags] public enum Flags : uint
{
+ /// If set, this option must only be shown in the full list of giveaway options (i.e. they must be added to the list only when the user clicks on the expand button).
extended = 0x1,
+ /// If set, this option must be pre-selected by default in the option list.
default_ = 0x2,
/// Field has a value
has_store_product = 0x4,
@@ -19389,11 +19508,14 @@ public sealed partial class StarsGiveawayWinnersOption : IObject
{
/// Extra bits of information, use flags.HasFlag(...) to test for those
public Flags flags;
+ /// The number of users that will be randomly chosen as winners.
public int users;
+ /// The number of Telegram Stars each winner will receive.
public long per_user_stars;
[Flags] public enum Flags : uint
{
+ /// If set, this option must be pre-selected by default in the option list.
default_ = 0x1,
}
}
@@ -19417,6 +19539,7 @@ public sealed partial class StarGift : IObject
{
limited = 0x1,
sold_out = 0x2,
+ birthday = 0x4,
}
}
@@ -19476,37 +19599,83 @@ public sealed partial class Payments_UserStarGifts : IObject
}
}
- /// See
+ /// Report menu option See
[TLDef(0x7903E3D9)]
public sealed partial class MessageReportOption : IObject
{
+ /// Option title
public string text;
+ /// Option identifier: if the user selects this option, re-invoke Messages_Report, passing this option to option
public byte[] option;
}
/// See Derived classes: , ,
public abstract partial class ReportResult : IObject { }
- /// See
+ /// The user must choose one of the following options, and then Messages_Report must be re-invoked, passing the option's option identifier to Messages_Report.option. See
[TLDef(0xF0E4E0B6)]
public sealed partial class ReportResultChooseOption : ReportResult
{
+ /// Title of the option popup
public string title;
+ /// Available options, rendered as menu entries.
public MessageReportOption[] options;
}
- /// See
+ /// The user should enter an additional comment for the moderators, and then Messages_Report must be re-invoked, passing the comment to Messages_Report.message. See
[TLDef(0x6F09AC31)]
public sealed partial class ReportResultAddComment : ReportResult
{
/// Extra bits of information, use flags.HasFlag(...) to test for those
public Flags flags;
+ /// The Messages_Report method must be re-invoked, passing this option to option
public byte[] option;
[Flags] public enum Flags : uint
{
+ /// Whether this step can be skipped by the user, passing an empty message to Messages_Report, or if a non-empty message is mandatory.
optional = 0x1,
}
}
- /// See
+ /// The report was sent successfully, no further actions are required. See
[TLDef(0x8DB33C4B)]
public sealed partial class ReportResultReported : ReportResult { }
+
+ /// See
+ [TLDef(0x8ECF0511)]
+ public sealed partial class Messages_BotPreparedInlineMessage : IObject
+ {
+ public string id;
+ public DateTime expire_date;
+ }
+
+ /// See
+ [TLDef(0xFF57708D)]
+ public sealed partial class Messages_PreparedInlineMessage : IObject
+ {
+ public long query_id;
+ public BotInlineResultBase result;
+ public InlineQueryPeerType[] peer_types;
+ public int cache_time;
+ public Dictionary users;
+ }
+
+ /// See
+ [TLDef(0xC99B1950)]
+ public sealed partial class BotAppSettings : IObject
+ {
+ public Flags flags;
+ [IfFlag(0)] public byte[] placeholder_path;
+ [IfFlag(1)] public int background_color;
+ [IfFlag(2)] public int background_dark_color;
+ [IfFlag(3)] public int header_color;
+ [IfFlag(4)] public int header_dark_color;
+
+ [Flags] public enum Flags : uint
+ {
+ has_placeholder_path = 0x1,
+ has_background_color = 0x2,
+ has_background_dark_color = 0x4,
+ has_header_color = 0x8,
+ has_header_dark_color = 0x10,
+ }
+ }
}
diff --git a/src/TL.SchemaFuncs.cs b/src/TL.SchemaFuncs.cs
index e1f5dc2..ecb1986 100644
--- a/src/TL.SchemaFuncs.cs
+++ b/src/TL.SchemaFuncs.cs
@@ -2214,6 +2214,7 @@ public static Task Messages_GetWebPagePreview(this Client client,
/// Expiration date
/// Maximum number of users that can join using this link
/// Description of the invite link, visible only to administrators
+ /// For Telegram Star subscriptions », contains the pricing of the subscription the user must activate to join the private channel.
public static Task Messages_ExportChatInvite(this Client client, InputPeer peer, DateTime? expire_date = null, int? usage_limit = null, string title = null, StarsSubscriptionPricing subscription_pricing = null, bool legacy_revoke_permanent = false, bool request_needed = false)
=> client.Invoke(new Messages_ExportChatInvite
{
@@ -3409,6 +3410,7 @@ public static Task Messages_GetAdminsWithInvites
/// Get info about the users that joined the chat using a specific chat invite See Possible codes: 400,403 (details)
/// If set, only returns info about users with pending join requests »
+ /// Set this flag if the link is a Telegram Star subscription link » and only members with already expired subscription must be returned.
/// Chat
/// Invite link
/// Search for a user in the pending join requests » list: only available when the requested flag is set, cannot be used together with a specific link.
@@ -3588,7 +3590,8 @@ public static Task Messages_GetMessageReactionsLi
/// Change the set of message reactions » that can be used in a certain group, supergroup or channel See Possible codes: 400 (details)
/// Group where to apply changes
/// Allowed reaction emojis
- /// This flag may be used to impose a custom limit of unique reactions (i.e. a customizable version of appConfig.reactions_uniq_max); this field and the other info set by the method will then be available to users in and .
+ /// This flag may be used to impose a custom limit of unique reactions (i.e. a customizable version of appConfig.reactions_uniq_max); this field and the other info set by the method will then be available to users in and .
If this flag is not set, the previously configured reactions_limit will not be altered.
+ /// If this flag is set and a is passed, the method will enable or disable paid message reactions ». If this flag is not set, the previously stored setting will not be changed.
public static Task Messages_SetChatAvailableReactions(this Client client, InputPeer peer, ChatReactions available_reactions, int? reactions_limit = null, bool? paid_enabled = default)
=> client.Invoke(new Messages_SetChatAvailableReactions
{
@@ -3716,10 +3719,10 @@ public static Task Messages_ToggleBotInAttachMenu(this Client client, Inpu
/// Short name of the application; 0-64 English letters, digits, and underscores
/// If set, indicates that the inline message that will be sent by the bot on behalf of the user once the web app interaction is Messages_SendWebViewResultMessage should be sent in reply to the specified message or story.
/// Open the web app as the specified peer, sending the resulting the message as the specified peer.
- public static Task Messages_RequestWebView(this Client client, InputPeer peer, InputUserBase bot, string platform, InputReplyTo reply_to = null, string url = null, DataJSON theme_params = null, string start_param = null, InputPeer send_as = null, bool from_bot_menu = false, bool silent = false, bool compact = false)
+ public static Task Messages_RequestWebView(this Client client, InputPeer peer, InputUserBase bot, string platform, InputReplyTo reply_to = null, string url = null, DataJSON theme_params = null, string start_param = null, InputPeer send_as = null, bool from_bot_menu = false, bool silent = false, bool compact = false, bool fullscreen = false)
=> client.Invoke(new Messages_RequestWebView
{
- flags = (Messages_RequestWebView.Flags)((reply_to != null ? 0x1 : 0) | (url != null ? 0x2 : 0) | (theme_params != null ? 0x4 : 0) | (start_param != null ? 0x8 : 0) | (send_as != null ? 0x2000 : 0) | (from_bot_menu ? 0x10 : 0) | (silent ? 0x20 : 0) | (compact ? 0x80 : 0)),
+ flags = (Messages_RequestWebView.Flags)((reply_to != null ? 0x1 : 0) | (url != null ? 0x2 : 0) | (theme_params != null ? 0x4 : 0) | (start_param != null ? 0x8 : 0) | (send_as != null ? 0x2000 : 0) | (from_bot_menu ? 0x10 : 0) | (silent ? 0x20 : 0) | (compact ? 0x80 : 0) | (fullscreen ? 0x100 : 0)),
peer = peer,
bot = bot,
url = url,
@@ -3757,10 +3760,10 @@ public static Task Messages_ProlongWebView(this Client client, InputPeer p
/// Deprecated.
/// Theme parameters »
/// Short name of the application; 0-64 English letters, digits, and underscores
- public static Task Messages_RequestSimpleWebView(this Client client, InputUserBase bot, string platform, DataJSON theme_params = null, string url = null, string start_param = null, bool from_switch_webview = false, bool from_side_menu = false, bool compact = false)
+ public static Task Messages_RequestSimpleWebView(this Client client, InputUserBase bot, string platform, DataJSON theme_params = null, string url = null, string start_param = null, bool from_switch_webview = false, bool from_side_menu = false, bool compact = false, bool fullscreen = false)
=> client.Invoke(new Messages_RequestSimpleWebView
{
- flags = (Messages_RequestSimpleWebView.Flags)((theme_params != null ? 0x1 : 0) | (url != null ? 0x8 : 0) | (start_param != null ? 0x10 : 0) | (from_switch_webview ? 0x2 : 0) | (from_side_menu ? 0x4 : 0) | (compact ? 0x80 : 0)),
+ flags = (Messages_RequestSimpleWebView.Flags)((theme_params != null ? 0x1 : 0) | (url != null ? 0x8 : 0) | (start_param != null ? 0x10 : 0) | (from_switch_webview ? 0x2 : 0) | (from_side_menu ? 0x4 : 0) | (compact ? 0x80 : 0) | (fullscreen ? 0x100 : 0)),
bot = bot,
url = url,
start_param = start_param,
@@ -3985,10 +3988,10 @@ public static Task Messages_GetBotApp(this Client client, Input
/// If the startapp query string parameter is present in the direct Mini App deep link, pass it to start_param.
/// Theme parameters »
/// Short name of the application; 0-64 English letters, digits, and underscores
- public static Task Messages_RequestAppWebView(this Client client, InputPeer peer, InputBotApp app, string platform, string start_param = null, DataJSON theme_params = null, bool write_allowed = false, bool compact = false)
+ public static Task Messages_RequestAppWebView(this Client client, InputPeer peer, InputBotApp app, string platform, string start_param = null, DataJSON theme_params = null, bool write_allowed = false, bool compact = false, bool fullscreen = false)
=> client.Invoke(new Messages_RequestAppWebView
{
- flags = (Messages_RequestAppWebView.Flags)((start_param != null ? 0x2 : 0) | (theme_params != null ? 0x4 : 0) | (write_allowed ? 0x1 : 0) | (compact ? 0x80 : 0)),
+ flags = (Messages_RequestAppWebView.Flags)((start_param != null ? 0x2 : 0) | (theme_params != null ? 0x4 : 0) | (write_allowed ? 0x1 : 0) | (compact ? 0x80 : 0) | (fullscreen ? 0x100 : 0)),
peer = peer,
app = app,
start_param = start_param,
@@ -4304,10 +4307,10 @@ public static Task Messages_GetFactCheck(this Client client, InputP
/// Start parameter, if opening from a Main Mini App link ».
/// Theme parameters »
/// Short name of the application; 0-64 English letters, digits, and underscores
- 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)
+ 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, bool fullscreen = false)
=> client.Invoke(new Messages_RequestMainWebView
{
- flags = (Messages_RequestMainWebView.Flags)((theme_params != null ? 0x1 : 0) | (start_param != null ? 0x2 : 0) | (compact ? 0x80 : 0)),
+ flags = (Messages_RequestMainWebView.Flags)((theme_params != null ? 0x1 : 0) | (start_param != null ? 0x2 : 0) | (compact ? 0x80 : 0) | (fullscreen ? 0x100 : 0)),
peer = peer,
bot = bot,
start_param = start_param,
@@ -4315,8 +4318,12 @@ public static Task Messages_RequestMainWebView(this Client client
platform = platform,
});
- /// See [bots: ✓]
- /// You can use
+ /// Sends one or more paid Telegram Star reactions », transferring Telegram Stars » to a channel's balance. See [bots: ✓]
+ /// The channel
+ /// The message to react to
+ /// The number of stars to send (each will increment the reaction counter by one).
+ /// Unique client message ID required to prevent message resending You can use
+ /// Each post with star reactions has a leaderboard with the top senders, but users can opt out of appearing there if they prefer more privacy.
If the user explicitly chose to make their paid reaction(s) private, pass to Messages_SendPaidReaction.private.
If the user explicitly chose to make their paid reaction(s) private, pass to Messages_SendPaidReaction.private.
If the user did not make any explicit choice about the privacy of their paid reaction(s) (i.e. when reacting by clicking on an existing star reaction on a message), do not populate the Messages_SendPaidReaction.private flag.
public static Task Messages_SendPaidReaction(this Client client, InputPeer peer, int msg_id, int count, long random_id, bool? private_ = default)
=> client.Invoke(new Messages_SendPaidReaction
{
@@ -4328,7 +4335,10 @@ public static Task Messages_SendPaidReaction(this Client client, In
private_ = private_ ?? default,
});
- /// See [bots: ✓]
+ /// Changes the privacy of already sent paid reactions on a specific message. See [bots: ✓]
+ /// The channel
+ /// The ID of the message to which we sent the paid reactions
+ /// If true, makes the current anonymous in the top sender leaderboard for this message; otherwise, does the opposite.
public static Task Messages_TogglePaidReactionPrivacy(this Client client, InputPeer peer, int msg_id, bool private_)
=> client.Invoke(new Messages_TogglePaidReactionPrivacy
{
@@ -4337,7 +4347,7 @@ public static Task Messages_TogglePaidReactionPrivacy(this Client client,
private_ = private_,
});
- /// See [bots: ✓]
+ /// Fetches an update with the current default paid reaction privacy, see here »: for more info. See [bots: ✓]
public static Task Messages_GetPaidReactionPrivacy(this Client client)
=> client.Invoke(new Messages_GetPaidReactionPrivacy
{
@@ -4385,6 +4395,24 @@ public static Task Messages_GetSponsoredMessages(thi
peer = peer,
});
+ /// See
+ public static Task Messages_SavePreparedInlineMessage(this Client client, InputBotInlineResultBase result, InputUserBase user_id, InlineQueryPeerType[] peer_types = null)
+ => client.Invoke(new Messages_SavePreparedInlineMessage
+ {
+ flags = (Messages_SavePreparedInlineMessage.Flags)(peer_types != null ? 0x1 : 0),
+ result = result,
+ user_id = user_id,
+ peer_types = peer_types,
+ });
+
+ /// See
+ public static Task Messages_GetPreparedInlineMessage(this Client client, InputUserBase bot, string id)
+ => client.Invoke(new Messages_GetPreparedInlineMessage
+ {
+ bot = bot,
+ id = id,
+ });
+
/// Returns a current state of updates. See [bots: ✓]
public static Task Updates_GetState(this Client client)
=> client.Invoke(new Updates_GetState
@@ -5002,6 +5030,8 @@ public static Task Channels_ExportMessageLink(this Client c
});
/// Enable/disable message signatures in channels See Possible codes: 400 (details)
+ /// If set, enables message signatures.
+ /// If set, messages from channel admins will link to their profiles, just like for group messages: can only be set if the signatures_enabled flag is set.
/// Channel
public static Task Channels_ToggleSignatures(this Client client, InputChannelBase channel, bool signatures_enabled = false, bool profiles_enabled = false)
=> client.Invoke(new Channels_ToggleSignatures
@@ -5708,6 +5738,31 @@ public static Task Bots_GetPreviewMedias(this Client client,
bot = bot,
});
+ /// See
+ public static Task Bots_UpdateUserEmojiStatus(this Client client, InputUserBase user_id, EmojiStatus emoji_status)
+ => client.Invoke(new Bots_UpdateUserEmojiStatus
+ {
+ user_id = user_id,
+ emoji_status = emoji_status,
+ });
+
+ /// See
+ public static Task Bots_ToggleUserEmojiStatusPermission(this Client client, InputUserBase bot, bool enabled)
+ => client.Invoke(new Bots_ToggleUserEmojiStatusPermission
+ {
+ bot = bot,
+ enabled = enabled,
+ });
+
+ /// See
+ public static Task Bots_CheckDownloadFileParams(this Client client, InputUserBase bot, string file_name, string url)
+ => client.Invoke(new Bots_CheckDownloadFileParams
+ {
+ bot = bot,
+ file_name = file_name,
+ url = url,
+ });
+
/// 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
@@ -5884,6 +5939,7 @@ public static Task Payments_GetStarsStatus(this Client cli
/// If set, fetches only incoming transactions.
/// If set, fetches only outgoing transactions.
/// Return transactions in ascending order by date (instead of descending order by date).
+ /// If set, fetches only transactions for the specified Telegram Star subscription ».
/// Fetch the transaction history of the peer ( or a bot we own).
/// Offset for pagination, obtained from the returned next_offset, initially an empty string ».
/// Maximum number of results to return, see pagination
@@ -5966,7 +6022,10 @@ public static Task Payments_GetStarsGiftOptions(this Client c
user_id = user_id,
});
- /// See [bots: ✓]
+ /// Obtain a list of active, expired or cancelled Telegram Star subscriptions ». See [bots: ✓]
+ /// Whether to return only expired subscriptions due to an excessively low Telegram Star balance.
+ /// Always pass .
+ /// Offset for pagination, taken from payments.starsStatus.
public static Task Payments_GetStarsSubscriptions(this Client client, InputPeer peer, string offset, bool missing_balance = false)
=> client.Invoke(new Payments_GetStarsSubscriptions
{
@@ -5975,7 +6034,10 @@ public static Task Payments_GetStarsSubscriptions(this Cli
offset = offset,
});
- /// See [bots: ✓]
+ /// Activate or deactivate a Telegram Star subscription ». See [bots: ✓]
+ /// Always pass .
+ /// ID of the subscription.
+ /// Whether to cancel or reactivate the subscription.
public static Task Payments_ChangeStarsSubscription(this Client client, InputPeer peer, string subscription_id, bool? canceled = default)
=> client.Invoke(new Payments_ChangeStarsSubscription
{
@@ -5985,7 +6047,9 @@ public static Task Payments_ChangeStarsSubscription(this Client client, In
canceled = canceled ?? default,
});
- /// See [bots: ✓]
+ /// Re-join a private channel associated to an active Telegram Star subscription ». See [bots: ✓]
+ /// Always pass .
+ /// ID of the subscription.
public static Task Payments_FulfillStarsSubscription(this Client client, InputPeer peer, string subscription_id)
=> client.Invoke(new Payments_FulfillStarsSubscription
{
@@ -6035,6 +6099,16 @@ public static Task Payments_ConvertStarGift(this Client client, InputUserB
msg_id = msg_id,
});
+ /// See
+ public static Task Payments_BotCancelStarsSubscription(this Client client, InputUserBase user_id, string invoice_slug = null, string charge_id = null, bool restore = false)
+ => client.Invoke(new Payments_BotCancelStarsSubscription
+ {
+ flags = (Payments_BotCancelStarsSubscription.Flags)((invoice_slug != null ? 0x2 : 0) | (charge_id != null ? 0x4 : 0) | (restore ? 0x1 : 0)),
+ user_id = user_id,
+ invoice_slug = invoice_slug,
+ charge_id = charge_id,
+ });
+
/// Create a stickerset. See [bots: ✓] Possible codes: 400 (details)
/// Whether this is a mask stickerset
/// Whether this is a custom emoji stickerset.
@@ -7098,6 +7172,7 @@ public static Task Stories_TogglePinnedToTop(this Client client, InputPeer
/// Globally search for stories using a hashtag or a location media area, see here » for more info on the full flow. See Possible codes: 400 (details)
/// Hashtag (without the #)
/// A or a .
Note areas may be searched only if they have an associated address.
+ /// If set, returns only stories posted by this peer.
/// Offset for pagination: initially an empty string, then the next_offset from the previously returned .
/// Maximum number of results to return, see pagination
public static Task Stories_SearchPosts(this Client client, string offset, int limit = int.MaxValue, string hashtag = null, MediaArea area = null, InputPeer peer = null)
@@ -10334,6 +10409,7 @@ public sealed partial class Messages_RequestWebView : IMethod
from_bot_menu = 0x10,
silent = 0x20,
compact = 0x80,
+ fullscreen = 0x100,
has_send_as = 0x2000,
}
}
@@ -10374,6 +10450,7 @@ public sealed partial class Messages_RequestSimpleWebView : IMethod
has_start_param = 0x2,
has_theme_params = 0x4,
compact = 0x80,
+ fullscreen = 0x100,
}
}
@@ -10806,6 +10884,7 @@ public sealed partial class Messages_RequestMainWebView : IMethod
has_theme_params = 0x1,
has_start_param = 0x2,
compact = 0x80,
+ fullscreen = 0x100,
}
}
@@ -10871,6 +10950,27 @@ public sealed partial class Messages_GetSponsoredMessages : IMethod
+ {
+ public Flags flags;
+ public InputBotInlineResultBase result;
+ public InputUserBase user_id;
+ [IfFlag(0)] public InlineQueryPeerType[] peer_types;
+
+ [Flags] public enum Flags : uint
+ {
+ has_peer_types = 0x1,
+ }
+ }
+
+ [TLDef(0x857EBDB8)]
+ public sealed partial class Messages_GetPreparedInlineMessage : IMethod
+ {
+ public InputUserBase bot;
+ public string id;
+ }
+
[TLDef(0xEDD4882A)]
public sealed partial class Updates_GetState : IMethod { }
@@ -11887,6 +11987,28 @@ public sealed partial class Bots_GetPreviewMedias : IMethod
public InputUserBase bot;
}
+ [TLDef(0xED9F30C5)]
+ public sealed partial class Bots_UpdateUserEmojiStatus : IMethod
+ {
+ public InputUserBase user_id;
+ public EmojiStatus emoji_status;
+ }
+
+ [TLDef(0x06DE6392)]
+ public sealed partial class Bots_ToggleUserEmojiStatusPermission : IMethod
+ {
+ public InputUserBase bot;
+ public bool enabled;
+ }
+
+ [TLDef(0x50077589)]
+ public sealed partial class Bots_CheckDownloadFileParams : IMethod
+ {
+ public InputUserBase bot;
+ public string file_name;
+ public string url;
+ }
+
[TLDef(0x37148DBB)]
public sealed partial class Payments_GetPaymentForm : IMethod
{
@@ -12182,6 +12304,22 @@ public sealed partial class Payments_ConvertStarGift : IMethod
public int msg_id;
}
+ [TLDef(0x57F9ECE6)]
+ public sealed partial class Payments_BotCancelStarsSubscription : IMethod
+ {
+ public Flags flags;
+ public InputUserBase user_id;
+ [IfFlag(1)] public string invoice_slug;
+ [IfFlag(2)] public string charge_id;
+
+ [Flags] public enum Flags : uint
+ {
+ restore = 0x1,
+ has_invoice_slug = 0x2,
+ has_charge_id = 0x4,
+ }
+ }
+
[TLDef(0x9021AB67)]
public sealed partial class Stickers_CreateStickerSet : IMethod
{
diff --git a/src/TL.Table.cs b/src/TL.Table.cs
index 9d070a3..ec40b3f 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 = 192; // fetched 31/10/2024 17:10:55
+ public const int Version = 193; // fetched 18/11/2024 12:45:10
internal const int SecretChats = 144;
internal const int MTProto2 = 73;
internal const uint VectorCtor = 0x1CB5C415;
@@ -213,7 +213,7 @@ public static partial class Layer
[0x41B3E202] = typeof(MessageActionPaymentRefunded),
[0x45D5B021] = typeof(MessageActionGiftStars),
[0xB00C47A2] = typeof(MessageActionPrizeStars),
- [0x9BB3EF44] = typeof(MessageActionStarGift),
+ [0x08557637] = typeof(MessageActionStarGift),
[0xD58A08C6] = typeof(Dialog),
[0x71BD134C] = typeof(DialogFolder),
[0x2331B22D] = typeof(PhotoEmpty),
@@ -419,6 +419,7 @@ public static partial class Layer
[0xA584B019] = typeof(UpdateStarsRevenueStatus),
[0x283BD312] = typeof(UpdateBotPurchasedPaidMedia),
[0x51CA7AEC] = typeof(UpdatePaidReactionPrivacy),
+ [0x2D13C6EE] = typeof(UpdateBotSubscriptionExpire),
[0xA56C2A3E] = typeof(Updates_State),
[0x5D75A138] = typeof(Updates_DifferenceEmpty),
[0x00F49CA0] = typeof(Updates_Difference),
@@ -499,6 +500,8 @@ public static partial class Layer
[0xE94F0F86] = typeof(InputPrivacyValueDisallowChatParticipants),
[0x2F453E49] = typeof(InputPrivacyValueAllowCloseFriends),
[0x77CDC9F1] = typeof(InputPrivacyValueAllowPremium),
+ [0x5A4FCCE5] = typeof(InputPrivacyValueAllowBots),
+ [0xC4E57915] = typeof(InputPrivacyValueDisallowBots),
[0xFFFE1BAC] = typeof(PrivacyValueAllowContacts),
[0x65427B82] = typeof(PrivacyValueAllowAll),
[0xB8905FB2] = typeof(PrivacyValueAllowUsers),
@@ -509,6 +512,8 @@ public static partial class Layer
[0x41C87565] = typeof(PrivacyValueDisallowChatParticipants),
[0xF7E8D89B] = typeof(PrivacyValueAllowCloseFriends),
[0xECE9814B] = typeof(PrivacyValueAllowPremium),
+ [0x21461B5D] = typeof(PrivacyValueAllowBots),
+ [0xF6A5F82F] = typeof(PrivacyValueDisallowBots),
[0x50A04E45] = typeof(Account_PrivacyRules),
[0xB8D0AFDF] = typeof(AccountDaysTTL),
[0x6C37C15C] = typeof(DocumentAttributeImageSize),
@@ -556,7 +561,7 @@ public static partial class Layer
[0x6E153F16] = typeof(Messages_StickerSet),
[0xD3F924EB] = null,//Messages_StickerSetNotModified
[0xC27AC8C7] = typeof(BotCommand),
- [0x82437E74] = typeof(BotInfo),
+ [0x36607333] = typeof(BotInfo),
[0xA2FA4880] = typeof(KeyboardButton),
[0x258AFF05] = typeof(KeyboardButtonUrl),
[0x35BBDB6B] = typeof(KeyboardButtonCallback),
@@ -745,7 +750,7 @@ public static partial class Layer
[0xA44F3EF6] = typeof(PageBlockMap),
[0x7D748D04] = typeof(DataJSON),
[0xCB296BF8] = typeof(LabeledPrice),
- [0x5DB95A15] = typeof(Invoice),
+ [0x049EE584] = typeof(Invoice),
[0xEA02C27E] = typeof(PaymentCharge),
[0x1E8CAAEB] = typeof(PostAddress),
[0x909C3F94] = typeof(PaymentRequestedInfo),
@@ -1324,7 +1329,7 @@ public static partial class Layer
[0x23E91BA3] = typeof(BotPreviewMedia),
[0x0CA71D64] = typeof(Bots_PreviewInfo),
[0x05416D58] = typeof(StarsSubscriptionPricing),
- [0x538ECF18] = typeof(StarsSubscription),
+ [0x2E6EAB1A] = typeof(StarsSubscription),
[0x4BA3A95A] = typeof(MessageReactor),
[0x94CE852A] = typeof(StarsGiveawayOption),
[0x54236209] = typeof(StarsGiveawayWinnersOption),
@@ -1337,6 +1342,9 @@ public static partial class Layer
[0xF0E4E0B6] = typeof(ReportResultChooseOption),
[0x6F09AC31] = typeof(ReportResultAddComment),
[0x8DB33C4B] = typeof(ReportResultReported),
+ [0x8ECF0511] = typeof(Messages_BotPreparedInlineMessage),
+ [0xFF57708D] = typeof(Messages_PreparedInlineMessage),
+ [0xC99B1950] = typeof(BotAppSettings),
// from TL.Secret:
[0x6ABD9782] = typeof(Layer143.DecryptedMessageMediaDocument),
[0x020DF5D0] = typeof(Layer101.MessageEntityBlockquote),
diff --git a/src/WTelegramClient.csproj b/src/WTelegramClient.csproj
index ea47934..1d0caa1 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: 192
+ Telegram Client API (MTProto) library written 100% in C# and .NET Standard | Latest API layer: 193
Release Notes:
$(ReleaseNotes.Replace("|", "%0D%0A").Replace(" - ","%0D%0A- ").Replace(" ", "%0D%0A%0D%0A"))