diff --git a/README.md b/README.md
index a89d3b9..8bb243f 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 c887407..21e4c2b 100644
--- a/src/TL.Schema.cs
+++ b/src/TL.Schema.cs
@@ -818,6 +818,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;
+ /// If set, the user has enabled paid messages », we might need to pay the specified amount of Stars to send them messages, depending on the configured exceptions: check .send_paid_messages_stars or Users_GetRequirementsToContact to see if the currently logged in user actually has to pay or not, see here » for the full flow.
[IfFlag(47)] public long send_paid_messages_stars;
[Flags] public enum Flags : uint
@@ -1124,6 +1125,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;
+ /// If set, this supergroup or monoforum has enabled paid messages », we might need to pay the specified amount of Stars to send messages to it, depending on the configured exceptions: check .send_paid_messages_stars to see if the currently logged in user actually has to pay or not, see here » for the full flow (only set for the monoforum, not the associated channel).
[IfFlag(46)] public long send_paid_messages_stars;
[IfFlag(50)] public long linked_monoforum_id;
@@ -1491,6 +1493,7 @@ namespace TL
[IfFlag(42)] public StickerSet emojiset;
[IfFlag(49)] public BotVerification bot_verification;
[IfFlag(50)] public int stargifts_count;
+ /// If set and bigger than 0, this supergroup, monoforum or the monoforum associated to this channel has enabled paid messages » and we must pay the specified amount of Stars to send messages to it, see here » for the full flow.
This flag will be set both for the monoforum and for of the associated channel).
If set and equal to 0, the monoforum requires payment in general but we were exempted from paying.
[IfFlag(53)] public long send_paid_messages_stars;
[Flags] public enum Flags : uint
@@ -1841,7 +1844,9 @@ namespace TL
[IfFlag(34)] public long effect;
/// Represents a fact-check ».
[IfFlag(35)] public FactCheck factcheck;
+ /// Used for Telegram Gateway verification messages: if set and the current unixtime is bigger than the specified unixtime, invoke Messages_ReportMessagesDelivery passing the ID and the peer of this message as soon as it is received by the client (optionally batching requests for the same peer).
[IfFlag(37)] public DateTime report_delivery_until_date;
+ /// The amount of stars the sender has paid to send the message, see here » for more info.
[IfFlag(38)] public long paid_message_stars;
[IfFlag(39)] public SuggestedPost suggested_post;
@@ -1965,6 +1970,7 @@ namespace TL
public DateTime date;
/// Event connected with the service message
public MessageAction action;
+ /// Reactions ».
[IfFlag(20)] public MessageReactions reactions;
/// 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;
@@ -1981,6 +1987,7 @@ namespace TL
media_unread = 0x20,
/// Field has a value
has_from_id = 0x100,
+ /// Whether you can react to this messages ».
reactions_are_possible = 0x200,
/// Whether the message is silent
silent = 0x2000,
@@ -2007,6 +2014,7 @@ namespace TL
public override MessageReplyHeaderBase ReplyTo => reply_to;
/// Message date
public override DateTime Date => date;
+ /// Reactions ».
public override MessageReactions Reactions => reactions;
/// 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.
public override int TtlPeriod => ttl_period;
@@ -2967,7 +2975,7 @@ namespace TL
}
}
/// See
- [TLDef(0x2E3AE60E)]
+ [TLDef(0x34F762F3)]
public sealed partial class MessageActionStarGiftUnique : MessageAction
{
/// Extra bits of information, use flags.HasFlag(...) to test for those
@@ -2978,7 +2986,7 @@ namespace TL
[IfFlag(6)] public Peer from_id;
[IfFlag(7)] public Peer peer;
[IfFlag(7)] public long saved_id;
- [IfFlag(8)] public long resale_stars;
+ [IfFlag(8)] public StarsAmountBase resale_amount;
[IfFlag(9)] public DateTime can_transfer_at;
[IfFlag(10)] public DateTime can_resell_at;
@@ -2996,8 +3004,8 @@ namespace TL
has_from_id = 0x40,
/// Fields and have a value
has_peer = 0x80,
- /// Field has a value
- has_resale_stars = 0x100,
+ /// Field has a value
+ has_resale_amount = 0x100,
/// Field has a value
has_can_transfer_at = 0x200,
/// Field has a value
@@ -3596,6 +3604,7 @@ 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;
+ /// All users that must pay us » to send us private messages will have this flag set only for us, containing the amount of required stars, see here » for more info on paid messages.
[IfFlag(14)] public long charge_paid_message_stars;
[IfFlag(15)] public string registration_month;
[IfFlag(16)] public string phone_country;
@@ -3742,7 +3751,7 @@ namespace TL
}
/// Extended user info See
- [TLDef(0x29DE80BE)]
+ [TLDef(0x7E63CE1F)]
public sealed partial class UserFull : IObject
{
/// Extra bits of information, use flags.HasFlag(...) to test for those
@@ -3806,9 +3815,12 @@ namespace TL
/// This bot has an active referral program »
[IfFlag(43)] public StarRefProgram starref_program;
[IfFlag(44)] public BotVerification bot_verification;
+ /// If set and bigger than 0, this user has enabled paid messages » and we must pay the specified amount of Stars to send messages to them, see here » for the full flow.
If set and equal to 0, the user requires payment in general but we were exempted from paying for any of the reasons specified in the docs ».
[IfFlag(46)] public long send_paid_messages_stars;
[IfFlag(47)] public DisallowedGiftsSettings disallowed_gifts;
[IfFlag(49)] public StarsRating stars_rating;
+ [IfFlag(50)] public StarsRating stars_my_pending_rating;
+ [IfFlag(50)] public DateTime stars_my_pending_rating_date;
[Flags] public enum Flags : uint
{
@@ -3903,6 +3915,8 @@ namespace TL
display_gifts_button = 0x10000,
/// Field has a value
has_stars_rating = 0x20000,
+ /// Fields and have a value
+ has_stars_my_pending_rating = 0x40000,
}
}
@@ -4056,7 +4070,7 @@ namespace TL
public override IPeerInfo UserOrChat(Peer peer) => peer?.UserOrChat(users, chats);
}
/// Incomplete list of messages and auxiliary data. See
- [TLDef(0x3A54685E)]
+ [TLDef(0x762B263D)]
public sealed partial class Messages_MessagesSlice : Messages_Messages, IPeerResolver
{
/// Extra bits of information, use flags.HasFlag(...) to test for those
@@ -4067,6 +4081,7 @@ namespace TL
[IfFlag(0)] public int next_rate;
/// Indicates the absolute position of messages[0] within the total result set with count count.
This is useful, for example, if the result was fetched using offset_id, and we need to display a progress/total counter (like photo 134 of 200, for all media in a chat, we could simply use photo ${offset_id_offset} of ${count}.
[IfFlag(2)] public int offset_id_offset;
+ [IfFlag(3)] public SearchPostsFlood search_flood;
[Flags] public enum Flags : uint
{
@@ -4076,6 +4091,8 @@ namespace TL
inexact = 0x2,
/// Field has a value
has_offset_id_offset = 0x4,
+ /// Field has a value
+ has_search_flood = 0x8,
}
}
/// Channel messages See
@@ -7163,7 +7180,7 @@ namespace TL
Birthday = 0xD65A11CC,
///Whether received gifts will be automatically displayed on our profile
StarGiftsAutoSave = 0xE1732341,
- ///See
+ ///Who can send you messages without paying, if paid messages » are enabled.
NoPaidMessages = 0xBDC597B4,
}
@@ -7194,7 +7211,7 @@ namespace TL
Birthday = 0x2000A518,
///Whether received gifts will be automatically displayed on our profile
StarGiftsAutoSave = 0x2CA4FDF8,
- ///See
+ ///Who can send you messages without paying, if paid messages » are enabled.
NoPaidMessages = 0x17D348D2,
}
@@ -7230,14 +7247,14 @@ namespace TL
[TLDef(0x840649CF)]
public sealed partial class InputPrivacyValueAllowChatParticipants : InputPrivacyRule
{
- /// Allowed chat IDs
+ /// Allowed chat IDs (either a or a supergroup ID, verbatim the way it is received in the constructor (i.e. unlike with bot API IDs, here group and supergroup IDs should be treated in the same way)).
public long[] chats;
}
/// Disallow only participants of certain chats See
[TLDef(0xE94F0F86)]
public sealed partial class InputPrivacyValueDisallowChatParticipants : InputPrivacyRule
{
- /// Disallowed chat IDs
+ /// Disallowed chat IDs (either a or a supergroup ID, verbatim the way it is received in the constructor (i.e. unlike with bot API IDs, here group and supergroup IDs should be treated in the same way)).
public long[] chats;
}
/// Allow only close friends » See
@@ -7285,14 +7302,14 @@ namespace TL
[TLDef(0x6B134E8E)]
public sealed partial class PrivacyValueAllowChatParticipants : PrivacyRule
{
- /// Allowed chats
+ /// Allowed chat IDs (either a or a supergroup ID, verbatim the way it is received in the constructor (i.e. unlike with bot API IDs, here group and supergroup IDs should be treated in the same way)).
public long[] chats;
}
/// Disallow only participants of certain chats See
[TLDef(0x41C87565)]
public sealed partial class PrivacyValueDisallowChatParticipants : PrivacyRule
{
- /// Disallowed chats
+ /// Disallowed chats IDs (either a or a supergroup ID, verbatim the way it is received in the constructor (i.e. unlike with bot API IDs, here group and supergroup IDs should be treated in the same way)).
public long[] chats;
}
/// Allow only close friends » See
@@ -14255,6 +14272,12 @@ namespace TL
{
public StarGiftBase gift;
}
+ /// See
+ [TLDef(0x31CAD303)]
+ public sealed partial class WebPageAttributeStarGiftCollection : WebPageAttribute
+ {
+ public DocumentBase[] icons;
+ }
/// How users voted in a poll See
[TLDef(0x4899484E)]
@@ -16190,11 +16213,17 @@ namespace TL
public long stars;
}
/// See
- [TLDef(0x63CBC38C)]
+ [TLDef(0xC39F5324)]
public sealed partial class InputInvoiceStarGiftResale : InputInvoice
{
+ public Flags flags;
public string slug;
public InputPeer to_id;
+
+ [Flags] public enum Flags : uint
+ {
+ ton = 0x1,
+ }
}
/// Exported invoice deep link See
@@ -17433,7 +17462,7 @@ namespace TL
public override int ID => id;
}
/// Represents a story. See
- [TLDef(0x79B26A24)]
+ [TLDef(0xEDF164F1)]
public sealed partial class StoryItem : StoryItemBase
{
/// Extra bits of information, use flags.HasFlag(...) to test for those
@@ -17462,6 +17491,7 @@ namespace TL
[IfFlag(3)] public StoryViews views;
/// The reaction we sent.
[IfFlag(15)] public Reaction sent_reaction;
+ [IfFlag(19)] public int[] albums;
[Flags] public enum Flags : uint
{
@@ -17499,6 +17529,8 @@ namespace TL
has_fwd_from = 0x20000,
/// Field has a value
has_from_id = 0x40000,
+ /// Field has a value
+ has_albums = 0x80000,
}
/// ID of the story.
@@ -20155,7 +20187,7 @@ namespace TL
public override Peer ReleasedBy => released_by;
}
/// See
- [TLDef(0xF63778AE)]
+ [TLDef(0x3A274D50)]
public sealed partial class StarGiftUnique : StarGiftBase
{
/// Extra bits of information, use flags.HasFlag(...) to test for those
@@ -20171,7 +20203,7 @@ namespace TL
public int availability_issued;
public int availability_total;
[IfFlag(3)] public string gift_address;
- [IfFlag(4)] public long resell_stars;
+ [IfFlag(4)] public StarsAmountBase[] resell_amount;
[IfFlag(5)] public Peer released_by;
[Flags] public enum Flags : uint
@@ -20184,11 +20216,12 @@ namespace TL
has_owner_address = 0x4,
/// Field has a value
has_gift_address = 0x8,
- /// Field has a value
- has_resell_stars = 0x10,
+ /// Field has a value
+ has_resell_amount = 0x10,
/// Field has a value
has_released_by = 0x20,
require_premium = 0x40,
+ resale_ton_only = 0x80,
}
public override long ID => id;
@@ -20697,23 +20730,25 @@ namespace TL
public InputPeer peer;
}
- /// See
+ /// Total number of non-refunded Telegram Stars a user has spent on sending us messages either directly or through a channel, see here » for more info on paid messages. See
[TLDef(0x1E109708)]
public sealed partial class Account_PaidMessagesRevenue : IObject
{
+ /// Amount in Stars.
public long stars_amount;
}
- /// See Derived classes: ,
+ /// Specifies a requirement that must be satisfied in order to contact a user. See Derived classes: ,
/// a value means requirementToContactEmpty
public abstract partial class RequirementToContact : IObject { }
- /// See
+ /// This user requires us to buy a Premium subscription in order to contact them. See
[TLDef(0xE581E4E9)]
public sealed partial class RequirementToContactPremium : RequirementToContact { }
- /// See
+ /// This user requires us to pay the specified amount of Telegram Stars to send them a message, see here » for the full flow. See
[TLDef(0xB4F67E93)]
public sealed partial class RequirementToContactPaidMessages : RequirementToContact
{
+ /// The required amount of Telegram Stars.
public long stars_amount;
}
@@ -20958,4 +20993,47 @@ namespace TL
{
public StarGiftCollection[] collections;
}
+
+ /// See
+ [TLDef(0x9325705A)]
+ public sealed partial class StoryAlbum : IObject
+ {
+ public Flags flags;
+ public int album_id;
+ public string title;
+ [IfFlag(0)] public PhotoBase icon_photo;
+ [IfFlag(1)] public DocumentBase icon_video;
+
+ [Flags] public enum Flags : uint
+ {
+ has_icon_photo = 0x1,
+ has_icon_video = 0x2,
+ }
+ }
+
+ /// See
+ /// a value means stories.albumsNotModified
+ [TLDef(0xC3987A3A)]
+ public sealed partial class Stories_Albums : IObject
+ {
+ public long hash;
+ public StoryAlbum[] albums;
+ }
+
+ /// See
+ [TLDef(0x3E0B5B6A)]
+ public sealed partial class SearchPostsFlood : IObject
+ {
+ public Flags flags;
+ public int total_daily;
+ public int remains;
+ [IfFlag(1)] public int wait_till;
+ public long stars_amount;
+
+ [Flags] public enum Flags : uint
+ {
+ query_is_free = 0x1,
+ has_wait_till = 0x2,
+ }
+ }
}
diff --git a/src/TL.SchemaFuncs.cs b/src/TL.SchemaFuncs.cs
index a066365..c10d6f0 100644
--- a/src/TL.SchemaFuncs.cs
+++ b/src/TL.SchemaFuncs.cs
@@ -1433,7 +1433,7 @@ namespace TL
hash = hash,
});
- /// Get the number of stars we have received from the specified user thanks to paid messages »; the received amount will be equal to the sent amount multiplied by stars_paid_message_commission_permille divided by 1000. See [bots: ✓]
+ /// Get the number of stars we have received from the specified user thanks to paid messages »; the received amount will be equal to the sent amount multiplied by stars_paid_message_commission_permille divided by 1000. See [bots: ✓]
/// If set, can contain the ID of a monoforum (channel direct messages) to obtain the number of stars the user has spent to send us direct messages via the channel.
/// The user that paid to send us messages.
public static Task Account_GetPaidMessagesRevenue(this Client client, InputUserBase user_id, InputPeer parent_peer = null)
@@ -1446,7 +1446,7 @@ namespace TL
/// Allow a user to send us messages without paying if paid messages » are enabled. See [bots: ✓]
/// If set and require_payment is not set, refunds the amounts the user has already paid us to send us messages (directly or via a monoforum).
- /// Allow or disallow a user to send us messages without paying.
+ /// If set, requires the user to pay in order to send us messages (can only be used by monoforums, not users, i.e. parent_peer must be set if this flag is set; users must instead use the privacy setting to remove a previously added exemption).
If not set, allows the user to send us messages without paying (can be used by both monoforums and users).
/// If set, applies the setting within the monoforum aka direct messages » (pass the ID of the monoforum, not the ID of the associated channel).
/// The user to exempt or unexempt.
public static Task Account_ToggleNoPaidMessagesException(this Client client, InputUserBase user_id, InputPeer parent_peer = null, bool refund_charged = false, bool require_payment = false)
@@ -1483,7 +1483,8 @@ namespace TL
errors = errors,
});
- /// See [bots: ✓]
+ /// Check whether we can write to the specified users, used to implement bulk checks for Premium-only messages » and paid messages ». See [bots: ✓]
+ /// Users to check.
public static Task Users_GetRequirementsToContact(this Client client, params InputUserBase[] id)
=> client.Invoke(new Users_GetRequirementsToContact
{
@@ -1911,6 +1912,7 @@ 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.
+ /// For paid messages », specifies the amount of Telegram Stars the user has agreed to pay in order to send 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, long? allow_paid_stars = null, SuggestedPost suggested_post = 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
{
@@ -1948,6 +1950,7 @@ 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.
+ /// For paid messages », specifies the amount of Telegram Stars the user has agreed to pay in order to send 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, long? allow_paid_stars = null, SuggestedPost suggested_post = 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
{
@@ -1983,6 +1986,7 @@ 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.
+ /// For paid messages », specifies the amount of Telegram Stars the user has agreed to pay in order to send the message.
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, InputReplyTo reply_to = null, SuggestedPost suggested_post = 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
{
@@ -2496,6 +2500,7 @@ 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.
+ /// For paid messages », specifies the amount of Telegram Stars the user has agreed to pay in order to send the message.
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
{
@@ -2945,6 +2950,7 @@ 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.
+ /// For paid messages », specifies the amount of Telegram Stars the user has agreed to pay in order to send 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, 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
{
@@ -4513,7 +4519,8 @@ namespace TL
hash = hash,
});
- /// See Possible codes: 400 (details)
+ /// Used for Telegram Gateway verification messages »: indicate to the server that one or more s were received by the client, if requested by the .report_delivery_until_date flag or the equivalent flag in push notifications. See Possible codes: 400 (details)
+ /// If set,
public static Task Messages_ReportMessagesDelivery(this Client client, InputPeer peer, int[] id, bool push = false)
=> client.Invoke(new Messages_ReportMessagesDelivery
{
@@ -5644,14 +5651,17 @@ namespace TL
/// Offsets for pagination, for more info click here
/// Offsets for pagination, for more info click here
/// Maximum number of results to return, see pagination
- 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)
+ public static Task Channels_SearchPosts(this Client client, int offset_rate = default, InputPeer offset_peer = null, int offset_id = default, int limit = int.MaxValue, string hashtag = null, string query = null, long? allow_paid_stars = null)
=> client.Invoke(new Channels_SearchPosts
{
+ flags = (Channels_SearchPosts.Flags)((hashtag != null ? 0x1 : 0) | (query != null ? 0x2 : 0) | (allow_paid_stars != null ? 0x4 : 0)),
hashtag = hashtag,
+ query = query,
offset_rate = offset_rate,
offset_peer = offset_peer,
offset_id = offset_id,
limit = limit,
+ allow_paid_stars = allow_paid_stars ?? default,
});
/// Enable or disable paid messages » in this supergroup or monoforum. See [bots: ✓]
@@ -5682,6 +5692,14 @@ namespace TL
id = id,
});
+ /// See
+ public static Task Channels_CheckSearchPostsFlood(this Client client, string query = null)
+ => client.Invoke(new Channels_CheckSearchPostsFlood
+ {
+ flags = (Channels_CheckSearchPostsFlood.Flags)(query != null ? 0x1 : 0),
+ query = query,
+ });
+
/// Sends a custom request; for bots only See [bots: ✓] Possible codes: 400,403 (details)
/// The method name
/// JSON-serialized method parameters
@@ -5976,7 +5994,11 @@ namespace TL
duration_months = duration_months ?? default,
});
- /// See [bots: ✓] Possible codes: 400 (details)
+ /// Verify a user or chat on behalf of an organization ». See [bots: ✓] Possible codes: 400 (details)
+ /// If set, adds the verification; otherwise removes verification.
+ /// Must not be set if invoked by a bot, must be set to the ID of an owned bot if invoked by a user.
+ /// The peer to verify
+ /// Custom description for the verification, the UTF-8 length limit for this field is contained in bot_verification_description_length_limit ».
If not set, Was verified by organization "organization_name" will be used as description.
public static Task Bots_SetCustomVerification(this Client client, InputPeer peer, InputUserBase bot = null, string custom_description = null, bool enabled = false)
=> client.Invoke(new Bots_SetCustomVerification
{
@@ -5986,7 +6008,8 @@ namespace TL
custom_description = custom_description,
});
- /// See Possible codes: 400 (details)
+ /// Obtain a list of similarly themed bots, selected based on similarities in their subscriber bases, see here » for more info. See Possible codes: 400 (details)
+ /// The method will return bots related to the passed bot.
public static Task Bots_GetBotRecommendations(this Client client, InputUserBase bot)
=> client.Invoke(new Bots_GetBotRecommendations
{
@@ -6480,11 +6503,11 @@ namespace TL
});
/// See [bots: ✓]
- public static Task Payments_UpdateStarGiftPrice(this Client client, InputSavedStarGift stargift, long resell_stars)
+ public static Task Payments_UpdateStarGiftPrice(this Client client, InputSavedStarGift stargift, StarsAmountBase resell_amount)
=> client.Invoke(new Payments_UpdateStarGiftPrice
{
stargift = stargift,
- resell_stars = resell_stars,
+ resell_amount = resell_amount,
});
/// See
@@ -7021,7 +7044,14 @@ namespace TL
file = file,
});
- /// See [bots: ✓]
+ /// Create and optionally join a new conference call. See [bots: ✓]
+ /// If set, mute our microphone when joining the call (can only be used if join is set).
+ /// If set, our video stream is disabled (can only be used if join is set).
+ /// If set, also join the call, otherwise just create the call link.
+ /// Unique client message ID required to prevent creation of duplicate group calls.
+ /// Public key (can only be used if join is set).
+ /// Initial blockchain block (can only be used if join is set).
+ /// Parameters from tgcalls (can only be used if join is set).
public static Task Phone_CreateConferenceCall(this Client client, int random_id, Int256? public_key = null, byte[] block = null, DataJSON params_ = null, bool muted = false, bool video_stopped = false, bool join = false)
=> client.Invoke(new Phone_CreateConferenceCall
{
@@ -7349,10 +7379,10 @@ namespace TL
/// Period after which the story is moved to archive (and to the profile if pinned is set), in seconds; must be one of 6 * 3600, 12 * 3600, 86400, or 2 * 86400 for Telegram Premium users, and 86400 otherwise.
/// If set, indicates that this story is a repost of story with ID fwd_from_story posted by the peer in fwd_from_id.
/// If set, indicates that this story is a repost of story with ID fwd_from_story posted by the peer in fwd_from_id.
- public static Task Stories_SendStory(this Client client, InputPeer peer, InputMedia media, InputPrivacyRule[] privacy_rules, long random_id, string caption = null, MessageEntity[] entities = null, int? period = null, MediaArea[] media_areas = null, InputPeer fwd_from_id = null, int? fwd_from_story = null, bool pinned = false, bool noforwards = false, bool fwd_modified = false)
+ public static Task Stories_SendStory(this Client client, InputPeer peer, InputMedia media, InputPrivacyRule[] privacy_rules, long random_id, string caption = null, MessageEntity[] entities = null, int? period = null, MediaArea[] media_areas = null, InputPeer fwd_from_id = null, int? fwd_from_story = null, int[] albums = null, bool pinned = false, bool noforwards = false, bool fwd_modified = false)
=> client.Invoke(new Stories_SendStory
{
- flags = (Stories_SendStory.Flags)((caption != null ? 0x1 : 0) | (entities != null ? 0x2 : 0) | (period != null ? 0x8 : 0) | (media_areas != null ? 0x20 : 0) | (fwd_from_id != null ? 0x40 : 0) | (fwd_from_story != null ? 0x40 : 0) | (pinned ? 0x4 : 0) | (noforwards ? 0x10 : 0) | (fwd_modified ? 0x80 : 0)),
+ flags = (Stories_SendStory.Flags)((caption != null ? 0x1 : 0) | (entities != null ? 0x2 : 0) | (period != null ? 0x8 : 0) | (media_areas != null ? 0x20 : 0) | (fwd_from_id != null ? 0x40 : 0) | (fwd_from_story != null ? 0x40 : 0) | (albums != null ? 0x100 : 0) | (pinned ? 0x4 : 0) | (noforwards ? 0x10 : 0) | (fwd_modified ? 0x80 : 0)),
peer = peer,
media = media,
media_areas = media_areas,
@@ -7363,6 +7393,7 @@ namespace TL
period = period ?? default,
fwd_from_id = fwd_from_id,
fwd_from_story = fwd_from_story ?? default,
+ albums = albums,
});
/// Edit an uploaded story See Possible codes: 400 (details)
@@ -7641,6 +7672,63 @@ namespace TL
limit = limit,
});
+ /// See
+ public static Task Stories_CreateAlbum(this Client client, InputPeer peer, string title, params int[] stories)
+ => client.Invoke(new Stories_CreateAlbum
+ {
+ peer = peer,
+ title = title,
+ stories = stories,
+ });
+
+ /// See
+ public static Task Stories_UpdateAlbum(this Client client, InputPeer peer, int album_id, string title = null, int[] delete_stories = null, int[] add_stories = null, int[] order = null)
+ => client.Invoke(new Stories_UpdateAlbum
+ {
+ flags = (Stories_UpdateAlbum.Flags)((title != null ? 0x1 : 0) | (delete_stories != null ? 0x2 : 0) | (add_stories != null ? 0x4 : 0) | (order != null ? 0x8 : 0)),
+ peer = peer,
+ album_id = album_id,
+ title = title,
+ delete_stories = delete_stories,
+ add_stories = add_stories,
+ order = order,
+ });
+
+ /// See
+ public static Task Stories_ReorderAlbums(this Client client, InputPeer peer, params int[] order)
+ => client.Invoke(new Stories_ReorderAlbums
+ {
+ peer = peer,
+ order = order,
+ });
+
+ /// See
+ public static Task Stories_DeleteAlbum(this Client client, InputPeer peer, int album_id)
+ => client.Invoke(new Stories_DeleteAlbum
+ {
+ peer = peer,
+ album_id = album_id,
+ });
+
+ /// See
+ /// a null value means stories.albumsNotModified
+ public static Task Stories_GetAlbums(this Client client, InputPeer peer, long hash = default)
+ => client.Invoke(new Stories_GetAlbums
+ {
+ peer = peer,
+ hash = hash,
+ });
+
+ /// See
+ public static Task Stories_GetAlbumStories(this Client client, InputPeer peer, int album_id, int offset = default, int limit = int.MaxValue)
+ => client.Invoke(new Stories_GetAlbumStories
+ {
+ peer = peer,
+ album_id = album_id,
+ offset = offset,
+ limit = limit,
+ });
+
/// Obtains info about the boosts that were applied to a certain channel or supergroup (admins only) See Possible codes: 400 (details)
/// Whether to return only info about boosts received from gift codes and giveaways created by the channel/supergroup »
/// The channel/supergroup
@@ -12454,14 +12542,24 @@ namespace TL.Methods
public bool restricted;
}
- [TLDef(0xD19F987B)]
+ [TLDef(0xF2C4F24D)]
public sealed partial class Channels_SearchPosts : IMethod
{
- public string hashtag;
+ public Flags flags;
+ [IfFlag(0)] public string hashtag;
+ [IfFlag(1)] public string query;
public int offset_rate;
public InputPeer offset_peer;
public int offset_id;
public int limit;
+ [IfFlag(2)] public long allow_paid_stars;
+
+ [Flags] public enum Flags : uint
+ {
+ has_hashtag = 0x1,
+ has_query = 0x2,
+ has_allow_paid_stars = 0x4,
+ }
}
[TLDef(0x4B12327B)]
@@ -12491,6 +12589,18 @@ namespace TL.Methods
public int id;
}
+ [TLDef(0x22567115)]
+ public sealed partial class Channels_CheckSearchPostsFlood : IMethod
+ {
+ public Flags flags;
+ [IfFlag(0)] public string query;
+
+ [Flags] public enum Flags : uint
+ {
+ has_query = 0x1,
+ }
+ }
+
[TLDef(0xAA2769ED)]
public sealed partial class Bots_SendCustomRequest : IMethod
{
@@ -13212,11 +13322,11 @@ namespace TL.Methods
}
}
- [TLDef(0x3BAEA4E1)]
+ [TLDef(0xEDBE6CCB)]
public sealed partial class Payments_UpdateStarGiftPrice : IMethod
{
public InputSavedStarGift stargift;
- public long resell_stars;
+ public StarsAmountBase resell_amount;
}
[TLDef(0x1F4A0E87)]
@@ -13948,7 +14058,7 @@ namespace TL.Methods
public InputPeer peer;
}
- [TLDef(0xE4E6694B)]
+ [TLDef(0x737FC2EC)]
public sealed partial class Stories_SendStory : IMethod
{
public Flags flags;
@@ -13962,6 +14072,7 @@ namespace TL.Methods
[IfFlag(3)] public int period;
[IfFlag(6)] public InputPeer fwd_from_id;
[IfFlag(6)] public int fwd_from_story;
+ [IfFlag(8)] public int[] albums;
[Flags] public enum Flags : uint
{
@@ -13973,6 +14084,7 @@ namespace TL.Methods
has_media_areas = 0x20,
has_fwd_from_id = 0x40,
fwd_modified = 0x80,
+ has_albums = 0x100,
}
}
@@ -14205,6 +14317,64 @@ namespace TL.Methods
}
}
+ [TLDef(0xA36396E5)]
+ public sealed partial class Stories_CreateAlbum : IMethod
+ {
+ public InputPeer peer;
+ public string title;
+ public int[] stories;
+ }
+
+ [TLDef(0x5E5259B6)]
+ public sealed partial class Stories_UpdateAlbum : IMethod
+ {
+ public Flags flags;
+ public InputPeer peer;
+ public int album_id;
+ [IfFlag(0)] public string title;
+ [IfFlag(1)] public int[] delete_stories;
+ [IfFlag(2)] public int[] add_stories;
+ [IfFlag(3)] public int[] order;
+
+ [Flags] public enum Flags : uint
+ {
+ has_title = 0x1,
+ has_delete_stories = 0x2,
+ has_add_stories = 0x4,
+ has_order = 0x8,
+ }
+ }
+
+ [TLDef(0x8535FBD9)]
+ public sealed partial class Stories_ReorderAlbums : IMethod
+ {
+ public InputPeer peer;
+ public int[] order;
+ }
+
+ [TLDef(0x8D3456D0)]
+ public sealed partial class Stories_DeleteAlbum : IMethod
+ {
+ public InputPeer peer;
+ public int album_id;
+ }
+
+ [TLDef(0x25B3EAC7)]
+ public sealed partial class Stories_GetAlbums : IMethod
+ {
+ public InputPeer peer;
+ public long hash;
+ }
+
+ [TLDef(0xAC806D61)]
+ public sealed partial class Stories_GetAlbumStories : IMethod
+ {
+ public InputPeer peer;
+ public int album_id;
+ public int offset;
+ public int limit;
+ }
+
[TLDef(0x60F67660)]
public sealed partial class Premium_GetBoostsList : IMethod
{
diff --git a/src/TL.Table.cs b/src/TL.Table.cs
index 6745b43..3479f87 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 = 210; // fetched 25/07/2025 14:54:33
+ public const int Version = 211; // fetched 31/07/2025 22:39:04
internal const int SecretChats = 144;
internal const int MTProto2 = 73;
internal const uint VectorCtor = 0x1CB5C415;
@@ -216,7 +216,7 @@ namespace TL
[0x45D5B021] = typeof(MessageActionGiftStars),
[0xB00C47A2] = typeof(MessageActionPrizeStars),
[0x4717E8A4] = typeof(MessageActionStarGift),
- [0x2E3AE60E] = typeof(MessageActionStarGiftUnique),
+ [0x34F762F3] = typeof(MessageActionStarGiftUnique),
[0xAC1F1FCD] = typeof(MessageActionPaidMessagesRefunded),
[0x84B88578] = typeof(MessageActionPaidMessagesPrice),
[0x2FFE2F7A] = typeof(MessageActionConferenceCall),
@@ -254,7 +254,7 @@ namespace TL
[0xF47741F7] = typeof(PeerSettings),
[0xA437C3ED] = typeof(WallPaper),
[0xE0804116] = typeof(WallPaperNoFile),
- [0x29DE80BE] = typeof(UserFull),
+ [0x7E63CE1F] = typeof(UserFull),
[0x145ADE0B] = typeof(Contact),
[0xC13E3C50] = typeof(ImportedContact),
[0x16D9703B] = typeof(ContactStatus),
@@ -267,7 +267,7 @@ namespace TL
[0x71E094F3] = typeof(Messages_DialogsSlice),
[0xF0E3E596] = typeof(Messages_DialogsNotModified),
[0x8C718E87] = typeof(Messages_Messages),
- [0x3A54685E] = typeof(Messages_MessagesSlice),
+ [0x762B263D] = typeof(Messages_MessagesSlice),
[0xC776BA4E] = typeof(Messages_ChannelMessages),
[0x74535F21] = typeof(Messages_MessagesNotModified),
[0x64FF9FD5] = typeof(Messages_Chats),
@@ -1008,6 +1008,7 @@ namespace TL
[0x2E94C3E7] = typeof(WebPageAttributeStory),
[0x50CC03D3] = typeof(WebPageAttributeStickerSet),
[0xCF6F6DB8] = typeof(WebPageAttributeUniqueStarGift),
+ [0x31CAD303] = typeof(WebPageAttributeStarGiftCollection),
[0x4899484E] = typeof(Messages_VotesList),
[0xF568028A] = typeof(BankCardOpenUrl),
[0x3E24E573] = typeof(Payments_BankCardData),
@@ -1128,7 +1129,7 @@ namespace TL
[0x4A5F5BD9] = typeof(InputInvoiceStarGiftTransfer),
[0xDABAB2EF] = typeof(InputInvoicePremiumGiftStars),
[0xF4997E42] = typeof(InputInvoiceBusinessBotTransferStars),
- [0x63CBC38C] = typeof(InputInvoiceStarGiftResale),
+ [0xC39F5324] = typeof(InputInvoiceStarGiftResale),
[0xAED0CBD9] = typeof(Payments_ExportedInvoice),
[0xCFB9D957] = typeof(Messages_TranscribedAudio),
[0x5334759C] = typeof(Help_PremiumPromo),
@@ -1213,7 +1214,7 @@ namespace TL
[0x8D595CD6] = typeof(StoryViews),
[0x51E6EE4F] = typeof(StoryItemDeleted),
[0xFFADC913] = typeof(StoryItemSkipped),
- [0x79B26A24] = typeof(StoryItem),
+ [0xEDF164F1] = typeof(StoryItem),
[0x1158FE3E] = typeof(Stories_AllStoriesNotModified),
[0x6EFC5E81] = typeof(Stories_AllStories),
[0x63C3DD0A] = typeof(Stories_Stories),
@@ -1362,7 +1363,7 @@ namespace TL
[0x94CE852A] = typeof(StarsGiveawayOption),
[0x54236209] = typeof(StarsGiveawayWinnersOption),
[0x00BCFF5B] = typeof(StarGift),
- [0xF63778AE] = typeof(StarGiftUnique),
+ [0x3A274D50] = typeof(StarGiftUnique),
[0xA388A368] = null,//Payments_StarGiftsNotModified
[0x2ED82995] = typeof(Payments_StarGifts),
[0x7903E3D9] = typeof(MessageReportOption),
@@ -1424,6 +1425,10 @@ namespace TL
[0x9D6B13B0] = typeof(StarGiftCollection),
[0xA0BA4F17] = null,//Payments_StarGiftCollectionsNotModified
[0x8A2932F3] = typeof(Payments_StarGiftCollections),
+ [0x9325705A] = typeof(StoryAlbum),
+ [0x564EDAEB] = null,//Stories_AlbumsNotModified
+ [0xC3987A3A] = typeof(Stories_Albums),
+ [0x3E0B5B6A] = typeof(SearchPostsFlood),
// from TL.Secret:
[0x6ABD9782] = typeof(Layer143.DecryptedMessageMediaDocument),
[0x020DF5D0] = typeof(Layer101.MessageEntityBlockquote),
@@ -1558,6 +1563,7 @@ namespace TL
[typeof(RequirementToContact)] = 0x050A9839, //requirementToContactEmpty
[typeof(Contacts_SponsoredPeers)] = 0xEA32B4B1, //contacts.sponsoredPeersEmpty
[typeof(Payments_StarGiftCollections)] = 0xA0BA4F17, //payments.starGiftCollectionsNotModified
+ [typeof(Stories_Albums)] = 0x564EDAEB, //stories.albumsNotModified
[typeof(DecryptedMessageMedia)] = 0x089F5C4A, //decryptedMessageMediaEmpty
};
}
diff --git a/src/WTelegramClient.csproj b/src/WTelegramClient.csproj
index d786b10..ed47ea1 100644
--- a/src/WTelegramClient.csproj
+++ b/src/WTelegramClient.csproj
@@ -13,8 +13,8 @@
WTelegramClient
Wizou
0.0.0
- layer.210
- Telegram Client API (MTProto) library written 100% in C# and .NET Standard | Latest API layer: 210
+ layer.211
+ Telegram Client API (MTProto) library written 100% in C# and .NET Standard | Latest API layer: 211
Release Notes:
$(ReleaseNotes.Replace("|", "%0D%0A").Replace(" - ","%0D%0A- ").Replace(" ", "%0D%0A%0D%0A"))