diff --git a/README.md b/README.md
index ac00bd1..0d91114 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://dev.azure.com/wiz0u/WTelegramClient/_build?definitionId=7)
[](https://www.buymeacoffee.com/wizou)
diff --git a/src/TL.Schema.cs b/src/TL.Schema.cs
index 7f0540b..36f144e 100644
--- a/src/TL.Schema.cs
+++ b/src/TL.Schema.cs
@@ -814,6 +814,7 @@ namespace TL
{
/// Field has a value
has_usernames = 0x1,
+ bot_can_edit = 0x2,
}
}
@@ -2074,22 +2075,22 @@ namespace TL
/// Action message
public string message;
}
- /// The user has given the bot permission to do something. See
+ /// We have given the bot permission to send us direct messages. See
[TLDef(0xC516D679)]
public class MessageActionBotAllowed : MessageAction
{
/// Flags, see TL conditional fields
public Flags flags;
- /// The user has logged in via Telegram Login »; this field contains the domain name of the website on which the user has logged in.
+ /// We have authorized the bot to send us messages by logging into a website via Telegram Login »; this field contains the domain name of the website on which the user has logged in.
[IfFlag(0)] public string domain;
- /// We just gave the specified bot web app permission to send us messages.
+ /// We have authorized the bot to send us messages by opening the specified bot web app.
[IfFlag(2)] public BotApp app;
[Flags] public enum Flags : uint
{
/// Field has a value
has_domain = 0x1,
- /// We just installed the bot's attachment menu, thus giving the bot permission to send us messages.
+ /// We have authorized the bot to send us messages by installing the bot's attachment menu.
attach_menu = 0x2,
/// Field has a value
has_app = 0x4,
@@ -2157,8 +2158,9 @@ namespace TL
{
/// Flags, see TL conditional fields
public Flags flags;
- /// New Time-To-Live
+ /// New Time-To-Live of all messages sent in this chat; if 0, autodeletion was disabled.
public int period;
+ /// If set, the chat TTL setting was set not due to a manual change by one of participants, but automatically because one of the participants has the Messages_SetDefaultHistoryTTL. For example, when a user writes to us for the first time and we have set a default messages TTL of 1 week, this service message (with auto_setting_from=our_userid) will be emitted before our first message.
[IfFlag(0)] public long auto_setting_from;
[Flags] public enum Flags : uint
@@ -2201,15 +2203,24 @@ namespace TL
public string text;
}
/// Info about a gifted Telegram Premium subscription See
- [TLDef(0xABA0F5C6)]
+ [TLDef(0xC83D6AEC)]
public class MessageActionGiftPremium : MessageAction
{
+ public Flags flags;
/// Three-letter ISO 4217 currency code
public string currency;
/// Price of the gift in the smallest units of the currency (integer, not float/double). For example, for a price of US$ 1.45 pass amount = 145. See the exp parameter in currencies.json, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies).
public long amount;
/// Duration of the gifted Telegram Premium subscription
public int months;
+ [IfFlag(0)] public string crypto_currency;
+ [IfFlag(0)] public long crypto_amount;
+
+ [Flags] public enum Flags : uint
+ {
+ /// Field has a value
+ has_crypto_currency = 0x1,
+ }
}
/// A forum topic was created. See
[TLDef(0x0D999256)]
@@ -2242,7 +2253,7 @@ namespace TL
[IfFlag(1)] public long icon_emoji_id;
/// Whether the topic was closed.
[IfFlag(2)] public bool closed;
- /// Whether the topic was hidden.
+ /// Whether the topic was hidden (only valid for the "General" topic, id=1).
[IfFlag(3)] public bool hidden;
[Flags] public enum Flags : uint
@@ -2273,6 +2284,15 @@ namespace TL
/// The shared peer
public Peer peer;
}
+ /// See
+ [TLDef(0xBC44A927)]
+ public class MessageActionSetChatWallPaper : MessageAction
+ {
+ public WallPaperBase wallpaper;
+ }
+ /// See
+ [TLDef(0xC0787D6D)]
+ public class MessageActionSetSameChatWallPaper : MessageActionSetChatWallPaper { }
/// Chat info. See Derived classes: ,
public abstract class DialogBase : IObject
@@ -2832,7 +2852,7 @@ namespace TL
}
/// Extended user info See
- [TLDef(0xF8D32AED)]
+ [TLDef(0x93EADB53)]
public class UserFull : IObject
{
/// Flags, see TL conditional fields
@@ -2871,6 +2891,7 @@ namespace TL
[IfFlag(18)] public ChatAdminRights bot_broadcast_admin_rights;
/// Telegram Premium subscriptions gift options
[IfFlag(19)] public PremiumGiftOption[] premium_gifts;
+ [IfFlag(24)] public WallPaperBase wallpaper;
[Flags] public enum Flags : uint
{
@@ -2916,6 +2937,8 @@ namespace TL
has_fallback_photo = 0x400000,
/// Whether the real-time chat translation popup should be hidden.
translations_disabled = 0x800000,
+ /// Field has a value
+ has_wallpaper = 0x1000000,
}
}
@@ -4045,7 +4068,7 @@ namespace TL
/// Folder ID
public int id;
/// Folder info
- [IfFlag(0)] public DialogFilter filter;
+ [IfFlag(0)] public DialogFilterBase filter;
[Flags] public enum Flags : uint
{
@@ -4295,6 +4318,7 @@ namespace TL
has_new_participant = 0x2,
/// Field has a value
has_invite = 0x4,
+ via_chatlist = 0x8,
}
}
/// A bot was stopped or re-started. See
@@ -6549,7 +6573,7 @@ namespace TL
{
}
/// Button to force a user to switch to inline mode Pressing the button will prompt the user to select one of their chats, open that chat and insert the bot's username and the specified inline query in the input field. See
- [TLDef(0x0568A748)]
+ [TLDef(0x93B9FBB5)]
public class KeyboardButtonSwitchInline : KeyboardButtonBase
{
/// Flags, see TL conditional fields
@@ -6558,11 +6582,14 @@ namespace TL
public string text;
/// The inline query to use
public string query;
+ [IfFlag(1)] public InlineQueryPeerType[] peer_types;
[Flags] public enum Flags : uint
{
/// If set, pressing the button will insert the bot's username and the specified inline query in the current chat's input field.
same_peer = 0x1,
+ /// Field has a value
+ has_peer_types = 0x2,
}
/// Button label
@@ -7973,18 +8000,20 @@ namespace TL
google_signin_allowed = 0x2,
}
}
- /// See
+ /// The code was delivered via fragment.com. See
[TLDef(0xD9565C39)]
public class Auth_SentCodeTypeFragmentSms : Auth_SentCodeTypeSms
{
+ /// Open the specified URL to log into fragment.com with the wallet that owns the specified phone number and view the code.
public string url;
}
- /// See
+ /// An authentication code should be delivered via SMS after Firebase attestation, as described in the auth documentation ». See
[TLDef(0xE57B1432)]
public class Auth_SentCodeTypeFirebaseSms : Auth_SentCodeTypeSms
{
/// Flags, see TL conditional fields
public Flags flags;
+ /// On Android, the nonce to be used as described in the auth documentation »
[IfFlag(0)] public byte[] nonce;
[IfFlag(1)] public string receipt;
[IfFlag(1)] public int push_timeout;
@@ -10107,11 +10136,17 @@ namespace TL
public bool join_muted;
}
/// A user joined the supergroup/channel using a specific invite link See
- [TLDef(0x5CDADA77)]
+ [TLDef(0xFE9FC158)]
public class ChannelAdminLogEventActionParticipantJoinByInvite : ChannelAdminLogEventAction
{
+ public Flags flags;
/// The invite link used to join the supergroup/channel
public ExportedChatInvite invite;
+
+ [Flags] public enum Flags : uint
+ {
+ via_chatlist = 0x1,
+ }
}
/// A chat invite was deleted See
[TLDef(0x5A50FCA4)]
@@ -11612,6 +11647,7 @@ namespace TL
allow_missed_call = 0x20,
/// Field has a value
has_logout_tokens = 0x40,
+ /// Whether Firebase auth is supported
allow_firebase = 0x80,
/// Field has a value
has_token = 0x100,
@@ -12211,10 +12247,24 @@ namespace TL
public BankCardOpenUrl[] open_urls;
}
- /// Dialog filter AKA folder See
+ /// Dialog filter (folder ») See Derived classes:
/// a value means dialogFilterDefault
+ public abstract class DialogFilterBase : IObject
+ {
+ /// Folder ID
+ public virtual int ID { get; }
+ /// Folder name
+ public virtual string Title { get; }
+ /// Folder emoticon
+ public virtual string Emoticon { get; }
+ /// Pinned chats, folders can have unlimited pinned chats
+ public virtual InputPeer[] PinnedPeers { get; }
+ /// Include the following chats in this folder
+ public virtual InputPeer[] IncludePeers { get; }
+ }
+ /// Dialog filter AKA folder See
[TLDef(0x7438F7E8)]
- public class DialogFilter : IObject
+ public class DialogFilter : DialogFilterBase
{
/// Flags, see TL conditional fields
public Flags flags;
@@ -12252,6 +12302,40 @@ namespace TL
/// Field has a value
has_emoticon = 0x2000000,
}
+
+ /// Folder ID
+ public override int ID => id;
+ /// Folder name
+ public override string Title => title;
+ /// Folder emoticon
+ public override string Emoticon => emoticon;
+ /// Pinned chats, folders can have unlimited pinned chats
+ public override InputPeer[] PinnedPeers => pinned_peers;
+ /// Include the following chats in this folder
+ public override InputPeer[] IncludePeers => include_peers;
+ }
+ /// See
+ [TLDef(0xD64A04A8)]
+ public class DialogFilterChatlist : DialogFilterBase
+ {
+ public Flags flags;
+ public int id;
+ public string title;
+ [IfFlag(25)] public string emoticon;
+ public InputPeer[] pinned_peers;
+ public InputPeer[] include_peers;
+
+ [Flags] public enum Flags : uint
+ {
+ has_emoticon = 0x2000000,
+ has_my_invites = 0x4000000,
+ }
+
+ public override int ID => id;
+ public override string Title => title;
+ public override string Emoticon => emoticon;
+ public override InputPeer[] PinnedPeers => pinned_peers;
+ public override InputPeer[] IncludePeers => include_peers;
}
/// Suggested folders See
@@ -12259,7 +12343,7 @@ namespace TL
public class DialogFilterSuggested : IObject
{
/// Folder info
- public DialogFilter filter;
+ public DialogFilterBase filter;
/// Folder description
public string description;
}
@@ -12970,6 +13054,8 @@ namespace TL
Megagroup = 0x5EC4BE43,
///The inline query was sent in a channel
Broadcast = 0x6334EE9A,
+ ///See
+ BotPM = 0x0E3B2D0C,
}
/// ID of a specific chat import session, click here for more info ». See
@@ -13037,6 +13123,7 @@ namespace TL
has_approved_by = 0x2,
/// Field has a value
has_about = 0x4,
+ via_chatlist = 0x8,
}
}
@@ -13286,6 +13373,7 @@ namespace TL
has_chat_invite = 0x10,
/// Whether the message needs to be labeled as "recommended" instead of "sponsored"
recommended = 0x20,
+ /// Whether a profile photo bubble should be displayed for this message, like for messages sent in groups. The photo shown in the bubble is obtained either from the peer contained in from_id, or from chat_invite.
show_peer_photo = 0x40,
/// Field has a value
has_sponsor_info = 0x80,
@@ -13885,6 +13973,7 @@ namespace TL
{
/// Pass true if this is a restore of a Telegram Premium purchase; only for the App Store
restore = 0x1,
+ /// Pass true if this is an upgrade from a monthly subscription to a yearly subscription; only for App Store
upgrade = 0x2,
}
}
@@ -14077,7 +14166,7 @@ namespace TL
{
/// Flags, see TL conditional fields
public Flags flags;
- /// Identifier of the last in-store transaction for the currently used subscription.
+ /// Identifier of the last in-store transaction for the currently used subscription on the current account.
[IfFlag(3)] public string transaction;
/// Duration of subscription in months
public int months;
@@ -14096,7 +14185,7 @@ namespace TL
has_store_product = 0x1,
/// Whether this subscription option is currently in use.
current = 0x2,
- /// Whether this subscription option can be used to upgrade the existing Telegram Premium subscription.
+ /// Whether this subscription option can be used to upgrade the existing Telegram Premium subscription. When upgrading Telegram Premium subscriptions bought through stores, make sure that the store transaction ID is equal to transaction, to avoid upgrading someone else's account, if the client is currently logged into multiple accounts.
can_purchase_upgrade = 0x4,
/// Field has a value
has_transaction = 0x8,
@@ -14240,6 +14329,7 @@ namespace TL
pinned = 0x8,
/// Field has a value
has_draft = 0x10,
+ /// Whether this constructor is a reduced version of the full topic information.
If set, only the my, closed, id, date, title, icon_color, icon_emoji_id and from_id parameters will contain valid information.
Reduced info is usually only returned in topic-related admin log events » and in the : if needed, full information can be fetched using Channels_GetForumTopicsByID.
short_ = 0x20,
/// Whether the topic is hidden (only valid for the "General" topic, id=1)
hidden = 0x40,
@@ -14488,28 +14578,28 @@ namespace TL
public JsonObject config;
}
- /// Used to fetch information about a bot web app See Derived classes: ,
+ /// Used to fetch information about a named bot web app See Derived classes: ,
public abstract class InputBotApp : IObject { }
- /// Used to fetch information about a bot web app by its ID See
+ /// Used to fetch information about a named bot web app by its ID See
[TLDef(0xA920BD7A)]
public class InputBotAppID : InputBotApp
{
- /// Bot web app ID.
+ /// named bot web app ID.
public long id;
/// ⚠ REQUIRED FIELD. See how to obtain it
Access hash, obtained from the .
public long access_hash;
}
- /// Used to fetch information about a bot web app by its short name See
+ /// Used to fetch information about a named bot web app by its short name See
[TLDef(0x908C0407)]
public class InputBotAppShortName : InputBotApp
{
/// ID of the bot that owns the bot web app
public InputUserBase bot_id;
- /// Short name, obtained from a bot web app deep link
+ /// Short name, obtained from a named bot web app deep link
public string short_name;
}
- /// Contains information about a bot web app. See
+ /// Contains information about a named bot web app. See
/// a value means botAppNotModified
[TLDef(0x95FCD1D6)]
public class BotApp : IObject
@@ -14520,7 +14610,7 @@ namespace TL
public long id;
/// Bot web app access hash
public long access_hash;
- /// Bot web app short name, used to generate bot web app deep links.
+ /// Bot web app short name, used to generate named bot web app deep links.
public string short_name;
/// Bot web app title.
public string title;
@@ -14540,7 +14630,7 @@ namespace TL
}
}
- /// Contains information about a bot web app See
+ /// Contains information about a named bot web app See
[TLDef(0xEB50ADF5)]
public class Messages_BotApp : IObject
{
@@ -14558,9 +14648,9 @@ namespace TL
}
}
- /// Contains the link that must be used to open a bot web app. See Derived classes:
+ /// Contains the link that must be used to open a named bot web app. See Derived classes:
public abstract class AppWebViewResult : IObject { }
- /// Contains the link that must be used to open a bot web app. See
+ /// Contains the link that must be used to open a named bot web app. See
[TLDef(0x3C1B4F0D)]
public class AppWebViewResultUrl : AppWebViewResult
{
@@ -14587,4 +14677,109 @@ namespace TL
/// When the user read the message
public DateTime date;
}
+
+ /// See
+ public abstract class InputChatlist : IObject { }
+ /// See
+ [TLDef(0xF3E0DA33)]
+ public class InputChatlistDialogFilter : InputChatlist
+ {
+ public int filter_id;
+ }
+
+ /// See
+ [TLDef(0x0C5181AC)]
+ public class ExportedChatlistInvite : IObject
+ {
+ public Flags flags;
+ public string title;
+ public string url;
+ public Peer[] peers;
+
+ [Flags] public enum Flags : uint
+ {
+ }
+ }
+
+ /// See
+ [TLDef(0x10E6E3A6)]
+ public class Chatlists_ExportedChatlistInvite : IObject
+ {
+ public DialogFilterBase filter;
+ public ExportedChatlistInvite invite;
+ }
+
+ /// See
+ [TLDef(0x10AB6DC7)]
+ public class Chatlists_ExportedInvites : IObject, IPeerResolver
+ {
+ public ExportedChatlistInvite[] invites;
+ public Dictionary chats;
+ public Dictionary users;
+ /// returns a or for the given Peer
+ public IPeerInfo UserOrChat(Peer peer) => peer?.UserOrChat(users, chats);
+ }
+
+ /// See
+ public abstract class Chatlists_ChatlistInviteBase : IObject
+ {
+ public virtual Dictionary Chats { get; }
+ public virtual Dictionary Users { get; }
+ }
+ /// See
+ [TLDef(0xFA87F659)]
+ public class Chatlists_ChatlistInviteAlready : Chatlists_ChatlistInviteBase, IPeerResolver
+ {
+ public int filter_id;
+ public Peer[] missing_peers;
+ public Peer[] already_peers;
+ public Dictionary chats;
+ public Dictionary users;
+
+ public override Dictionary Chats => chats;
+ public override Dictionary Users => users;
+ /// returns a or for the given Peer
+ public IPeerInfo UserOrChat(Peer peer) => peer?.UserOrChat(users, chats);
+ }
+ /// See
+ [TLDef(0x1DCD839D)]
+ public class Chatlists_ChatlistInvite : Chatlists_ChatlistInviteBase, IPeerResolver
+ {
+ public Flags flags;
+ public string title;
+ [IfFlag(0)] public string emoticon;
+ public Peer[] peers;
+ public Dictionary chats;
+ public Dictionary users;
+
+ [Flags] public enum Flags : uint
+ {
+ has_emoticon = 0x1,
+ }
+
+ public override Dictionary Chats => chats;
+ public override Dictionary Users => users;
+ /// returns a or for the given Peer
+ public IPeerInfo UserOrChat(Peer peer) => peer?.UserOrChat(users, chats);
+ }
+
+ /// See
+ [TLDef(0x93BD878D)]
+ public class Chatlists_ChatlistUpdates : IObject, IPeerResolver
+ {
+ public Peer[] missing_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(0xE8A775B0)]
+ public class Bots_BotInfo : IObject
+ {
+ public string name;
+ public string about;
+ public string description;
+ }
}
diff --git a/src/TL.SchemaFuncs.cs b/src/TL.SchemaFuncs.cs
index 46b9669..e15471c 100644
--- a/src/TL.SchemaFuncs.cs
+++ b/src/TL.SchemaFuncs.cs
@@ -286,7 +286,10 @@ namespace TL
code = code,
});
- /// See Possible codes: 400 (details)
+ /// Login by importing an authorization token See Possible codes: 400 (details)
+ /// API ID
+ /// API hash
+ /// The authorization token
public static Task Auth_ImportWebTokenAuthorization(this Client client, int api_id, string api_hash, string web_auth_token)
=> client.Invoke(new Auth_ImportWebTokenAuthorization
{
@@ -295,7 +298,10 @@ namespace TL
web_auth_token = web_auth_token,
});
- /// See [bots: ✓] Possible codes: 400 (details)
+ /// Request an SMS code via Firebase. See [bots: ✓] Possible codes: 400 (details)
+ /// Phone number
+ /// Phone code hash returned by Auth_SendCode
+ /// On Android, a JWS object obtained as described in the auth documentation »
public static Task Auth_RequestFirebaseSms(this Client client, string phone_number, string phone_code_hash, string safety_net_token = null, string ios_push_secret = null)
=> client.Invoke(new Auth_RequestFirebaseSms
{
@@ -768,9 +774,10 @@ namespace TL
/// The JPG/PNG wallpaper
/// MIME type of uploaded wallpaper
/// Wallpaper settings
- public static Task Account_UploadWallPaper(this Client client, InputFileBase file, string mime_type, WallPaperSettings settings)
+ public static Task Account_UploadWallPaper(this Client client, InputFileBase file, string mime_type, WallPaperSettings settings, bool for_chat = false)
=> client.Invoke(new Account_UploadWallPaper
{
+ flags = (Account_UploadWallPaper.Flags)(for_chat ? 0x1 : 0),
file = file,
mime_type = mime_type,
settings = settings,
@@ -1132,7 +1139,7 @@ namespace TL
{
});
- /// Returns basic user info according to their identifiers. See [bots: ✓] Possible codes: 400,500 (details)
+ /// Returns basic user info according to their identifiers. See [bots: ✓] Possible codes: 400 (details)
/// List of user identifiers
public static Task Users_GetUsers(this Client client, params InputUserBase[] id)
=> client.Invoke(new Users_GetUsers
@@ -1379,7 +1386,7 @@ namespace TL
id = id,
});
- /// Returns the current user dialog list. See Possible codes: 400,403,500 (details)
+ /// Returns the current user dialog list. See Possible codes: 400,403 (details)
/// Exclude pinned dialogs
/// Peer folder ID, for more info click here
/// Offsets for pagination, for more info click here
@@ -1399,7 +1406,7 @@ namespace TL
hash = hash,
});
- /// Returns the conversation history with one interlocutor / within a chat See Possible codes: 400,406,500 (details)
+ /// Returns the conversation history with one interlocutor / within a chat See Possible codes: 400,406 (details)
/// Target peer
/// Only return messages starting from the specified message ID
/// Only return messages sent before the specified date
@@ -1501,7 +1508,7 @@ namespace TL
/// Sends a current user typing event (see for all event types) to a conversation partner or group. See [bots: ✓] Possible codes: 400,403,406 (details)
/// Target user or group
- /// Thread ID
+ /// Topic ID
/// Type of action
public static Task Messages_SetTyping(this Client client, InputPeer peer, SendMessageAction action, int? top_msg_id = null)
=> client.Invoke(new Messages_SetTyping
@@ -1521,17 +1528,17 @@ namespace TL
/// Whether to move used stickersets to top, see here for more info on this flag »
/// The destination where the message will be sent
/// The message ID to which this message will reply to
- /// If set, sends the message to the specified forum topic
+ /// This field must contain the topic ID only when replying to messages in forum topics different from the "General" topic (i.e. reply_to_msg_id is set and reply_to_msg_id != topicID and topicID != 1).
If the replied-to message is deleted before the method finishes execution, the value in this field will be used to send the message to the correct topic, instead of the "General" topic.
/// The message
/// Unique client message ID required to prevent message resending You can use
/// Reply markup for sending bot buttons
/// Message entities for sending styled text
/// Scheduled message date for scheduled messages
/// Send this message as the specified peer
- public static Task Messages_SendMessage(this Client client, InputPeer peer, string message, long random_id, int? reply_to_msg_id = null, int? top_msg_id = null, ReplyMarkup reply_markup = null, MessageEntity[] entities = null, DateTime? schedule_date = null, InputPeer send_as = null, bool no_webpage = false, bool silent = false, bool background = false, bool clear_draft = false, bool noforwards = false, bool update_stickersets_order = false)
+ public static Task Messages_SendMessage(this Client client, InputPeer peer, string message, long random_id, int? reply_to_msg_id = null, ReplyMarkup reply_markup = null, MessageEntity[] entities = null, int? top_msg_id = null, DateTime? schedule_date = null, InputPeer send_as = null, bool no_webpage = false, bool silent = false, bool background = false, bool clear_draft = false, bool noforwards = false, bool update_stickersets_order = false)
=> client.Invoke(new Messages_SendMessage
{
- flags = (Messages_SendMessage.Flags)((reply_to_msg_id != null ? 0x1 : 0) | (top_msg_id != null ? 0x200 : 0) | (reply_markup != null ? 0x4 : 0) | (entities != null ? 0x8 : 0) | (schedule_date != null ? 0x400 : 0) | (send_as != null ? 0x2000 : 0) | (no_webpage ? 0x2 : 0) | (silent ? 0x20 : 0) | (background ? 0x40 : 0) | (clear_draft ? 0x80 : 0) | (noforwards ? 0x4000 : 0) | (update_stickersets_order ? 0x8000 : 0)),
+ flags = (Messages_SendMessage.Flags)((reply_to_msg_id != null ? 0x1 : 0) | (reply_markup != null ? 0x4 : 0) | (entities != null ? 0x8 : 0) | (top_msg_id != null ? 0x200 : 0) | (schedule_date != null ? 0x400 : 0) | (send_as != null ? 0x2000 : 0) | (no_webpage ? 0x2 : 0) | (silent ? 0x20 : 0) | (background ? 0x40 : 0) | (clear_draft ? 0x80 : 0) | (noforwards ? 0x4000 : 0) | (update_stickersets_order ? 0x8000 : 0)),
peer = peer,
reply_to_msg_id = reply_to_msg_id.GetValueOrDefault(),
top_msg_id = top_msg_id.GetValueOrDefault(),
@@ -1551,7 +1558,7 @@ namespace TL
/// Whether to move used stickersets to top, see here for more info on this flag »
/// Destination
/// Message ID to which this message should reply to
- /// If set, sends the media to the specified forum topic
+ /// This field must contain the topic ID only when replying to messages in forum topics different from the "General" topic (i.e. reply_to_msg_id is set and reply_to_msg_id != topicID and topicID != 1).
If the replied-to message is deleted before the method finishes execution, the value in this field will be used to send the message to the correct topic, instead of the "General" topic.
/// Attached media
/// Caption
/// Random ID to avoid resending the same message You can use
@@ -1559,10 +1566,10 @@ namespace TL
/// Message entities for styled text
/// Scheduled message date for scheduled messages
/// Send this message as the specified peer
- public static Task Messages_SendMedia(this Client client, InputPeer peer, InputMedia media, string message, long random_id, int? reply_to_msg_id = null, int? top_msg_id = null, ReplyMarkup reply_markup = null, MessageEntity[] entities = null, DateTime? schedule_date = null, InputPeer send_as = null, bool silent = false, bool background = false, bool clear_draft = false, bool noforwards = false, bool update_stickersets_order = false)
+ public static Task Messages_SendMedia(this Client client, InputPeer peer, InputMedia media, string message, long random_id, int? reply_to_msg_id = null, ReplyMarkup reply_markup = null, MessageEntity[] entities = null, int? top_msg_id = null, DateTime? schedule_date = null, InputPeer send_as = null, bool silent = false, bool background = false, bool clear_draft = false, bool noforwards = false, bool update_stickersets_order = false)
=> client.Invoke(new Messages_SendMedia
{
- flags = (Messages_SendMedia.Flags)((reply_to_msg_id != null ? 0x1 : 0) | (top_msg_id != null ? 0x200 : 0) | (reply_markup != null ? 0x4 : 0) | (entities != null ? 0x8 : 0) | (schedule_date != null ? 0x400 : 0) | (send_as != null ? 0x2000 : 0) | (silent ? 0x20 : 0) | (background ? 0x40 : 0) | (clear_draft ? 0x80 : 0) | (noforwards ? 0x4000 : 0) | (update_stickersets_order ? 0x8000 : 0)),
+ flags = (Messages_SendMedia.Flags)((reply_to_msg_id != null ? 0x1 : 0) | (reply_markup != null ? 0x4 : 0) | (entities != null ? 0x8 : 0) | (top_msg_id != null ? 0x200 : 0) | (schedule_date != null ? 0x400 : 0) | (send_as != null ? 0x2000 : 0) | (silent ? 0x20 : 0) | (background ? 0x40 : 0) | (clear_draft ? 0x80 : 0) | (noforwards ? 0x4000 : 0) | (update_stickersets_order ? 0x8000 : 0)),
peer = peer,
reply_to_msg_id = reply_to_msg_id.GetValueOrDefault(),
top_msg_id = top_msg_id.GetValueOrDefault(),
@@ -1884,7 +1891,7 @@ namespace TL
title = title,
});
- /// Check the validity of a chat invite link and get basic info about it See Possible codes: 400,406,500 (details)
+ /// Check the validity of a chat invite link and get basic info about it See Possible codes: 400,406 (details)
/// Invite hash from chat invite deep link ».
public static Task Messages_CheckChatInvite(this Client client, string hash)
=> client.Invoke(new Messages_CheckChatInvite
@@ -2087,7 +2094,7 @@ namespace TL
/// Whether to hide the via @botname in the resulting message (only for bot usernames encountered in the )
/// Destination
/// ID of the message this message should reply to
- /// If set, sends the message to the specified forum topic
+ /// This field must contain the topic ID only when replying to messages in forum topics different from the "General" topic (i.e. reply_to_msg_id is set and reply_to_msg_id != topicID and topicID != 1).
If the replied-to message is deleted before the method finishes execution, the value in this field will be used to send the message to the correct topic, instead of the "General" topic.
/// Random ID to avoid resending the same query You can use
/// Query ID from Messages_GetInlineBotResults
/// Result ID from Messages_GetInlineBotResults
@@ -2189,7 +2196,7 @@ namespace TL
cache_time = cache_time,
});
- /// Get dialog info of specified peers See Possible codes: 400,406,500 (details)
+ /// Get dialog info of specified peers See Possible codes: 400,406 (details)
/// Peers
public static Task Messages_GetPeerDialogs(this Client client, params InputDialogPeerBase[] peers)
=> client.Invoke(new Messages_GetPeerDialogs
@@ -2531,7 +2538,7 @@ namespace TL
/// Whether to move used stickersets to top, see here for more info on this flag »
/// The destination chat
/// The message to reply to
- /// If set, sends the media to the specified forum topic
+ /// This field must contain the topic ID only when replying to messages in forum topics different from the "General" topic (i.e. reply_to_msg_id is set and reply_to_msg_id != topicID and topicID != 1).
If the replied-to message is deleted before the method finishes execution, the value in this field will be used to send the message to the correct topic, instead of the "General" topic.
/// The medias to send: note that they must be separately uploaded using Messages_UploadMedia first, using raw inputMediaUploaded* constructors is not supported.
/// Scheduled message date for scheduled messages
/// Send this message as the specified peer
@@ -2663,7 +2670,7 @@ namespace TL
banned_rights = banned_rights,
});
- /// Get localized emoji keywords See
+ /// Get localized emoji keywords ». See
/// Language code
public static Task Messages_GetEmojiKeywords(this Client client, string lang_code)
=> client.Invoke(new Messages_GetEmojiKeywords
@@ -2671,9 +2678,9 @@ namespace TL
lang_code = lang_code,
});
- /// Get changed emoji keywords See
+ /// Get changed emoji keywords ». See
/// Language code
- /// Previous emoji keyword localization version
+ /// Previous stored emoji keyword list version
public static Task Messages_GetEmojiKeywordsDifference(this Client client, string lang_code, int from_version)
=> client.Invoke(new Messages_GetEmojiKeywordsDifference
{
@@ -2681,16 +2688,16 @@ namespace TL
from_version = from_version,
});
- /// Get info about an emoji keyword localization See
- /// Language codes
+ /// Obtain a list of related languages that must be used when fetching emoji keyword lists ». See
+ /// The user's language codes
public static Task Messages_GetEmojiKeywordsLanguages(this Client client, params string[] lang_codes)
=> client.Invoke(new Messages_GetEmojiKeywordsLanguages
{
lang_codes = lang_codes,
});
- /// Returns an HTTP URL which can be used to automatically log in into translation platform and suggest new emoji replacements. The URL will be valid for 30 seconds after generation See
- /// Language code for which the emoji replacements will be suggested
+ /// Returns an HTTP URL which can be used to automatically log in into translation platform and suggest new emoji keywords ». The URL will be valid for 30 seconds after generation. See
+ /// Language code for which the emoji keywords will be suggested
public static Task Messages_GetEmojiURL(this Client client, string lang_code)
=> client.Invoke(new Messages_GetEmojiURL
{
@@ -2821,7 +2828,7 @@ namespace TL
});
/// Get folders See
- public static Task Messages_GetDialogFilters(this Client client)
+ public static Task Messages_GetDialogFilters(this Client client)
=> client.Invoke(new Messages_GetDialogFilters
{
});
@@ -2835,7 +2842,7 @@ namespace TL
/// Update folder See Possible codes: 400 (details)
/// Folder ID
/// Folder info
- public static Task Messages_UpdateDialogFilter(this Client client, int id, DialogFilter filter = null)
+ public static Task Messages_UpdateDialogFilter(this Client client, int id, DialogFilterBase filter = null)
=> client.Invoke(new Messages_UpdateDialogFilter
{
flags = (Messages_UpdateDialogFilter.Flags)(filter != null ? 0x1 : 0),
@@ -3057,7 +3064,7 @@ namespace TL
peer = peer,
});
- /// Get info about the users that joined the chat using a specific chat invite See Possible codes: 400,403,500 (details)
+ /// Get info about the users that joined the chat using a specific chat invite See Possible codes: 400,403 (details)
/// If set, only returns info about users with pending join requests »
/// Chat
/// Invite link
@@ -3354,12 +3361,12 @@ namespace TL
/// Theme parameters »
/// Short name of the application; 0-64 English letters, digits, and underscores
/// Whether the inline message that will be sent by the bot on behalf of the user once the web app interaction is Messages_SendWebViewResultMessage should be sent in reply to this message ID.
- /// If set, the inline message that will be sent by the bot on behalf of the user once the web app interaction is Messages_SendWebViewResultMessage will be sent to the specified forum topic
+ /// This field must contain the topic ID only when replying to messages in forum topics different from the "General" topic (i.e. reply_to_msg_id is set and reply_to_msg_id != topicID and topicID != 1).
If the replied-to message is deleted before the method finishes execution, the value in this field will be used to send the message to the correct topic, instead of the "General" topic.
/// Open the web app as the specified peer, sending the resulting the message as the specified peer.
- public static Task Messages_RequestWebView(this Client client, InputPeer peer, InputUserBase bot, string platform, string url = null, string start_param = null, DataJSON theme_params = null, int? reply_to_msg_id = null, int? top_msg_id = null, InputPeer send_as = null, bool from_bot_menu = false, bool silent = false)
+ public static Task Messages_RequestWebView(this Client client, InputPeer peer, InputUserBase bot, string platform, int? reply_to_msg_id = null, string url = null, DataJSON theme_params = null, string start_param = null, int? top_msg_id = null, InputPeer send_as = null, bool from_bot_menu = false, bool silent = false)
=> client.Invoke(new Messages_RequestWebView
{
- flags = (Messages_RequestWebView.Flags)((url != null ? 0x2 : 0) | (start_param != null ? 0x8 : 0) | (theme_params != null ? 0x4 : 0) | (reply_to_msg_id != null ? 0x1 : 0) | (top_msg_id != null ? 0x200 : 0) | (send_as != null ? 0x2000 : 0) | (from_bot_menu ? 0x10 : 0) | (silent ? 0x20 : 0)),
+ flags = (Messages_RequestWebView.Flags)((reply_to_msg_id != null ? 0x1 : 0) | (url != null ? 0x2 : 0) | (theme_params != null ? 0x4 : 0) | (start_param != null ? 0x8 : 0) | (top_msg_id != null ? 0x200 : 0) | (send_as != null ? 0x2000 : 0) | (from_bot_menu ? 0x10 : 0) | (silent ? 0x20 : 0)),
peer = peer,
bot = bot,
url = url,
@@ -3377,7 +3384,7 @@ namespace TL
/// Bot that owns the web app
/// Web app interaction ID obtained from Messages_RequestWebView
/// Whether the inline message that will be sent by the bot on behalf of the user once the web app interaction is Messages_SendWebViewResultMessage should be sent in reply to this message ID.
- /// If set, the inline message that will be sent by the bot on behalf of the user once the web app interaction is Messages_SendWebViewResultMessage will be sent to the specified forum topic.
+ /// This field must contain the topic ID only when replying to messages in forum topics different from the "General" topic (i.e. reply_to_msg_id is set and reply_to_msg_id != topicID and topicID != 1).
If the replied-to message is deleted before the method finishes execution, the value in this field will be used to send the message to the correct topic, instead of the "General" topic.
/// Open the web app as the specified peer
public static Task Messages_ProlongWebView(this Client client, InputPeer peer, InputUserBase bot, long query_id, int? reply_to_msg_id = null, int? top_msg_id = null, InputPeer send_as = null, bool silent = false)
=> client.Invoke(new Messages_ProlongWebView
@@ -3604,8 +3611,8 @@ namespace TL
peer = peer,
});
- /// Obtain information about a bot web app See [bots: ✓] Possible codes: 400 (details)
- /// Bot app information obtained from a bot web app deep link ».
+ /// Obtain information about a named bot web app See [bots: ✓] Possible codes: 400 (details)
+ /// Bot app information obtained from a named bot web app deep link ».
/// Hash for pagination, for more info click here
public static Task Messages_GetBotApp(this Client client, InputBotApp app, long hash = default)
=> client.Invoke(new Messages_GetBotApp
@@ -3614,11 +3621,11 @@ namespace TL
hash = hash,
});
- /// Open a bot web app from a bot web app deep link, sending over user information after user confirmation. See [bots: ✓]
- /// Set this flag if the bot is asking permission to send messages to the user as specified in the bot web app deep link docs, and the user agreed.
+ /// Open a bot web app from a named bot web app deep link, sending over user information after user confirmation. See [bots: ✓]
+ /// Set this flag if the bot is asking permission to send messages to the user as specified in the named bot web app deep link docs, and the user agreed.
/// If the client has clicked on the link in a Telegram chat, pass the chat's peer information; otherwise pass the bot's peer information, instead.
- /// The app obtained by invoking Messages_GetBotApp as specified in the bot web app deep link docs.
- /// If the startapp query string parameter is present in the bot web app deep link, pass it to start_param.
+ /// The app obtained by invoking Messages_GetBotApp as specified in the named bot web app deep link docs.
+ /// If the startapp query string parameter is present in the named bot web app deep link, pass it to start_param.
/// Theme parameters »
/// Short name of the application; 0-64 English letters, digits, and underscores
public static Task Messages_RequestAppWebView(this Client client, InputPeer peer, InputBotApp app, string platform, string start_param = null, DataJSON theme_params = null, bool write_allowed = false)
@@ -3632,6 +3639,17 @@ namespace TL
platform = platform,
});
+ /// See
+ public static Task Messages_SetChatWallPaper(this Client client, InputPeer peer, InputWallPaperBase wallpaper = null, int? id = null, WallPaperSettings settings = null)
+ => client.Invoke(new Messages_SetChatWallPaper
+ {
+ flags = (Messages_SetChatWallPaper.Flags)((wallpaper != null ? 0x1 : 0) | (id != null ? 0x2 : 0) | (settings != null ? 0x4 : 0)),
+ peer = peer,
+ wallpaper = wallpaper,
+ settings = settings,
+ id = id.GetValueOrDefault(),
+ });
+
/// Returns a current state of updates. See [bots: ✓]
public static Task Updates_GetState(this Client client)
=> client.Invoke(new Updates_GetState
@@ -3672,10 +3690,11 @@ namespace TL
/// Installs a previously uploaded photo as a profile photo. See Possible codes: 400 (details)
/// If set, the chosen profile photo will be shown to users that can't display your main profile photo due to your privacy settings.
/// Input photo
- public static Task Photos_UpdateProfilePhoto(this Client client, InputPhoto id, bool fallback = false)
+ public static Task Photos_UpdateProfilePhoto(this Client client, InputPhoto id, InputUserBase bot = null, bool fallback = false)
=> client.Invoke(new Photos_UpdateProfilePhoto
{
- flags = (Photos_UpdateProfilePhoto.Flags)(fallback ? 0x1 : 0),
+ flags = (Photos_UpdateProfilePhoto.Flags)((bot != null ? 0x2 : 0) | (fallback ? 0x1 : 0)),
+ bot = bot,
id = id,
});
@@ -3685,10 +3704,11 @@ namespace TL
/// Animated profile picture video
/// Floating point UNIX timestamp in seconds, indicating the frame of the video/sticker that should be used as static preview; can only be used if video or video_emoji_markup is set.
/// Animated sticker profile picture, must contain either a or a .
- public static Task Photos_UploadProfilePhoto(this Client client, InputFileBase file = null, InputFileBase video = null, double? video_start_ts = null, VideoSizeBase video_emoji_markup = null, bool fallback = false)
+ public static Task Photos_UploadProfilePhoto(this Client client, InputFileBase file = null, InputFileBase video = null, double? video_start_ts = null, VideoSizeBase video_emoji_markup = null, InputUserBase bot = null, bool fallback = false)
=> client.Invoke(new Photos_UploadProfilePhoto
{
- flags = (Photos_UploadProfilePhoto.Flags)((file != null ? 0x1 : 0) | (video != null ? 0x2 : 0) | (video_start_ts != null ? 0x4 : 0) | (video_emoji_markup != null ? 0x10 : 0) | (fallback ? 0x8 : 0)),
+ flags = (Photos_UploadProfilePhoto.Flags)((file != null ? 0x1 : 0) | (video != null ? 0x2 : 0) | (video_start_ts != null ? 0x4 : 0) | (video_emoji_markup != null ? 0x10 : 0) | (bot != null ? 0x20 : 0) | (fallback ? 0x8 : 0)),
+ bot = bot,
file = file,
video = video,
video_start_ts = video_start_ts.GetValueOrDefault(),
@@ -4046,7 +4066,7 @@ namespace TL
id = id,
});
- /// Get channel/supergroup messages See [bots: ✓] Possible codes: 400,406,500 (details)
+ /// Get channel/supergroup messages See [bots: ✓] Possible codes: 400,406 (details)
/// Channel/supergroup
/// IDs of messages to get
public static Task Channels_GetMessages(this Client client, InputChannelBase channel, params InputMessage[] id)
@@ -4091,7 +4111,7 @@ namespace TL
id = id,
});
- /// Get full info about a supergroup, gigagroup or channel See [bots: ✓] Possible codes: 400,403,406,500 (details)
+ /// Get full info about a supergroup, gigagroup or channel See [bots: ✓] Possible codes: 400,403,406 (details)
/// The channel, supergroup or gigagroup to get info about
public static Task Channels_GetFullChannel(this Client client, InputChannelBase channel)
=> client.Invoke(new Channels_GetFullChannel
@@ -4174,7 +4194,7 @@ namespace TL
username = username,
});
- /// Join a channel/supergroup See Possible codes: 400,406,500 (details)
+ /// Join a channel/supergroup See Possible codes: 400,406 (details)
/// Channel/supergroup to join
public static Task Channels_JoinChannel(this Client client, InputChannelBase channel)
=> client.Invoke(new Channels_JoinChannel
@@ -4329,7 +4349,7 @@ namespace TL
{
});
- /// Associate a group to a channel as discussion group for that channel See Possible codes: 400 (details)
+ /// Associate a group to a channel as discussion group for that channel See Possible codes: 400,403 (details)
/// Channel
/// Discussion group to associate to the channel
public static Task Channels_SetDiscussionGroup(this Client client, InputChannelBase broadcast, InputChannelBase group)
@@ -4454,7 +4474,7 @@ namespace TL
order = order,
});
- /// Associate or dissociate a purchased fragment.com username to a supergroup or channel. See [bots: ✓]
+ /// Associate or dissociate a purchased fragment.com username to a supergroup or channel. See [bots: ✓] Possible codes: 400 (details)
/// Supergroup or channel
/// Username
/// Whether to associate or dissociate the username
@@ -4491,10 +4511,10 @@ namespace TL
/// ID of the custom emoji used as topic icon. Telegram Premium users can use any custom emoji, other users can only use the custom emojis contained in the emoji pack.
/// Unique client message ID to prevent duplicate sending of the same event You can use
/// Create the topic as the specified peer
- public static Task Channels_CreateForumTopic(this Client client, InputChannelBase channel, string title, long random_id, int? icon_color = null, long? icon_emoji_id = null, InputPeer send_as = null)
+ public static Task Channels_CreateForumTopic(this Client client, InputChannelBase channel, string title, long random_id, int? icon_color = null, InputPeer send_as = null, long? icon_emoji_id = null)
=> client.Invoke(new Channels_CreateForumTopic
{
- flags = (Channels_CreateForumTopic.Flags)((icon_color != null ? 0x1 : 0) | (icon_emoji_id != null ? 0x8 : 0) | (send_as != null ? 0x4 : 0)),
+ flags = (Channels_CreateForumTopic.Flags)((icon_color != null ? 0x1 : 0) | (send_as != null ? 0x4 : 0) | (icon_emoji_id != null ? 0x8 : 0)),
channel = channel,
title = title,
icon_color = icon_color.GetValueOrDefault(),
@@ -4538,7 +4558,7 @@ namespace TL
/// If present, will update the topic title (maximum UTF-8 length: 128).
/// If present, updates the custom emoji used as topic icon. Telegram Premium users can use any custom emoji, other users can only use the custom emojis contained in the emoji pack. Pass 0 to switch to the fallback topic icon.
/// If present, will update the open/closed status of the topic.
- /// If present, will hide/unhide the topic.
+ /// If present, will hide/unhide the topic (only valid for the "General" topic, id=1).
public static Task Channels_EditForumTopic(this Client client, InputChannelBase channel, int topic_id, string title = null, long? icon_emoji_id = null, bool? closed = default, bool? hidden = default)
=> client.Invoke(new Channels_EditForumTopic
{
@@ -4605,7 +4625,7 @@ namespace TL
msg_id = msg_id,
});
- /// Hide or display the participants list in a supergroup See [bots: ✓]
+ /// Hide or display the participants list in a supergroup. See [bots: ✓] Possible codes: 400 (details)
/// Supergroup ID
/// If true, will hide the participants list; otherwise will unhide it.
public static Task Channels_ToggleParticipantsHidden(this Client client, InputChannelBase channel, bool enabled)
@@ -4706,23 +4726,44 @@ namespace TL
/// Language code, if left empty update the fallback about text and description
/// New about text
/// New description
- public static Task Bots_SetBotInfo(this Client client, string lang_code, string about = null, string description = null)
+ public static Task Bots_SetBotInfo(this Client client, string lang_code, string about = null, string description = null, InputUserBase bot = null, string name = null)
=> client.Invoke(new Bots_SetBotInfo
{
- flags = (Bots_SetBotInfo.Flags)((about != null ? 0x1 : 0) | (description != null ? 0x2 : 0)),
+ flags = (Bots_SetBotInfo.Flags)((about != null ? 0x1 : 0) | (description != null ? 0x2 : 0) | (bot != null ? 0x4 : 0) | (name != null ? 0x8 : 0)),
+ bot = bot,
lang_code = lang_code,
+ name = name,
about = about,
description = description,
});
/// Get our about text and description (bots only) See [bots: ✓] Possible codes: 400 (details)
/// Language code, if left empty this method will return the fallback about text and description.
- public static Task Bots_GetBotInfo(this Client client, string lang_code)
+ public static Task Bots_GetBotInfo(this Client client, string lang_code, InputUserBase bot = null)
=> client.Invoke(new Bots_GetBotInfo
{
+ flags = (Bots_GetBotInfo.Flags)(bot != null ? 0x1 : 0),
+ bot = bot,
lang_code = lang_code,
});
+ /// See
+ public static Task Bots_ReorderUsernames(this Client client, InputUserBase bot, params string[] order)
+ => client.Invoke(new Bots_ReorderUsernames
+ {
+ bot = bot,
+ order = order,
+ });
+
+ /// See
+ public static Task Bots_ToggleUsername(this Client client, InputUserBase bot, string username, bool active)
+ => client.Invoke(new Bots_ToggleUsername
+ {
+ bot = bot,
+ username = username,
+ active = active,
+ });
+
/// Get a payment form See Possible codes: 400 (details)
/// Invoice
/// A JSON object with the following keys, containing color theme information (integers, RGB24) to pass to the payment provider, to apply in eventual verification pages:
bg_color - Background color
text_color - Text color
hint_color - Hint text color
link_color - Link color
button_color - Button color
button_text_color - Button text color
@@ -5370,14 +5411,6 @@ namespace TL
folder_peers = folder_peers,
});
- /// Delete a peer folder See Possible codes: 400 (details)
- /// Peer folder ID, for more info click here
- public static Task Folders_DeleteFolder(this Client client, int folder_id)
- => client.Invoke(new Folders_DeleteFolder
- {
- folder_id = folder_id,
- });
-
/// Get channel statistics See Possible codes: 400,403 (details)
/// Whether to enable dark theme for graph colors
/// The channel
@@ -5438,6 +5471,93 @@ namespace TL
channel = channel,
msg_id = msg_id,
});
+
+ /// See
+ public static Task Chatlists_ExportChatlistInvite(this Client client, InputChatlist chatlist, string title, params InputPeer[] peers)
+ => client.Invoke(new Chatlists_ExportChatlistInvite
+ {
+ chatlist = chatlist,
+ title = title,
+ peers = peers,
+ });
+
+ /// See
+ public static Task Chatlists_DeleteExportedInvite(this Client client, InputChatlist chatlist, string slug)
+ => client.Invoke(new Chatlists_DeleteExportedInvite
+ {
+ chatlist = chatlist,
+ slug = slug,
+ });
+
+ /// See
+ public static Task Chatlists_EditExportedInvite(this Client client, InputChatlist chatlist, string slug, string title = null, InputPeer[] peers = null)
+ => client.Invoke(new Chatlists_EditExportedInvite
+ {
+ flags = (Chatlists_EditExportedInvite.Flags)((title != null ? 0x2 : 0) | (peers != null ? 0x4 : 0)),
+ chatlist = chatlist,
+ slug = slug,
+ title = title,
+ peers = peers,
+ });
+
+ /// See
+ public static Task Chatlists_GetExportedInvites(this Client client, InputChatlist chatlist)
+ => client.Invoke(new Chatlists_GetExportedInvites
+ {
+ chatlist = chatlist,
+ });
+
+ /// See
+ public static Task Chatlists_CheckChatlistInvite(this Client client, string slug)
+ => client.Invoke(new Chatlists_CheckChatlistInvite
+ {
+ slug = slug,
+ });
+
+ /// See
+ public static Task Chatlists_JoinChatlistInvite(this Client client, string slug, params InputPeer[] peers)
+ => client.Invoke(new Chatlists_JoinChatlistInvite
+ {
+ slug = slug,
+ peers = peers,
+ });
+
+ /// See
+ public static Task Chatlists_GetChatlistUpdates(this Client client, InputChatlist chatlist)
+ => client.Invoke(new Chatlists_GetChatlistUpdates
+ {
+ chatlist = chatlist,
+ });
+
+ /// See
+ public static Task Chatlists_JoinChatlistUpdates(this Client client, InputChatlist chatlist, params InputPeer[] peers)
+ => client.Invoke(new Chatlists_JoinChatlistUpdates
+ {
+ chatlist = chatlist,
+ peers = peers,
+ });
+
+ /// See
+ public static Task Chatlists_HideChatlistUpdates(this Client client, InputChatlist chatlist)
+ => client.Invoke(new Chatlists_HideChatlistUpdates
+ {
+ chatlist = chatlist,
+ });
+
+ /// See
+ public static Task Chatlists_GetLeaveChatlistSuggestions(this Client client, InputChatlist chatlist)
+ => client.Invoke(new Chatlists_GetLeaveChatlistSuggestions
+ {
+ chatlist = chatlist,
+ });
+
+ /// See
+ public static Task Chatlists_LeaveChatlist(this Client client, InputChatlist chatlist, params InputPeer[] peers)
+ => client.Invoke(new Chatlists_LeaveChatlist
+ {
+ chatlist = chatlist,
+ peers = peers,
+ });
}
}
@@ -6015,12 +6135,18 @@ namespace TL.Methods
public InputWallPaperBase wallpaper;
}
- [TLDef(0xDD853661)]
+ [TLDef(0xE39A8F03)]
public class Account_UploadWallPaper : IMethod
{
+ public Flags flags;
public InputFileBase file;
public string mime_type;
public WallPaperSettings settings;
+
+ [Flags] public enum Flags : uint
+ {
+ for_chat = 0x1,
+ }
}
[TLDef(0x6C5A5B37)]
@@ -7746,7 +7872,7 @@ namespace TL.Methods
}
[TLDef(0xF19ED96D)]
- public class Messages_GetDialogFilters : IMethod { }
+ public class Messages_GetDialogFilters : IMethod { }
[TLDef(0xA29CD42C)]
public class Messages_GetSuggestedDialogFilters : IMethod { }
@@ -7756,7 +7882,7 @@ namespace TL.Methods
{
public Flags flags;
public int id;
- [IfFlag(0)] public DialogFilter filter;
+ [IfFlag(0)] public DialogFilterBase filter;
[Flags] public enum Flags : uint
{
@@ -8401,6 +8527,23 @@ namespace TL.Methods
}
}
+ [TLDef(0x8FFACAE1)]
+ public class Messages_SetChatWallPaper : IMethod
+ {
+ public Flags flags;
+ public InputPeer peer;
+ [IfFlag(0)] public InputWallPaperBase wallpaper;
+ [IfFlag(2)] public WallPaperSettings settings;
+ [IfFlag(1)] public int id;
+
+ [Flags] public enum Flags : uint
+ {
+ has_wallpaper = 0x1,
+ has_id = 0x2,
+ has_settings = 0x4,
+ }
+ }
+
[TLDef(0xEDD4882A)]
public class Updates_GetState : IMethod { }
@@ -8434,22 +8577,25 @@ namespace TL.Methods
}
}
- [TLDef(0x1C3D5956)]
+ [TLDef(0x09E82039)]
public class Photos_UpdateProfilePhoto : IMethod
{
public Flags flags;
+ [IfFlag(1)] public InputUserBase bot;
public InputPhoto id;
[Flags] public enum Flags : uint
{
fallback = 0x1,
+ has_bot = 0x2,
}
}
- [TLDef(0x093C9A51)]
+ [TLDef(0x0388A3B5)]
public class Photos_UploadProfilePhoto : IMethod
{
public Flags flags;
+ [IfFlag(5)] public InputUserBase bot;
[IfFlag(0)] public InputFileBase file;
[IfFlag(1)] public InputFileBase video;
[IfFlag(2)] public double video_start_ts;
@@ -8462,6 +8608,7 @@ namespace TL.Methods
has_video_start_ts = 0x4,
fallback = 0x8,
has_video_emoji_markup = 0x10,
+ has_bot = 0x20,
}
}
@@ -9210,11 +9357,13 @@ namespace TL.Methods
public ChatAdminRights admin_rights;
}
- [TLDef(0xA365DF7A)]
+ [TLDef(0x10CF3123)]
public class Bots_SetBotInfo : IMethod
{
public Flags flags;
+ [IfFlag(2)] public InputUserBase bot;
public string lang_code;
+ [IfFlag(3)] public string name;
[IfFlag(0)] public string about;
[IfFlag(1)] public string description;
@@ -9222,13 +9371,37 @@ namespace TL.Methods
{
has_about = 0x1,
has_description = 0x2,
+ has_bot = 0x4,
+ has_name = 0x8,
}
}
- [TLDef(0x75EC12E6)]
- public class Bots_GetBotInfo : IMethod
+ [TLDef(0xDCD914FD)]
+ public class Bots_GetBotInfo : IMethod
{
+ public Flags flags;
+ [IfFlag(0)] public InputUserBase bot;
public string lang_code;
+
+ [Flags] public enum Flags : uint
+ {
+ has_bot = 0x1,
+ }
+ }
+
+ [TLDef(0x9709B1C2)]
+ public class Bots_ReorderUsernames : IMethod
+ {
+ public InputUserBase bot;
+ public string[] order;
+ }
+
+ [TLDef(0x053CA973)]
+ public class Bots_ToggleUsername : IMethod
+ {
+ public InputUserBase bot;
+ public string username;
+ public bool active;
}
[TLDef(0x37148DBB)]
@@ -9766,12 +9939,6 @@ namespace TL.Methods
public InputFolderPeer[] folder_peers;
}
- [TLDef(0x1C295881)]
- public class Folders_DeleteFolder : IMethod
- {
- public int folder_id;
- }
-
[TLDef(0xAB42441A)]
public class Stats_GetBroadcastStats : IMethod
{
@@ -9832,4 +9999,86 @@ namespace TL.Methods
dark = 0x1,
}
}
+
+ [TLDef(0x8472478E)]
+ public class Chatlists_ExportChatlistInvite : IMethod
+ {
+ public InputChatlist chatlist;
+ public string title;
+ public InputPeer[] peers;
+ }
+
+ [TLDef(0x719C5C5E)]
+ public class Chatlists_DeleteExportedInvite : IMethod
+ {
+ public InputChatlist chatlist;
+ public string slug;
+ }
+
+ [TLDef(0x653DB63D)]
+ public class Chatlists_EditExportedInvite : IMethod
+ {
+ public Flags flags;
+ public InputChatlist chatlist;
+ public string slug;
+ [IfFlag(1)] public string title;
+ [IfFlag(2)] public InputPeer[] peers;
+
+ [Flags] public enum Flags : uint
+ {
+ has_title = 0x2,
+ has_peers = 0x4,
+ }
+ }
+
+ [TLDef(0xCE03DA83)]
+ public class Chatlists_GetExportedInvites : IMethod
+ {
+ public InputChatlist chatlist;
+ }
+
+ [TLDef(0x41C10FFF)]
+ public class Chatlists_CheckChatlistInvite : IMethod
+ {
+ public string slug;
+ }
+
+ [TLDef(0xA6B1E39A)]
+ public class Chatlists_JoinChatlistInvite : IMethod
+ {
+ public string slug;
+ public InputPeer[] peers;
+ }
+
+ [TLDef(0x89419521)]
+ public class Chatlists_GetChatlistUpdates : IMethod
+ {
+ public InputChatlist chatlist;
+ }
+
+ [TLDef(0xE089F8F5)]
+ public class Chatlists_JoinChatlistUpdates : IMethod
+ {
+ public InputChatlist chatlist;
+ public InputPeer[] peers;
+ }
+
+ [TLDef(0x66E486FB)]
+ public class Chatlists_HideChatlistUpdates : IMethod
+ {
+ public InputChatlist chatlist;
+ }
+
+ [TLDef(0xFDBCD714)]
+ public class Chatlists_GetLeaveChatlistSuggestions : IMethod
+ {
+ public InputChatlist chatlist;
+ }
+
+ [TLDef(0x74FAE13A)]
+ public class Chatlists_LeaveChatlist : IMethod
+ {
+ public InputChatlist chatlist;
+ public InputPeer[] peers;
+ }
}
diff --git a/src/TL.Table.cs b/src/TL.Table.cs
index f993e3c..441228b 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 = 156; // fetched 26/03/2023 17:25:51
+ public const int Version = 158; // fetched 21/04/2023 14:33:19
internal const int SecretChats = 144;
internal const int MTProto2 = 73;
internal const uint VectorCtor = 0x1CB5C415;
@@ -190,11 +190,13 @@ namespace TL
[0xEBBCA3CB] = typeof(MessageActionChatJoinedByRequest),
[0x47DD8079] = typeof(MessageActionWebViewDataSentMe),
[0xB4C38CB5] = typeof(MessageActionWebViewDataSent),
- [0xABA0F5C6] = typeof(MessageActionGiftPremium),
+ [0xC83D6AEC] = typeof(MessageActionGiftPremium),
[0x0D999256] = typeof(MessageActionTopicCreate),
[0xC0944820] = typeof(MessageActionTopicEdit),
[0x57DE635E] = typeof(MessageActionSuggestProfilePhoto),
[0xFE77345D] = typeof(MessageActionRequestedPeer),
+ [0xBC44A927] = typeof(MessageActionSetChatWallPaper),
+ [0xC0787D6D] = typeof(MessageActionSetSameChatWallPaper),
[0xD58A08C6] = typeof(Dialog),
[0x71BD134C] = typeof(DialogFolder),
[0x2331B22D] = typeof(PhotoEmpty),
@@ -222,7 +224,7 @@ namespace TL
[0xA518110D] = typeof(PeerSettings),
[0xA437C3ED] = typeof(WallPaper),
[0xE0804116] = typeof(WallPaperNoFile),
- [0xF8D32AED] = typeof(UserFull),
+ [0x93EADB53] = typeof(UserFull),
[0x145ADE0B] = typeof(Contact),
[0xC13E3C50] = typeof(ImportedContact),
[0x16D9703B] = typeof(ContactStatus),
@@ -508,7 +510,7 @@ namespace TL
[0x35BBDB6B] = typeof(KeyboardButtonCallback),
[0xB16A6C29] = typeof(KeyboardButtonRequestPhone),
[0xFC796B3F] = typeof(KeyboardButtonRequestGeoLocation),
- [0x0568A748] = typeof(KeyboardButtonSwitchInline),
+ [0x93B9FBB5] = typeof(KeyboardButtonSwitchInline),
[0x50F41CCF] = typeof(KeyboardButtonGame),
[0xAFD93FBB] = typeof(KeyboardButtonBuy),
[0x10B78D29] = typeof(KeyboardButtonUrlAuth),
@@ -756,7 +758,7 @@ namespace TL
[0xF92424D2] = typeof(ChannelAdminLogEventActionParticipantMute),
[0xE64429C0] = typeof(ChannelAdminLogEventActionParticipantUnmute),
[0x56D6A247] = typeof(ChannelAdminLogEventActionToggleGroupCallSetting),
- [0x5CDADA77] = typeof(ChannelAdminLogEventActionParticipantJoinByInvite),
+ [0xFE9FC158] = typeof(ChannelAdminLogEventActionParticipantJoinByInvite),
[0x5A50FCA4] = typeof(ChannelAdminLogEventActionExportedInviteDelete),
[0x410A134E] = typeof(ChannelAdminLogEventActionExportedInviteRevoke),
[0xE90EBB59] = typeof(ChannelAdminLogEventActionExportedInviteEdit),
@@ -915,6 +917,7 @@ namespace TL
[0x3E24E573] = typeof(Payments_BankCardData),
[0x7438F7E8] = typeof(DialogFilter),
[0x363293AE] = null,//DialogFilterDefault
+ [0xD64A04A8] = typeof(DialogFilterChatlist),
[0x77744D4A] = typeof(DialogFilterSuggested),
[0xB637EDAF] = typeof(StatsDateRangeDays),
[0xCB43ACDE] = typeof(StatsAbsValueAndPrev),
@@ -1082,6 +1085,14 @@ namespace TL
[0x3C1B4F0D] = typeof(AppWebViewResultUrl),
[0xB57295D5] = typeof(InlineBotWebView),
[0x4A4FF172] = typeof(ReadParticipantDate),
+ [0xF3E0DA33] = typeof(InputChatlistDialogFilter),
+ [0x0C5181AC] = typeof(ExportedChatlistInvite),
+ [0x10E6E3A6] = typeof(Chatlists_ExportedChatlistInvite),
+ [0x10AB6DC7] = typeof(Chatlists_ExportedInvites),
+ [0xFA87F659] = typeof(Chatlists_ChatlistInviteAlready),
+ [0x1DCD839D] = typeof(Chatlists_ChatlistInvite),
+ [0x93BD878D] = typeof(Chatlists_ChatlistUpdates),
+ [0xE8A775B0] = typeof(Bots_BotInfo),
// from TL.Secret:
[0x6ABD9782] = typeof(Layer143.DecryptedMessageMediaDocument),
[0x91CC4674] = typeof(Layer73.DecryptedMessage),
@@ -1198,6 +1209,7 @@ namespace TL
[typeof(ChatReactions)] = 0xEAFC32BC, //chatReactionsNone
[typeof(Messages_Reactions)] = 0xB06FDBDF, //messages.reactionsNotModified
// from TL.Secret:
+ [typeof(DialogFilterBase)] = 0x363293AE, //dialogFilterDefault
[typeof(EmojiList)] = 0x481EADFA, //emojiListNotModified
[typeof(Messages_EmojiGroups)] = 0x6FB4AD87, //messages.emojiGroupsNotModified
[typeof(Help_AppConfig)] = 0x7CDE641D, //help.appConfigNotModified
diff --git a/src/WTelegramClient.csproj b/src/WTelegramClient.csproj
index 49d8aeb..46d77cb 100644
--- a/src/WTelegramClient.csproj
+++ b/src/WTelegramClient.csproj
@@ -13,7 +13,7 @@
WTelegramClient
0.0.0
Wizou
- Telegram Client API (MTProto) library written 100% in C# and .NET Standard | Latest API layer: 156
Release Notes:
$(ReleaseNotes.Replace("|", "%0D%0A").Replace(" - ","%0D%0A- ").Replace(" ", "%0D%0A%0D%0A"))
+ Telegram Client API (MTProto) library written 100% in C# and .NET Standard | Latest API layer: 158
Release Notes:
$(ReleaseNotes.Replace("|", "%0D%0A").Replace(" - ","%0D%0A- ").Replace(" ", "%0D%0A%0D%0A"))
Copyright © Olivier Marcoux 2021-2023
MIT
https://github.com/wiz0u/WTelegramClient