From 9aa97d341a0a5f28a456fc3f403ee2711b27eed1 Mon Sep 17 00:00:00 2001 From: Wizou <11647984+wiz0u@users.noreply.github.com> Date: Wed, 13 Apr 2022 16:02:02 +0200 Subject: [PATCH] Upgrade to layer 140: Ringtones/Sounds, Custom bot menu, ... --- src/TL.Helpers.cs | 2 +- src/TL.Schema.cs | 292 +++++++++++++++++++++++++++++++++++++----- src/TL.SchemaFuncs.cs | 275 ++++++++++++++++++++++++++++++++++++++- src/TL.Table.cs | 42 +++++- 4 files changed, 566 insertions(+), 45 deletions(-) diff --git a/src/TL.Helpers.cs b/src/TL.Helpers.cs index 22f6caf..bc2ba15 100644 --- a/src/TL.Helpers.cs +++ b/src/TL.Helpers.cs @@ -159,7 +159,7 @@ namespace TL } partial class Chat { - public override bool IsActive => (flags & (Flags.kicked | Flags.left | Flags.deactivated)) == 0; + public override bool IsActive => (flags & (Flags.left | Flags.deactivated)) == 0; public override ChatPhoto Photo => photo; public override bool IsBanned(ChatBannedRights.Flags flags = 0) => ((default_banned_rights?.flags ?? 0) & flags) != 0; public override InputPeer ToInputPeer() => new InputPeerChat(id); diff --git a/src/TL.Schema.cs b/src/TL.Schema.cs index 2c8296f..1d02cfa 100644 --- a/src/TL.Schema.cs +++ b/src/TL.Schema.cs @@ -775,6 +775,7 @@ namespace TL apply_min_photo = 0x2000000, /// If set, this user was reported by many users as a fake or scam user: be careful when interacting with them. fake = 0x4000000, + bot_attach_menu = 0x8000000, } } @@ -876,8 +877,6 @@ namespace TL { /// Whether the current user is the creator of the group creator = 0x1, - /// Whether the current user was kicked from the group - kicked = 0x2, /// Whether the current user has left the group left = 0x4, /// Whether the group was migrated @@ -1165,11 +1164,12 @@ namespace TL public override string[] AvailableReactions => available_reactions; } /// Full info about a channel, supergroup or gigagroup. See - [TLDef(0xE13C3D20)] + [TLDef(0xEA68A619)] public partial class ChannelFull : ChatFullBase { /// Flags, see TL conditional fields public Flags flags; + public Flags2 flags2; /// ID of the channel public long id; /// Info about the channel @@ -1307,6 +1307,11 @@ namespace TL has_available_reactions = 0x40000000, } + [Flags] public enum Flags2 : uint + { + can_delete_channel = 0x1, + } + /// ID of the channel public override long ID => id; /// Info about the channel @@ -2070,6 +2075,18 @@ namespace TL /// A user was accepted into the group by an admin See [TLDef(0xEBBCA3CB)] public class MessageActionChatJoinedByRequest : MessageAction { } + /// See + [TLDef(0x47DD8079, inheritBefore = true)] + public class MessageActionWebViewDataSentMe : MessageActionWebViewDataSent + { + public string data; + } + /// See + [TLDef(0xB4C38CB5)] + public class MessageActionWebViewDataSent : MessageAction + { + public string text; + } /// Chat info. Derived classes: , See public abstract class DialogBase : IObject @@ -2404,7 +2421,7 @@ namespace TL public class InputNotifyBroadcasts : InputNotifyPeerBase { } /// Notification settings. See - [TLDef(0x9C3D198E)] + [TLDef(0xDF1F002B)] public class InputPeerNotifySettings : IObject { /// Flags, see TL conditional fields @@ -2416,7 +2433,7 @@ namespace TL /// Date until which all notifications shall be switched off [IfFlag(2)] public int mute_until; /// Name of an audio file for notification - [IfFlag(3)] public string sound; + [IfFlag(3)] public NotificationSound sound; [Flags] public enum Flags : uint { @@ -2432,7 +2449,7 @@ namespace TL } /// Notification settings. See - [TLDef(0xAF509D20)] + [TLDef(0xA83B0426)] public class PeerNotifySettings : IObject { /// Flags, see TL conditional fields @@ -2443,8 +2460,9 @@ namespace TL [IfFlag(1)] public bool silent; /// Mute all notifications until this date [IfFlag(2)] public int mute_until; - /// Audio file name for notifications - [IfFlag(3)] public string sound; + [IfFlag(3)] public NotificationSound ios_sound; + [IfFlag(4)] public NotificationSound android_sound; + [IfFlag(5)] public NotificationSound other_sound; [Flags] public enum Flags : uint { @@ -2454,8 +2472,12 @@ namespace TL has_silent = 0x2, /// Field has a value has_mute_until = 0x4, - /// Field has a value - has_sound = 0x8, + /// Field has a value + has_ios_sound = 0x8, + /// Field has a value + has_android_sound = 0x10, + /// Field has a value + has_other_sound = 0x20, } } @@ -2596,7 +2618,7 @@ namespace TL } /// Extended user info See - [TLDef(0xCF366521)] + [TLDef(0x8C72EA81)] public class UserFull : IObject { /// Flags, see TL conditional fields @@ -2625,6 +2647,8 @@ namespace TL [IfFlag(15)] public string theme_emoticon; /// Anonymized text to be shown instead of the the user's name on forwarded messages [IfFlag(16)] public string private_forward_name; + [IfFlag(17)] public ChatAdminRights bot_group_admin_rights; + [IfFlag(18)] public ChatAdminRights bot_broadcast_admin_rights; [Flags] public enum Flags : uint { @@ -2656,6 +2680,10 @@ namespace TL has_theme_emoticon = 0x8000, /// Field has a value has_private_forward_name = 0x10000, + /// Field has a value + has_bot_group_admin_rights = 0x20000, + /// Field has a value + has_bot_broadcast_admin_rights = 0x40000, } } @@ -4113,6 +4141,25 @@ namespace TL /// Reactions public MessageReactions reactions; } + /// See + [TLDef(0x17B7A20B)] + public class UpdateAttachMenuBots : Update { } + /// See + [TLDef(0x1592B79D)] + public class UpdateWebViewResultSent : Update + { + public long query_id; + } + /// See + [TLDef(0x14B85813)] + public class UpdateBotMenuButton : Update + { + public long bot_id; + public BotMenuButtonBase button; + } + /// See + [TLDef(0x74D8BE99)] + public class UpdateSavedRingtones : Update { } /// Updates state. See [TLDef(0xA56C2A3E)] @@ -5971,7 +6018,7 @@ namespace TL } /// Info about bots (available bot commands, etc) See - [TLDef(0x1B74B335)] + [TLDef(0xE4169B5D)] public class BotInfo : IObject { /// ID of the bot @@ -5980,6 +6027,7 @@ namespace TL public string description; /// Bot commands that can be used in the chat public BotCommand[] commands; + public BotMenuButtonBase menu_button; } /// Bot or inline keyboard buttons Derived classes: , , , , , , , , , , , , See @@ -6149,6 +6197,17 @@ namespace TL /// User ID public long user_id; } + /// See + [TLDef(0x13767230, inheritBefore = true)] + public class KeyboardButtonWebView : KeyboardButton + { + public string url; + } + /// See + [TLDef(0xA0C0505C)] + public class KeyboardButtonSimpleWebView : KeyboardButtonWebView + { + } /// Inline keyboard row See [TLDef(0x77608B83)] @@ -6700,15 +6759,13 @@ namespace TL } /// Represents a sent inline message from the perspective of a bot Derived classes: , , , , , , See - public abstract class InputBotInlineMessage : IObject - { - /// Flags, see TL conditional fields - public int flags; - } + public abstract class InputBotInlineMessage : IObject { } /// A media See - [TLDef(0x3380C786, inheritBefore = true)] + [TLDef(0x3380C786)] public class InputBotInlineMessageMediaAuto : InputBotInlineMessage { + /// Flags, see TL conditional fields + public Flags flags; /// Caption public string message; /// Message entities for styled text @@ -6725,9 +6782,11 @@ namespace TL } } /// Simple text message See - [TLDef(0x3DCD7A87, inheritBefore = true)] + [TLDef(0x3DCD7A87)] public class InputBotInlineMessageText : InputBotInlineMessage { + /// Flags, see TL conditional fields + public Flags flags; /// Message public string message; /// Message entities for styled text @@ -6746,9 +6805,11 @@ namespace TL } } /// Geolocation See - [TLDef(0x96929A85, inheritBefore = true)] + [TLDef(0x96929A85)] public class InputBotInlineMessageMediaGeo : InputBotInlineMessage { + /// Flags, see TL conditional fields + public Flags flags; /// Geolocation public InputGeoPoint geo_point; /// For live locations, a direction in which the location moves, in degrees; 1-360 @@ -6773,9 +6834,11 @@ namespace TL } } /// Venue See - [TLDef(0x417BBF11, inheritBefore = true)] + [TLDef(0x417BBF11)] public class InputBotInlineMessageMediaVenue : InputBotInlineMessage { + /// Flags, see TL conditional fields + public Flags flags; /// Geolocation public InputGeoPoint geo_point; /// Venue name @@ -6798,9 +6861,11 @@ namespace TL } } /// A contact See - [TLDef(0xA6EDBFFD, inheritBefore = true)] + [TLDef(0xA6EDBFFD)] public class InputBotInlineMessageMediaContact : InputBotInlineMessage { + /// Flags, see TL conditional fields + public Flags flags; /// Phone number public string phone_number; /// First name @@ -6819,9 +6884,11 @@ namespace TL } } /// A game See - [TLDef(0x4B425864, inheritBefore = true)] + [TLDef(0x4B425864)] public class InputBotInlineMessageGame : InputBotInlineMessage { + /// Flags, see TL conditional fields + public Flags flags; /// Inline keyboard [IfFlag(2)] public ReplyMarkup reply_markup; @@ -6832,9 +6899,11 @@ namespace TL } } /// An invoice See - [TLDef(0xD7E78225, inheritBefore = true)] + [TLDef(0xD7E78225)] public class InputBotInlineMessageMediaInvoice : InputBotInlineMessage { + /// Flags, see TL conditional fields + public Flags flags; /// Product name, 1-32 characters public string title; /// Product description, 1-255 characters @@ -6979,15 +7048,13 @@ namespace TL } /// Inline message Derived classes: , , , , , See - public abstract class BotInlineMessage : IObject - { - /// Flags, see TL conditional fields - public int flags; - } + public abstract class BotInlineMessage : IObject { } /// Send whatever media is attached to the See - [TLDef(0x764CF810, inheritBefore = true)] + [TLDef(0x764CF810)] public class BotInlineMessageMediaAuto : BotInlineMessage { + /// Flags, see TL conditional fields + public Flags flags; /// Caption public string message; /// Message entities for styled text @@ -7004,9 +7071,11 @@ namespace TL } } /// Send a simple text message See - [TLDef(0x8C7F65E2, inheritBefore = true)] + [TLDef(0x8C7F65E2)] public class BotInlineMessageText : BotInlineMessage { + /// Flags, see TL conditional fields + public Flags flags; /// The message public string message; /// Message entities for styled text @@ -7025,9 +7094,11 @@ namespace TL } } /// Send a geolocation See - [TLDef(0x051846FD, inheritBefore = true)] + [TLDef(0x051846FD)] public class BotInlineMessageMediaGeo : BotInlineMessage { + /// Flags, see TL conditional fields + public Flags flags; /// Geolocation public GeoPoint geo; /// For live locations, a direction in which the location moves, in degrees; 1-360. @@ -7052,9 +7123,11 @@ namespace TL } } /// Send a venue See - [TLDef(0x8A86659C, inheritBefore = true)] + [TLDef(0x8A86659C)] public class BotInlineMessageMediaVenue : BotInlineMessage { + /// Flags, see TL conditional fields + public Flags flags; /// Geolocation of venue public GeoPoint geo; /// Venue name @@ -7077,9 +7150,11 @@ namespace TL } } /// Send a contact See - [TLDef(0x18D1CDC2, inheritBefore = true)] + [TLDef(0x18D1CDC2)] public class BotInlineMessageMediaContact : BotInlineMessage { + /// Flags, see TL conditional fields + public Flags flags; /// Phone number public string phone_number; /// First name @@ -7098,9 +7173,11 @@ namespace TL } } /// Send an invoice See - [TLDef(0x354A9B09, inheritBefore = true)] + [TLDef(0x354A9B09)] public class BotInlineMessageMediaInvoice : BotInlineMessage { + /// Flags, see TL conditional fields + public Flags flags; /// Product name, 1-32 characters public string title; /// Product description, 1-255 characters @@ -12731,4 +12808,149 @@ namespace TL /// Stream key public string key; } + + /// See + [TLDef(0x4576F3F0)] + public class AttachMenuBotIconColor : IObject + { + public string name; + public int color; + } + + /// See + [TLDef(0xB2A7386B)] + public class AttachMenuBotIcon : IObject + { + public Flags flags; + public string name; + public DocumentBase icon; + [IfFlag(0)] public AttachMenuBotIconColor[] colors; + + [Flags] public enum Flags : uint + { + has_colors = 0x1, + } + } + + /// See + [TLDef(0xE93CB772)] + public class AttachMenuBot : IObject + { + public Flags flags; + public long bot_id; + public string short_name; + public AttachMenuBotIcon[] icons; + + [Flags] public enum Flags : uint + { + inactive = 0x1, + } + } + + /// See + /// a null value means attachMenuBotsNotModified + [TLDef(0x3C4301C0)] + public class AttachMenuBots : IObject + { + public long hash; + public AttachMenuBot[] bots; + public Dictionary users; + } + + /// See + [TLDef(0x93BF667F)] + public class AttachMenuBotsBot : IObject + { + public AttachMenuBot bot; + public Dictionary users; + } + + /// See + public abstract class WebViewResult : IObject { } + /// See + [TLDef(0x0C14557C)] + public class WebViewResultUrl : WebViewResult + { + public long query_id; + public string url; + } + + /// See + public abstract class SimpleWebViewResult : IObject { } + /// See + [TLDef(0x882F76BB)] + public class SimpleWebViewResultUrl : SimpleWebViewResult + { + public string url; + } + + /// See + [TLDef(0x0C94511C)] + public class WebViewMessageSent : IObject + { + public Flags flags; + [IfFlag(0)] public InputBotInlineMessageIDBase msg_id; + + [Flags] public enum Flags : uint + { + has_msg_id = 0x1, + } + } + + /// See + public abstract class BotMenuButtonBase : IObject { } + /// See + [TLDef(0x7533A588)] + public class BotMenuButtonDefault : BotMenuButtonBase { } + /// See + [TLDef(0x4258C205)] + public class BotMenuButtonCommands : BotMenuButtonBase { } + /// See + [TLDef(0xC7B57CE6)] + public class BotMenuButton : BotMenuButtonBase + { + public string text; + public string url; + } + + /// See + /// a null value means account.savedRingtonesNotModified + [TLDef(0xC1E92CC5)] + public class Account_SavedRingtones : IObject + { + public long hash; + public DocumentBase[] ringtones; + } + + /// See + public abstract class NotificationSound : IObject { } + /// See + [TLDef(0x97E8BEBE)] + public class NotificationSoundDefault : NotificationSound { } + /// See + [TLDef(0x6F0C34DF)] + public class NotificationSoundNone : NotificationSound { } + /// See + [TLDef(0x830B9AE4)] + public class NotificationSoundLocal : NotificationSound + { + public string title; + public string data; + } + /// See + [TLDef(0xFF6C8049)] + public class NotificationSoundRingtone : NotificationSound + { + public long id; + } + + /// See + [TLDef(0xB7263F6D)] + public class Account_SavedRingtone : IObject { } + /// See + [TLDef(0x1F307EB7)] + public class Account_SavedRingtoneConverted : Account_SavedRingtone + { + public DocumentBase document; + } } diff --git a/src/TL.SchemaFuncs.cs b/src/TL.SchemaFuncs.cs index e4b7c61..7453bcf 100644 --- a/src/TL.SchemaFuncs.cs +++ b/src/TL.SchemaFuncs.cs @@ -968,6 +968,31 @@ namespace TL call_requests_disabled = call_requests_disabled.GetValueOrDefault(), }); + /// See + /// a null value means account.savedRingtonesNotModified + public static Task Account_GetSavedRingtones(this Client client, long hash = default) + => client.Invoke(new Account_GetSavedRingtones + { + hash = hash, + }); + + /// See + public static Task Account_SaveRingtone(this Client client, InputDocument id, bool unsave) + => client.Invoke(new Account_SaveRingtone + { + id = id, + unsave = unsave, + }); + + /// See + public static Task Account_UploadRingtone(this Client client, InputFileBase file, string file_name, string mime_type) + => client.Invoke(new Account_UploadRingtone + { + file = file, + file_name = file_name, + mime_type = mime_type, + }); + /// Returns basic user info according to their identifiers. See [bots: ✓] Possible codes: 400 (details) /// List of user identifiers public static Task Users_GetUsers(this Client client, InputUserBase[] id) @@ -3096,6 +3121,81 @@ namespace TL limit = limit, }); + /// See + /// a null value means attachMenuBotsNotModified + public static Task Messages_GetAttachMenuBots(this Client client, long hash = default) + => client.Invoke(new Messages_GetAttachMenuBots + { + hash = hash, + }); + + /// See + public static Task Messages_GetAttachMenuBot(this Client client, InputUserBase bot) + => client.Invoke(new Messages_GetAttachMenuBot + { + bot = bot, + }); + + /// See + public static Task Messages_ToggleBotInAttachMenu(this Client client, InputUserBase bot, bool enabled) + => client.Invoke(new Messages_ToggleBotInAttachMenu + { + bot = bot, + enabled = enabled, + }); + + /// See + public static Task Messages_RequestWebView(this Client client, InputPeer peer, InputUserBase bot, bool from_bot_menu = false, bool silent = false, string url = null, string start_param = null, DataJSON theme_params = null, int? reply_to_msg_id = null) + => client.Invoke(new Messages_RequestWebView + { + flags = (Messages_RequestWebView.Flags)((from_bot_menu ? 0x10 : 0) | (silent ? 0x20 : 0) | (url != null ? 0x2 : 0) | (start_param != null ? 0x8 : 0) | (theme_params != null ? 0x4 : 0) | (reply_to_msg_id != null ? 0x1 : 0)), + peer = peer, + bot = bot, + url = url, + start_param = start_param, + theme_params = theme_params, + reply_to_msg_id = reply_to_msg_id.GetValueOrDefault(), + }); + + /// See + public static Task Messages_ProlongWebView(this Client client, InputPeer peer, InputUserBase bot, long query_id, bool silent = false, int? reply_to_msg_id = null) + => client.Invoke(new Messages_ProlongWebView + { + flags = (Messages_ProlongWebView.Flags)((silent ? 0x20 : 0) | (reply_to_msg_id != null ? 0x1 : 0)), + peer = peer, + bot = bot, + query_id = query_id, + reply_to_msg_id = reply_to_msg_id.GetValueOrDefault(), + }); + + /// See + public static Task Messages_RequestSimpleWebView(this Client client, InputUserBase bot, string url, DataJSON theme_params = null) + => client.Invoke(new Messages_RequestSimpleWebView + { + flags = (Messages_RequestSimpleWebView.Flags)(theme_params != null ? 0x1 : 0), + bot = bot, + url = url, + theme_params = theme_params, + }); + + /// This method is only for small private Chat. See Terminology to understand what this means
Search for a similar method name starting with Channels_ if you're dealing with a
See
+ public static Task Messages_SendWebViewResultMessage(this Client client, string bot_query_id, InputBotInlineResultBase result) + => client.Invoke(new Messages_SendWebViewResultMessage + { + bot_query_id = bot_query_id, + result = result, + }); + + /// See + public static Task Messages_SendWebViewData(this Client client, InputUserBase bot, long random_id, string button_text, string data) + => client.Invoke(new Messages_SendWebViewData + { + bot = bot, + random_id = random_id, + button_text = button_text, + data = data, + }); + /// Returns a current state of updates. See [bots: ✓] public static Task Updates_GetState(this Client client) => client.Invoke(new Updates_GetState @@ -3724,9 +3824,10 @@ namespace TL /// Delete the history of a supergroup See Possible codes: 400 (details) /// Supergroup whose history must be deleted /// ID of message up to which the history must be deleted - public static Task Channels_DeleteHistory(this Client client, InputChannelBase channel, int max_id = default) + public static Task Channels_DeleteHistory(this Client client, InputChannelBase channel, int max_id = default, bool for_everyone = false) => client.Invoke(new Channels_DeleteHistory { + flags = (Channels_DeleteHistory.Flags)(for_everyone ? 0x1 : 0), channel = channel, max_id = max_id, }); @@ -3901,6 +4002,35 @@ namespace TL lang_code = lang_code, }); + /// See + public static Task Bots_SetBotMenuButton(this Client client, InputUserBase user_id, BotMenuButtonBase button) + => client.Invoke(new Bots_SetBotMenuButton + { + user_id = user_id, + button = button, + }); + + /// See + public static Task Bots_GetBotMenuButton(this Client client, InputUserBase user_id) + => client.Invoke(new Bots_GetBotMenuButton + { + user_id = user_id, + }); + + /// See + public static Task Bots_SetBotBroadcastDefaultAdminRights(this Client client, ChatAdminRights admin_rights) + => client.Invoke(new Bots_SetBotBroadcastDefaultAdminRights + { + admin_rights = admin_rights, + }); + + /// See + public static Task Bots_SetBotGroupDefaultAdminRights(this Client client, ChatAdminRights admin_rights) + => client.Invoke(new Bots_SetBotGroupDefaultAdminRights + { + admin_rights = admin_rights, + }); + /// Get a payment form See Possible codes: 400 (details) /// The peer where the payment form was sent /// Message ID of payment form @@ -5269,6 +5399,27 @@ namespace TL.Methods } } + [TLDef(0xE1902288)] + public class Account_GetSavedRingtones : IMethod + { + public long hash; + } + + [TLDef(0x3DEA5B03)] + public class Account_SaveRingtone : IMethod + { + public InputDocument id; + public bool unsave; + } + + [TLDef(0x831A83A2)] + public class Account_UploadRingtone : IMethod + { + public InputFileBase file; + public string file_name; + public string mime_type; + } + [TLDef(0x0D91A548)] public class Users_GetUsers : IMethod { @@ -7038,6 +7189,93 @@ namespace TL.Methods public int limit; } + [TLDef(0x16FCC2CB)] + public class Messages_GetAttachMenuBots : IMethod + { + public long hash; + } + + [TLDef(0x77216192)] + public class Messages_GetAttachMenuBot : IMethod + { + public InputUserBase bot; + } + + [TLDef(0x1AEE33AF)] + public class Messages_ToggleBotInAttachMenu : IMethod + { + public InputUserBase bot; + public bool enabled; + } + + [TLDef(0x0FA04DFF)] + public class Messages_RequestWebView : IMethod + { + public Flags flags; + public InputPeer peer; + public InputUserBase bot; + [IfFlag(1)] public string url; + [IfFlag(3)] public string start_param; + [IfFlag(2)] public DataJSON theme_params; + [IfFlag(0)] public int reply_to_msg_id; + + [Flags] public enum Flags : uint + { + has_reply_to_msg_id = 0x1, + has_url = 0x2, + has_theme_params = 0x4, + has_start_param = 0x8, + from_bot_menu = 0x10, + silent = 0x20, + } + } + + [TLDef(0xD22AD148)] + public class Messages_ProlongWebView : IMethod + { + public Flags flags; + public InputPeer peer; + public InputUserBase bot; + public long query_id; + [IfFlag(0)] public int reply_to_msg_id; + + [Flags] public enum Flags : uint + { + has_reply_to_msg_id = 0x1, + silent = 0x20, + } + } + + [TLDef(0x6ABB2F73)] + public class Messages_RequestSimpleWebView : IMethod + { + public Flags flags; + public InputUserBase bot; + public string url; + [IfFlag(0)] public DataJSON theme_params; + + [Flags] public enum Flags : uint + { + has_theme_params = 0x1, + } + } + + [TLDef(0x0A4314F5)] + public class Messages_SendWebViewResultMessage : IMethod + { + public string bot_query_id; + public InputBotInlineResultBase result; + } + + [TLDef(0xDC0242C8)] + public class Messages_SendWebViewData : IMethod + { + public InputUserBase bot; + public long random_id; + public string button_text; + public string data; + } + [TLDef(0xEDD4882A)] public class Updates_GetState : IMethod { } @@ -7499,11 +7737,17 @@ namespace TL.Methods public int[] id; } - [TLDef(0xAF369D42)] - public class Channels_DeleteHistory : IMethod + [TLDef(0x9BAA9647)] + public class Channels_DeleteHistory : IMethod { + public Flags flags; public InputChannelBase channel; public int max_id; + + [Flags] public enum Flags : uint + { + for_everyone = 0x1, + } } [TLDef(0xEABBB94C)] @@ -7623,6 +7867,31 @@ namespace TL.Methods public string lang_code; } + [TLDef(0x4504D54F)] + public class Bots_SetBotMenuButton : IMethod + { + public InputUserBase user_id; + public BotMenuButtonBase button; + } + + [TLDef(0x9C60EB28)] + public class Bots_GetBotMenuButton : IMethod + { + public InputUserBase user_id; + } + + [TLDef(0x788464E1)] + public class Bots_SetBotBroadcastDefaultAdminRights : IMethod + { + public ChatAdminRights admin_rights; + } + + [TLDef(0x925EC9EA)] + public class Bots_SetBotGroupDefaultAdminRights : IMethod + { + public ChatAdminRights admin_rights; + } + [TLDef(0x8A333C8D)] public class Payments_GetPaymentForm : IMethod { diff --git a/src/TL.Table.cs b/src/TL.Table.cs index 373016c..d709a72 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 = 139; // fetched 01/03/2022 09:53:50 + public const int Version = 140; // fetched 13/04/2022 12:36:36 internal const uint VectorCtor = 0x1CB5C415; internal const uint NullCtor = 0x56730BCC; internal const uint RpcResultCtor = 0xF35C6D01; @@ -131,7 +131,7 @@ namespace TL [0x8261AC61] = typeof(Channel), [0x17D493D5] = typeof(ChannelForbidden), [0xD18EE226] = typeof(ChatFull), - [0xE13C3D20] = typeof(ChannelFull), + [0xEA68A619] = typeof(ChannelFull), [0xC02D4007] = typeof(ChatParticipant), [0xE46BCEE4] = typeof(ChatParticipantCreator), [0xA0933F5B] = typeof(ChatParticipantAdmin), @@ -185,6 +185,8 @@ namespace TL [0xB3A07661] = typeof(MessageActionGroupCallScheduled), [0xAA786345] = typeof(MessageActionSetChatTheme), [0xEBBCA3CB] = typeof(MessageActionChatJoinedByRequest), + [0x47DD8079] = typeof(MessageActionWebViewDataSentMe), + [0xB4C38CB5] = typeof(MessageActionWebViewDataSent), [0xA8EDD0F5] = typeof(Dialog), [0x71BD134C] = typeof(DialogFolder), [0x2331B22D] = typeof(PhotoEmpty), @@ -205,12 +207,12 @@ namespace TL [0x193B4417] = typeof(InputNotifyUsers), [0x4A95E84E] = typeof(InputNotifyChats), [0xB1DB7C7E] = typeof(InputNotifyBroadcasts), - [0x9C3D198E] = typeof(InputPeerNotifySettings), - [0xAF509D20] = typeof(PeerNotifySettings), + [0xDF1F002B] = typeof(InputPeerNotifySettings), + [0xA83B0426] = typeof(PeerNotifySettings), [0xA518110D] = typeof(PeerSettings), [0xA437C3ED] = typeof(WallPaper), [0xE0804116] = typeof(WallPaperNoFile), - [0xCF366521] = typeof(UserFull), + [0x8C72EA81] = typeof(UserFull), [0x145ADE0B] = typeof(Contact), [0xC13E3C50] = typeof(ImportedContact), [0x16D9703B] = typeof(ContactStatus), @@ -343,6 +345,10 @@ namespace TL [0x7063C3DB] = typeof(UpdatePendingJoinRequests), [0x11DFA986] = typeof(UpdateBotChatInviteRequester), [0x154798C3] = typeof(UpdateMessageReactions), + [0x17B7A20B] = typeof(UpdateAttachMenuBots), + [0x1592B79D] = typeof(UpdateWebViewResultSent), + [0x14B85813] = typeof(UpdateBotMenuButton), + [0x74D8BE99] = typeof(UpdateSavedRingtones), [0xA56C2A3E] = typeof(Updates_State), [0x5D75A138] = typeof(Updates_DifferenceEmpty), [0x00F49CA0] = typeof(Updates_Difference), @@ -468,7 +474,7 @@ namespace TL [0xB60A24A6] = typeof(Messages_StickerSet), [0xD3F924EB] = null,//Messages_StickerSetNotModified [0xC27AC8C7] = typeof(BotCommand), - [0x1B74B335] = typeof(BotInfo), + [0xE4169B5D] = typeof(BotInfo), [0xA2FA4880] = typeof(KeyboardButton), [0x258AFF05] = typeof(KeyboardButtonUrl), [0x35BBDB6B] = typeof(KeyboardButtonCallback), @@ -482,6 +488,8 @@ namespace TL [0xBBC7515D] = typeof(KeyboardButtonRequestPoll), [0xE988037B] = typeof(InputKeyboardButtonUserProfile), [0x308660C1] = typeof(KeyboardButtonUserProfile), + [0x13767230] = typeof(KeyboardButtonWebView), + [0xA0C0505C] = typeof(KeyboardButtonSimpleWebView), [0x77608B83] = typeof(KeyboardButtonRow), [0xA03E5B85] = typeof(ReplyKeyboardHide), [0x86B40B08] = typeof(ReplyKeyboardForceReply), @@ -944,6 +952,26 @@ namespace TL [0x80EB48AF] = typeof(GroupCallStreamChannel), [0xD0E482B2] = typeof(Phone_GroupCallStreamChannels), [0x2DBF3432] = typeof(Phone_GroupCallStreamRtmpUrl), + [0x4576F3F0] = typeof(AttachMenuBotIconColor), + [0xB2A7386B] = typeof(AttachMenuBotIcon), + [0xE93CB772] = typeof(AttachMenuBot), + [0xF1D88A5C] = null,//AttachMenuBotsNotModified + [0x3C4301C0] = typeof(AttachMenuBots), + [0x93BF667F] = typeof(AttachMenuBotsBot), + [0x0C14557C] = typeof(WebViewResultUrl), + [0x882F76BB] = typeof(SimpleWebViewResultUrl), + [0x0C94511C] = typeof(WebViewMessageSent), + [0x7533A588] = typeof(BotMenuButtonDefault), + [0x4258C205] = typeof(BotMenuButtonCommands), + [0xC7B57CE6] = typeof(BotMenuButton), + [0xFBF6E8B1] = null,//Account_SavedRingtonesNotModified + [0xC1E92CC5] = typeof(Account_SavedRingtones), + [0x97E8BEBE] = typeof(NotificationSoundDefault), + [0x6F0C34DF] = typeof(NotificationSoundNone), + [0x830B9AE4] = typeof(NotificationSoundLocal), + [0xFF6C8049] = typeof(NotificationSoundRingtone), + [0xB7263F6D] = typeof(Account_SavedRingtone), + [0x1F307EB7] = typeof(Account_SavedRingtoneConverted), // from TL.Secret: [0xBB718624] = typeof(Layer66.SendMessageUploadRoundAction), [0xE50511D8] = typeof(Layer45.DecryptedMessageMediaWebPage), @@ -1045,6 +1073,8 @@ namespace TL [typeof(Account_Themes)] = 0xF41EB622, //account.themesNotModified [typeof(Help_CountriesList)] = 0x93CC1F32, //help.countriesListNotModified [typeof(Messages_AvailableReactions)] = 0x9F071957, //messages.availableReactionsNotModified + [typeof(AttachMenuBots)] = 0xF1D88A5C, //attachMenuBotsNotModified + [typeof(Account_SavedRingtones)] = 0xFBF6E8B1, //account.savedRingtonesNotModified // from TL.Secret: [typeof(DecryptedMessageMedia)] = 0x089F5C4A, //decryptedMessageMediaEmpty // The End