diff --git a/src/TL.Schema.cs b/src/TL.Schema.cs index d192858..167d6ce 100644 --- a/src/TL.Schema.cs +++ b/src/TL.Schema.cs @@ -51,7 +51,7 @@ namespace TL } /// Defines a user for further interaction. See [TLDef(0xDDE8A54C)] - public class InputPeerUser : InputPeer + public partial class InputPeerUser : InputPeer { /// User identifier public long user_id; @@ -60,7 +60,7 @@ namespace TL } /// Defines a channel for further interaction. See [TLDef(0x27BCBBFC)] - public class InputPeerChannel : InputPeer + public partial class InputPeerChannel : InputPeer { /// Channel identifier public long channel_id; @@ -897,6 +897,7 @@ namespace TL call_active = 0x800000, /// Whether there's anyone in the group call call_not_empty = 0x1000000, + noforwards = 0x2000000, } /// ID of the group @@ -993,6 +994,7 @@ namespace TL fake = 0x2000000, /// Whether this supergroup is a gigagroup gigagroup = 0x4000000, + noforwards = 0x8000000, } /// ID of the channel @@ -1116,7 +1118,7 @@ namespace TL public override int Folder => folder_id; } /// Full info about a channel/supergroup See - [TLDef(0x59CFF963)] + [TLDef(0x56662E2E)] public class ChannelFull : ChatFullBase { /// Flags, see TL conditional fields @@ -1185,6 +1187,7 @@ namespace TL [IfFlag(27)] public string theme_emoticon; [IfFlag(28)] public int requests_pending; [IfFlag(28)] public long[] recent_requesters; + [IfFlag(29)] public Peer default_send_as; [Flags] public enum Flags { @@ -1246,6 +1249,8 @@ namespace TL has_theme_emoticon = 0x8000000, /// Field has a value has_requests_pending = 0x10000000, + /// Field has a value + has_default_send_as = 0x20000000, } /// ID of the channel @@ -1493,6 +1498,7 @@ namespace TL pinned = 0x1000000, /// Field has a value has_ttl_period = 0x2000000, + noforwards = 0x4000000, } /// ID of the message @@ -2249,11 +2255,12 @@ namespace TL /// Oject contains info on user authorization. Derived classes: , See public abstract class Auth_AuthorizationBase : IObject { } /// Contains user authorization info. See - [TLDef(0xCD050916)] + [TLDef(0x33FB7BB8)] public class Auth_Authorization : Auth_AuthorizationBase { /// Flags, see TL conditional fields public Flags flags; + [IfFlag(1)] public int otherwise_relogin_days; /// Temporary passport sessions [IfFlag(0)] public int tmp_sessions; /// Info on authorized user @@ -2263,6 +2270,7 @@ namespace TL { /// Field has a value has_tmp_sessions = 0x1, + setup_password_required = 0x2, } } /// An account with this phone number doesn't exist on telegram: the user has to enter basic information and sign up See @@ -2367,13 +2375,15 @@ namespace TL } /// Peer settings See - [TLDef(0x733F2961)] + [TLDef(0xA518110D)] public class PeerSettings : IObject { /// Flags, see TL conditional fields public Flags flags; /// Distance in meters between us and this peer [IfFlag(6)] public int geo_distance; + [IfFlag(9)] public string request_chat_title; + [IfFlag(9)] public DateTime request_chat_date; [Flags] public enum Flags { @@ -2395,6 +2405,9 @@ namespace TL autoarchived = 0x80, /// Whether we can invite members to a group or channel invite_members = 0x100, + /// Field has a value + has_request_chat_title = 0x200, + request_chat_broadcast = 0x400, } } @@ -2491,13 +2504,12 @@ namespace TL } /// Extended user info See - [TLDef(0xD697FF05)] + [TLDef(0xCF366521)] public class UserFull : IObject { /// Flags, see TL conditional fields public Flags flags; - /// Remaining user info - public UserBase user; + public long id; /// Bio of the user [IfFlag(1)] public string about; /// Peer settings @@ -2518,6 +2530,7 @@ namespace TL [IfFlag(14)] public int ttl_period; /// Emoji associated with chat theme [IfFlag(15)] public string theme_emoticon; + [IfFlag(16)] public string private_forward_name; [Flags] public enum Flags { @@ -2547,6 +2560,8 @@ namespace TL has_ttl_period = 0x4000, /// Field has a value has_theme_emoticon = 0x8000, + /// Field has a value + has_private_forward_name = 0x10000, } } @@ -5020,7 +5035,7 @@ namespace TL public class SendMessageChooseStickerAction : SendMessageAction { } /// User has clicked on an animated emoji triggering a reaction, click here for more info ». See [TLDef(0x25972BCB)] - public class SendMessageEmojiInteraction : SendMessageAction + public partial class SendMessageEmojiInteraction : SendMessageAction { /// Emoji public string emoticon; @@ -5031,7 +5046,7 @@ namespace TL } /// User is watching an animated emoji reaction triggered by another user, click here for more info ». See [TLDef(0xB665902E)] - public class SendMessageEmojiInteractionSeen : SendMessageAction + public partial class SendMessageEmojiInteractionSeen : SendMessageAction { /// Emoji public string emoticon; @@ -5498,13 +5513,16 @@ namespace TL official_app = 0x2, /// Whether the session is still waiting for a 2FA password password_pending = 0x4, + encrypted_requests_disabled = 0x8, + call_requests_disabled = 0x10, } } /// Logged-in sessions See - [TLDef(0x1250ABDE)] + [TLDef(0x4BFF8EA0)] public class Account_Authorizations : IObject { + public int authorization_ttl_days; /// Logged-in sessions public Authorization[] authorizations; } @@ -5794,6 +5812,7 @@ namespace TL } /// Stickerset and stickers inside it See + /// a null value means messages.stickerSetNotModified [TLDef(0xB60A24A6)] public class Messages_StickerSet : IObject { @@ -5975,6 +5994,21 @@ namespace TL has_quiz = 0x1, } } + /// See + [TLDef(0xE988037B)] + public class InputKeyboardButtonUserProfile : KeyboardButtonBase + { + public string text; + public InputUserBase user_id; + + public override string Text => text; + } + /// See + [TLDef(0x308660C1, inheritBefore = true)] + public class KeyboardButtonUserProfile : KeyboardButton + { + public long user_id; + } /// Inline keyboard row See [TLDef(0x77608B83)] @@ -6291,7 +6325,7 @@ namespace TL } /// Channel participant Derived classes: , , , , , See - public abstract class ChannelParticipantBase : IObject { } + public abstract partial class ChannelParticipantBase : IObject { } /// Channel/supergroup participant See [TLDef(0xC00C07C0)] public class ChannelParticipant : ChannelParticipantBase @@ -6315,12 +6349,12 @@ namespace TL [Flags] public enum Flags { - via_invite = 0x1, + via_request = 0x1, } } /// Channel/supergroup creator See [TLDef(0x2FE601D3)] - public class ChannelParticipantCreator : ChannelParticipantBase + public partial class ChannelParticipantCreator : ChannelParticipantBase { /// Flags, see TL conditional fields public Flags flags; @@ -6339,7 +6373,7 @@ namespace TL } /// Admin See [TLDef(0x34C3BB53)] - public class ChannelParticipantAdmin : ChannelParticipantBase + public partial class ChannelParticipantAdmin : ChannelParticipantBase { /// Flags, see TL conditional fields public Flags flags; @@ -7134,6 +7168,8 @@ namespace TL Call = 0x741CD3E3, ///Type of verification code that will be sent next if you call the resendCode method: SMS code FlashCall = 0x226CCEFB, + ///See + MissedCall = 0xD61AD6EE, } /// Type of the verification code that was sent Derived classes: , , , See @@ -7166,6 +7202,12 @@ namespace TL /// pattern to match public string pattern; } + /// See + [TLDef(0x82006484)] + public class Auth_SentCodeTypeMissedCall : Auth_SentCodeTypeCall + { + public string prefix; + } /// Callback answer sent by the bot in response to a button press See [TLDef(0x36585EA4)] @@ -9203,6 +9245,18 @@ namespace TL public ExportedChatInvite invite; public long approved_by; } + /// See + [TLDef(0xCB2AC766)] + public class ChannelAdminLogEventActionToggleNoForwards : ChannelAdminLogEventAction + { + public bool new_value; + } + /// See + [TLDef(0x278F2868)] + public class ChannelAdminLogEventActionSendMessage : ChannelAdminLogEventAction + { + public MessageBase message; + } /// Admin log event See [TLDef(0x1FAD68CD)] @@ -9273,6 +9327,7 @@ namespace TL group_call = 0x4000, /// Invite events invites = 0x8000, + send = 0x10000, } } @@ -10522,11 +10577,12 @@ namespace TL } /// Settings used by telegram servers for sending the confirm code. See - [TLDef(0xDEBEBE83)] + [TLDef(0x8A6469C2)] public class CodeSettings : IObject { /// Flags, see TL conditional fields public Flags flags; + [IfFlag(6)] public byte[][] logout_tokens; [Flags] public enum Flags { @@ -10536,6 +10592,9 @@ namespace TL current_number = 0x2, /// If a token that will be included in eventually sent SMSs is required: required in newer versions of android, to use the android SMS receiver APIs allow_app_hash = 0x10, + allow_missed_call = 0x20, + /// Field has a value + has_logout_tokens = 0x40, } } @@ -12230,6 +12289,53 @@ namespace TL public SearchResultsPosition[] positions; } + /// See + [TLDef(0x8356CDA9)] + public class Channels_SendAsPeers : IObject, IPeerResolver + { + public Peer[] peers; + public Dictionary chats; + public Dictionary users; + /// returns a or for the given Peer + public IPeerInfo UserOrChat(Peer peer) => peer.UserOrChat(users, chats); + } + + /// See + [TLDef(0x3B6D152E)] + public class Users_UserFull : IObject, IPeerResolver + { + public UserFull full_user; + public Dictionary chats; + public Dictionary users; + /// returns a or for the given Peer + public IPeerInfo UserOrChat(Peer peer) => peer.UserOrChat(users, chats); + } + + /// See + [TLDef(0x6880B94D)] + public class Messages_PeerSettings : IObject, IPeerResolver + { + public PeerSettings settings; + public Dictionary chats; + public Dictionary users; + /// returns a or for the given Peer + public IPeerInfo UserOrChat(Peer peer) => peer.UserOrChat(users, chats); + } + + /// See + [TLDef(0xC3A2835F)] + public class Auth_LoggedOut : IObject + { + public Flags flags; + [IfFlag(0)] public byte[] future_auth_token; + + [Flags] public enum Flags + { + /// Field has a value + has_future_auth_token = 0x1, + } + } + // ---functions--- public static class SchemaExtensions @@ -12350,7 +12456,7 @@ namespace TL phone_code = phone_code, }); /// Logs out the user. See [bots: ✓] - public static Task Auth_LogOut(this Client client) + public static Task Auth_LogOut(this Client client) => client.CallAsync(new Auth_LogOut { }); @@ -13076,6 +13182,21 @@ namespace TL { hash = hash, }); + /// See + public static Task Account_SetAuthorizationTTL(this Client client, int authorization_ttl_days) + => client.CallAsync(new Account_SetAuthorizationTTL + { + authorization_ttl_days = authorization_ttl_days, + }); + /// See + public static Task Account_ChangeAuthorizationSettings(this Client client, long hash, bool? encrypted_requests_disabled = default, bool? call_requests_disabled = default) + => client.CallAsync(new Account_ChangeAuthorizationSettings + { + flags = (Account_ChangeAuthorizationSettings.Flags)((encrypted_requests_disabled != default ? 0x1 : 0) | (call_requests_disabled != default ? 0x2 : 0)), + hash = hash, + encrypted_requests_disabled = encrypted_requests_disabled.GetValueOrDefault(), + call_requests_disabled = call_requests_disabled.GetValueOrDefault(), + }); /// Returns basic user info according to their identifiers. See [bots: ✓] Possible codes: 400,401 (details) /// List of user identifiers public static Task Users_GetUsers(this Client client, InputUserBase[] id) @@ -13085,7 +13206,7 @@ namespace TL }); /// Returns extended user info by ID. See [bots: ✓] Possible codes: 400 (details) /// User ID - public static Task Users_GetFullUser(this Client client, InputUserBase id) + public static Task Users_GetFullUser(this Client client, InputUserBase id) => client.CallAsync(new Users_GetFullUser { id = id, @@ -13412,10 +13533,10 @@ namespace TL /// Reply markup for sending bot buttons /// Message entities for sending styled text /// Scheduled message date for scheduled messages - public static Task Messages_SendMessage(this Client client, InputPeer peer, string message, long random_id, bool no_webpage = false, bool silent = false, bool background = false, bool clear_draft = false, int? reply_to_msg_id = null, ReplyMarkup reply_markup = null, MessageEntity[] entities = null, DateTime? schedule_date = null) + public static Task Messages_SendMessage(this Client client, InputPeer peer, string message, long random_id, bool no_webpage = false, bool silent = false, bool background = false, bool clear_draft = false, int? reply_to_msg_id = null, ReplyMarkup reply_markup = null, MessageEntity[] entities = null, DateTime? schedule_date = null, InputPeer send_as = null) => client.CallAsync(new Messages_SendMessage { - flags = (Messages_SendMessage.Flags)((no_webpage ? 0x2 : 0) | (silent ? 0x20 : 0) | (background ? 0x40 : 0) | (clear_draft ? 0x80 : 0) | (reply_to_msg_id != null ? 0x1 : 0) | (reply_markup != null ? 0x4 : 0) | (entities != null ? 0x8 : 0) | (schedule_date != null ? 0x400 : 0)), + flags = (Messages_SendMessage.Flags)((no_webpage ? 0x2 : 0) | (silent ? 0x20 : 0) | (background ? 0x40 : 0) | (clear_draft ? 0x80 : 0) | (reply_to_msg_id != null ? 0x1 : 0) | (reply_markup != null ? 0x4 : 0) | (entities != null ? 0x8 : 0) | (schedule_date != null ? 0x400 : 0) | (send_as != null ? 0x2000 : 0)), peer = peer, reply_to_msg_id = reply_to_msg_id.GetValueOrDefault(), message = message, @@ -13423,6 +13544,7 @@ namespace TL reply_markup = reply_markup, entities = entities, schedule_date = schedule_date.GetValueOrDefault(), + send_as = send_as, }); /// Send a media See [bots: ✓] Possible codes: 400,403,420 (details) /// Send message silently (no notification should be triggered) @@ -13436,10 +13558,10 @@ namespace TL /// Reply markup for bot keyboards /// Message entities for styled text /// Scheduled message date for scheduled messages - public static Task Messages_SendMedia(this Client client, InputPeer peer, InputMedia media, string message, long random_id, bool silent = false, bool background = false, bool clear_draft = false, int? reply_to_msg_id = null, ReplyMarkup reply_markup = null, MessageEntity[] entities = null, DateTime? schedule_date = null) + public static Task Messages_SendMedia(this Client client, InputPeer peer, InputMedia media, string message, long random_id, bool silent = false, bool background = false, bool clear_draft = false, int? reply_to_msg_id = null, ReplyMarkup reply_markup = null, MessageEntity[] entities = null, DateTime? schedule_date = null, InputPeer send_as = null) => client.CallAsync(new Messages_SendMedia { - flags = (Messages_SendMedia.Flags)((silent ? 0x20 : 0) | (background ? 0x40 : 0) | (clear_draft ? 0x80 : 0) | (reply_to_msg_id != null ? 0x1 : 0) | (reply_markup != null ? 0x4 : 0) | (entities != null ? 0x8 : 0) | (schedule_date != null ? 0x400 : 0)), + flags = (Messages_SendMedia.Flags)((silent ? 0x20 : 0) | (background ? 0x40 : 0) | (clear_draft ? 0x80 : 0) | (reply_to_msg_id != null ? 0x1 : 0) | (reply_markup != null ? 0x4 : 0) | (entities != null ? 0x8 : 0) | (schedule_date != null ? 0x400 : 0) | (send_as != null ? 0x2000 : 0)), peer = peer, reply_to_msg_id = reply_to_msg_id.GetValueOrDefault(), media = media, @@ -13448,6 +13570,7 @@ namespace TL reply_markup = reply_markup, entities = entities, schedule_date = schedule_date.GetValueOrDefault(), + send_as = send_as, }); /// Forwards messages by their IDs. See [bots: ✓] Possible codes: 400,403,420 (details) /// Whether to send messages silently (no notification will be triggered on the destination clients) @@ -13460,15 +13583,16 @@ namespace TL /// Random ID to prevent resending of messages /// Destination peer /// Scheduled message date for scheduled messages - public static Task Messages_ForwardMessages(this Client client, InputPeer from_peer, int[] id, long[] random_id, InputPeer to_peer, bool silent = false, bool background = false, bool with_my_score = false, bool drop_author = false, bool drop_media_captions = false, DateTime? schedule_date = null) + public static Task Messages_ForwardMessages(this Client client, InputPeer from_peer, int[] id, long[] random_id, InputPeer to_peer, bool silent = false, bool background = false, bool with_my_score = false, bool drop_author = false, bool drop_media_captions = false, DateTime? schedule_date = null, InputPeer send_as = null) => client.CallAsync(new Messages_ForwardMessages { - flags = (Messages_ForwardMessages.Flags)((silent ? 0x20 : 0) | (background ? 0x40 : 0) | (with_my_score ? 0x100 : 0) | (drop_author ? 0x800 : 0) | (drop_media_captions ? 0x1000 : 0) | (schedule_date != null ? 0x400 : 0)), + flags = (Messages_ForwardMessages.Flags)((silent ? 0x20 : 0) | (background ? 0x40 : 0) | (with_my_score ? 0x100 : 0) | (drop_author ? 0x800 : 0) | (drop_media_captions ? 0x1000 : 0) | (schedule_date != null ? 0x400 : 0) | (send_as != null ? 0x2000 : 0)), from_peer = from_peer, id = id, random_id = random_id, to_peer = to_peer, schedule_date = schedule_date.GetValueOrDefault(), + send_as = send_as, }); /// Report a new incoming chat for spam, if the of the chat allow us to do that See Possible codes: 400 (details) /// Peer to report @@ -13479,7 +13603,7 @@ namespace TL }); /// Get peer settings See Possible codes: 400 (details) /// The peer - public static Task Messages_GetPeerSettings(this Client client, InputPeer peer) + public static Task Messages_GetPeerSettings(this Client client, InputPeer peer) => client.CallAsync(new Messages_GetPeerSettings { peer = peer, @@ -13737,10 +13861,12 @@ namespace TL }); /// Get info about a stickerset See [bots: ✓] Possible codes: 400 (details) /// Stickerset - public static Task Messages_GetStickerSet(this Client client, InputStickerSet stickerset) + /// a null value means messages.stickerSetNotModified + public static Task Messages_GetStickerSet(this Client client, InputStickerSet stickerset, int hash) => client.CallAsync(new Messages_GetStickerSet { stickerset = stickerset, + hash = hash, }); /// Install a stickerset See Possible codes: 400 (details) /// Stickerset to install @@ -13906,16 +14032,17 @@ namespace TL /// Query ID from messages.getInlineBotResults /// Result ID from messages.getInlineBotResults /// Scheduled message date for scheduled messages - public static Task Messages_SendInlineBotResult(this Client client, InputPeer peer, long random_id, long query_id, string id, bool silent = false, bool background = false, bool clear_draft = false, bool hide_via = false, int? reply_to_msg_id = null, DateTime? schedule_date = null) + public static Task Messages_SendInlineBotResult(this Client client, InputPeer peer, long random_id, long query_id, string id, bool silent = false, bool background = false, bool clear_draft = false, bool hide_via = false, int? reply_to_msg_id = null, DateTime? schedule_date = null, InputPeer send_as = null) => client.CallAsync(new Messages_SendInlineBotResult { - flags = (Messages_SendInlineBotResult.Flags)((silent ? 0x20 : 0) | (background ? 0x40 : 0) | (clear_draft ? 0x80 : 0) | (hide_via ? 0x800 : 0) | (reply_to_msg_id != null ? 0x1 : 0) | (schedule_date != null ? 0x400 : 0)), + flags = (Messages_SendInlineBotResult.Flags)((silent ? 0x20 : 0) | (background ? 0x40 : 0) | (clear_draft ? 0x80 : 0) | (hide_via ? 0x800 : 0) | (reply_to_msg_id != null ? 0x1 : 0) | (schedule_date != null ? 0x400 : 0) | (send_as != null ? 0x2000 : 0)), peer = peer, reply_to_msg_id = reply_to_msg_id.GetValueOrDefault(), random_id = random_id, query_id = query_id, id = id, schedule_date = schedule_date.GetValueOrDefault(), + send_as = send_as, }); /// Find out if a media message's caption can be edited See Possible codes: 400,403 (details) /// Peer where the media was sent @@ -14297,14 +14424,15 @@ namespace TL /// The message to reply to /// The medias to send /// Scheduled message date for scheduled messages - public static Task Messages_SendMultiMedia(this Client client, InputPeer peer, InputSingleMedia[] multi_media, bool silent = false, bool background = false, bool clear_draft = false, int? reply_to_msg_id = null, DateTime? schedule_date = null) + public static Task Messages_SendMultiMedia(this Client client, InputPeer peer, InputSingleMedia[] multi_media, bool silent = false, bool background = false, bool clear_draft = false, int? reply_to_msg_id = null, DateTime? schedule_date = null, InputPeer send_as = null) => client.CallAsync(new Messages_SendMultiMedia { - flags = (Messages_SendMultiMedia.Flags)((silent ? 0x20 : 0) | (background ? 0x40 : 0) | (clear_draft ? 0x80 : 0) | (reply_to_msg_id != null ? 0x1 : 0) | (schedule_date != null ? 0x400 : 0)), + flags = (Messages_SendMultiMedia.Flags)((silent ? 0x20 : 0) | (background ? 0x40 : 0) | (clear_draft ? 0x80 : 0) | (reply_to_msg_id != null ? 0x1 : 0) | (schedule_date != null ? 0x400 : 0) | (send_as != null ? 0x2000 : 0)), peer = peer, reply_to_msg_id = reply_to_msg_id.GetValueOrDefault(), multi_media = multi_media, schedule_date = schedule_date.GetValueOrDefault(), + send_as = send_as, }); /// Upload encrypted file and associate it to a secret chat See /// The secret chat to associate the file to @@ -14836,6 +14964,28 @@ namespace TL peer = peer, user_id = user_id, }); + /// See + public static Task Messages_HideAllChatJoinRequests(this Client client, InputPeer peer, bool approved = false, string link = null) + => client.CallAsync(new Messages_HideAllChatJoinRequests + { + flags = (Messages_HideAllChatJoinRequests.Flags)((approved ? 0x1 : 0) | (link != null ? 0x2 : 0)), + peer = peer, + link = link, + }); + /// See + public static Task Messages_ToggleNoForwards(this Client client, InputPeer peer, bool enabled) + => client.CallAsync(new Messages_ToggleNoForwards + { + peer = peer, + enabled = enabled, + }); + /// See + public static Task Messages_SaveDefaultSendAs(this Client client, InputPeer peer, InputPeer send_as) + => client.CallAsync(new Messages_SaveDefaultSendAs + { + peer = peer, + send_as = send_as, + }); /// Returns a current state of updates. See [bots: ✓] public static Task Updates_GetState(this Client client) => client.CallAsync(new Updates_GetState @@ -15166,24 +15316,15 @@ namespace TL channel = channel, id = id, }); - /// Delete all messages sent by a certain user in a supergroup See Possible codes: 400,403 (details) - /// Supergroup - /// User whose messages should be deleted - public static Task Channels_DeleteUserHistory(this Client client, InputChannelBase channel, InputUserBase user_id) - => client.CallAsync(new Channels_DeleteUserHistory - { - channel = channel, - user_id = user_id, - }); /// Reports some messages from a user in a supergroup as spam; requires administrator rights in the supergroup See Possible codes: 400 (details) /// Supergroup - /// ID of the user that sent the spam messages + /// user that sent the spam messages /// IDs of spam messages - public static Task Channels_ReportSpam(this Client client, InputChannelBase channel, InputUserBase user_id, int[] id) + public static Task Channels_ReportSpam(this Client client, InputChannelBase channel, InputPeer participant, int[] id) => client.CallAsync(new Channels_ReportSpam { channel = channel, - user_id = user_id, + participant = participant, id = id, }); /// Get channel/supergroup messages See [bots: ✓] Possible codes: 400 (details) @@ -15483,7 +15624,8 @@ namespace TL => client.CallAsync(new Channels_GetInactiveChannels { }); - /// See + /// Convert a supergroup to a gigagroup, when requested by channel suggestions. See Possible codes: 400 (details) + /// The supergroup to convert public static Task Channels_ConvertToGigagroup(this Client client, InputChannelBase channel) => client.CallAsync(new Channels_ConvertToGigagroup { @@ -15505,6 +15647,19 @@ namespace TL { channel = channel, }); + /// See + public static Task Channels_GetSendAs(this Client client, InputPeer peer) + => client.CallAsync(new Channels_GetSendAs + { + peer = peer, + }); + /// See + public static Task Channels_DeleteParticipantHistory(this Client client, InputChannelBase channel, InputPeer participant) + => client.CallAsync(new Channels_DeleteParticipantHistory + { + channel = channel, + participant = participant, + }); /// Sends a custom request; for bots only See [bots: ✓] Possible codes: 400 (details) /// The method name /// JSON-serialized method parameters @@ -15635,6 +15790,7 @@ namespace TL /// Thumbnail /// Stickers /// Used when importing stickers using the sticker import SDKs, specifies the name of the software that created the stickers + /// a null value means messages.stickerSetNotModified public static Task Stickers_CreateStickerSet(this Client client, InputUserBase user_id, string title, string short_name, InputStickerSetItem[] stickers, bool masks = false, bool animated = false, InputDocument thumb = null, string software = null) => client.CallAsync(new Stickers_CreateStickerSet { @@ -15648,6 +15804,7 @@ namespace TL }); /// Remove a sticker from the set where it belongs, bots only. The sticker set must have been created by the bot. See [bots: ✓] Possible codes: 400 (details) /// The sticker to remove + /// a null value means messages.stickerSetNotModified public static Task Stickers_RemoveStickerFromSet(this Client client, InputDocument sticker) => client.CallAsync(new Stickers_RemoveStickerFromSet { @@ -15656,6 +15813,7 @@ namespace TL /// Changes the absolute position of a sticker in the set to which it belongs; for bots only. The sticker set must have been created by the bot See [bots: ✓] Possible codes: 400 (details) /// The sticker /// The new position of the sticker, zero-based + /// a null value means messages.stickerSetNotModified public static Task Stickers_ChangeStickerPosition(this Client client, InputDocument sticker, int position) => client.CallAsync(new Stickers_ChangeStickerPosition { @@ -15665,6 +15823,7 @@ namespace TL /// Add a sticker to a stickerset, bots only. The sticker set must have been created by the bot. See [bots: ✓] Possible codes: 400 (details) /// The stickerset /// The sticker + /// a null value means messages.stickerSetNotModified public static Task Stickers_AddStickerToSet(this Client client, InputStickerSet stickerset, InputStickerSetItem sticker) => client.CallAsync(new Stickers_AddStickerToSet { @@ -15674,6 +15833,7 @@ namespace TL /// Set stickerset thumbnail See [bots: ✓] Possible codes: 400 (details) /// Stickerset /// Thumbnail + /// a null value means messages.stickerSetNotModified public static Task Stickers_SetStickerSetThumb(this Client client, InputStickerSet stickerset, InputDocument thumb) => client.CallAsync(new Stickers_SetStickerSetThumb { @@ -16205,8 +16365,8 @@ namespace TL.Methods public string phone_code; } - [TLDef(0x5717DA40)] - public class Auth_LogOut : IMethod { } + [TLDef(0x3E72BA19)] + public class Auth_LogOut : IMethod { } [TLDef(0x9FAB0D1A)] public class Auth_ResetAuthorizations : IMethod { } @@ -16838,14 +16998,37 @@ namespace TL.Methods public long hash; } + [TLDef(0xBF899AA0)] + public class Account_SetAuthorizationTTL : IMethod + { + public int authorization_ttl_days; + } + + [TLDef(0x40F48462)] + public class Account_ChangeAuthorizationSettings : IMethod + { + public Flags flags; + public long hash; + [IfFlag(0)] public bool encrypted_requests_disabled; + [IfFlag(1)] public bool call_requests_disabled; + + [Flags] public enum Flags + { + /// Field has a value + has_encrypted_requests_disabled = 0x1, + /// Field has a value + has_call_requests_disabled = 0x2, + } + } + [TLDef(0x0D91A548)] public class Users_GetUsers : IMethod { public InputUserBase[] id; } - [TLDef(0xCA30A5B1)] - public class Users_GetFullUser : IMethod + [TLDef(0xB60F5918)] + public class Users_GetFullUser : IMethod { public InputUserBase id; } @@ -17137,7 +17320,7 @@ namespace TL.Methods } } - [TLDef(0x520C3870)] + [TLDef(0x0D9D75A4)] public class Messages_SendMessage : IMethod { public Flags flags; @@ -17148,6 +17331,7 @@ namespace TL.Methods [IfFlag(2)] public ReplyMarkup reply_markup; [IfFlag(3)] public MessageEntity[] entities; [IfFlag(10)] public DateTime schedule_date; + [IfFlag(13)] public InputPeer send_as; [Flags] public enum Flags { @@ -17163,10 +17347,12 @@ namespace TL.Methods clear_draft = 0x80, /// Field has a value has_schedule_date = 0x400, + /// Field has a value + has_send_as = 0x2000, } } - [TLDef(0x3491EBA9)] + [TLDef(0xE25FF8E0)] public class Messages_SendMedia : IMethod { public Flags flags; @@ -17178,6 +17364,7 @@ namespace TL.Methods [IfFlag(2)] public ReplyMarkup reply_markup; [IfFlag(3)] public MessageEntity[] entities; [IfFlag(10)] public DateTime schedule_date; + [IfFlag(13)] public InputPeer send_as; [Flags] public enum Flags { @@ -17192,10 +17379,12 @@ namespace TL.Methods clear_draft = 0x80, /// Field has a value has_schedule_date = 0x400, + /// Field has a value + has_send_as = 0x2000, } } - [TLDef(0xD9FEE60E)] + [TLDef(0xCC30290B)] public class Messages_ForwardMessages : IMethod { public Flags flags; @@ -17204,6 +17393,7 @@ namespace TL.Methods public long[] random_id; public InputPeer to_peer; [IfFlag(10)] public DateTime schedule_date; + [IfFlag(13)] public InputPeer send_as; [Flags] public enum Flags { @@ -17214,6 +17404,8 @@ namespace TL.Methods has_schedule_date = 0x400, drop_author = 0x800, drop_media_captions = 0x1000, + /// Field has a value + has_send_as = 0x2000, } } @@ -17223,8 +17415,8 @@ namespace TL.Methods public InputPeer peer; } - [TLDef(0x3672E09C)] - public class Messages_GetPeerSettings : IMethod + [TLDef(0xEFD9A6A2)] + public class Messages_GetPeerSettings : IMethod { public InputPeer peer; } @@ -17457,10 +17649,11 @@ namespace TL.Methods public string hash; } - [TLDef(0x2619A90E)] + [TLDef(0xC8A0EC74)] public class Messages_GetStickerSet : IMethod { public InputStickerSet stickerset; + public int hash; } [TLDef(0xC78FE460)] @@ -17599,7 +17792,7 @@ namespace TL.Methods } } - [TLDef(0x220815B0)] + [TLDef(0x7AA11297)] public class Messages_SendInlineBotResult : IMethod { public Flags flags; @@ -17609,6 +17802,7 @@ namespace TL.Methods public long query_id; public string id; [IfFlag(10)] public DateTime schedule_date; + [IfFlag(13)] public InputPeer send_as; [Flags] public enum Flags { @@ -17620,6 +17814,8 @@ namespace TL.Methods /// Field has a value has_schedule_date = 0x400, hide_via = 0x800, + /// Field has a value + has_send_as = 0x2000, } } @@ -18004,7 +18200,7 @@ namespace TL.Methods public long hash; } - [TLDef(0xCC0110CB)] + [TLDef(0xF803138F)] public class Messages_SendMultiMedia : IMethod { public Flags flags; @@ -18012,6 +18208,7 @@ namespace TL.Methods [IfFlag(0)] public int reply_to_msg_id; public InputSingleMedia[] multi_media; [IfFlag(10)] public DateTime schedule_date; + [IfFlag(13)] public InputPeer send_as; [Flags] public enum Flags { @@ -18022,6 +18219,8 @@ namespace TL.Methods clear_draft = 0x80, /// Field has a value has_schedule_date = 0x400, + /// Field has a value + has_send_as = 0x2000, } } @@ -18517,6 +18716,35 @@ namespace TL.Methods } } + [TLDef(0xE085F4EA)] + public class Messages_HideAllChatJoinRequests : IMethod + { + public Flags flags; + public InputPeer peer; + [IfFlag(1)] public string link; + + [Flags] public enum Flags + { + approved = 0x1, + /// Field has a value + has_link = 0x2, + } + } + + [TLDef(0xB11EAFA2)] + public class Messages_ToggleNoForwards : IMethod + { + public InputPeer peer; + public bool enabled; + } + + [TLDef(0xCCFDDF96)] + public class Messages_SaveDefaultSendAs : IMethod + { + public InputPeer peer; + public InputPeer send_as; + } + [TLDef(0xEDD4882A)] public class Updates_GetState : IMethod { } @@ -18784,18 +19012,11 @@ namespace TL.Methods public int[] id; } - [TLDef(0xD10DD71B)] - public class Channels_DeleteUserHistory : IMethod - { - public InputChannelBase channel; - public InputUserBase user_id; - } - - [TLDef(0xFE087810)] + [TLDef(0xF44A8315)] public class Channels_ReportSpam : IMethod { public InputChannelBase channel; - public InputUserBase user_id; + public InputPeer participant; public int[] id; } @@ -19067,6 +19288,19 @@ namespace TL.Methods public InputChannelBase channel; } + [TLDef(0x0DC770EE)] + public class Channels_GetSendAs : IMethod + { + public InputPeer peer; + } + + [TLDef(0x367544DB)] + public class Channels_DeleteParticipantHistory : IMethod + { + public InputChannelBase channel; + public InputPeer participant; + } + [TLDef(0xAA2769ED)] public class Bots_SendCustomRequest : IMethod { diff --git a/src/TL.Table.cs b/src/TL.Table.cs index 7e1166f..2098b7e 100644 --- a/src/TL.Table.cs +++ b/src/TL.Table.cs @@ -6,7 +6,7 @@ namespace TL { public static class Layer { - public const int Version = 134; // fetched 10/11/2021 16:21:52 + public const int Version = 135; // fetched 27/11/2021 01:15:53 internal const uint VectorCtor = 0x1CB5C415; internal const uint NullCtor = 0x56730BCC; internal const uint RpcResultCtor = 0xF35C6D01; @@ -128,7 +128,7 @@ namespace TL [0x8261AC61] = typeof(Channel), [0x17D493D5] = typeof(ChannelForbidden), [0x46A6FFB4] = typeof(ChatFull), - [0x59CFF963] = typeof(ChannelFull), + [0x56662E2E] = typeof(ChannelFull), [0xC02D4007] = typeof(ChatParticipant), [0xE46BCEE4] = typeof(ChatParticipantCreator), [0xA0933F5B] = typeof(ChatParticipantAdmin), @@ -195,7 +195,7 @@ namespace TL [0x1117DD5F] = null,//GeoPointEmpty [0xB2A2F663] = typeof(GeoPoint), [0x5E002502] = typeof(Auth_SentCode), - [0xCD050916] = typeof(Auth_Authorization), + [0x33FB7BB8] = typeof(Auth_Authorization), [0x44747E9A] = typeof(Auth_AuthorizationSignUpRequired), [0xB434E2B8] = typeof(Auth_ExportedAuthorization), [0xB8BC5B0C] = typeof(InputNotifyPeer), @@ -204,10 +204,10 @@ namespace TL [0xB1DB7C7E] = typeof(InputNotifyBroadcasts), [0x9C3D198E] = typeof(InputPeerNotifySettings), [0xAF509D20] = typeof(PeerNotifySettings), - [0x733F2961] = typeof(PeerSettings), + [0xA518110D] = typeof(PeerSettings), [0xA437C3ED] = typeof(WallPaper), [0xE0804116] = typeof(WallPaperNoFile), - [0xD697FF05] = typeof(UserFull), + [0xCF366521] = typeof(UserFull), [0x145ADE0B] = typeof(Contact), [0xC13E3C50] = typeof(ImportedContact), [0x16D9703B] = typeof(ContactStatus), @@ -444,7 +444,7 @@ namespace TL [0xE89C45B2] = typeof(WebPage), [0x7311CA11] = typeof(WebPageNotModified), [0xAD01D61D] = typeof(Authorization), - [0x1250ABDE] = typeof(Account_Authorizations), + [0x4BFF8EA0] = typeof(Account_Authorizations), [0x185B184F] = typeof(Account_Password), [0x9A5C33E5] = typeof(Account_PasswordSettings), [0xC23727C9] = typeof(Account_PasswordInputSettings), @@ -462,6 +462,7 @@ namespace TL [0x0CDE3739] = typeof(InputStickerSetAnimatedEmojiAnimations), [0xD7DF217A] = typeof(StickerSet), [0xB60A24A6] = typeof(Messages_StickerSet), + [0xD3F924EB] = null,//Messages_StickerSetNotModified [0xC27AC8C7] = typeof(BotCommand), [0x1B74B335] = typeof(BotInfo), [0xA2FA4880] = typeof(KeyboardButton), @@ -475,6 +476,8 @@ namespace TL [0x10B78D29] = typeof(KeyboardButtonUrlAuth), [0xD02E7FD4] = typeof(InputKeyboardButtonUrlAuth), [0xBBC7515D] = typeof(KeyboardButtonRequestPoll), + [0xE988037B] = typeof(InputKeyboardButtonUserProfile), + [0x308660C1] = typeof(KeyboardButtonUserProfile), [0x77608B83] = typeof(KeyboardButtonRow), [0xA03E5B85] = typeof(ReplyKeyboardHide), [0x86B40B08] = typeof(ReplyKeyboardForceReply), @@ -555,6 +558,7 @@ namespace TL [0xC000BBA2] = typeof(Auth_SentCodeTypeSms), [0x5353E5A7] = typeof(Auth_SentCodeTypeCall), [0xAB03C6D9] = typeof(Auth_SentCodeTypeFlashCall), + [0x82006484] = typeof(Auth_SentCodeTypeMissedCall), [0x36585EA4] = typeof(Messages_BotCallbackAnswer), [0x26B5DDE6] = typeof(Messages_MessageEditData), [0x890C3D89] = typeof(InputBotInlineMessageID), @@ -709,6 +713,8 @@ namespace TL [0x3E7F6847] = typeof(ChannelAdminLogEventActionParticipantVolume), [0x6E941A38] = typeof(ChannelAdminLogEventActionChangeHistoryTTL), [0xAFB6144A] = typeof(ChannelAdminLogEventActionParticipantJoinByRequest), + [0xCB2AC766] = typeof(ChannelAdminLogEventActionToggleNoForwards), + [0x278F2868] = typeof(ChannelAdminLogEventActionSendMessage), [0x1FAD68CD] = typeof(ChannelAdminLogEvent), [0xED8AF74D] = typeof(Channels_AdminLogResults), [0xEA107AE4] = typeof(ChannelAdminLogEventsFilter), @@ -809,7 +815,7 @@ namespace TL [0x967A462E] = typeof(InputWallPaperNoFile), [0x1C199183] = null,//Account_WallPapersNotModified [0xCDC3858C] = typeof(Account_WallPapers), - [0xDEBEBE83] = typeof(CodeSettings), + [0x8A6469C2] = typeof(CodeSettings), [0x1DC1BCA4] = typeof(WallPaperSettings), [0xE04232F3] = typeof(AutoDownloadSettings), [0x63CACF26] = typeof(Account_AutoDownloadSettings), @@ -916,6 +922,10 @@ namespace TL [0x147EE23C] = typeof(Messages_SearchResultsCalendar), [0x7F648B67] = typeof(SearchResultPosition), [0x53B22BAF] = typeof(Messages_SearchResultsPositions), + [0x8356CDA9] = typeof(Channels_SendAsPeers), + [0x3B6D152E] = typeof(Users_UserFull), + [0x6880B94D] = typeof(Messages_PeerSettings), + [0xC3A2835F] = typeof(Auth_LoggedOut), // from TL.Secret: [0xBB718624] = typeof(Layer66.SendMessageUploadRoundAction), [0xE50511D8] = typeof(Layer45.DecryptedMessageMediaWebPage), @@ -995,6 +1005,7 @@ namespace TL [typeof(Messages_Stickers)] = 0xF1749A22, //messages.stickersNotModified [typeof(Messages_AllStickers)] = 0xE86602C3, //messages.allStickersNotModified [typeof(InputStickerSet)] = 0xFFB62B95, //inputStickerSetEmpty + [typeof(Messages_StickerSet)] = 0xD3F924EB, //messages.stickerSetNotModified [typeof(InputChannelBase)] = 0xEE8C1E86, //inputChannelEmpty [typeof(ChannelMessagesFilter)] = 0x94D42EE7, //channelMessagesFilterEmpty [typeof(Channels_ChannelParticipants)] = 0xF0173FE9, //channels.channelParticipantsNotModified