From 11a9ca86318d90d0ff75b2d6aaabd3ef554e6b3b Mon Sep 17 00:00:00 2001
From: Wizou <11647984+wiz0u@users.noreply.github.com>
Date: Wed, 14 Sep 2022 18:22:52 +0200
Subject: [PATCH] more 'params' arguments
---
README.md | 42 ++++++++++++++++++++++++------------
src/Client.cs | 4 ++--
src/TL.Schema.cs | 20 ++++++++---------
src/TL.SchemaFuncs.cs | 50 +++++++++++++++++++++----------------------
src/TL.Secret.cs | 20 ++++++++---------
5 files changed, 75 insertions(+), 61 deletions(-)
diff --git a/README.md b/README.md
index 8f056d5..2114c15 100644
--- a/README.md
+++ b/README.md
@@ -26,10 +26,12 @@ static async Task Main(string[] _)
Console.WriteLine($"We are logged-in as {my.username ?? my.first_name + " " + my.last_name} (id {my.id})");
}
```
-When run, this will prompt you interactively for your App **api_hash** and **api_id** (that you obtain through Telegram's [API development tools](https://my.telegram.org/apps) page) and try to connect to Telegram servers.
+When run, this will prompt you interactively for your App **api_hash** and **api_id** (that you obtain through Telegram's
+[API development tools](https://my.telegram.org/apps) page) and try to connect to Telegram servers.
Those api hash/id represent your application and one can be used for handling many user accounts.
-Then it will attempt to sign-in *(login)* as a user for which you must enter the **phone_number** and the **verification_code** that will be sent to this user (for example through SMS or another Telegram client app the user is connected to).
+Then it will attempt to sign-in *(login)* as a user for which you must enter the **phone_number** and the **verification_code**
+that will be sent to this user (for example through SMS, Email, or another Telegram client app the user is connected to).
If the verification succeeds but the phone number is unknown to Telegram, the user might be prompted to sign-up
*(register their account by accepting the Terms of Service)* and provide their **first_name** and **last_name**.
@@ -42,9 +44,11 @@ All those API methods require `using TL;` namespace and are called with an under
# Saved session
If you run this program again, you will notice that only **api_hash** is requested, the other prompts are gone and you are automatically logged-on and ready to go.
-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.
+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) you may want to change it or simply delete the existing session file in order to restart the authentification process.
+That file path is configurable (session_pathname), and under various circumstances (changing user or server address)
+you may want to change it or simply delete the existing session file in order to restart the authentification process.
# Non-interactive configuration
Your next step will probably be to provide a configuration to the client so that the required elements are not prompted through the Console but answered by your program.
@@ -83,13 +87,17 @@ Its `int` argument is the log severity, compatible with the [LogLevel enum](http
# Example of API call
->ℹ️ The Telegram API makes extensive usage of base and derived classes, so be ready to use the various syntaxes C# offer to check/cast base classes into the more useful derived classes (`is`, `as`, `case DerivedType` )
+>ℹ️ The Telegram API makes extensive usage of base and derived classes, so be ready to use the various C# syntaxes
+to check/cast base classes into the more useful derived classes (`is`, `as`, `case DerivedType` )
-All the Telegram API classes/methods are fully documented through Intellisense: Place your mouse over a class/method name, or start typing the call arguments to see a tooltip displaying their description, the list of derived classes and a web link to the official API page.
+All the Telegram API classes/methods are fully documented through Intellisense: Place your mouse over a class/method name,
+or start typing the call arguments to see a tooltip displaying their description, the list of derived classes and a web link to the official API page.
-The Telegram [API object classes](https://corefork.telegram.org/schema) are defined in the `TL` namespace, and the [API functions](https://corefork.telegram.org/methods) are available as async methods of `Client`.
+The Telegram [API object classes](https://corefork.telegram.org/schema) are defined in the `TL` namespace,
+and the [API functions](https://corefork.telegram.org/methods) are available as async methods of `Client`.
-Below is an example of calling the [messages.getAllChats](https://corefork.telegram.org/method/messages.getAllChats) API function, enumerating the various groups/channels the user is in, and then using `client.SendMessageAsync` helper function to easily send a message:
+Below is an example of calling the [messages.getAllChats](https://corefork.telegram.org/method/messages.getAllChats) API function,
+enumerating the various groups/channels the user is in, and then using `client.SendMessageAsync` helper function to easily send a message:
```csharp
using TL;
...
@@ -115,14 +123,17 @@ Console.WriteLine($"Sending a message in chat {chatId}: {target.Title}");
await client.SendMessageAsync(target, "Hello, World");
```
-➡️ You can find lots of useful code snippets in [EXAMPLES.md](https://github.com/wiz0u/WTelegramClient/blob/master/EXAMPLES.md) and in the [Examples subdirectory](https://github.com/wiz0u/WTelegramClient/tree/master/Examples).
+➡️ You can find lots of useful code snippets in [EXAMPLES.md](https://github.com/wiz0u/WTelegramClient/blob/master/EXAMPLES.md)
+and in the [Examples subdirectory](https://github.com/wiz0u/WTelegramClient/tree/master/Examples).
# Terminology in Telegram Client API
In the API, Telegram uses some terms/classnames that can be confusing as they differ from the terms shown to end-users:
-- `Channel` : A (large or public) chat group *(sometimes called [supergroup](https://corefork.telegram.org/api/channel#supergroups))* or a [broadcast channel](https://corefork.telegram.org/api/channel#channels) (the `broadcast` flag differentiate those)
-- `Chat` : A private [basic chat group](https://corefork.telegram.org/api/channel#basic-groups) with less than 200 members (it may be migrated to a supergroup `Channel` with a new ID when it gets bigger or public, in which case the old `Chat` will still exist but be `deactivated`)
+- `Channel` : A (large or public) chat group *(sometimes called [supergroup](https://corefork.telegram.org/api/channel#supergroups))*
+or a [broadcast channel](https://corefork.telegram.org/api/channel#channels) (the `broadcast` flag differentiate those)
+- `Chat` : A private [basic chat group](https://corefork.telegram.org/api/channel#basic-groups) with less than 200 members
+(it may be migrated to a supergroup `Channel` with a new ID when it gets bigger or public, in which case the old `Chat` will still exist but be `deactivated`)
**⚠️ Most chat groups you see are really of type `Channel`, not `Chat`!**
- chats : In plural or general meaning, it means either `Chat` or `Channel`
- `Peer` : Either a `Chat`, a `Channel` or a `User`
@@ -133,13 +144,15 @@ See [FAQ #4](https://github.com/wiz0u/WTelegramClient/blob/master/FAQ.md#access-
# Other things to know
-The Client class also offers an `OnUpdate` event that is triggered when Telegram servers sends Updates (like new messages or status), independently of your API requests. See [Examples/Program_ListenUpdates.cs](https://github.com/wiz0u/WTelegramClient/blob/master/Examples/Program_ListenUpdates.cs)
+The Client class also offers an `OnUpdate` event that is triggered when Telegram servers sends Updates (like new messages or status), independently of your API requests.
+See [Examples/Program_ListenUpdates.cs](https://github.com/wiz0u/WTelegramClient/blob/master/Examples/Program_ListenUpdates.cs)
An invalid API request can result in a `RpcException` being raised, reflecting the [error code and status text](https://revgram.github.io/errors.html) of the problem.
The other configuration items that you can override include: **session_pathname, session_key, server_address, device_model, system_version, app_version, system_lang_code, lang_pack, lang_code, user_id**
-Optional API parameters have a default value of `null` when unset. Passing `null` for a required string/array is the same as *empty* (0-length). Required API parameters/fields can sometimes be set to 0 or `null` when unused (check API documentation or experiment).
+Optional API parameters have a default value of `null` when unset. Passing `null` for a required string/array is the same as *empty* (0-length).
+Required API parameters/fields can sometimes be set to 0 or `null` when unused (check API documentation or experiment).
I've added several useful converters, implicit cast or helper properties to various API objects so that they are more easy to manipulate.
@@ -157,7 +170,8 @@ This library can be used for any Telegram scenarios including:
It has been tested in a Console app, [in a WinForms app](https://github.com/wiz0u/WTelegramClient/blob/master/FAQ.md#gui),
[in ASP.NET webservice](https://github.com/wiz0u/WTelegramClient/blob/master/EXAMPLES.md#logging), and in Xamarin/Android.
-Please don't use this library for Spam or Scam. Respect Telegram [Terms of Service](https://telegram.org/tos) as well as the [API Terms of Service](https://core.telegram.org/api/terms) or you might get banned from Telegram servers.
+Please don't use this library for Spam or Scam. Respect Telegram [Terms of Service](https://telegram.org/tos)
+as well as the [API Terms of Service](https://core.telegram.org/api/terms) or you might get banned from Telegram servers.
Developers feedback is welcome in the Telegram support group [@WTelegramClient](https://t.me/WTelegramClient)
You can also check our [📖 Frequently Asked Questions](https://github.com/wiz0u/WTelegramClient/blob/master/FAQ.md) for more help and troubleshooting guide.
diff --git a/src/Client.cs b/src/Client.cs
index 4179ae7..c7691eb 100644
--- a/src/Client.cs
+++ b/src/Client.cs
@@ -870,7 +870,7 @@ namespace WTelegram
{
try
{
- var users = await this.Users_GetUsers(new[] { InputUser.Self }); // this calls also reenable incoming Updates
+ var users = await this.Users_GetUsers(InputUser.Self); // this calls also reenable incoming Updates
var self = users[0] as User;
if (self.id == long.Parse(botToken.Split(':')[0]))
{
@@ -905,7 +905,7 @@ namespace WTelegram
{
try
{
- var users = await this.Users_GetUsers(new[] { InputUser.Self }); // this call also reenable incoming Updates
+ var users = await this.Users_GetUsers(InputUser.Self); // this call also reenable incoming Updates
var self = users[0] as User;
// check user_id or phone_number match currently logged-in user
if ((long.TryParse(_config("user_id"), out long id) && (id == -1 || self.id == id)) ||
diff --git a/src/TL.Schema.cs b/src/TL.Schema.cs
index e8697b4..4b46231 100644
--- a/src/TL.Schema.cs
+++ b/src/TL.Schema.cs
@@ -370,7 +370,7 @@ namespace TL
public string provider;
/// JSON-encoded data about the invoice, which will be shared with the payment provider. A detailed description of required fields should be provided by the payment provider.
public DataJSON provider_data;
- /// Unique bot deep links start parameter. If present, forwarded copies of the sent message will have a URL button with a deep link to the bot (instead of a Pay button), with the value used as the start parameter. If absent, forwarded copies of the sent message will have a Pay button, allowing multiple users to pay directly from the forwarded message, using the same invoice.
+ /// Unique bot deep links start parameter. If present, forwarded copies of the sent message will have a URL button with a deep link to the bot (instead of a Pay button), with the value used as the start parameter. If absent, forwarded copies of the sent message will have a Pay button, allowing multiple users to pay directly from the forwarded message, using the same invoice.
[IfFlag(1)] public string start_param;
[Flags] public enum Flags : uint
@@ -794,7 +794,7 @@ namespace TL
{
/// Flags, see TL conditional fields
public Flags flags;
- /// Identifier of the respective photo
Parameter added in Layer 2
+ /// Identifier of the respective photo
public long photo_id;
/// Stripped thumbnail
[IfFlag(1)] public byte[] stripped_thumb;
@@ -2604,7 +2604,7 @@ namespace TL
default_ = 0x2,
/// Field has a value
has_settings = 0x4,
- /// Whether this is a pattern wallpaper »
+ /// Whether this is a pattern wallpaper »
pattern = 0x8,
/// Whether this wallpaper should be used in dark mode.
dark = 0x10,
@@ -2796,7 +2796,7 @@ namespace TL
public ImportedContact[] imported;
/// Popular contacts
public PopularContact[] popular_invites;
- /// List of contact ids that could not be imported due to system limitation and will need to be imported at a later date.
Parameter added in Layer 13
+ /// List of contact ids that could not be imported due to system limitation and will need to be imported at a later date.
public long[] retry_contacts;
/// List of users
public Dictionary users;
@@ -3106,7 +3106,7 @@ namespace TL
{
/// User id
public long user_id;
- /// Action type
Param added in Layer 17.
+ /// Action type
public SendMessageAction action;
}
/// The user is preparing a message in a group; typing, recording, uploading, etc. This update is valid for 6 seconds. If no further updates of this kind are received after 6 seconds, it should be considered that the user stopped doing whatever they were doing See
@@ -3115,7 +3115,7 @@ namespace TL
{
/// Peer that started typing (can be the chat itself, in case of anonymous admins).
public Peer from_id;
- /// Type of action
Parameter added in Layer 17.
+ /// Type of action
public SendMessageAction action;
}
/// Composition of chat participants changed. See
@@ -3144,7 +3144,7 @@ namespace TL
public string first_name;
/// New last name. Corresponds to the new value of real_last_name field of the .
public string last_name;
- /// New username.
Parameter added in Layer 18.
+ /// New username.
public string username;
}
/// Change of contact's profile photo. See
@@ -4150,7 +4150,7 @@ namespace TL
presentation = 0x1,
}
}
- /// The command set of a certain bot in a certain chat has changed. See
+ /// The command set of a certain bot in a certain chat has changed. See
[TLDef(0x4D712F2E)]
public class UpdateBotCommands : Update
{
@@ -13148,7 +13148,7 @@ namespace TL
{
/// Whether this bot attachment menu entry should be shown in the attachment menu (toggle using messages.toggleBotInAttachMenu)
inactive = 0x1,
- /// True, if the bot supports the "settings_button_pressed" event »
+ /// True, if the bot supports the "settings_button_pressed" event »
has_settings = 0x2,
}
}
@@ -13317,7 +13317,7 @@ namespace TL
[TLDef(0xAED0CBD9)]
public class Payments_ExportedInvoice : IObject
{
- /// Exported invoice deep link
+ /// Exported invoice deep link
public string url;
}
diff --git a/src/TL.SchemaFuncs.cs b/src/TL.SchemaFuncs.cs
index 04f33ae..86fded4 100644
--- a/src/TL.SchemaFuncs.cs
+++ b/src/TL.SchemaFuncs.cs
@@ -307,7 +307,7 @@ namespace TL
/// Device token type.
Possible values:
1 - APNS (device token for apple push)
2 - FCM (firebase token for google firebase)
3 - MPNS (channel URI for microsoft push)
4 - Simple push (endpoint for firefox's simple push API)
5 - Ubuntu phone (token for ubuntu push)
6 - Blackberry (token for blackberry push)
7 - Unused
8 - WNS (windows push)
9 - APNS VoIP (token for apple push VoIP)
10 - Web push (web push, see below)
11 - MPNS VoIP (token for microsoft push VoIP)
12 - Tizen (token for tizen push)
For 10 web push, the token must be a JSON-encoded object containing the keys described in PUSH updates
/// Device token
/// List of user identifiers of other users currently using the client
- public static Task Account_UnregisterDevice(this Client client, int token_type, string token, long[] other_uids)
+ public static Task Account_UnregisterDevice(this Client client, int token_type, string token, params long[] other_uids)
=> client.Invoke(new Account_UnregisterDevice
{
token_type = token_type,
@@ -935,7 +935,7 @@ namespace TL
message = message,
});
- /// Initiate a 2FA password reset: can only be used if the user is already logged-in, see here for more info » See
+ /// Initiate a 2FA password reset: can only be used if the user is already logged-in, see here for more info » See Possible codes: 400 (details)
public static Task Account_ResetPassword(this Client client)
=> client.Invoke(new Account_ResetPassword
{
@@ -1104,7 +1104,7 @@ namespace TL
/// Delete contacts by phone number See
/// Phone numbers
- public static Task Contacts_DeleteByPhones(this Client client, string[] phones)
+ public static Task Contacts_DeleteByPhones(this Client client, params string[] phones)
=> client.Invoke(new Contacts_DeleteByPhones
{
phones = phones,
@@ -1393,7 +1393,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 (details)
/// Target user or group
/// Thread ID
- /// Type of action
Parameter added in Layer 17.
+ /// 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
{
@@ -1517,7 +1517,7 @@ namespace TL
/// ⚠ This method is only for basic Chat. See Terminology to understand what this means
Search for a similar method name starting with Channels_ if you're dealing with a Returns chat basic info on their IDs. See [bots: ✓] Possible codes: 400 (details)
/// List of chat IDs
- public static Task Messages_GetChats(this Client client, long[] id)
+ public static Task Messages_GetChats(this Client client, params long[] id)
=> client.Invoke(new Messages_GetChats
{
id = id,
@@ -1709,7 +1709,7 @@ namespace TL
/// ⚠ This method is only for basic Chat. See Terminology to understand what this means
Search for a similar method name starting with Channels_ if you're dealing with a Notifies the sender about the recipient having listened a voice message or watched a video. See
/// Message ID list
- public static Task Messages_ReadMessageContents(this Client client, int[] id)
+ public static Task Messages_ReadMessageContents(this Client client, params int[] id)
=> client.Invoke(new Messages_ReadMessageContents
{
id = id,
@@ -2105,7 +2105,7 @@ namespace TL
/// Mark new featured stickers as read See
/// IDs of stickersets to mark as read
- public static Task Messages_ReadFeaturedStickers(this Client client, long[] id)
+ public static Task Messages_ReadFeaturedStickers(this Client client, params long[] id)
=> client.Invoke(new Messages_ReadFeaturedStickers
{
id = id,
@@ -2482,7 +2482,7 @@ namespace TL
/// The chat where the poll was sent
/// The message ID of the poll
/// The options that were chosen
- public static Task Messages_SendVote(this Client client, InputPeer peer, int msg_id, byte[][] options)
+ public static Task Messages_SendVote(this Client client, InputPeer peer, int msg_id, params byte[][] options)
=> client.Invoke(new Messages_SendVote
{
peer = peer,
@@ -2548,7 +2548,7 @@ namespace TL
/// Get info about an emoji keyword localization See
/// Language codes
- public static Task Messages_GetEmojiKeywordsLanguages(this Client client, string[] lang_codes)
+ public static Task Messages_GetEmojiKeywordsLanguages(this Client client, params string[] lang_codes)
=> client.Invoke(new Messages_GetEmojiKeywordsLanguages
{
lang_codes = lang_codes,
@@ -2624,7 +2624,7 @@ namespace TL
/// Get scheduled messages See Possible codes: 400 (details)
/// Peer
/// IDs of scheduled messages
- public static Task Messages_GetScheduledMessages(this Client client, InputPeer peer, int[] id)
+ public static Task Messages_GetScheduledMessages(this Client client, InputPeer peer, params int[] id)
=> client.Invoke(new Messages_GetScheduledMessages
{
peer = peer,
@@ -2634,7 +2634,7 @@ namespace TL
/// Send scheduled messages right away See Possible codes: 400 (details)
/// Peer
/// Scheduled message IDs
- public static Task Messages_SendScheduledMessages(this Client client, InputPeer peer, int[] id)
+ public static Task Messages_SendScheduledMessages(this Client client, InputPeer peer, params int[] id)
=> client.Invoke(new Messages_SendScheduledMessages
{
peer = peer,
@@ -2644,7 +2644,7 @@ namespace TL
/// Delete scheduled messages See
/// Peer
/// Scheduled message IDs
- public static Task Messages_DeleteScheduledMessages(this Client client, InputPeer peer, int[] id)
+ public static Task Messages_DeleteScheduledMessages(this Client client, InputPeer peer, params int[] id)
=> client.Invoke(new Messages_DeleteScheduledMessages
{
peer = peer,
@@ -2705,7 +2705,7 @@ namespace TL
/// Reorder folders See
/// New folder order
- public static Task Messages_UpdateDialogFiltersOrder(this Client client, int[] order)
+ public static Task Messages_UpdateDialogFiltersOrder(this Client client, params int[] order)
=> client.Invoke(new Messages_UpdateDialogFiltersOrder
{
order = order,
@@ -3061,7 +3061,7 @@ namespace TL
/// Get message reactions » See
/// Peer
/// Message IDs
- public static Task Messages_GetMessagesReactions(this Client client, InputPeer peer, int[] id)
+ public static Task Messages_GetMessagesReactions(this Client client, InputPeer peer, params int[] id)
=> client.Invoke(new Messages_GetMessagesReactions
{
peer = peer,
@@ -3264,7 +3264,7 @@ namespace TL
/// Bot that owns the web app
/// Unique client message ID to prevent duplicate sending of the same event
/// Text of the that was pressed to open the web app.
- /// Data to relay to the bot, obtained from a web_app_data_send JS event.
+ /// Data to relay to the bot, obtained from a web_app_data_send JS event.
public static Task Messages_SendWebViewData(this Client client, InputUserBase bot, long random_id, string button_text, string data)
=> client.Invoke(new Messages_SendWebViewData
{
@@ -3300,7 +3300,7 @@ namespace TL
/// Fetch custom emoji stickers ». See [bots: ✓]
/// Custom emoji IDs from a .
- public static Task Messages_GetCustomEmojiDocuments(this Client client, long[] document_id)
+ public static Task Messages_GetCustomEmojiDocuments(this Client client, params long[] document_id)
=> client.Invoke(new Messages_GetCustomEmojiDocuments
{
document_id = document_id,
@@ -3705,7 +3705,7 @@ namespace TL
hash = hash,
});
- /// Get Telegram Premim promotion information See
+ /// Get Telegram Premium promotion information See
public static Task Help_GetPremiumPromo(this Client client)
=> client.Invoke(new Help_GetPremiumPromo
{
@@ -3724,7 +3724,7 @@ namespace TL
/// Delete messages in a channel/supergroup See [bots: ✓] Possible codes: 400,403 (details)
/// Channel/supergroup
/// IDs of messages to delete
- public static Task Channels_DeleteMessages(this Client client, InputChannelBase channel, int[] id)
+ public static Task Channels_DeleteMessages(this Client client, InputChannelBase channel, params int[] id)
=> client.Invoke(new Channels_DeleteMessages
{
channel = channel,
@@ -3735,7 +3735,7 @@ namespace TL
/// Supergroup
/// Participant whose messages should be reported
/// IDs of spam messages
- public static Task Channels_ReportSpam(this Client client, InputChannelBase channel, InputPeer participant, int[] id)
+ public static Task Channels_ReportSpam(this Client client, InputChannelBase channel, InputPeer participant, params int[] id)
=> client.Invoke(new Channels_ReportSpam
{
channel = channel,
@@ -3980,7 +3980,7 @@ namespace TL
/// Mark channel/supergroup message contents as read See Possible codes: 400 (details)
/// Channel/supergroup
/// IDs of messages whose contents should be marked as read
- public static Task Channels_ReadMessageContents(this Client client, InputChannelBase channel, int[] id)
+ public static Task Channels_ReadMessageContents(this Client client, InputChannelBase channel, params int[] id)
=> client.Invoke(new Channels_ReadMessageContents
{
channel = channel,
@@ -4169,7 +4169,7 @@ namespace TL
commands = commands,
});
- /// Clear bot commands for the specified bot scope and language code See [bots: ✓]
+ /// Clear bot commands for the specified bot scope and language code See [bots: ✓] Possible codes: 400 (details)
/// Command scope
/// Language code
public static Task Bots_ResetBotCommands(this Client client, BotCommandScope scope, string lang_code)
@@ -4542,7 +4542,7 @@ namespace TL
/// If set, the user's video will be disabled by default upon joining.
/// The group call
/// Join the group call, presenting yourself as the specified user/channel
- /// The invitation hash from the invite link », if provided allows speaking in a livestream or muted group chat.
+ /// The invitation hash from the invite link », if provided allows speaking in a livestream or muted group chat.
/// WebRTC parameters
public static Task Phone_JoinGroupCall(this Client client, InputGroupCall call, InputPeer join_as, DataJSON params_, bool muted = false, bool video_stopped = false, string invite_hash = null)
=> client.Invoke(new Phone_JoinGroupCall
@@ -4623,7 +4623,7 @@ namespace TL
/// Check whether the group call Server Forwarding Unit is currently receiving the streams with the specified WebRTC source IDs.
Returns an intersection of the source IDs specified in sources, and the source IDs currently being forwarded by the SFU. See Possible codes: 400 (details)
/// Group call
/// Source IDs
- public static Task Phone_CheckGroupCall(this Client client, InputGroupCall call, int[] sources)
+ public static Task Phone_CheckGroupCall(this Client client, InputGroupCall call, params int[] sources)
=> client.Invoke(new Phone_CheckGroupCall
{
call = call,
@@ -4686,7 +4686,7 @@ namespace TL
peer = peer,
});
- /// Get an invite link for a group call or livestream See Possible codes: 403 (details)
+ /// Get an invite link for a group call or livestream See Possible codes: 403 (details)
/// For livestreams or muted group chats, if set, users that join using this link will be able to speak without explicitly requesting permission by (for example by raising their hand).
/// The group call
public static Task Phone_ExportGroupCallInvite(this Client client, InputGroupCall call, bool can_self_unmute = false)
@@ -4784,7 +4784,7 @@ namespace TL
/// Language pack name, usually obtained from a language pack link
/// Language code
/// Strings to get
- public static Task Langpack_GetStrings(this Client client, string lang_pack, string lang_code, string[] keys)
+ public static Task Langpack_GetStrings(this Client client, string lang_pack, string lang_code, params string[] keys)
=> client.Invoke(new Langpack_GetStrings
{
lang_pack = lang_pack,
diff --git a/src/TL.Secret.cs b/src/TL.Secret.cs
index 63f6331..49d375d 100644
--- a/src/TL.Secret.cs
+++ b/src/TL.Secret.cs
@@ -212,7 +212,7 @@ namespace TL
{
/// Random message ID, assigned by the author of message.
Must be equal to the ID passed to sending method.
public long random_id;
- /// Message lifetime. Has higher priority than .
Parameter added in Layer 17.
+ /// Message lifetime. Has higher priority than .
Parameter added in Layer 17.
public int ttl;
/// Message text
public string message;
@@ -247,7 +247,7 @@ namespace TL
public int thumb_h;
/// Duration of video in seconds
public int duration;
- /// MIME-type of the video file
Parameter added in Layer 17.
+ /// MIME-type of the video file
Parameter added in Layer 17.
public string mime_type;
/// Image width
public int w;
@@ -266,7 +266,7 @@ namespace TL
{
/// Audio duration in seconds
public int duration;
- /// MIME-type of the audio file
Parameter added in Layer 13.
+ /// MIME-type of the audio file
Parameter added in Layer 13.
public string mime_type;
/// File size
public int size;
@@ -289,7 +289,7 @@ namespace TL
[TLDef(0xF3048883)]
public class DecryptedMessageActionNotifyLayer : DecryptedMessageAction
{
- /// Layer number, must be 17 or higher (this constructor was introduced in Layer 17).
+ /// Layer number, must be 17 or higher (this constructor was introduced in Layer 17.
public int layer;
}
/// User is preparing a message: typing, recording, uploading, etc. See
@@ -304,13 +304,13 @@ namespace TL
[TLDef(0x1BE31789)]
public class DecryptedMessageLayer : IObject
{
- /// Set of random bytes to prevent content recognition in short encrypted messages.
Clients are required to check that there are at least 15 random bytes included in each message. Messages with less than 15 random bytes must be ignored.
Parameter moved here from in Layer 17.
+ /// Set of random bytes to prevent content recognition in short encrypted messages.
Clients are required to check that there are at least 15 random bytes included in each message. Messages with less than 15 random bytes must be ignored.
Parameter moved here from in Layer 17.
public byte[] random_bytes;
/// Layer number. Mimimal value - 17 (the layer in which the constructor was added).
public int layer;
- /// 2x the number of messages in the sender's inbox (including deleted and service messages), incremented by 1 if current user was not the chat creator
Parameter added in Layer 17.
+ /// 2x the number of messages in the sender's inbox (including deleted and service messages), incremented by 1 if current user was not the chat creator
Parameter added in Layer 17.
public int in_seq_no;
- /// 2x the number of messages in the recipient's inbox (including deleted and service messages), incremented by 1 if current user was the chat creator
Parameter added in Layer 17.
+ /// 2x the number of messages in the recipient's inbox (including deleted and service messages), incremented by 1 if current user was the chat creator
Parameter added in Layer 17.
public int out_seq_no;
/// The content of message itself
public DecryptedMessageBase message;
@@ -348,7 +348,7 @@ namespace TL
public Flags flags;
/// Random message ID, assigned by the author of message.
Must be equal to the ID passed to sending method.
public long random_id;
- /// Message lifetime. Has higher priority than .
Parameter added in Layer 17.
+ /// Message lifetime. Has higher priority than .
Parameter added in Layer 17.
public int ttl;
/// Message text
public string message;
@@ -412,7 +412,7 @@ namespace TL
public int thumb_h;
/// Duration of video in seconds
public int duration;
- /// MIME-type of the video file
Parameter added in Layer 17.
+ /// MIME-type of the video file
Parameter added in Layer 17.
public string mime_type;
/// Image width
public int w;
@@ -486,7 +486,7 @@ namespace TL
public Flags flags;
/// Random message ID, assigned by the author of message.
Must be equal to the ID passed to sending method.
public long random_id;
- /// Message lifetime. Has higher priority than .
Parameter added in Layer 17.
+ /// Message lifetime. Has higher priority than .
Parameter added in Layer 17.
public int ttl;
/// Message text
public string message;