diff --git a/FAQ.md b/FAQ.md index c879365..4ebb202 100644 --- a/FAQ.md +++ b/FAQ.md @@ -22,7 +22,8 @@ The WTelegram.session file contains the authentication keys negociated for the c You could switch the current user via an `Auth_Logout` followed by a `LoginUserIfNeeded` but that would require the user to sign in with a verification_code each time. -Instead, if you want to deal with multiple users from the same machine, the recommended solution is to have a different session file for each user. This can be done by having your Config callback reply with a different filename (or folder) for "**session_pathname**" for each user. +Instead, if you want to deal with multiple users from the same machine, the recommended solution is to have a different session file for each user. +This can be done by having your Config callback reply with a different filename (or folder) for "**session_pathname**" for each user. This way, you can keep separate session files (each with their authentication keys) for each user. If you need to manage these user accounts in parallel, you can create multiple instances of WTelegram.Client, diff --git a/README.md b/README.md index 8a524db..f68bee3 100644 --- a/README.md +++ b/README.md @@ -47,7 +47,7 @@ If you run this program again, you will notice that only **api_hash** is request This is because WTelegramClient saves (typically in the encrypted file **bin\WTelegram.session**) its state and the authentication keys that were negotiated with Telegram so that you needn't sign-in again every time. -That file path is configurable (**session_pathname**), and under various circumstances (changing user or server address) +That file path is configurable (**session_pathname**), and under various circumstances *(changing user or server address, write permissions)* you may want to change it or simply delete the existing session file in order to restart the authentification process. # Non-interactive configuration diff --git a/src/TL.Schema.cs b/src/TL.Schema.cs index c3c7207..6e1c9e3 100644 --- a/src/TL.Schema.cs +++ b/src/TL.Schema.cs @@ -1880,7 +1880,7 @@ namespace TL public string emoticon; } - /// Object describing actions connected to a service message. See Derived classes: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , + /// Object describing actions connected to a service message. See Derived classes: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , /// a value means messageActionEmpty public abstract class MessageAction : IObject { } /// Group created See @@ -2196,8 +2196,11 @@ namespace TL { /// Flags, see TL conditional fields public Flags flags; + /// Topic name. public string title; + /// If no custom emoji icon is specified, specifies the color of the fallback topic icon (RGB), one of 0x6FB9F0, 0xFFD67E, 0xCB86DB, 0x8EEE98, 0xFF93B2, or 0xFB6F5F. public int icon_color; + /// ID of the custom emoji used as topic icon. [IfFlag(0)] public long icon_emoji_id; [Flags] public enum Flags : uint @@ -2486,7 +2489,7 @@ namespace TL } } - /// Contains info on a confirmation code message sent via SMS, phone call or Telegram. See Derived classes: + /// Contains info on a confirmation code message sent via SMS, phone call or Telegram. See Derived classes: , public abstract class Auth_SentCodeBase : IObject { } /// Contains info about a sent verification code. See [TLDef(0x5E002502)] @@ -2570,7 +2573,7 @@ namespace TL public byte[] bytes; } - /// Object defines the set of users and/or groups that generate notifications. See Derived classes: , , , + /// Object defines the set of users and/or groups that generate notifications. See Derived classes: , , , , public abstract class InputNotifyPeerBase : IObject { } /// Notifications generated by a certain user or group. See [TLDef(0xB8BC5B0C)] @@ -3199,7 +3202,7 @@ namespace TL [TLDef(0x1BB00451)] public class InputMessagesFilterPinned : MessagesFilter { } - /// Object contains info on events occurred. See Derived classes: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , + /// Object contains info on events occurred. See Derived classes: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , public abstract class Update : IObject { } /// New message in a private chat or in a basic group. See [TLDef(0x1F2B0AFD)] @@ -4978,6 +4981,7 @@ namespace TL [IfFlag(2)] public int base_lang_pack_version; /// Default message reaction [IfFlag(15)] public Reaction reactions_default; + /// Autologin token, click here for more info on URL authorization ». [IfFlag(16)] public string autologin_token; [Flags] public enum Flags : uint @@ -5447,7 +5451,7 @@ namespace TL public UserBase user; } - /// Object defines the set of users and/or groups that generate notifications. See Derived classes: , , , + /// Object defines the set of users and/or groups that generate notifications. See Derived classes: , , , , public abstract class NotifyPeerBase : IObject { } /// Notifications generated by a certain user or group. See [TLDef(0x9FD40BD8)] @@ -6283,7 +6287,7 @@ namespace TL public DateTime expires; } - /// Represents a stickerset See Derived classes: , , , , , , , + /// Represents a stickerset See Derived classes: , , , , , , , , /// a value means inputStickerSetEmpty public abstract partial class InputStickerSet : IObject { } /// Stickerset by ID See @@ -6440,7 +6444,7 @@ namespace TL } } - /// Bot or inline keyboard buttons See Derived classes: , , , , , , , , , , , , , , + /// Bot or inline keyboard buttons See Derived classes: , , , , , , , , , , , , , , , public abstract class KeyboardButtonBase : IObject { /// Button text @@ -7837,7 +7841,7 @@ namespace TL FragmentSms = 0x06ED998C, } - /// Type of the verification code that was sent See Derived classes: , , , , , , + /// Type of the verification code that was sent See Derived classes: , , , , , , , , public abstract class Auth_SentCodeType : IObject { } /// The code was sent through the telegram app See [TLDef(0x3DBB5986)] @@ -8225,7 +8229,7 @@ namespace TL public StickerSetCoveredBase[] sets; } - /// Stickerset preview See Derived classes: , , + /// Stickerset preview See Derived classes: , , , public abstract class StickerSetCoveredBase : IObject { /// Stickerset @@ -9841,7 +9845,7 @@ namespace TL } } - /// Channel admin log event See Derived classes: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , + /// Channel admin log event See Derived classes: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , public abstract class ChannelAdminLogEventAction : IObject { } /// Channel/supergroup title was changed See [TLDef(0xE6DFB825)] @@ -12332,7 +12336,7 @@ namespace TL public IPeerInfo UserOrChat => peer?.UserOrChat(users, chats); } - /// Represents an animated video thumbnail See Derived classes: + /// Represents an animated video thumbnail See Derived classes: , , public abstract class VideoSizeBase : IObject { } /// Animated profile picture in MPEG4 format See [TLDef(0xDE33B094)] @@ -14019,7 +14023,7 @@ namespace TL } } - /// See Derived classes: + /// See Derived classes: , public abstract class MessageExtendedMediaBase : IObject { } /// See [TLDef(0xAD628CC8)] @@ -14072,7 +14076,7 @@ namespace TL } } - /// See Derived classes: + /// See Derived classes: , public abstract class ForumTopicBase : IObject { public virtual int ID { get; } @@ -14094,7 +14098,9 @@ namespace TL public int id; public DateTime date; public string title; + /// If no custom emoji icon is specified, specifies the color of the fallback topic icon (RGB), one of 0x6FB9F0, 0xFFD67E, 0xCB86DB, 0x8EEE98, 0xFF93B2, or 0xFB6F5F. public int icon_color; + /// ID of the custom emoji used as topic icon. [IfFlag(0)] public long icon_emoji_id; public int top_message; public int read_inbox_max_id; @@ -14150,15 +14156,17 @@ namespace TL public int period; } - /// See + /// Describes a temporary profile link. See [TLDef(0x41BF109B)] public class ExportedContactToken : IObject { + /// The temporary profile link. public string url; + /// Its expiry date public DateTime expires; } - /// See Derived classes: + /// See Derived classes: , , public abstract class RequestPeerType : IObject { } /// See [TLDef(0x5F3B8A00)] @@ -14259,7 +14267,7 @@ namespace TL public MessageEntity[] entities; } - /// Translated text, or no result See Derived classes: + /// Translated text, or no result See Derived classes: public abstract class Messages_TranslatedText : IObject { } /// See [TLDef(0x33DB32F8)] @@ -14316,13 +14324,14 @@ namespace TL public JsonObject config; } - /// See Derived classes: + /// See Derived classes: , public abstract class InputBotApp : IObject { } /// See [TLDef(0xA920BD7A)] public class InputBotAppID : InputBotApp { public long id; + /// REQUIRED FIELD. See how to obtain it
public long access_hash; } ///
See @@ -14371,7 +14380,7 @@ namespace TL } } - /// See Derived classes: + /// See Derived classes: public abstract class AppWebViewResult : IObject { } /// See [TLDef(0x3C1B4F0D)] diff --git a/src/TL.SchemaFuncs.cs b/src/TL.SchemaFuncs.cs index fdaa088..d3f26ae 100644 --- a/src/TL.SchemaFuncs.cs +++ b/src/TL.SchemaFuncs.cs @@ -286,7 +286,7 @@ namespace TL code = code, }); - /// See [bots: ✓] + /// See Possible codes: 400 (details) 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 +295,7 @@ namespace TL web_auth_token = web_auth_token, }); - /// See [bots: ✓] + /// See [bots: ✓] Possible codes: 400 (details) 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 { @@ -978,7 +978,7 @@ namespace TL hash = hash, }); - /// Set time-to-live of current session See Possible codes: 406 (details) + /// Set time-to-live of current session See Possible codes: 400,406 (details) /// Time-to-live of current session in days public static Task Account_SetAuthorizationTTL(this Client client, int authorization_ttl_days) => client.Invoke(new Account_SetAuthorizationTTL @@ -1062,14 +1062,17 @@ namespace TL { }); - /// See [bots: ✓] + /// Reorder usernames associated with the currently logged-in user. See Possible codes: 400 (details) + /// The new order for active usernames. All active usernames must be specified. public static Task Account_ReorderUsernames(this Client client, params string[] order) => client.Invoke(new Account_ReorderUsernames { order = order, }); - /// See [bots: ✓] + /// Associate or dissociate a purchased fragment.com username to the currently logged-in user. See Possible codes: 400 (details) + /// Username + /// Whether to associate or dissociate it public static Task Account_ToggleUsername(this Client client, string username, bool active) => client.Invoke(new Account_ToggleUsername { @@ -1077,7 +1080,7 @@ namespace TL active = active, }); - /// See [bots: ✓] + /// See /// a null value means emojiListNotModified public static Task Account_GetDefaultProfilePhotoEmojis(this Client client, long hash = default) => client.Invoke(new Account_GetDefaultProfilePhotoEmojis @@ -1085,7 +1088,7 @@ namespace TL hash = hash, }); - /// See [bots: ✓] + /// See /// a null value means emojiListNotModified public static Task Account_GetDefaultGroupPhotoEmojis(this Client client, long hash = default) => client.Invoke(new Account_GetDefaultGroupPhotoEmojis @@ -1093,13 +1096,18 @@ namespace TL hash = hash, }); - /// See [bots: ✓] + /// Get autosave settings See public static Task Account_GetAutoSaveSettings(this Client client) => client.Invoke(new Account_GetAutoSaveSettings { }); - /// See [bots: ✓] + /// Modify autosave settings See [bots: ✓] Possible codes: 400 (details) + /// Whether the new settings should affect all private chats + /// Whether the new settings should affect all groups + /// Whether the new settings should affect all channels + /// Whether the new settings should affect a specific peer + /// The new autosave settings public static Task Account_SaveAutoSaveSettings(this Client client, AutoSaveSettings settings, InputPeer peer = null, bool users = false, bool chats = false, bool broadcasts = false) => client.Invoke(new Account_SaveAutoSaveSettings { @@ -1108,13 +1116,13 @@ namespace TL settings = settings, }); - /// See [bots: ✓] + /// See public static Task Account_DeleteAutoSaveExceptions(this Client client) => client.Invoke(new Account_DeleteAutoSaveExceptions { }); - /// Returns basic user info according to their identifiers. See [bots: ✓] Possible codes: 400 (details) + /// Returns basic user info according to their identifiers. See [bots: ✓] Possible codes: 400,500 (details) /// List of user identifiers public static Task Users_GetUsers(this Client client, params InputUserBase[] id) => client.Invoke(new Users_GetUsers @@ -1339,13 +1347,14 @@ namespace TL phone = phone, }); - /// See [bots: ✓] + /// Generates a temporary profile link for the currently logged-in user. See [bots: ✓] public static Task Contacts_ExportContactToken(this Client client) => client.Invoke(new Contacts_ExportContactToken { }); - /// See [bots: ✓] + /// Obtain user info from a temporary profile link. See [bots: ✓] Possible codes: 400 (details) + /// The token extracted from the temporary profile link. public static Task Contacts_ImportContactToken(this Client client, string token) => client.Invoke(new Contacts_ImportContactToken { @@ -1360,7 +1369,7 @@ namespace TL id = id, }); - /// Returns the current user dialog list. See Possible codes: 400,403 (details) + /// Returns the current user dialog list. See Possible codes: 400,403,500 (details) /// Exclude pinned dialogs /// Peer folder ID, for more info click here /// Offsets for pagination, for more info click here @@ -1380,7 +1389,7 @@ namespace TL hash = hash, }); - /// Returns the conversation history with one interlocutor / within a chat See Possible codes: 400,406 (details) + /// Returns the conversation history with one interlocutor / within a chat See Possible codes: 400,406,500 (details) /// Target peer /// Only return messages starting from the specified message ID /// Only return messages sent before the specified date @@ -1502,6 +1511,7 @@ 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 message thread/forum topic /// The message /// Unique client message ID required to prevent message resending You can use /// Reply markup for sending bot buttons @@ -1531,6 +1541,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 message thread/forum topic /// Attached media /// Caption /// Random ID to avoid resending the same message You can use @@ -1565,6 +1576,7 @@ namespace TL /// IDs of messages /// Random ID to prevent resending of messages You can use /// Destination peer + /// Destination message thread/forum topic /// Scheduled message date for scheduled messages /// Forward the messages as the specified peer public static Task Messages_ForwardMessages(this Client client, InputPeer from_peer, int[] id, long[] random_id, InputPeer to_peer, int? top_msg_id = null, DateTime? schedule_date = null, InputPeer send_as = null, bool silent = false, bool background = false, bool with_my_score = false, bool drop_author = false, bool drop_media_captions = false, bool noforwards = false) @@ -1673,6 +1685,7 @@ namespace TL /// Creates a new chat. See Possible codes: 400,406,500 (details) /// List of user IDs to be invited /// Chat name + /// Time-to-live of all messages that will be sent in the chat: once message.date+message.ttl_period === time(), the message will be deleted on the server, and must be deleted locally as well. You can use Messages_SetDefaultHistoryTTL to edit this value later. public static Task Messages_CreateChat(this Client client, InputUserBase[] users, string title, int? ttl_period = null) => client.Invoke(new Messages_CreateChat { @@ -1861,7 +1874,7 @@ namespace TL title = title, }); - /// Check the validity of a chat invite link and get basic info about it See Possible codes: 400,406 (details) + /// Check the validity of a chat invite link and get basic info about it See Possible codes: 400,406,500 (details) /// Invite hash from chat invite deep link ». public static Task Messages_CheckChatInvite(this Client client, string hash) => client.Invoke(new Messages_CheckChatInvite @@ -2063,6 +2076,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 message thread/forum topic /// Random ID to avoid resending the same query You can use /// Query ID from Messages_GetInlineBotResults /// Result ID from Messages_GetInlineBotResults @@ -2164,7 +2178,7 @@ namespace TL cache_time = cache_time, }); - /// Get dialog info of specified peers See Possible codes: 400,406 (details) + /// Get dialog info of specified peers See Possible codes: 400,406,500 (details) /// Peers public static Task Messages_GetPeerDialogs(this Client client, params InputDialogPeerBase[] peers) => client.Invoke(new Messages_GetPeerDialogs @@ -2175,6 +2189,7 @@ namespace TL /// Save a message draft associated to a chat. See Possible codes: 400 (details) /// Disable generation of the webpage preview /// Message ID the message should reply to + /// Message thread/forum topic where the message will be sent /// Destination of the message that should be sent /// The draft /// Message entities for styled text @@ -2455,6 +2470,7 @@ namespace TL /// Get unread messages where we were mentioned See Possible codes: 400 (details) /// Peer where to look for mentions + /// If set, considers only messages within the specified message thread/forum topic /// Offsets for pagination, for more info click here /// Offsets for pagination, for more info click here /// Maximum number of results to return, see pagination @@ -2475,6 +2491,7 @@ namespace TL /// Mark mentions as read See Possible codes: 400 (details) /// Dialog + /// Mark as read only mentions within the specified message thread/forum topic public static Task Messages_ReadMentions(this Client client, InputPeer peer, int? top_msg_id = null) => client.Invoke(new Messages_ReadMentions { @@ -2503,6 +2520,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 message thread/forum 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 @@ -2670,6 +2688,7 @@ namespace TL /// Get the number of results that would be found by a Messages_Search call with the same parameters See Possible codes: 400 (details) /// Peer where to search + /// If set, consider only messages within the specified message thread/forum topic /// Search filters public static Task Messages_GetSearchCounters(this Client client, InputPeer peer, MessagesFilter[] filters, int? top_msg_id = null) => client.Invoke(new Messages_GetSearchCounters @@ -2881,6 +2900,7 @@ namespace TL /// Unpin all pinned messages See [bots: ✓] Possible codes: 400 (details) /// Chat where to unpin + /// Message thread/forum topic where to unpin public static Task Messages_UnpinAllMessages(this Client client, InputPeer peer, int? top_msg_id = null) => client.Invoke(new Messages_UnpinAllMessages { @@ -3026,7 +3046,7 @@ namespace TL peer = peer, }); - /// Get info about the users that joined the chat using a specific chat invite See Possible codes: 400,403 (details) + /// Get info about the users that joined the chat using a specific chat invite See Possible codes: 400,403,500 (details) /// If set, only returns info about users with pending join requests » /// Chat /// Invite link @@ -3227,6 +3247,7 @@ namespace TL /// Translate a given text See Possible codes: 400 (details) /// If the text is a chat message, the peer ID + /// A list of message IDs to translate /// The text to translate /// Two-letter ISO 639-1 language code of the language to which the message is translated public static Task Messages_TranslateText(this Client client, string to_lang, InputPeer peer = null, int[] id = null, TextWithEntities[] text = null) @@ -3241,6 +3262,7 @@ namespace TL /// Get unread reactions to messages you sent See /// Peer + /// If set, considers only reactions to messages within the specified message thread/forum topic /// Offsets for pagination, for more info click here /// Offsets for pagination, for more info click here /// Maximum number of results to return, see pagination @@ -3261,6 +3283,7 @@ namespace TL /// Mark message reactions » as read See Possible codes: 400 (details) /// Peer + /// Mark as read only reactions to messages within the specified message thread/forum topic public static Task Messages_ReadReactions(this Client client, InputPeer peer, int? top_msg_id = null) => client.Invoke(new Messages_ReadReactions { @@ -3319,6 +3342,7 @@ 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 message thread/forum 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) => client.Invoke(new Messages_RequestWebView @@ -3341,6 +3365,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 message thread/forum 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 @@ -3537,7 +3562,9 @@ namespace TL hash = hash, }); - /// See [bots: ✓] + /// Look for custom emojis associated to a UTF8 emoji See [bots: ✓] Possible codes: 400 (details) + /// The emoji + /// Hash for pagination, for more info click here /// a null value means emojiListNotModified public static Task Messages_SearchCustomEmoji(this Client client, string emoticon, long hash = default) => client.Invoke(new Messages_SearchCustomEmoji @@ -3546,7 +3573,9 @@ namespace TL hash = hash, }); - /// See [bots: ✓] + /// Toggle real-time chat translation for a certain chat See [bots: ✓] + /// Whether to disable or enable real-time chat translation + /// Peer where to enable or disable real-time chat translation public static Task Messages_TogglePeerTranslations(this Client client, InputPeer peer, bool disabled = false) => client.Invoke(new Messages_TogglePeerTranslations { @@ -3554,7 +3583,7 @@ namespace TL peer = peer, }); - /// See [bots: ✓] + /// See [bots: ✓] Possible codes: 400 (details) public static Task Messages_GetBotApp(this Client client, InputBotApp app, long hash = default) => client.Invoke(new Messages_GetBotApp { @@ -3621,7 +3650,7 @@ namespace TL }); /// Updates current user profile photo. See Possible codes: 400 (details) - /// File saved in parts by means of Upload_SaveFilePart method + /// Profile photo /// Animated profile picture video /// Floating point UNIX timestamp in seconds, indicating the frame of the video that should be used as static preview. 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) @@ -3656,7 +3685,10 @@ namespace TL limit = limit, }); - /// See [bots: ✓] + /// See [bots: ✓] Possible codes: 400 (details) + /// Profile photo + /// Animated profile picture video + /// Floating point UNIX timestamp in seconds, indicating the frame of the video that should be used as static preview. public static Task Photos_UploadContactProfilePhoto(this Client client, InputUserBase user_id, InputFileBase file = null, InputFileBase video = null, double? video_start_ts = null, VideoSizeBase video_emoji_markup = null, bool suggest = false, bool save = false) => client.Invoke(new Photos_UploadContactProfilePhoto { @@ -3852,6 +3884,7 @@ namespace TL }); /// Get app-specific configuration, see client configuration for more info on the result. See + /// Hash for pagination, for more info click here /// a null value means help.appConfigNotModified public static Task Help_GetAppConfig(this Client client, int hash = default) => client.Invoke(new Help_GetAppConfig @@ -3977,7 +4010,7 @@ namespace TL id = id, }); - /// Get channel/supergroup messages See [bots: ✓] Possible codes: 400,406 (details) + /// Get channel/supergroup messages See [bots: ✓] Possible codes: 400,406,500 (details) /// Channel/supergroup /// IDs of messages to get public static Task Channels_GetMessages(this Client client, InputChannelBase channel, params InputMessage[] id) @@ -4022,7 +4055,7 @@ namespace TL id = id, }); - /// Get full info about a supergroup, gigagroup or channel See [bots: ✓] Possible codes: 400,403,406 (details) + /// Get full info about a supergroup, gigagroup or channel See [bots: ✓] Possible codes: 400,403,406,500 (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 @@ -4034,10 +4067,12 @@ namespace TL /// Whether to create a channel /// Whether to create a supergroup /// Whether the supergroup is being created to import messages from a foreign chat service using Messages_InitHistoryImport + /// Whether to create a forum /// Channel title /// Channel description /// Geogroup location /// Geogroup address + /// Time-to-live of all messages that will be sent in the supergroup: once message.date+message.ttl_period === time(), the message will be deleted on the server, and must be deleted locally as well. You can use Messages_SetDefaultHistoryTTL to edit this value later. public static Task Channels_CreateChannel(this Client client, string title, string about, InputGeoPoint geo_point = null, string address = null, int? ttl_period = null, bool broadcast = false, bool megagroup = false, bool for_import = false, bool forum = false) => client.Invoke(new Channels_CreateChannel { @@ -4103,7 +4138,7 @@ namespace TL username = username, }); - /// Join a channel/supergroup See Possible codes: 400,406 (details) + /// Join a channel/supergroup See Possible codes: 400,406,500 (details) /// Channel/supergroup to join public static Task Channels_JoinChannel(this Client client, InputChannelBase channel) => client.Invoke(new Channels_JoinChannel @@ -4373,7 +4408,9 @@ namespace TL enabled = enabled, }); - /// See [bots: ✓] + /// Reorder active usernames See [bots: ✓] Possible codes: 400 (details) + /// The supergroup or channel + /// The new order for active usernames. All active usernames must be specified. public static Task Channels_ReorderUsernames(this Client client, InputChannelBase channel, params string[] order) => client.Invoke(new Channels_ReorderUsernames { @@ -4381,7 +4418,10 @@ namespace TL order = order, }); - /// See [bots: ✓] + /// Associate or dissociate a purchased fragment.com username to a supergroup or channel. See [bots: ✓] + /// Supergroup or channel + /// Username + /// Whether to associate or dissociate the username public static Task Channels_ToggleUsername(this Client client, InputChannelBase channel, string username, bool active) => client.Invoke(new Channels_ToggleUsername { @@ -4390,14 +4430,17 @@ namespace TL active = active, }); - /// See [bots: ✓] + /// Disable all purchased usernames of a supergroup or channel See [bots: ✓] + /// Supergroup or channel public static Task Channels_DeactivateAllUsernames(this Client client, InputChannelBase channel) => client.Invoke(new Channels_DeactivateAllUsernames { channel = channel, }); - /// See [bots: ✓] Possible codes: 400 (details) + /// Enable or disable forum functionality in a supergroup. See [bots: ✓] Possible codes: 400 (details) + /// Supergroup ID + /// Enable or disable forum functionality public static Task Channels_ToggleForum(this Client client, InputChannelBase channel, bool enabled) => client.Invoke(new Channels_ToggleForum { @@ -4405,7 +4448,13 @@ namespace TL enabled = enabled, }); - /// See [bots: ✓] + /// Create a forum topic. See [bots: ✓] Possible codes: 400 (details) + /// The forum + /// Topic title + /// If no custom emoji icon is specified, specifies the color of the fallback topic icon (RGB), one of 0x6FB9F0, 0xFFD67E, 0xCB86DB, 0x8EEE98, 0xFF93B2, or 0xFB6F5F. + /// 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) => client.Invoke(new Channels_CreateForumTopic { @@ -4418,7 +4467,13 @@ namespace TL send_as = send_as, }); - /// See [bots: ✓] Possible codes: 400 (details) + /// Get topics of a forum See [bots: ✓] Possible codes: 400 (details) + /// Supergroup + /// Search query + /// Offsets for pagination, for more info click here + /// Offsets for pagination, for more info click here + /// Offsets for pagination, for more info click here + /// Maximum number of results to return, see pagination public static Task Channels_GetForumTopics(this Client client, InputChannelBase channel, DateTime offset_date = default, int offset_id = default, int offset_topic = default, int limit = int.MaxValue, string q = null) => client.Invoke(new Channels_GetForumTopics { @@ -4431,7 +4486,9 @@ namespace TL limit = limit, }); - /// See [bots: ✓] + /// Get forum topics by their ID See [bots: ✓] + /// Forum + /// Topic IDs public static Task Channels_GetForumTopicsByID(this Client client, InputChannelBase channel, params int[] topics) => client.Invoke(new Channels_GetForumTopicsByID { @@ -4439,7 +4496,13 @@ namespace TL topics = topics, }); - /// See [bots: ✓] + /// Edit forum topic See [bots: ✓] + /// Supergroup + /// Topic ID + /// If present, will update the topic title. + /// 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. 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 { @@ -4452,7 +4515,10 @@ namespace TL hidden = hidden.GetValueOrDefault(), }); - /// See [bots: ✓] + /// Pin or unpin forum topics See [bots: ✓] + /// Supergroup ID + /// Forum topic ID + /// Whether to pin or unpin the topic public static Task Channels_UpdatePinnedForumTopic(this Client client, InputChannelBase channel, int topic_id, bool pinned) => client.Invoke(new Channels_UpdatePinnedForumTopic { @@ -4461,7 +4527,9 @@ namespace TL pinned = pinned, }); - /// See [bots: ✓] + /// Delete message history of a forum topic See [bots: ✓] + /// Forum + /// Topic ID public static Task Channels_DeleteTopicHistory(this Client client, InputChannelBase channel, int top_msg_id) => client.Invoke(new Channels_DeleteTopicHistory { @@ -4469,7 +4537,10 @@ namespace TL top_msg_id = top_msg_id, }); - /// See [bots: ✓] + /// Reorder pinned forum topics See [bots: ✓] + /// If set, topics pinned server-side but not present in the order field will be unpinned. + /// Supergroup ID + /// Topic IDs » public static Task Channels_ReorderPinnedForumTopics(this Client client, InputChannelBase channel, int[] order, bool force = false) => client.Invoke(new Channels_ReorderPinnedForumTopics { @@ -4478,7 +4549,9 @@ namespace TL order = order, }); - /// See [bots: ✓] + /// Enable or disable the native antispam system. See [bots: ✓] + /// Supergroup ID + /// Enable or disable the native antispam system. public static Task Channels_ToggleAntiSpam(this Client client, InputChannelBase channel, bool enabled) => client.Invoke(new Channels_ToggleAntiSpam { @@ -4486,7 +4559,9 @@ namespace TL enabled = enabled, }); - /// See [bots: ✓] + /// Report a native antispam false positive See [bots: ✓] + /// Supergroup ID + /// Message ID that was mistakenly deleted by the native antispam system, taken from the admin log public static Task Channels_ReportAntiSpamFalsePositive(this Client client, InputChannelBase channel, int msg_id) => client.Invoke(new Channels_ReportAntiSpamFalsePositive { @@ -4494,7 +4569,9 @@ namespace TL msg_id = msg_id, }); - /// See [bots: ✓] + /// Hide or display the participants list in a supergroup See [bots: ✓] + /// 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) => client.Invoke(new Channels_ToggleParticipantsHidden { @@ -4589,7 +4666,10 @@ namespace TL admin_rights = admin_rights, }); - /// See [bots: ✓] + /// Set our about text and description (bots only) See [bots: ✓] Possible codes: 400 (details) + /// 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) => client.Invoke(new Bots_SetBotInfo { @@ -4599,7 +4679,8 @@ namespace TL description = description, }); - /// See [bots: ✓] + /// 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) => client.Invoke(new Bots_GetBotInfo { @@ -4721,6 +4802,7 @@ namespace TL /// Whether this is a mask stickerset /// Whether this is an animated stickerset /// Whether this is a video stickerset + /// Whether this is a custom emoji stickerset. /// Stickerset owner /// Stickerset name, 1-64 chars /// Short name of sticker set, to be used in sticker deep links ». Can contain only english letters, digits and underscores. Must begin with a letter, can't contain consecutive underscores and, if called by a bot, must end in "_by_<bot_username>". <bot_username> is case insensitive. 1-64 characters. @@ -4800,7 +4882,11 @@ namespace TL title = title, }); - /// See [bots: ✓] + /// Update the keywords, emojis or mask coordinates of a sticker See [bots: ✓] Possible codes: 400 (details) + /// The sticker + /// If set, updates the emoji list associated to the sticker + /// If set, updates the mask coordinates + /// If set, updates the sticker keywords (separated by commas). /// a null value means messages.stickerSetNotModified public static Task Stickers_ChangeSticker(this Client client, InputDocument sticker, string emoji = null, MaskCoords mask_coords = null, string keywords = null) => client.Invoke(new Stickers_ChangeSticker @@ -4812,7 +4898,9 @@ namespace TL keywords = keywords, }); - /// See [bots: ✓] + /// Renames a stickerset, bots only. See [bots: ✓] Possible codes: 400 (details) + /// Stickerset to rename + /// New stickerset title /// a null value means messages.stickerSetNotModified public static Task Stickers_RenameStickerSet(this Client client, InputStickerSet stickerset, string title) => client.Invoke(new Stickers_RenameStickerSet @@ -4821,7 +4909,8 @@ namespace TL title = title, }); - /// See [bots: ✓] + /// Deletes a stickerset we created, bots only. See [bots: ✓] Possible codes: 400 (details) + /// Stickerset to delete public static Task Stickers_DeleteStickerSet(this Client client, InputStickerSet stickerset) => client.Invoke(new Stickers_DeleteStickerSet {