diff --git a/README.md b/README.md
index 12f7892..47419e1 100644
--- a/README.md
+++ b/README.md
@@ -1,4 +1,4 @@
-[](https://corefork.telegram.org/methods)
+[](https://corefork.telegram.org/methods)
[](https://www.nuget.org/packages/WTelegramClient/)
[](https://www.nuget.org/packages/WTelegramClient/absoluteLatest)
[](https://buymeacoffee.com/wizou)
diff --git a/src/TL.Schema.cs b/src/TL.Schema.cs
index 3d612af..5caaf90 100644
--- a/src/TL.Schema.cs
+++ b/src/TL.Schema.cs
@@ -768,7 +768,7 @@ namespace TL
public long id;
}
/// Indicates info about a certain user. See
- [TLDef(0x4B46C37E)]
+ [TLDef(0x020B1422)]
public sealed partial class User : UserBase
{
/// Extra bits of information, use flags.HasFlag(...) to test for those
@@ -812,6 +812,7 @@ namespace TL
/// Monthly Active Users (MAU) of this bot (may be absent for small bots).
[IfFlag(44)] public int bot_active_users;
[IfFlag(46)] public long bot_verification_icon;
+ [IfFlag(47)] public long send_paid_messages_stars;
[Flags] public enum Flags : uint
{
@@ -901,6 +902,8 @@ namespace TL
bot_has_main_app = 0x2000,
/// Field has a value
has_bot_verification_icon = 0x4000,
+ /// Field has a value
+ has_send_paid_messages_stars = 0x8000,
}
}
@@ -1071,7 +1074,7 @@ namespace TL
public override string Title => title;
}
/// Channel/supergroup info See
- [TLDef(0xE00998B7)]
+ [TLDef(0x7482147E)]
public sealed partial class Channel : ChatBase
{
/// Extra bits of information, use flags.HasFlag(...) to test for those
@@ -1115,6 +1118,7 @@ namespace TL
/// 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;
[IfFlag(45)] public long bot_verification_icon;
+ [IfFlag(46)] public long send_paid_messages_stars;
[Flags] public enum Flags : uint
{
@@ -1198,6 +1202,8 @@ namespace TL
signature_profiles = 0x1000,
/// Field has a value
has_bot_verification_icon = 0x2000,
+ /// Field has a value
+ has_send_paid_messages_stars = 0x4000,
}
/// ID of the channel, see here » for more info
@@ -1580,6 +1586,7 @@ namespace TL
/// Field has a value
has_stargifts_count = 0x40000,
stargifts_available = 0x80000,
+ paid_messages_available = 0x100000,
}
/// ID of the channel
@@ -1757,7 +1764,7 @@ namespace TL
public override Peer Peer => peer_id;
}
/// A message See
- [TLDef(0x96FDBBE9)]
+ [TLDef(0xEABCDD4D)]
public sealed partial class Message : MessageBase
{
/// Extra bits of information, use flags.HasFlag(...) to test for those
@@ -1817,6 +1824,7 @@ namespace TL
/// Represents a fact-check ».
[IfFlag(35)] public FactCheck factcheck;
[IfFlag(37)] public DateTime report_delivery_until_date;
+ [IfFlag(38)] public long paid_message_stars;
[Flags] public enum Flags : uint
{
@@ -1894,6 +1902,8 @@ namespace TL
video_processing_pending = 0x10,
/// Field has a value
has_report_delivery_until_date = 0x20,
+ /// Field has a value
+ has_paid_message_stars = 0x40,
}
/// ID of the message
@@ -2742,12 +2752,14 @@ namespace TL
via_giveaway = 0x1,
/// Field has a value
has_boost_peer = 0x2,
- /// If set, the link was not redeemed yet.
- unclaimed = 0x4,
+ /// Fields and have a value
+ has_currency = 0x4,
/// Fields and have a value
has_crypto_currency = 0x8,
/// Field has a value
has_message = 0x10,
+ /// If set, the link was not redeemed yet.
+ unclaimed = 0x20,
}
}
/// A giveaway was started. See
@@ -3392,7 +3404,7 @@ namespace TL
}
/// List of actions that are possible when interacting with this user, to be shown as suggested actions in the chat action bar », see here » for more info. See
- [TLDef(0xACD66C5E)]
+ [TLDef(0xF47741F7)]
public sealed partial class PeerSettings : IObject
{
/// Extra bits of information, use flags.HasFlag(...) to test for those
@@ -3407,6 +3419,11 @@ namespace TL
[IfFlag(13)] public long business_bot_id;
/// Contains a deep link », used to open a management menu in the business bot. This flag is set if and only if business_bot_id is set.
[IfFlag(13)] public string business_bot_manage_url;
+ [IfFlag(14)] public long charge_paid_message_stars;
+ [IfFlag(15)] public string registration_month;
+ [IfFlag(16)] public string phone_country;
+ [IfFlag(17)] public DateTime name_change_date;
+ [IfFlag(18)] public DateTime photo_change_date;
[Flags] public enum Flags : uint
{
@@ -3438,6 +3455,16 @@ namespace TL
business_bot_can_reply = 0x1000,
/// Fields and have a value
has_business_bot_id = 0x2000,
+ /// Field has a value
+ has_charge_paid_message_stars = 0x4000,
+ /// Field has a value
+ has_registration_month = 0x8000,
+ /// Field has a value
+ has_phone_country = 0x10000,
+ /// Field has a value
+ has_name_change_date = 0x20000,
+ /// Field has a value
+ has_photo_change_date = 0x40000,
}
}
@@ -3538,7 +3565,7 @@ namespace TL
}
/// Extended user info See
- [TLDef(0x4D975BBC)]
+ [TLDef(0xD2234EA0)]
public sealed partial class UserFull : IObject
{
/// Extra bits of information, use flags.HasFlag(...) to test for those
@@ -3577,8 +3604,6 @@ namespace TL
[IfFlag(17)] public ChatAdminRights bot_group_admin_rights;
/// A suggested set of administrator rights for the bot, to be shown when adding the bot as admin to a channel, see here for more info on how to handle them ».
[IfFlag(18)] public ChatAdminRights bot_broadcast_admin_rights;
- /// Telegram Premium subscriptions gift options
- [IfFlag(19)] public PremiumGiftOption[] premium_gifts;
/// Wallpaper to use in the private chat with the user.
[IfFlag(24)] public WallPaperBase wallpaper;
/// Active stories »
@@ -3604,6 +3629,7 @@ namespace TL
/// This bot has an active referral program »
[IfFlag(43)] public StarRefProgram starref_program;
[IfFlag(44)] public BotVerification bot_verification;
+ [IfFlag(46)] public long send_paid_messages_stars;
[Flags] public enum Flags : uint
{
@@ -3639,8 +3665,6 @@ namespace TL
has_bot_group_admin_rights = 0x20000,
/// Field has a value
has_bot_broadcast_admin_rights = 0x40000,
- /// Field has a value
- has_premium_gifts = 0x80000,
/// Whether this user doesn't allow sending voice messages in a private chat with them
voice_messages_forbidden = 0x100000,
/// Field has a value
@@ -3693,6 +3717,8 @@ namespace TL
has_starref_program = 0x800,
/// Field has a value
has_bot_verification = 0x1000,
+ /// Field has a value
+ has_send_paid_messages_stars = 0x4000,
}
}
@@ -6904,6 +6930,8 @@ namespace TL
Birthday = 0xD65A11CC,
///Whether received gifts will be automatically displayed on our profile
StarGiftsAutoSave = 0xE1732341,
+ ///See
+ NoPaidMessages = 0xBDC597B4,
}
/// 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
@@ -6933,6 +6961,8 @@ namespace TL
Birthday = 0x2000A518,
///Whether received gifts will be automatically displayed on our profile
StarGiftsAutoSave = 0x2CA4FDF8,
+ ///See
+ NoPaidMessages = 0x17D348D2,
}
/// Privacy rules indicate who can or can't do something and are specified by a , and its input counterpart . See Derived classes: , , , , , , , , , , ,
@@ -14454,11 +14484,12 @@ namespace TL
}
/// Global privacy settings See
- [TLDef(0x734C4CCB)]
+ [TLDef(0xC9D8DF1C)]
public sealed partial class GlobalPrivacySettings : IObject
{
/// Extra bits of information, use flags.HasFlag(...) to test for those
public Flags flags;
+ [IfFlag(5)] public long noncontact_peers_paid_stars;
[Flags] public enum Flags : uint
{
@@ -14472,6 +14503,8 @@ namespace TL
hide_read_marks = 0x8,
/// If set, only users that have a premium account, are in our contact list, or already have a private chat with us can write to us; a 403 PRIVACY_PREMIUM_REQUIRED error will be emitted otherwise.
The .contact_require_premium flag will be set for users that have this flag enabled.
To check whether we can write to a user with this flag enabled, if we haven't yet cached all the required information (for example we don't have the or history of all users while displaying the chat list in the sharing UI) the Users_GetIsPremiumRequiredToContact method may be invoked, passing the list of users currently visible in the UI, returning a list of booleans that directly specify whether we can or cannot write to each user.
This option may be enabled by both non-Premium and Premium users only if the new_noncontact_peers_require_premium_without_ownpremium client configuration flag » is equal to true, otherwise it may be enabled only by Premium users and non-Premium users will receive a PREMIUM_ACCOUNT_REQUIRED error when trying to enable this flag.
new_noncontact_peers_require_premium = 0x10,
+ /// Field has a value
+ has_noncontact_peers_paid_stars = 0x20,
}
}
@@ -15865,6 +15898,20 @@ namespace TL
public InputSavedStarGift stargift;
public InputPeer to_id;
}
+ /// See
+ [TLDef(0xDABAB2EF)]
+ public sealed partial class InputInvoicePremiumGiftStars : InputInvoice
+ {
+ public Flags flags;
+ public InputUserBase user_id;
+ public int months;
+ [IfFlag(0)] public TextWithEntities message;
+
+ [Flags] public enum Flags : uint
+ {
+ has_message = 0x1,
+ }
+ }
/// Exported invoice deep link See
[TLDef(0xAED0CBD9)]
@@ -16072,30 +16119,6 @@ namespace TL
}
}
- /// Telegram Premium gift option See
- [TLDef(0x74C34319)]
- public sealed partial class PremiumGiftOption : IObject
- {
- /// Extra bits of information, use flags.HasFlag(...) to test for those
- public Flags flags;
- /// Duration of gifted Telegram Premium subscription
- public int months;
- /// Three-letter ISO 4217 currency code
- public string currency;
- /// Price of the product 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;
- /// An invoice deep link » to an invoice for in-app payment, using the official Premium bot; may be empty if direct payment isn't available.
- public string bot_url;
- /// An identifier for the App Store/Play Store product associated with the Premium gift.
- [IfFlag(0)] public string store_product;
-
- [Flags] public enum Flags : uint
- {
- /// Field has a value
- has_store_product = 0x1,
- }
- }
-
/// Represents an additional payment method See
[TLDef(0x88F8F21B)]
public sealed partial class PaymentFormMethod : IObject
@@ -19349,7 +19372,7 @@ namespace TL
}
/// Represents a Telegram Stars transaction ». See
- [TLDef(0x64DFC926)]
+ [TLDef(0xA39FD94A)]
public sealed partial class StarsTransaction : IObject
{
/// Extra bits of information, use flags.HasFlag(...) to test for those
@@ -19392,6 +19415,8 @@ namespace TL
[IfFlag(17)] public Peer starref_peer;
/// For transactions made by referred users, the amount of Telegram Stars received by the affiliate, can be negative for refunds.
[IfFlag(17)] public StarsAmount starref_amount;
+ [IfFlag(19)] public int paid_messages;
+ [IfFlag(20)] public int premium_gift_months;
[Flags] public enum Flags : uint
{
@@ -19432,6 +19457,10 @@ namespace TL
/// Fields and have a value
has_starref_peer = 0x20000,
stargift_upgrade = 0x40000,
+ /// Field has a value
+ has_paid_messages = 0x80000,
+ /// Field has a value
+ has_premium_gift_months = 0x100000,
}
}
@@ -20256,6 +20285,7 @@ namespace TL
refunded = 0x200,
can_upgrade = 0x400,
has_saved_id = 0x800,
+ pinned_to_top = 0x1000,
}
}
@@ -20315,4 +20345,24 @@ namespace TL
{
public InputPeer peer;
}
+
+ /// See
+ [TLDef(0x1E109708)]
+ public sealed partial class Account_PaidMessagesRevenue : IObject
+ {
+ public long stars_amount;
+ }
+
+ /// See
+ /// a value means requirementToContactEmpty
+ public abstract partial class RequirementToContact : IObject { }
+ /// See
+ [TLDef(0xE581E4E9)]
+ public sealed partial class RequirementToContactPremium : RequirementToContact { }
+ /// See
+ [TLDef(0xB4F67E93)]
+ public sealed partial class RequirementToContactPaidMessages : RequirementToContact
+ {
+ public long stars_amount;
+ }
}
diff --git a/src/TL.SchemaFuncs.cs b/src/TL.SchemaFuncs.cs
index 296b6c7..004175d 100644
--- a/src/TL.SchemaFuncs.cs
+++ b/src/TL.SchemaFuncs.cs
@@ -1433,6 +1433,21 @@ namespace TL
hash = hash,
});
+ /// See
+ public static Task Account_AddNoPaidMessagesException(this Client client, InputUserBase user_id, bool refund_charged = false)
+ => client.Invoke(new Account_AddNoPaidMessagesException
+ {
+ flags = (Account_AddNoPaidMessagesException.Flags)(refund_charged ? 0x1 : 0),
+ user_id = user_id,
+ });
+
+ /// See
+ public static Task Account_GetPaidMessagesRevenue(this Client client, InputUserBase user_id)
+ => client.Invoke(new Account_GetPaidMessagesRevenue
+ {
+ user_id = user_id,
+ });
+
/// Returns basic user info according to their identifiers. See [bots: ✓] Possible codes: 400 (details)
/// List of user identifiers
public static Task Users_GetUsers(this Client client, params InputUserBase[] id)
@@ -1459,10 +1474,9 @@ namespace TL
errors = errors,
});
- /// Check whether we can write to the specified user (this method can only be called by non-Premium users), see here » for more info on the full flow. See
- /// Users to fetch info about.
- public static Task Users_GetIsPremiumRequiredToContact(this Client client, params InputUserBase[] id)
- => client.Invoke(new Users_GetIsPremiumRequiredToContact
+ /// See
+ public static Task Users_GetRequirementsToContact(this Client client, params InputUserBase[] id)
+ => client.Invoke(new Users_GetRequirementsToContact
{
id = id,
});
@@ -1880,10 +1894,10 @@ namespace TL
/// Send this message as the specified peer
/// Add the message to the specified quick reply shortcut », instead.
/// Specifies a message effect » to use for the message.
- public static Task Messages_SendMessage(this Client client, InputPeer peer, string message, long random_id, InputReplyTo reply_to = null, ReplyMarkup reply_markup = null, MessageEntity[] entities = null, DateTime? schedule_date = null, InputPeer send_as = null, InputQuickReplyShortcutBase quick_reply_shortcut = null, long? effect = null, bool no_webpage = false, bool silent = false, bool background = false, bool clear_draft = false, bool noforwards = false, bool update_stickersets_order = false, bool invert_media = false, bool allow_paid_floodskip = false)
+ public static Task Messages_SendMessage(this Client client, InputPeer peer, string message, long random_id, InputReplyTo reply_to = null, ReplyMarkup reply_markup = null, MessageEntity[] entities = null, DateTime? schedule_date = null, InputPeer send_as = null, InputQuickReplyShortcutBase quick_reply_shortcut = null, long? effect = null, long? allow_paid_stars = null, bool no_webpage = false, bool silent = false, bool background = false, bool clear_draft = false, bool noforwards = false, bool update_stickersets_order = false, bool invert_media = false, bool allow_paid_floodskip = false)
=> client.Invoke(new Messages_SendMessage
{
- flags = (Messages_SendMessage.Flags)((reply_to != null ? 0x1 : 0) | (reply_markup != null ? 0x4 : 0) | (entities != null ? 0x8 : 0) | (schedule_date != null ? 0x400 : 0) | (send_as != null ? 0x2000 : 0) | (quick_reply_shortcut != null ? 0x20000 : 0) | (effect != null ? 0x40000 : 0) | (no_webpage ? 0x2 : 0) | (silent ? 0x20 : 0) | (background ? 0x40 : 0) | (clear_draft ? 0x80 : 0) | (noforwards ? 0x4000 : 0) | (update_stickersets_order ? 0x8000 : 0) | (invert_media ? 0x10000 : 0) | (allow_paid_floodskip ? 0x80000 : 0)),
+ flags = (Messages_SendMessage.Flags)((reply_to != null ? 0x1 : 0) | (reply_markup != null ? 0x4 : 0) | (entities != null ? 0x8 : 0) | (schedule_date != null ? 0x400 : 0) | (send_as != null ? 0x2000 : 0) | (quick_reply_shortcut != null ? 0x20000 : 0) | (effect != null ? 0x40000 : 0) | (allow_paid_stars != null ? 0x200000 : 0) | (no_webpage ? 0x2 : 0) | (silent ? 0x20 : 0) | (background ? 0x40 : 0) | (clear_draft ? 0x80 : 0) | (noforwards ? 0x4000 : 0) | (update_stickersets_order ? 0x8000 : 0) | (invert_media ? 0x10000 : 0) | (allow_paid_floodskip ? 0x80000 : 0)),
peer = peer,
reply_to = reply_to,
message = message,
@@ -1894,6 +1908,7 @@ namespace TL
send_as = send_as,
quick_reply_shortcut = quick_reply_shortcut,
effect = effect ?? default,
+ allow_paid_stars = allow_paid_stars ?? default,
});
/// Send a media See [bots: ✓] Possible codes: 400,403,406,420,500 (details)
@@ -1915,10 +1930,10 @@ namespace TL
/// Send this message as the specified peer
/// Add the message to the specified quick reply shortcut », instead.
/// Specifies a message effect » to use for the message.
- public static Task Messages_SendMedia(this Client client, InputPeer peer, InputMedia media, string message, long random_id, InputReplyTo reply_to = null, ReplyMarkup reply_markup = null, MessageEntity[] entities = null, DateTime? schedule_date = null, InputPeer send_as = null, InputQuickReplyShortcutBase quick_reply_shortcut = null, long? effect = null, bool silent = false, bool background = false, bool clear_draft = false, bool noforwards = false, bool update_stickersets_order = false, bool invert_media = false, bool allow_paid_floodskip = false)
+ public static Task Messages_SendMedia(this Client client, InputPeer peer, InputMedia media, string message, long random_id, InputReplyTo reply_to = null, ReplyMarkup reply_markup = null, MessageEntity[] entities = null, DateTime? schedule_date = null, InputPeer send_as = null, InputQuickReplyShortcutBase quick_reply_shortcut = null, long? effect = null, long? allow_paid_stars = null, bool silent = false, bool background = false, bool clear_draft = false, bool noforwards = false, bool update_stickersets_order = false, bool invert_media = false, bool allow_paid_floodskip = false)
=> client.Invoke(new Messages_SendMedia
{
- flags = (Messages_SendMedia.Flags)((reply_to != null ? 0x1 : 0) | (reply_markup != null ? 0x4 : 0) | (entities != null ? 0x8 : 0) | (schedule_date != null ? 0x400 : 0) | (send_as != null ? 0x2000 : 0) | (quick_reply_shortcut != null ? 0x20000 : 0) | (effect != null ? 0x40000 : 0) | (silent ? 0x20 : 0) | (background ? 0x40 : 0) | (clear_draft ? 0x80 : 0) | (noforwards ? 0x4000 : 0) | (update_stickersets_order ? 0x8000 : 0) | (invert_media ? 0x10000 : 0) | (allow_paid_floodskip ? 0x80000 : 0)),
+ flags = (Messages_SendMedia.Flags)((reply_to != null ? 0x1 : 0) | (reply_markup != null ? 0x4 : 0) | (entities != null ? 0x8 : 0) | (schedule_date != null ? 0x400 : 0) | (send_as != null ? 0x2000 : 0) | (quick_reply_shortcut != null ? 0x20000 : 0) | (effect != null ? 0x40000 : 0) | (allow_paid_stars != null ? 0x200000 : 0) | (silent ? 0x20 : 0) | (background ? 0x40 : 0) | (clear_draft ? 0x80 : 0) | (noforwards ? 0x4000 : 0) | (update_stickersets_order ? 0x8000 : 0) | (invert_media ? 0x10000 : 0) | (allow_paid_floodskip ? 0x80000 : 0)),
peer = peer,
reply_to = reply_to,
media = media,
@@ -1930,6 +1945,7 @@ namespace TL
send_as = send_as,
quick_reply_shortcut = quick_reply_shortcut,
effect = effect ?? default,
+ allow_paid_stars = allow_paid_stars ?? default,
});
/// Forwards messages by their IDs. See [bots: ✓] Possible codes: 400,403,406,420,500 (details)
@@ -1948,10 +1964,10 @@ namespace TL
/// Scheduled message date for scheduled messages
/// Forward the messages as the specified peer
/// Add the messages to the specified quick reply shortcut », instead.
- public static Task Messages_ForwardMessages(this Client client, InputPeer from_peer, int[] id, long[] random_id, InputPeer to_peer, int? top_msg_id = null, DateTime? schedule_date = null, InputPeer send_as = null, InputQuickReplyShortcutBase quick_reply_shortcut = null, int? video_timestamp = null, bool silent = false, bool background = false, bool with_my_score = false, bool drop_author = false, bool drop_media_captions = false, bool noforwards = false, bool allow_paid_floodskip = false)
+ public static Task Messages_ForwardMessages(this Client client, InputPeer from_peer, int[] id, long[] random_id, InputPeer to_peer, int? top_msg_id = null, DateTime? schedule_date = null, InputPeer send_as = null, InputQuickReplyShortcutBase quick_reply_shortcut = null, int? video_timestamp = null, long? allow_paid_stars = null, bool silent = false, bool background = false, bool with_my_score = false, bool drop_author = false, bool drop_media_captions = false, bool noforwards = false, bool allow_paid_floodskip = false)
=> client.Invoke(new Messages_ForwardMessages
{
- flags = (Messages_ForwardMessages.Flags)((top_msg_id != null ? 0x200 : 0) | (schedule_date != null ? 0x400 : 0) | (send_as != null ? 0x2000 : 0) | (quick_reply_shortcut != null ? 0x20000 : 0) | (video_timestamp != null ? 0x100000 : 0) | (silent ? 0x20 : 0) | (background ? 0x40 : 0) | (with_my_score ? 0x100 : 0) | (drop_author ? 0x800 : 0) | (drop_media_captions ? 0x1000 : 0) | (noforwards ? 0x4000 : 0) | (allow_paid_floodskip ? 0x80000 : 0)),
+ flags = (Messages_ForwardMessages.Flags)((top_msg_id != null ? 0x200 : 0) | (schedule_date != null ? 0x400 : 0) | (send_as != null ? 0x2000 : 0) | (quick_reply_shortcut != null ? 0x20000 : 0) | (video_timestamp != null ? 0x100000 : 0) | (allow_paid_stars != null ? 0x200000 : 0) | (silent ? 0x20 : 0) | (background ? 0x40 : 0) | (with_my_score ? 0x100 : 0) | (drop_author ? 0x800 : 0) | (drop_media_captions ? 0x1000 : 0) | (noforwards ? 0x4000 : 0) | (allow_paid_floodskip ? 0x80000 : 0)),
from_peer = from_peer,
id = id,
random_id = random_id,
@@ -1961,6 +1977,7 @@ namespace TL
send_as = send_as,
quick_reply_shortcut = quick_reply_shortcut,
video_timestamp = video_timestamp ?? default,
+ allow_paid_stars = allow_paid_stars ?? default,
});
/// Report a new incoming chat for spam, if the of the chat allow us to do that See Possible codes: 400 (details)
@@ -2458,10 +2475,10 @@ namespace TL
/// Scheduled message date for scheduled messages
/// Send this message as the specified peer
/// Add the message to the specified quick reply shortcut », instead.
- public static Task Messages_SendInlineBotResult(this Client client, InputPeer peer, long random_id, long query_id, string id, InputReplyTo reply_to = null, DateTime? schedule_date = null, InputPeer send_as = null, InputQuickReplyShortcutBase quick_reply_shortcut = null, bool silent = false, bool background = false, bool clear_draft = false, bool hide_via = false)
+ public static Task Messages_SendInlineBotResult(this Client client, InputPeer peer, long random_id, long query_id, string id, InputReplyTo reply_to = null, DateTime? schedule_date = null, InputPeer send_as = null, InputQuickReplyShortcutBase quick_reply_shortcut = null, long? allow_paid_stars = null, bool silent = false, bool background = false, bool clear_draft = false, bool hide_via = false)
=> client.Invoke(new Messages_SendInlineBotResult
{
- flags = (Messages_SendInlineBotResult.Flags)((reply_to != null ? 0x1 : 0) | (schedule_date != null ? 0x400 : 0) | (send_as != null ? 0x2000 : 0) | (quick_reply_shortcut != null ? 0x20000 : 0) | (silent ? 0x20 : 0) | (background ? 0x40 : 0) | (clear_draft ? 0x80 : 0) | (hide_via ? 0x800 : 0)),
+ flags = (Messages_SendInlineBotResult.Flags)((reply_to != null ? 0x1 : 0) | (schedule_date != null ? 0x400 : 0) | (send_as != null ? 0x2000 : 0) | (quick_reply_shortcut != null ? 0x20000 : 0) | (allow_paid_stars != null ? 0x200000 : 0) | (silent ? 0x20 : 0) | (background ? 0x40 : 0) | (clear_draft ? 0x80 : 0) | (hide_via ? 0x800 : 0)),
peer = peer,
reply_to = reply_to,
random_id = random_id,
@@ -2470,6 +2487,7 @@ namespace TL
schedule_date = schedule_date ?? default,
send_as = send_as,
quick_reply_shortcut = quick_reply_shortcut,
+ allow_paid_stars = allow_paid_stars ?? default,
});
/// Find out if a media message's caption can be edited See Possible codes: 400,403 (details)
@@ -2905,10 +2923,10 @@ namespace TL
/// Send this message as the specified peer
/// Add the message to the specified quick reply shortcut », instead.
/// Specifies a message effect » to use for the message.
- public static Task Messages_SendMultiMedia(this Client client, InputPeer peer, InputSingleMedia[] multi_media, InputReplyTo reply_to = null, DateTime? schedule_date = null, InputPeer send_as = null, InputQuickReplyShortcutBase quick_reply_shortcut = null, long? effect = null, bool silent = false, bool background = false, bool clear_draft = false, bool noforwards = false, bool update_stickersets_order = false, bool invert_media = false, bool allow_paid_floodskip = false)
+ public static Task Messages_SendMultiMedia(this Client client, InputPeer peer, InputSingleMedia[] multi_media, InputReplyTo reply_to = null, DateTime? schedule_date = null, InputPeer send_as = null, InputQuickReplyShortcutBase quick_reply_shortcut = null, long? effect = null, long? allow_paid_stars = null, bool silent = false, bool background = false, bool clear_draft = false, bool noforwards = false, bool update_stickersets_order = false, bool invert_media = false, bool allow_paid_floodskip = false)
=> client.Invoke(new Messages_SendMultiMedia
{
- flags = (Messages_SendMultiMedia.Flags)((reply_to != null ? 0x1 : 0) | (schedule_date != null ? 0x400 : 0) | (send_as != null ? 0x2000 : 0) | (quick_reply_shortcut != null ? 0x20000 : 0) | (effect != null ? 0x40000 : 0) | (silent ? 0x20 : 0) | (background ? 0x40 : 0) | (clear_draft ? 0x80 : 0) | (noforwards ? 0x4000 : 0) | (update_stickersets_order ? 0x8000 : 0) | (invert_media ? 0x10000 : 0) | (allow_paid_floodskip ? 0x80000 : 0)),
+ flags = (Messages_SendMultiMedia.Flags)((reply_to != null ? 0x1 : 0) | (schedule_date != null ? 0x400 : 0) | (send_as != null ? 0x2000 : 0) | (quick_reply_shortcut != null ? 0x20000 : 0) | (effect != null ? 0x40000 : 0) | (allow_paid_stars != null ? 0x200000 : 0) | (silent ? 0x20 : 0) | (background ? 0x40 : 0) | (clear_draft ? 0x80 : 0) | (noforwards ? 0x4000 : 0) | (update_stickersets_order ? 0x8000 : 0) | (invert_media ? 0x10000 : 0) | (allow_paid_floodskip ? 0x80000 : 0)),
peer = peer,
reply_to = reply_to,
multi_media = multi_media,
@@ -2916,6 +2934,7 @@ namespace TL
send_as = send_as,
quick_reply_shortcut = quick_reply_shortcut,
effect = effect ?? default,
+ allow_paid_stars = allow_paid_stars ?? default,
});
/// Upload encrypted file and associate it to a secret chat See Possible codes: 400 (details)
@@ -5558,6 +5577,14 @@ namespace TL
limit = limit,
});
+ /// See
+ public static Task Channels_UpdatePaidMessagesPrice(this Client client, InputChannelBase channel, long send_paid_messages_stars)
+ => client.Invoke(new Channels_UpdatePaidMessagesPrice
+ {
+ channel = channel,
+ send_paid_messages_stars = send_paid_messages_stars,
+ });
+
/// Sends a custom request; for bots only See [bots: ✓] Possible codes: 400,403 (details)
/// The method name
/// JSON-serialized method parameters
@@ -6331,6 +6358,14 @@ namespace TL
peer = peer,
});
+ /// See
+ public static Task Payments_ToggleStarGiftsPinnedToTop(this Client client, InputPeer peer, params InputSavedStarGift[] stargift)
+ => client.Invoke(new Payments_ToggleStarGiftsPinnedToTop
+ {
+ peer = peer,
+ stargift = stargift,
+ });
+
/// Create a stickerset. See [bots: ✓] Possible codes: 400 (details)
/// Whether this is a mask stickerset
/// Whether this is a custom emoji stickerset.
@@ -8663,6 +8698,24 @@ namespace TL.Methods
public long hash;
}
+ [TLDef(0x6F688AA7)]
+ public sealed partial class Account_AddNoPaidMessagesException : IMethod
+ {
+ public Flags flags;
+ public InputUserBase user_id;
+
+ [Flags] public enum Flags : uint
+ {
+ refund_charged = 0x1,
+ }
+ }
+
+ [TLDef(0xF1266F38)]
+ public sealed partial class Account_GetPaidMessagesRevenue : IMethod
+ {
+ public InputUserBase user_id;
+ }
+
[TLDef(0x0D91A548)]
public sealed partial class Users_GetUsers : IMethod
{
@@ -8682,8 +8735,8 @@ namespace TL.Methods
public SecureValueErrorBase[] errors;
}
- [TLDef(0xA622AA10)]
- public sealed partial class Users_GetIsPremiumRequiredToContact : IMethod
+ [TLDef(0xD89A83A3)]
+ public sealed partial class Users_GetRequirementsToContact : IMethod
{
public InputUserBase[] id;
}
@@ -9028,7 +9081,7 @@ namespace TL.Methods
}
}
- [TLDef(0x983F9745)]
+ [TLDef(0xFBF2340A)]
public sealed partial class Messages_SendMessage : IMethod
{
public Flags flags;
@@ -9042,6 +9095,7 @@ namespace TL.Methods
[IfFlag(13)] public InputPeer send_as;
[IfFlag(17)] public InputQuickReplyShortcutBase quick_reply_shortcut;
[IfFlag(18)] public long effect;
+ [IfFlag(21)] public long allow_paid_stars;
[Flags] public enum Flags : uint
{
@@ -9060,10 +9114,11 @@ namespace TL.Methods
has_quick_reply_shortcut = 0x20000,
has_effect = 0x40000,
allow_paid_floodskip = 0x80000,
+ has_allow_paid_stars = 0x200000,
}
}
- [TLDef(0x7852834E)]
+ [TLDef(0xA550CD78)]
public sealed partial class Messages_SendMedia : IMethod
{
public Flags flags;
@@ -9078,6 +9133,7 @@ namespace TL.Methods
[IfFlag(13)] public InputPeer send_as;
[IfFlag(17)] public InputQuickReplyShortcutBase quick_reply_shortcut;
[IfFlag(18)] public long effect;
+ [IfFlag(21)] public long allow_paid_stars;
[Flags] public enum Flags : uint
{
@@ -9095,10 +9151,11 @@ namespace TL.Methods
has_quick_reply_shortcut = 0x20000,
has_effect = 0x40000,
allow_paid_floodskip = 0x80000,
+ has_allow_paid_stars = 0x200000,
}
}
- [TLDef(0x6D74DA08)]
+ [TLDef(0xBB9FA475)]
public sealed partial class Messages_ForwardMessages : IMethod
{
public Flags flags;
@@ -9111,6 +9168,7 @@ namespace TL.Methods
[IfFlag(13)] public InputPeer send_as;
[IfFlag(17)] public InputQuickReplyShortcutBase quick_reply_shortcut;
[IfFlag(20)] public int video_timestamp;
+ [IfFlag(21)] public long allow_paid_stars;
[Flags] public enum Flags : uint
{
@@ -9126,6 +9184,7 @@ namespace TL.Methods
has_quick_reply_shortcut = 0x20000,
allow_paid_floodskip = 0x80000,
has_video_timestamp = 0x100000,
+ has_allow_paid_stars = 0x200000,
}
}
@@ -9519,7 +9578,7 @@ namespace TL.Methods
}
}
- [TLDef(0x3EBEE86A)]
+ [TLDef(0xC0CF7646)]
public sealed partial class Messages_SendInlineBotResult : IMethod
{
public Flags flags;
@@ -9531,6 +9590,7 @@ namespace TL.Methods
[IfFlag(10)] public DateTime schedule_date;
[IfFlag(13)] public InputPeer send_as;
[IfFlag(17)] public InputQuickReplyShortcutBase quick_reply_shortcut;
+ [IfFlag(21)] public long allow_paid_stars;
[Flags] public enum Flags : uint
{
@@ -9542,6 +9602,7 @@ namespace TL.Methods
hide_via = 0x800,
has_send_as = 0x2000,
has_quick_reply_shortcut = 0x20000,
+ has_allow_paid_stars = 0x200000,
}
}
@@ -9933,7 +9994,7 @@ namespace TL.Methods
public long hash;
}
- [TLDef(0x37B74355)]
+ [TLDef(0x1BF89D74)]
public sealed partial class Messages_SendMultiMedia : IMethod
{
public Flags flags;
@@ -9944,6 +10005,7 @@ namespace TL.Methods
[IfFlag(13)] public InputPeer send_as;
[IfFlag(17)] public InputQuickReplyShortcutBase quick_reply_shortcut;
[IfFlag(18)] public long effect;
+ [IfFlag(21)] public long allow_paid_stars;
[Flags] public enum Flags : uint
{
@@ -9959,6 +10021,7 @@ namespace TL.Methods
has_quick_reply_shortcut = 0x20000,
has_effect = 0x40000,
allow_paid_floodskip = 0x80000,
+ has_allow_paid_stars = 0x200000,
}
}
@@ -12102,6 +12165,13 @@ namespace TL.Methods
public int limit;
}
+ [TLDef(0xFC84653F)]
+ public sealed partial class Channels_UpdatePaidMessagesPrice : IMethod
+ {
+ public InputChannelBase channel;
+ public long send_paid_messages_stars;
+ }
+
[TLDef(0xAA2769ED)]
public sealed partial class Bots_SendCustomRequest : IMethod
{
@@ -12774,6 +12844,13 @@ namespace TL.Methods
}
}
+ [TLDef(0x1513E7B0)]
+ public sealed partial class Payments_ToggleStarGiftsPinnedToTop : IMethod
+ {
+ public InputPeer peer;
+ public InputSavedStarGift[] stargift;
+ }
+
[TLDef(0x9021AB67)]
public sealed partial class Stickers_CreateStickerSet : IMethod
{
diff --git a/src/TL.Table.cs b/src/TL.Table.cs
index 742ecad..1b55bf1 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 = 199; // fetched 13/02/2025 13:06:03
+ public const int Version = 200; // fetched 07/03/2025 23:09:37
internal const int SecretChats = 144;
internal const int MTProto2 = 73;
internal const uint VectorCtor = 0x1CB5C415;
@@ -124,7 +124,7 @@ namespace TL
[0x36C6019A] = typeof(PeerChat),
[0xA2A5371E] = typeof(PeerChannel),
[0xD3BC4B7A] = typeof(UserEmpty),
- [0x4B46C37E] = typeof(User),
+ [0x020B1422] = typeof(User),
[0x4F11BAE1] = null,//UserProfilePhotoEmpty
[0x82D1F706] = typeof(UserProfilePhoto),
[0x09D05049] = null,//UserStatusEmpty
@@ -136,7 +136,7 @@ namespace TL
[0x29562865] = typeof(ChatEmpty),
[0x41CBF256] = typeof(Chat),
[0x6592A1A7] = typeof(ChatForbidden),
- [0xE00998B7] = typeof(Channel),
+ [0x7482147E] = typeof(Channel),
[0x17D493D5] = typeof(ChannelForbidden),
[0x2633421B] = typeof(ChatFull),
[0x52D6806B] = typeof(ChannelFull),
@@ -148,7 +148,7 @@ namespace TL
[0x37C1011C] = null,//ChatPhotoEmpty
[0x1C6E1C11] = typeof(ChatPhoto),
[0x90A6CA84] = typeof(MessageEmpty),
- [0x96FDBBE9] = typeof(Message),
+ [0xEABCDD4D] = typeof(Message),
[0xD3D28540] = typeof(MessageService),
[0x3DED6320] = null,//MessageMediaEmpty
[0x695150D7] = typeof(MessageMediaPhoto),
@@ -239,10 +239,10 @@ namespace TL
[0x5C467992] = typeof(InputNotifyForumTopic),
[0xCACB6AE2] = typeof(InputPeerNotifySettings),
[0x99622C0C] = typeof(PeerNotifySettings),
- [0xACD66C5E] = typeof(PeerSettings),
+ [0xF47741F7] = typeof(PeerSettings),
[0xA437C3ED] = typeof(WallPaper),
[0xE0804116] = typeof(WallPaperNoFile),
- [0x4D975BBC] = typeof(UserFull),
+ [0xD2234EA0] = typeof(UserFull),
[0x145ADE0B] = typeof(Contact),
[0xC13E3C50] = typeof(ImportedContact),
[0x16D9703B] = typeof(ContactStatus),
@@ -1013,7 +1013,7 @@ namespace TL
[0xD7584C87] = typeof(StatsGroupTopAdmin),
[0x535F779D] = typeof(StatsGroupTopInviter),
[0xEF7FF916] = typeof(Stats_MegagroupStats),
- [0x734C4CCB] = typeof(GlobalPrivacySettings),
+ [0xC9D8DF1C] = typeof(GlobalPrivacySettings),
[0x4203C5EF] = typeof(Help_CountryCode),
[0xC3878E23] = typeof(Help_Country),
[0x93CC1F32] = null,//Help_CountriesListNotModified
@@ -1106,6 +1106,7 @@ namespace TL
[0xE8625E92] = typeof(InputInvoiceStarGift),
[0x4D818D5D] = typeof(InputInvoiceStarGiftUpgrade),
[0x4A5F5BD9] = typeof(InputInvoiceStarGiftTransfer),
+ [0xDABAB2EF] = typeof(InputInvoicePremiumGiftStars),
[0xAED0CBD9] = typeof(Payments_ExportedInvoice),
[0xCFB9D957] = typeof(Messages_TranscribedAudio),
[0x5334759C] = typeof(Help_PremiumPromo),
@@ -1116,7 +1117,6 @@ namespace TL
[0xDDDD0F56] = typeof(InputStorePaymentStarsTopup),
[0x1D741EF7] = typeof(InputStorePaymentStarsGift),
[0x751F08FA] = typeof(InputStorePaymentStarsGiveaway),
- [0x74C34319] = typeof(PremiumGiftOption),
[0x88F8F21B] = typeof(PaymentFormMethod),
[0x2DE11AAE] = null,//EmojiStatusEmpty
[0xE7FF068A] = typeof(EmojiStatus),
@@ -1324,7 +1324,7 @@ namespace TL
[0x60682812] = typeof(StarsTransactionPeerAds),
[0xF9677AAD] = typeof(StarsTransactionPeerAPI),
[0x0BD915C0] = typeof(StarsTopupOption),
- [0x64DFC926] = typeof(StarsTransaction),
+ [0xA39FD94A] = typeof(StarsTransaction),
[0x6C9CE8ED] = typeof(Payments_StarsStatus),
[0xE87ACBC0] = typeof(FoundStory),
[0xE2DE7737] = typeof(Stories_FoundStories),
@@ -1380,6 +1380,10 @@ namespace TL
[0x206AD49E] = null,//PaidReactionPrivacyDefault
[0x1F0C1AD9] = typeof(PaidReactionPrivacyAnonymous),
[0xDC6CFCF0] = typeof(PaidReactionPrivacyPeer),
+ [0x1E109708] = typeof(Account_PaidMessagesRevenue),
+ [0x050A9839] = null,//RequirementToContactEmpty
+ [0xE581E4E9] = typeof(RequirementToContactPremium),
+ [0xB4F67E93] = typeof(RequirementToContactPaidMessages),
// from TL.Secret:
[0x6ABD9782] = typeof(Layer143.DecryptedMessageMediaDocument),
[0x020DF5D0] = typeof(Layer101.MessageEntityBlockquote),
@@ -1511,6 +1515,7 @@ namespace TL
[typeof(Messages_AvailableEffects)] = 0xD1ED9A5B, //messages.availableEffectsNotModified
[typeof(Payments_StarGifts)] = 0xA388A368, //payments.starGiftsNotModified
[typeof(PaidReactionPrivacy)] = 0x206AD49E, //paidReactionPrivacyDefault
+ [typeof(RequirementToContact)] = 0x050A9839, //requirementToContactEmpty
[typeof(DecryptedMessageMedia)] = 0x089F5C4A, //decryptedMessageMediaEmpty
};
}
diff --git a/src/WTelegramClient.csproj b/src/WTelegramClient.csproj
index b54e320..dd5cdd1 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: 199
+ Telegram Client API (MTProto) library written 100% in C# and .NET Standard | Latest API layer: 200
Release Notes:
$(ReleaseNotes.Replace("|", "%0D%0A").Replace(" - ","%0D%0A- ").Replace(" ", "%0D%0A%0D%0A"))