diff --git a/README.md b/README.md
index 2daaede..e624246 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://www.buymeacoffee.com/wizou)
diff --git a/src/TL.Schema.cs b/src/TL.Schema.cs
index 5f4c554..f860984 100644
--- a/src/TL.Schema.cs
+++ b/src/TL.Schema.cs
@@ -364,7 +364,7 @@ namespace TL
public InputGame id;
}
/// Generated invoice of a bot payment See
- [TLDef(0x8EB5A6D5)]
+ [TLDef(0x405FEF0D)]
public sealed partial class InputMediaInvoice : InputMedia
{
/// Extra bits of information, use flags.HasFlag(...) to test for those
@@ -380,7 +380,7 @@ namespace TL
/// Bot-defined invoice payload, 1-128 bytes. This will not be displayed to the user, use for your internal processes.
public byte[] payload;
/// Payments provider token, obtained via Botfather
- public string provider;
+ [IfFlag(3)] public string provider;
/// JSON-encoded data about the invoice, which will be shared with the payment provider. A detailed description of required fields should be provided by the payment provider.
public DataJSON provider_data;
/// Unique bot deep links start parameter. If present, forwarded copies of the sent message will have a URL button with a deep link to the bot (instead of a Pay button), with the value used as the start parameter. If absent, forwarded copies of the sent message will have a Pay button, allowing multiple users to pay directly from the forwarded message, using the same invoice.
@@ -396,6 +396,8 @@ namespace TL
has_start_param = 0x2,
/// Field has a value
has_extended_media = 0x4,
+ /// Field has a value
+ has_provider = 0x8,
}
}
/// Live geolocation See
@@ -1682,7 +1684,7 @@ namespace TL
public override Peer Peer => peer_id;
}
/// A message See
- [TLDef(0x2357BF25)]
+ [TLDef(0x94345242)]
public sealed partial class Message : MessageBase
{
/// Extra bits of information, use flags.HasFlag(...) to test for those
@@ -1733,6 +1735,8 @@ namespace TL
/// Time To Live of the message, once message.date+message.ttl_period === time(), the message will be deleted on the server, and must be deleted locally as well.
[IfFlag(25)] public int ttl_period;
[IfFlag(30)] public int quick_reply_shortcut_id;
+ [IfFlag(34)] public long effect;
+ [IfFlag(35)] public FactCheck factcheck;
[Flags] public enum Flags : uint
{
@@ -1801,6 +1805,10 @@ namespace TL
/// Field has a value
has_via_business_bot_id = 0x1,
offline = 0x2,
+ /// Field has a value
+ has_effect = 0x4,
+ /// Field has a value
+ has_factcheck = 0x8,
}
/// ID of the message
@@ -5302,11 +5310,18 @@ namespace TL
public Reaction reaction;
}
/// See
- [TLDef(0x5C65D358)]
+ [TLDef(0xDFD961F5)]
public sealed partial class UpdateBroadcastRevenueTransactions : Update
{
+ public Peer peer;
public BroadcastRevenueBalances balances;
}
+ /// See
+ [TLDef(0x0FB85198)]
+ public sealed partial class UpdateStarsBalance : Update
+ {
+ public long balance;
+ }
/// Updates state. See
[TLDef(0xA56C2A3E)]
@@ -7730,8 +7745,16 @@ namespace TL
public long document_id;
}
/// Message entity representing a block quote. See
- [TLDef(0x020DF5D0)]
- public sealed partial class MessageEntityBlockquote : MessageEntity { }
+ [TLDef(0xF1CCAAAC)]
+ public sealed partial class MessageEntityBlockquote : MessageEntity
+ {
+ public Flags flags;
+
+ [Flags] public enum Flags : uint
+ {
+ collapsed = 0x1,
+ }
+ }
/// Represents a channel See Derived classes: ,
/// a value means inputChannelEmpty
@@ -8951,13 +8974,14 @@ namespace TL
public string url;
}
/// An authentication code should be delivered via SMS after Firebase attestation, as described in the auth documentation ». See
- [TLDef(0xE57B1432)]
+ [TLDef(0x13C90F17)]
public sealed partial class Auth_SentCodeTypeFirebaseSms : Auth_SentCodeTypeSms
{
/// Extra bits of information, use flags.HasFlag(...) to test for those
public Flags flags;
/// On Android, the nonce to be used as described in the auth documentation »
[IfFlag(0)] public byte[] nonce;
+ [IfFlag(2)] public byte[] play_integrity_nonce;
/// On iOS, must be compared with the receipt extracted from the received push notification.
[IfFlag(1)] public string receipt;
/// On iOS: if a push notification with the ios_push_secret isn't received within push_timeout seconds, the next_type authentication method must be used, with Auth_ResendCode.
@@ -8969,6 +8993,8 @@ namespace TL
has_nonce = 0x1,
/// Fields and have a value
has_receipt = 0x2,
+ /// Field has a value
+ has_play_integrity_nonce = 0x4,
}
}
/// See
@@ -10166,9 +10192,27 @@ namespace TL
public byte[] bytes;
}
+ /// Payment form See Derived classes:
+ public abstract partial class Payments_PaymentFormBase : IObject
+ {
+ /// Form ID
+ public virtual long FormId => default;
+ /// Bot ID
+ public virtual long BotId => default;
+ /// Form title
+ public virtual string Title => default;
+ /// Description
+ public virtual string Description => default;
+ /// Product photo
+ public virtual WebDocumentBase Photo => default;
+ /// Invoice
+ public virtual Invoice Invoice => default;
+ /// Users
+ public virtual Dictionary Users => default;
+ }
/// Payment form See
[TLDef(0xA0058751)]
- public sealed partial class Payments_PaymentForm : IObject
+ public sealed partial class Payments_PaymentForm : Payments_PaymentFormBase
{
/// Extra bits of information, use flags.HasFlag(...) to test for those
public Flags flags;
@@ -10218,6 +10262,47 @@ namespace TL
/// Field has a value
has_additional_methods = 0x40,
}
+
+ /// Form ID
+ public override long FormId => form_id;
+ /// Bot ID
+ public override long BotId => bot_id;
+ /// Form title
+ public override string Title => title;
+ /// Description
+ public override string Description => description;
+ /// Product photo
+ public override WebDocumentBase Photo => photo;
+ /// Invoice
+ public override Invoice Invoice => invoice;
+ /// Users
+ public override Dictionary Users => users;
+ }
+ /// See
+ [TLDef(0x7BF6B15C)]
+ public sealed partial class Payments_PaymentFormStars : Payments_PaymentFormBase
+ {
+ public Flags flags;
+ public long form_id;
+ public long bot_id;
+ public string title;
+ public string description;
+ [IfFlag(5)] public WebDocumentBase photo;
+ public Invoice invoice;
+ public Dictionary users;
+
+ [Flags] public enum Flags : uint
+ {
+ has_photo = 0x20,
+ }
+
+ public override long FormId => form_id;
+ public override long BotId => bot_id;
+ public override string Title => title;
+ public override string Description => description;
+ public override WebDocumentBase Photo => photo;
+ public override Invoice Invoice => invoice;
+ public override Dictionary Users => users;
}
/// Validated user-provided info See
@@ -10257,9 +10342,31 @@ namespace TL
public string url;
}
+ /// Payment receipt See Derived classes:
+ public abstract partial class Payments_PaymentReceiptBase : IObject
+ {
+ /// Date of generation
+ public virtual DateTime Date => default;
+ /// Bot ID
+ public virtual long BotId => default;
+ /// Title
+ public virtual string Title => default;
+ /// Description
+ public virtual string Description => default;
+ /// Photo
+ public virtual WebDocumentBase Photo => default;
+ /// Invoice
+ public virtual Invoice Invoice => default;
+ /// Three-letter ISO 4217 currency code
+ public virtual string Currency => default;
+ /// Total amount 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 virtual long TotalAmount => default;
+ /// Users
+ public virtual Dictionary Users => default;
+ }
/// Receipt See
[TLDef(0x70C4FE03)]
- public sealed partial class Payments_PaymentReceipt : IObject
+ public sealed partial class Payments_PaymentReceipt : Payments_PaymentReceiptBase
{
/// Extra bits of information, use flags.HasFlag(...) to test for those
public Flags flags;
@@ -10303,6 +10410,56 @@ namespace TL
/// Field has a value
has_tip_amount = 0x8,
}
+
+ /// Date of generation
+ public override DateTime Date => date;
+ /// Bot ID
+ public override long BotId => bot_id;
+ /// Title
+ public override string Title => title;
+ /// Description
+ public override string Description => description;
+ /// Photo
+ public override WebDocumentBase Photo => photo;
+ /// Invoice
+ public override Invoice Invoice => invoice;
+ /// Three-letter ISO 4217 currency code
+ public override string Currency => currency;
+ /// Total amount 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 override long TotalAmount => total_amount;
+ /// Users
+ public override Dictionary Users => users;
+ }
+ /// See
+ [TLDef(0xDABBF83A)]
+ public sealed partial class Payments_PaymentReceiptStars : Payments_PaymentReceiptBase
+ {
+ public Flags flags;
+ public DateTime date;
+ public long bot_id;
+ public string title;
+ public string description;
+ [IfFlag(2)] public WebDocumentBase photo;
+ public Invoice invoice;
+ public string currency;
+ public long total_amount;
+ public string transaction_id;
+ public Dictionary users;
+
+ [Flags] public enum Flags : uint
+ {
+ has_photo = 0x4,
+ }
+
+ public override DateTime Date => date;
+ public override long BotId => bot_id;
+ public override string Title => title;
+ public override string Description => description;
+ public override WebDocumentBase Photo => photo;
+ public override Invoice Invoice => invoice;
+ public override string Currency => currency;
+ public override long TotalAmount => total_amount;
+ public override Dictionary Users => users;
}
/// Saved server-side order information See
@@ -14998,6 +15155,12 @@ namespace TL
/// Should be populated with one of the giveaway options returned by Payments_GetPremiumGiftCodeOptions, see the giveaways » documentation for more info.
public PremiumGiftCodeOption option;
}
+ /// See
+ [TLDef(0x1DA33AD8)]
+ public sealed partial class InputInvoiceStars : InputInvoice
+ {
+ public StarsTopupOption option;
+ }
/// Exported invoice deep link See
[TLDef(0xAED0CBD9)]
@@ -15135,6 +15298,19 @@ namespace TL
has_prize_description = 0x10,
}
}
+ /// See
+ [TLDef(0x4F0EE8DF)]
+ public sealed partial class InputStorePaymentStars : InputStorePaymentPurpose
+ {
+ public Flags flags;
+ public long stars;
+ public string currency;
+ public long amount;
+
+ [Flags] public enum Flags : uint
+ {
+ }
+ }
/// Telegram Premium gift option See
[TLDef(0x74C34319)]
@@ -17900,4 +18076,131 @@ namespace TL
public long available_balance;
public long overall_revenue;
}
+
+ /// See
+ [TLDef(0x93C3E27E)]
+ public sealed partial class AvailableEffect : IObject
+ {
+ public Flags flags;
+ public long id;
+ public string emoticon;
+ [IfFlag(0)] public long static_icon_id;
+ public long effect_sticker_id;
+ [IfFlag(1)] public long effect_animation_id;
+
+ [Flags] public enum Flags : uint
+ {
+ has_static_icon_id = 0x1,
+ has_effect_animation_id = 0x2,
+ premium_required = 0x4,
+ }
+ }
+
+ /// See
+ /// a value means messages.availableEffectsNotModified
+ [TLDef(0xBDDB616E)]
+ public sealed partial class Messages_AvailableEffects : IObject
+ {
+ public int hash;
+ public AvailableEffect[] effects;
+ public DocumentBase[] documents;
+ }
+
+ /// See
+ [TLDef(0xB89BFCCF)]
+ public sealed partial class FactCheck : IObject
+ {
+ public Flags flags;
+ [IfFlag(1)] public string country;
+ [IfFlag(1)] public TextWithEntities text;
+ public long hash;
+
+ [Flags] public enum Flags : uint
+ {
+ need_check = 0x1,
+ has_country = 0x2,
+ }
+ }
+
+ /// See
+ public abstract partial class StarsTransactionPeerBase : IObject { }
+ /// See
+ [TLDef(0x95F2BFE4)]
+ public sealed partial class StarsTransactionPeerUnsupported : StarsTransactionPeerBase { }
+ /// See
+ [TLDef(0xB457B375)]
+ public sealed partial class StarsTransactionPeerAppStore : StarsTransactionPeerBase { }
+ /// See
+ [TLDef(0x7B560A0B)]
+ public sealed partial class StarsTransactionPeerPlayMarket : StarsTransactionPeerBase { }
+ /// See
+ [TLDef(0x250DBAF8)]
+ public sealed partial class StarsTransactionPeerPremiumBot : StarsTransactionPeerBase { }
+ /// See
+ [TLDef(0xE92FD902)]
+ public sealed partial class StarsTransactionPeerFragment : StarsTransactionPeerBase { }
+ /// See
+ [TLDef(0xD80DA15D)]
+ public sealed partial class StarsTransactionPeer : StarsTransactionPeerBase
+ {
+ public Peer peer;
+ }
+
+ /// See
+ [TLDef(0x0BD915C0)]
+ public sealed partial class StarsTopupOption : IObject
+ {
+ public Flags flags;
+ public long stars;
+ [IfFlag(0)] public string store_product;
+ public string currency;
+ public long amount;
+
+ [Flags] public enum Flags : uint
+ {
+ has_store_product = 0x1,
+ extended = 0x2,
+ }
+ }
+
+ /// See
+ [TLDef(0xCC7079B2)]
+ public sealed partial class StarsTransaction : IObject
+ {
+ public Flags flags;
+ public string id;
+ public long stars;
+ public DateTime date;
+ public StarsTransactionPeerBase peer;
+ [IfFlag(0)] public string title;
+ [IfFlag(1)] public string description;
+ [IfFlag(2)] public WebDocumentBase photo;
+
+ [Flags] public enum Flags : uint
+ {
+ has_title = 0x1,
+ has_description = 0x2,
+ has_photo = 0x4,
+ refund = 0x8,
+ }
+ }
+
+ /// See
+ [TLDef(0x8CF4EE60)]
+ public sealed partial class Payments_StarsStatus : IObject, IPeerResolver
+ {
+ public Flags flags;
+ public long balance;
+ public StarsTransaction[] history;
+ [IfFlag(0)] public string next_offset;
+ public Dictionary chats;
+ public Dictionary users;
+
+ [Flags] public enum Flags : uint
+ {
+ has_next_offset = 0x1,
+ }
+ /// returns a or for the given Peer
+ public IPeerInfo UserOrChat(Peer peer) => peer?.UserOrChat(users, chats);
+ }
}
diff --git a/src/TL.SchemaFuncs.cs b/src/TL.SchemaFuncs.cs
index d872175..0f9c38c 100644
--- a/src/TL.SchemaFuncs.cs
+++ b/src/TL.SchemaFuncs.cs
@@ -100,6 +100,24 @@ namespace TL
query = query,
});
+ /// See
+ public static Task InvokeWithGooglePlayIntegrity(this Client client, string nonce, string token, IMethod query)
+ => client.Invoke(new InvokeWithGooglePlayIntegrity
+ {
+ nonce = nonce,
+ token = token,
+ query = query,
+ });
+
+ /// See
+ public static Task InvokeWithApnsSecret(this Client client, string nonce, string secret, IMethod query)
+ => client.Invoke(new InvokeWithApnsSecret
+ {
+ nonce = nonce,
+ secret = secret,
+ query = query,
+ });
+
/// Send the verification code for login See Possible codes: 400,406,500 (details)
/// Phone number in international format
/// Application identifier (see App configuration)
@@ -234,11 +252,13 @@ namespace TL
/// The phone number
/// The phone code hash obtained from Auth_SendCode
[Obsolete("Use LoginUserIfNeeded instead of this method. See https://wiz0u.github.io/WTelegramClient/FAQ#tlsharp")]
- public static Task Auth_ResendCode(this Client client, string phone_number, string phone_code_hash)
+ public static Task Auth_ResendCode(this Client client, string phone_number, string phone_code_hash, string reason = null)
=> client.Invoke(new Auth_ResendCode
{
+ flags = (Auth_ResendCode.Flags)(reason != null ? 0x1 : 0),
phone_number = phone_number,
phone_code_hash = phone_code_hash,
+ reason = reason,
});
/// Cancel the login verification code See Possible codes: 400,406 (details)
@@ -313,13 +333,14 @@ namespace TL
/// Phone code hash returned by Auth_SendCode
/// On Android, a JWS object obtained as described in the auth documentation »
/// Secret token received via an apple push notification
- public static Task Auth_RequestFirebaseSms(this Client client, string phone_number, string phone_code_hash, string safety_net_token = null, string ios_push_secret = null)
+ public static Task Auth_RequestFirebaseSms(this Client client, string phone_number, string phone_code_hash, string safety_net_token = null, string ios_push_secret = null, string play_integrity_token = null)
=> client.Invoke(new Auth_RequestFirebaseSms
{
- flags = (Auth_RequestFirebaseSms.Flags)((safety_net_token != null ? 0x1 : 0) | (ios_push_secret != null ? 0x2 : 0)),
+ flags = (Auth_RequestFirebaseSms.Flags)((safety_net_token != null ? 0x1 : 0) | (ios_push_secret != null ? 0x2 : 0) | (play_integrity_token != null ? 0x4 : 0)),
phone_number = phone_number,
phone_code_hash = phone_code_hash,
safety_net_token = safety_net_token,
+ play_integrity_token = play_integrity_token,
ios_push_secret = ios_push_secret,
});
@@ -1797,10 +1818,10 @@ namespace TL
/// Message entities for sending styled text
/// Scheduled message date for scheduled messages
/// Send this message as the specified peer
- 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, 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)
+ 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)
=> 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) | (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)),
+ 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)),
peer = peer,
reply_to = reply_to,
message = message,
@@ -1810,6 +1831,7 @@ namespace TL
schedule_date = schedule_date.GetValueOrDefault(),
send_as = send_as,
quick_reply_shortcut = quick_reply_shortcut,
+ effect = effect.GetValueOrDefault(),
});
/// Send a media See [bots: ✓] Possible codes: 400,403,406,420,500 (details)
@@ -1828,10 +1850,10 @@ namespace TL
/// Message entities for styled text
/// Scheduled message date for scheduled messages
/// Send this message as the specified peer
- 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, bool silent = false, bool background = false, bool clear_draft = false, bool noforwards = false, bool update_stickersets_order = false, bool invert_media = 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, bool silent = false, bool background = false, bool clear_draft = false, bool noforwards = false, bool update_stickersets_order = false, bool invert_media = 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) | (silent ? 0x20 : 0) | (background ? 0x40 : 0) | (clear_draft ? 0x80 : 0) | (noforwards ? 0x4000 : 0) | (update_stickersets_order ? 0x8000 : 0) | (invert_media ? 0x10000 : 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) | (silent ? 0x20 : 0) | (background ? 0x40 : 0) | (clear_draft ? 0x80 : 0) | (noforwards ? 0x4000 : 0) | (update_stickersets_order ? 0x8000 : 0) | (invert_media ? 0x10000 : 0)),
peer = peer,
reply_to = reply_to,
media = media,
@@ -1842,6 +1864,7 @@ namespace TL
schedule_date = schedule_date.GetValueOrDefault(),
send_as = send_as,
quick_reply_shortcut = quick_reply_shortcut,
+ effect = effect.GetValueOrDefault(),
});
/// Forwards messages by their IDs. See [bots: ✓] Possible codes: 400,403,406,420,500 (details)
@@ -2802,16 +2825,17 @@ namespace TL
/// The medias to send: note that they must be separately uploaded using Messages_UploadMedia first, using raw inputMediaUploaded* constructors is not supported.
/// Scheduled message date for scheduled messages
/// Send this message as the specified peer
- 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, bool silent = false, bool background = false, bool clear_draft = false, bool noforwards = false, bool update_stickersets_order = false, bool invert_media = 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, bool silent = false, bool background = false, bool clear_draft = false, bool noforwards = false, bool update_stickersets_order = false, bool invert_media = 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) | (silent ? 0x20 : 0) | (background ? 0x40 : 0) | (clear_draft ? 0x80 : 0) | (noforwards ? 0x4000 : 0) | (update_stickersets_order ? 0x8000 : 0) | (invert_media ? 0x10000 : 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) | (silent ? 0x20 : 0) | (background ? 0x40 : 0) | (clear_draft ? 0x80 : 0) | (noforwards ? 0x4000 : 0) | (update_stickersets_order ? 0x8000 : 0) | (invert_media ? 0x10000 : 0)),
peer = peer,
reply_to = reply_to,
multi_media = multi_media,
schedule_date = schedule_date.GetValueOrDefault(),
send_as = send_as,
quick_reply_shortcut = quick_reply_shortcut,
+ effect = effect.GetValueOrDefault(),
});
/// Upload encrypted file and associate it to a secret chat See
@@ -4144,6 +4168,39 @@ namespace TL
hash = hash,
});
+ /// See
+ /// a null value means messages.availableEffectsNotModified
+ public static Task Messages_GetAvailableEffects(this Client client, int hash = default)
+ => client.Invoke(new Messages_GetAvailableEffects
+ {
+ hash = hash,
+ });
+
+ /// See
+ public static Task Messages_EditFactCheck(this Client client, InputPeer peer, int msg_id, TextWithEntities text)
+ => client.Invoke(new Messages_EditFactCheck
+ {
+ peer = peer,
+ msg_id = msg_id,
+ text = text,
+ });
+
+ /// See
+ public static Task Messages_DeleteFactCheck(this Client client, InputPeer peer, int msg_id)
+ => client.Invoke(new Messages_DeleteFactCheck
+ {
+ peer = peer,
+ msg_id = msg_id,
+ });
+
+ /// See
+ public static Task Messages_GetFactCheck(this Client client, InputPeer peer, params int[] msg_id)
+ => client.Invoke(new Messages_GetFactCheck
+ {
+ peer = peer,
+ msg_id = msg_id,
+ });
+
/// Returns a current state of updates. See [bots: ✓]
public static Task Updates_GetState(this Client client)
=> client.Invoke(new Updates_GetState
@@ -5239,6 +5296,17 @@ namespace TL
restricted = restricted,
});
+ /// See
+ public static Task Channels_SearchPosts(this Client client, string hashtag, int offset_rate = default, InputPeer offset_peer = null, int offset_id = default, int limit = int.MaxValue)
+ => client.Invoke(new Channels_SearchPosts
+ {
+ hashtag = hashtag,
+ offset_rate = offset_rate,
+ offset_peer = offset_peer,
+ offset_id = offset_id,
+ limit = limit,
+ });
+
/// Sends a custom request; for bots only See [bots: ✓] Possible codes: 400,403 (details)
/// The method name
/// JSON-serialized method parameters
@@ -5407,7 +5475,7 @@ namespace TL
/// 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
- public static Task Payments_GetPaymentForm(this Client client, InputInvoice invoice, DataJSON theme_params = null)
+ public static Task Payments_GetPaymentForm(this Client client, InputInvoice invoice, DataJSON theme_params = null)
=> client.Invoke(new Payments_GetPaymentForm
{
flags = (Payments_GetPaymentForm.Flags)(theme_params != null ? 0x1 : 0),
@@ -5418,7 +5486,7 @@ namespace TL
/// Get payment receipt See Possible codes: 400 (details)
/// The peer where the payment receipt was sent
/// Message ID of receipt
- public static Task Payments_GetPaymentReceipt(this Client client, InputPeer peer, int msg_id)
+ public static Task Payments_GetPaymentReceipt(this Client client, InputPeer peer, int msg_id)
=> client.Invoke(new Payments_GetPaymentReceipt
{
peer = peer,
@@ -5562,6 +5630,45 @@ namespace TL
purpose = purpose,
});
+ /// See
+ public static Task Payments_GetStarsTopupOptions(this Client client)
+ => client.Invoke(new Payments_GetStarsTopupOptions
+ {
+ });
+
+ /// See
+ public static Task Payments_GetStarsStatus(this Client client, InputPeer peer)
+ => client.Invoke(new Payments_GetStarsStatus
+ {
+ peer = peer,
+ });
+
+ /// See
+ public static Task Payments_GetStarsTransactions(this Client client, InputPeer peer, string offset, bool inbound = false, bool outbound = false)
+ => client.Invoke(new Payments_GetStarsTransactions
+ {
+ flags = (Payments_GetStarsTransactions.Flags)((inbound ? 0x1 : 0) | (outbound ? 0x2 : 0)),
+ peer = peer,
+ offset = offset,
+ });
+
+ /// See
+ public static Task Payments_SendStarsForm(this Client client, long form_id, InputInvoice invoice)
+ => client.Invoke(new Payments_SendStarsForm
+ {
+ flags = 0,
+ form_id = form_id,
+ invoice = invoice,
+ });
+
+ /// See
+ public static Task Payments_RefundStarsCharge(this Client client, InputUserBase user_id, string charge_id)
+ => client.Invoke(new Payments_RefundStarsCharge
+ {
+ user_id = user_id,
+ charge_id = charge_id,
+ });
+
/// Create a stickerset, bots only. See [bots: ✓] Possible codes: 400 (details)
/// Whether this is a mask stickerset
/// Whether this is a custom emoji stickerset.
@@ -6793,6 +6900,22 @@ namespace TL.Methods
public IMethod query;
}
+ [TLDef(0x1DF92984)]
+ public sealed partial class InvokeWithGooglePlayIntegrity : IMethod
+ {
+ public string nonce;
+ public string token;
+ public IMethod query;
+ }
+
+ [TLDef(0x0DAE54F8)]
+ public sealed partial class InvokeWithApnsSecret : IMethod
+ {
+ public string nonce;
+ public string secret;
+ public IMethod query;
+ }
+
[TLDef(0xA677244F)]
public sealed partial class Auth_SendCode : IMethod
{
@@ -6892,11 +7015,18 @@ namespace TL.Methods
}
}
- [TLDef(0x3EF1A9BF)]
+ [TLDef(0xCAE47523)]
public sealed partial class Auth_ResendCode : IMethod
{
+ public Flags flags;
public string phone_number;
public string phone_code_hash;
+ [IfFlag(0)] public string reason;
+
+ [Flags] public enum Flags : uint
+ {
+ has_reason = 0x1,
+ }
}
[TLDef(0x1F040578)]
@@ -6946,19 +7076,21 @@ namespace TL.Methods
public string web_auth_token;
}
- [TLDef(0x89464B50)]
+ [TLDef(0x8E39261E)]
public sealed partial class Auth_RequestFirebaseSms : IMethod
{
public Flags flags;
public string phone_number;
public string phone_code_hash;
[IfFlag(0)] public string safety_net_token;
+ [IfFlag(2)] public string play_integrity_token;
[IfFlag(1)] public string ios_push_secret;
[Flags] public enum Flags : uint
{
has_safety_net_token = 0x1,
has_ios_push_secret = 0x2,
+ has_play_integrity_token = 0x4,
}
}
@@ -8170,7 +8302,7 @@ namespace TL.Methods
}
}
- [TLDef(0xDFF8042C)]
+ [TLDef(0x983F9745)]
public sealed partial class Messages_SendMessage : IMethod
{
public Flags flags;
@@ -8183,6 +8315,7 @@ namespace TL.Methods
[IfFlag(10)] public DateTime schedule_date;
[IfFlag(13)] public InputPeer send_as;
[IfFlag(17)] public InputQuickReplyShortcutBase quick_reply_shortcut;
+ [IfFlag(18)] public long effect;
[Flags] public enum Flags : uint
{
@@ -8199,10 +8332,11 @@ namespace TL.Methods
update_stickersets_order = 0x8000,
invert_media = 0x10000,
has_quick_reply_shortcut = 0x20000,
+ has_effect = 0x40000,
}
}
- [TLDef(0x7BD66041)]
+ [TLDef(0x7852834E)]
public sealed partial class Messages_SendMedia : IMethod
{
public Flags flags;
@@ -8216,6 +8350,7 @@ namespace TL.Methods
[IfFlag(10)] public DateTime schedule_date;
[IfFlag(13)] public InputPeer send_as;
[IfFlag(17)] public InputQuickReplyShortcutBase quick_reply_shortcut;
+ [IfFlag(18)] public long effect;
[Flags] public enum Flags : uint
{
@@ -8231,6 +8366,7 @@ namespace TL.Methods
update_stickersets_order = 0x8000,
invert_media = 0x10000,
has_quick_reply_shortcut = 0x20000,
+ has_effect = 0x40000,
}
}
@@ -9060,7 +9196,7 @@ namespace TL.Methods
public long hash;
}
- [TLDef(0x0C964709)]
+ [TLDef(0x37B74355)]
public sealed partial class Messages_SendMultiMedia : IMethod
{
public Flags flags;
@@ -9070,6 +9206,7 @@ namespace TL.Methods
[IfFlag(10)] public DateTime schedule_date;
[IfFlag(13)] public InputPeer send_as;
[IfFlag(17)] public InputQuickReplyShortcutBase quick_reply_shortcut;
+ [IfFlag(18)] public long effect;
[Flags] public enum Flags : uint
{
@@ -9083,6 +9220,7 @@ namespace TL.Methods
update_stickersets_order = 0x8000,
invert_media = 0x10000,
has_quick_reply_shortcut = 0x20000,
+ has_effect = 0x40000,
}
}
@@ -10216,6 +10354,34 @@ namespace TL.Methods
public int hash;
}
+ [TLDef(0xDEA20A39)]
+ public sealed partial class Messages_GetAvailableEffects : IMethod
+ {
+ public int hash;
+ }
+
+ [TLDef(0x0589EE75)]
+ public sealed partial class Messages_EditFactCheck : IMethod
+ {
+ public InputPeer peer;
+ public int msg_id;
+ public TextWithEntities text;
+ }
+
+ [TLDef(0xD1DA940C)]
+ public sealed partial class Messages_DeleteFactCheck : IMethod
+ {
+ public InputPeer peer;
+ public int msg_id;
+ }
+
+ [TLDef(0xB9CDC5EE)]
+ public sealed partial class Messages_GetFactCheck : IMethod
+ {
+ public InputPeer peer;
+ public int[] msg_id;
+ }
+
[TLDef(0xEDD4882A)]
public sealed partial class Updates_GetState : IMethod { }
@@ -11063,6 +11229,16 @@ namespace TL.Methods
public bool restricted;
}
+ [TLDef(0xD19F987B)]
+ public sealed partial class Channels_SearchPosts : IMethod
+ {
+ public string hashtag;
+ public int offset_rate;
+ public InputPeer offset_peer;
+ public int offset_id;
+ public int limit;
+ }
+
[TLDef(0xAA2769ED)]
public sealed partial class Bots_SendCustomRequest : IMethod
{
@@ -11192,7 +11368,7 @@ namespace TL.Methods
}
[TLDef(0x37148DBB)]
- public sealed partial class Payments_GetPaymentForm : IMethod
+ public sealed partial class Payments_GetPaymentForm : IMethod
{
public Flags flags;
public InputInvoice invoice;
@@ -11205,7 +11381,7 @@ namespace TL.Methods
}
[TLDef(0x2478D1CC)]
- public sealed partial class Payments_GetPaymentReceipt : IMethod
+ public sealed partial class Payments_GetPaymentReceipt : IMethod
{
public InputPeer peer;
public int msg_id;
@@ -11329,6 +11505,48 @@ namespace TL.Methods
public InputStorePaymentPurpose purpose;
}
+ [TLDef(0xC00EC7D3)]
+ public sealed partial class Payments_GetStarsTopupOptions : IMethod { }
+
+ [TLDef(0x104FCFA7)]
+ public sealed partial class Payments_GetStarsStatus : IMethod
+ {
+ public InputPeer peer;
+ }
+
+ [TLDef(0x673AC2F9)]
+ public sealed partial class Payments_GetStarsTransactions : IMethod
+ {
+ public Flags flags;
+ public InputPeer peer;
+ public string offset;
+
+ [Flags] public enum Flags : uint
+ {
+ inbound = 0x1,
+ outbound = 0x2,
+ }
+ }
+
+ [TLDef(0x02BB731D)]
+ public sealed partial class Payments_SendStarsForm : IMethod
+ {
+ public Flags flags;
+ public long form_id;
+ public InputInvoice invoice;
+
+ [Flags] public enum Flags : uint
+ {
+ }
+ }
+
+ [TLDef(0x25AE8F4A)]
+ public sealed partial class Payments_RefundStarsCharge : IMethod
+ {
+ public InputUserBase user_id;
+ public string charge_id;
+ }
+
[TLDef(0x9021AB67)]
public sealed partial class Stickers_CreateStickerSet : IMethod
{
diff --git a/src/TL.Secret.cs b/src/TL.Secret.cs
index 6be7feb..c9c475b 100644
--- a/src/TL.Secret.cs
+++ b/src/TL.Secret.cs
@@ -825,7 +825,11 @@ namespace TL
}
namespace Layer101
- { }
+ {
+ /// Message entity representing a block quote. See
+ [TLDef(0x020DF5D0)]
+ public sealed partial class MessageEntityBlockquote : MessageEntity { }
+ }
namespace Layer143
{
diff --git a/src/TL.Table.cs b/src/TL.Table.cs
index 16bbb22..7974bd5 100644
--- a/src/TL.Table.cs
+++ b/src/TL.Table.cs
@@ -6,7 +6,7 @@ namespace TL
{
public static partial class Layer
{
- public const int Version = 179; // fetched 07/05/2024 13:21:04
+ public const int Version = 181; // fetched 28/05/2024 13:03:09
internal const int SecretChats = 144;
internal const int MTProto2 = 73;
internal const uint VectorCtor = 0x1CB5C415;
@@ -95,7 +95,7 @@ namespace TL
[0xE5BBFE1A] = typeof(InputMediaPhotoExternal),
[0xFB52DC99] = typeof(InputMediaDocumentExternal),
[0xD33F43F3] = typeof(InputMediaGame),
- [0x8EB5A6D5] = typeof(InputMediaInvoice),
+ [0x405FEF0D] = typeof(InputMediaInvoice),
[0x971FA843] = typeof(InputMediaGeoLive),
[0x0F94E5F1] = typeof(InputMediaPoll),
[0xE66FBF7B] = typeof(InputMediaDice),
@@ -146,7 +146,7 @@ namespace TL
[0x37C1011C] = null,//ChatPhotoEmpty
[0x1C6E1C11] = typeof(ChatPhoto),
[0x90A6CA84] = typeof(MessageEmpty),
- [0x2357BF25] = typeof(Message),
+ [0x94345242] = typeof(Message),
[0x2B085862] = typeof(MessageService),
[0x3DED6320] = null,//MessageMediaEmpty
[0x695150D7] = typeof(MessageMediaPhoto),
@@ -406,7 +406,8 @@ namespace TL
[0x07DF587C] = typeof(UpdateBotEditBusinessMessage),
[0xA02A982E] = typeof(UpdateBotDeleteBusinessMessage),
[0x1824E40B] = typeof(UpdateNewStoryReaction),
- [0x5C65D358] = typeof(UpdateBroadcastRevenueTransactions),
+ [0xDFD961F5] = typeof(UpdateBroadcastRevenueTransactions),
+ [0x0FB85198] = typeof(UpdateStarsBalance),
[0xA56C2A3E] = typeof(Updates_State),
[0x5D75A138] = typeof(Updates_DifferenceEmpty),
[0x00F49CA0] = typeof(Updates_Difference),
@@ -587,7 +588,7 @@ namespace TL
[0x761E6AF4] = typeof(MessageEntityBankCard),
[0x32CA960F] = typeof(MessageEntitySpoiler),
[0xC8CF05F8] = typeof(MessageEntityCustomEmoji),
- [0x020DF5D0] = typeof(MessageEntityBlockquote),
+ [0xF1CCAAAC] = typeof(MessageEntityBlockquote),
[0xEE8C1E86] = null,//InputChannelEmpty
[0xF35AEC28] = typeof(InputChannel),
[0x5B934F9D] = typeof(InputChannelFromMessage),
@@ -650,7 +651,7 @@ namespace TL
[0xF450F59B] = typeof(Auth_SentCodeTypeEmailCode),
[0xA5491DEA] = typeof(Auth_SentCodeTypeSetUpEmailRequired),
[0xD9565C39] = typeof(Auth_SentCodeTypeFragmentSms),
- [0xE57B1432] = typeof(Auth_SentCodeTypeFirebaseSms),
+ [0x13C90F17] = typeof(Auth_SentCodeTypeFirebaseSms),
[0xA416AC81] = typeof(Auth_SentCodeTypeSmsWord),
[0xB37794AF] = typeof(Auth_SentCodeTypeSmsPhrase),
[0x36585EA4] = typeof(Messages_BotCallbackAnswer),
@@ -745,10 +746,12 @@ namespace TL
[0xF46FE924] = typeof(InputWebFileAudioAlbumThumbLocation),
[0x21E753BC] = typeof(Upload_WebFile),
[0xA0058751] = typeof(Payments_PaymentForm),
+ [0x7BF6B15C] = typeof(Payments_PaymentFormStars),
[0xD1451883] = typeof(Payments_ValidatedRequestedInfo),
[0x4E5F810D] = typeof(Payments_PaymentResult),
[0xD8411139] = typeof(Payments_PaymentVerificationNeeded),
[0x70C4FE03] = typeof(Payments_PaymentReceipt),
+ [0xDABBF83A] = typeof(Payments_PaymentReceiptStars),
[0xFB8FE43C] = typeof(Payments_SavedInfo),
[0xC10EB2CF] = typeof(InputPaymentCredentialsSaved),
[0x3417D728] = typeof(InputPaymentCredentials),
@@ -1073,6 +1076,7 @@ namespace TL
[0xC5B56859] = typeof(InputInvoiceMessage),
[0xC326CAEF] = typeof(InputInvoiceSlug),
[0x98986C0D] = typeof(InputInvoicePremiumGiftCode),
+ [0x1DA33AD8] = typeof(InputInvoiceStars),
[0xAED0CBD9] = typeof(Payments_ExportedInvoice),
[0xCFB9D957] = typeof(Messages_TranscribedAudio),
[0x5334759C] = typeof(Help_PremiumPromo),
@@ -1080,6 +1084,7 @@ namespace TL
[0x616F7FE8] = typeof(InputStorePaymentGiftPremium),
[0xA3805F3F] = typeof(InputStorePaymentPremiumGiftCode),
[0x160544CA] = typeof(InputStorePaymentPremiumGiveaway),
+ [0x4F0EE8DF] = typeof(InputStorePaymentStars),
[0x74C34319] = typeof(PremiumGiftOption),
[0x88F8F21B] = typeof(PaymentFormMethod),
[0x2DE11AAE] = null,//EmojiStatusEmpty
@@ -1270,8 +1275,22 @@ namespace TL
[0x87158466] = typeof(Stats_BroadcastRevenueTransactions),
[0x56E34970] = typeof(ReactionsNotifySettings),
[0x8438F1C6] = typeof(BroadcastRevenueBalances),
+ [0x93C3E27E] = typeof(AvailableEffect),
+ [0xD1ED9A5B] = null,//Messages_AvailableEffectsNotModified
+ [0xBDDB616E] = typeof(Messages_AvailableEffects),
+ [0xB89BFCCF] = typeof(FactCheck),
+ [0x95F2BFE4] = typeof(StarsTransactionPeerUnsupported),
+ [0xB457B375] = typeof(StarsTransactionPeerAppStore),
+ [0x7B560A0B] = typeof(StarsTransactionPeerPlayMarket),
+ [0x250DBAF8] = typeof(StarsTransactionPeerPremiumBot),
+ [0xE92FD902] = typeof(StarsTransactionPeerFragment),
+ [0xD80DA15D] = typeof(StarsTransactionPeer),
+ [0x0BD915C0] = typeof(StarsTopupOption),
+ [0xCC7079B2] = typeof(StarsTransaction),
+ [0x8CF4EE60] = typeof(Payments_StarsStatus),
// from TL.Secret:
[0x6ABD9782] = typeof(Layer143.DecryptedMessageMediaDocument),
+ [0x020DF5D0] = typeof(Layer101.MessageEntityBlockquote),
[0x91CC4674] = typeof(Layer73.DecryptedMessage),
[0x0EF02CE6] = typeof(Layer66.DocumentAttributeVideo),
[0xBB718624] = typeof(Layer66.SendMessageUploadRoundAction),
@@ -1396,6 +1415,7 @@ namespace TL
[typeof(Messages_SavedReactionTags)] = 0x889B59EF, //messages.savedReactionTagsNotModified
[typeof(Help_TimezonesList)] = 0x970708CC, //help.timezonesListNotModified
[typeof(Messages_QuickReplies)] = 0x5F91EB5B, //messages.quickRepliesNotModified
+ [typeof(Messages_AvailableEffects)] = 0xD1ED9A5B, //messages.availableEffectsNotModified
[typeof(DecryptedMessageMedia)] = 0x089F5C4A, //decryptedMessageMediaEmpty
};
}
diff --git a/src/WTelegramClient.csproj b/src/WTelegramClient.csproj
index f4dedc4..50f849e 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: 179
Release Notes:
$(ReleaseNotes.Replace("|", "%0D%0A").Replace(" - ","%0D%0A- ").Replace(" ", "%0D%0A%0D%0A"))
+ Telegram Client API (MTProto) library written 100% in C# and .NET Standard | Latest API layer: 181
Release Notes:
$(ReleaseNotes.Replace("|", "%0D%0A").Replace(" - ","%0D%0A- ").Replace(" ", "%0D%0A%0D%0A"))
Copyright © Olivier Marcoux 2021-2024
MIT
https://wiz0u.github.io/WTelegramClient