documentation

This commit is contained in:
Wizou 2021-12-24 07:21:02 +01:00
parent 27f62b7537
commit 2881155f8b
5 changed files with 44 additions and 42 deletions

View file

@ -214,12 +214,12 @@ var chats = await client.Messages_GetAllChats(null);
const long chatId = 1234567890; // the target chat
var chat = chats.chats[chatId];
```
After the above code, once you have obtained an InputUser (or User), you can:
After the above code, once you [have obtained](https://github.com/wiz0u/WTelegramClient/blob/master/FAQ.md#access-hash) an `InputUser` or `User`, you can:
```csharp
// • Directly add the user to a simple Chat:
await client.Messages_AddChatUser(1234567890, inputUser, int.MaxValue);
await client.Messages_AddChatUser(1234567890, user, int.MaxValue);
// • Directly add the user to a Channel/group:
await client.Channels_InviteToChannel((Channel)chat, new[] { inputUser });
await client.Channels_InviteToChannel((Channel)chat, new[] { user });
// You may get exception USER_PRIVACY_RESTRICTED if the user has denied the right to be added to a chat
// or exception USER_NOT_MUTUAL_CONTACT if the user left the chat previously and you want to add him again
@ -229,19 +229,19 @@ var mcf = await client.Messages_GetFullChat(1234567890);
var mcf = await client.Channels_GetFullChannel((Channel)chat);
// extract the invite link and send it to the user:
var invite = (ChatInviteExported)mcf.full_chat.ExportedInvite;
await client.SendMessageAsync(inputUser, "Join our group with this link: " + invite.link);
await client.SendMessageAsync(user, "Join our group with this link: " + invite.link);
// • Create a new invite link for the chat/channel, and send it to the user
var invite = (ChatInviteExported)await client.Messages_ExportChatInvite(chat, title: "MyLink");
await client.SendMessageAsync(inputUser, "Join our group with this link: " + invite.link);
await client.SendMessageAsync(user, "Join our group with this link: " + invite.link);
// • Revoke then delete that invite link (when you no longer need it)
await client.Messages_EditExportedChatInvite(chat, invite.link, revoked: true);
await client.Messages_DeleteExportedChatInvite(chat, invite.link);
// • Remove the user from a simple Chat:
await client.Messages_DeleteChatUser(1234567890, inputUser);
await client.Messages_DeleteChatUser(1234567890, user);
// • Remove the user from a Channel/group:
await client.Channels_EditBanned((Channel)chat, inputUser, new ChatBannedRights { flags = ChatBannedRights.Flags.view_messages });
await client.Channels_EditBanned((Channel)chat, user, new ChatBannedRights { flags = ChatBannedRights.Flags.view_messages });
```
<a name="history"></a>

3
FAQ.md
View file

@ -49,7 +49,8 @@ However most common chat groups are not `Chat` but a `Channel` supergroup (witho
Some TL methods only applies to private `Chat`, some only applies to `Channel` and some to both.
The `access_hash` must usually be provided within the `Input...` structure you pass in argument to an API method (`InputPeer`, `InputChannel`, `InputUser`, etc...).
You obtain the `access_hash` through **description structures** like `Channel`, `User`, `Photo`, `Document` that you receive through updates or when you query them through API methods like `Messages_GetAllChats`, `Messages_GetDialogs`, `Contacts_ResolveUsername`, etc...
You obtain the `access_hash` through **description structures** like `Channel`, `User`, `Photo`, `Document` that you receive through updates or when you query them through API methods like `Messages_GetAllChats`, `Messages_GetDialogs`, `Contacts_ResolveUsername`, etc...
*(if you have a `Peer` object, you can convert it to a `User`/`Channel`/`Chat` via the `UserOrChat` helper from the root class that contained the peer)*
Once you obtained the description structure, there are 3 methods for building your `Input...` structure:
* **Recommended:** If you take a look at the **description structure** class or `ChatBase/UserBase`,

View file

@ -110,7 +110,8 @@ await client.SendMessageAsync(target, "Hello, World");
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)* or a broadcast channel (the `broadcast` flag differenciate those)
- `Chat` : A private simple chat group 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`)
- `Chat` : A private simple chat group 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`, `Channel` or a private chat with a `User`
- Dialog : The current status of a chat with a `Peer` *(draft, last message, unread count, pinned...)*

View file

@ -55,7 +55,7 @@ namespace TL
{
/// <summary>User identifier</summary>
public long user_id;
/// <summary><strong>access_hash</strong> value from the <see cref="User"/> constructor</summary>
/// <summary>⚠ <b>REQUIRED FIELD</b>. See <see href="https://github.com/wiz0u/WTelegramClient/blob/master/FAQ.md#access-hash">how to obtain it</see><br/><strong>access_hash</strong> value from the <see cref="User"/> constructor</summary>
public long access_hash;
}
/// <summary>Defines a channel for further interaction. <para>See <a href="https://corefork.telegram.org/constructor/inputPeerChannel"/></para></summary>
@ -64,7 +64,7 @@ namespace TL
{
/// <summary>Channel identifier</summary>
public long channel_id;
/// <summary><strong>access_hash</strong> value from the <see cref="Channel"/> constructor</summary>
/// <summary>⚠ <b>REQUIRED FIELD</b>. See <see href="https://github.com/wiz0u/WTelegramClient/blob/master/FAQ.md#access-hash">how to obtain it</see><br/><strong>access_hash</strong> value from the <see cref="Channel"/> constructor</summary>
public long access_hash;
}
/// <summary>Defines a <a href="https://corefork.telegram.org/api/min">min</a> user that was seen in a certain message of a certain chat. <para>See <a href="https://corefork.telegram.org/constructor/inputPeerUserFromMessage"/></para></summary>
@ -102,7 +102,7 @@ namespace TL
{
/// <summary>User identifier</summary>
public long user_id;
/// <summary><strong>access_hash</strong> value from the <see cref="User"/> constructor</summary>
/// <summary>⚠ <b>REQUIRED FIELD</b>. See <see href="https://github.com/wiz0u/WTelegramClient/blob/master/FAQ.md#access-hash">how to obtain it</see><br/><strong>access_hash</strong> value from the <see cref="User"/> constructor</summary>
public long access_hash;
}
/// <summary>Defines a <a href="https://corefork.telegram.org/api/min">min</a> user that was seen in a certain message of a certain chat. <para>See <a href="https://corefork.telegram.org/constructor/inputUserFromMessage"/></para></summary>
@ -506,7 +506,7 @@ namespace TL
{
/// <summary>Photo identifier</summary>
public long id;
/// <summary><strong>access_hash</strong> value from the <see cref="Photo"/> constructor</summary>
/// <summary>⚠ <b>REQUIRED FIELD</b>. See <see href="https://github.com/wiz0u/WTelegramClient/blob/master/FAQ.md#access-hash">how to obtain it</see><br/><strong>access_hash</strong> value from the <see cref="Photo"/> constructor</summary>
public long access_hash;
/// <summary><a href="https://corefork.telegram.org/api/file_reference">File reference</a></summary>
public byte[] file_reference;
@ -533,7 +533,7 @@ namespace TL
{
/// <summary>File ID, <strong>id</strong> parameter value from <see cref="EncryptedFile"/></summary>
public long id;
/// <summary>Checksum, <strong>access_hash</strong> parameter value from <see cref="EncryptedFile"/></summary>
/// <summary>⚠ <b>REQUIRED FIELD</b>. See <see href="https://github.com/wiz0u/WTelegramClient/blob/master/FAQ.md#access-hash">how to obtain it</see><br/>Checksum, <strong>access_hash</strong> parameter value from <see cref="EncryptedFile"/></summary>
public long access_hash;
}
/// <summary>Document location (video, voice, audio, basically every type except photo) <para>See <a href="https://corefork.telegram.org/constructor/inputDocumentFileLocation"/></para></summary>
@ -542,7 +542,7 @@ namespace TL
{
/// <summary>Document ID</summary>
public long id;
/// <summary><strong>access_hash</strong> parameter from the <see cref="Document"/> constructor</summary>
/// <summary>⚠ <b>REQUIRED FIELD</b>. See <see href="https://github.com/wiz0u/WTelegramClient/blob/master/FAQ.md#access-hash">how to obtain it</see><br/><strong>access_hash</strong> parameter from the <see cref="Document"/> constructor</summary>
public long access_hash;
/// <summary><a href="https://corefork.telegram.org/api/file_reference">File reference</a></summary>
public byte[] file_reference;
@ -555,7 +555,7 @@ namespace TL
{
/// <summary>File ID, <strong>id</strong> parameter value from <see cref="SecureFile"/></summary>
public long id;
/// <summary>Checksum, <strong>access_hash</strong> parameter value from <see cref="SecureFile"/></summary>
/// <summary>⚠ <b>REQUIRED FIELD</b>. See <see href="https://github.com/wiz0u/WTelegramClient/blob/master/FAQ.md#access-hash">how to obtain it</see><br/>Checksum, <strong>access_hash</strong> parameter value from <see cref="SecureFile"/></summary>
public long access_hash;
}
/// <summary>Empty constructor for takeout <para>See <a href="https://corefork.telegram.org/constructor/inputTakeoutFileLocation"/></para></summary>
@ -567,7 +567,7 @@ namespace TL
{
/// <summary>Photo ID, obtained from the <see cref="Photo"/> object</summary>
public long id;
/// <summary>Photo's access hash, obtained from the <see cref="Photo"/> object</summary>
/// <summary>⚠ <b>REQUIRED FIELD</b>. See <see href="https://github.com/wiz0u/WTelegramClient/blob/master/FAQ.md#access-hash">how to obtain it</see><br/>Photo's access hash, obtained from the <see cref="Photo"/> object</summary>
public long access_hash;
/// <summary><a href="https://corefork.telegram.org/api/file_reference">File reference</a></summary>
public byte[] file_reference;
@ -580,7 +580,7 @@ namespace TL
{
/// <summary>Photo ID</summary>
public long id;
/// <summary>Access hash</summary>
/// <summary>⚠ <b>REQUIRED FIELD</b>. See <see href="https://github.com/wiz0u/WTelegramClient/blob/master/FAQ.md#access-hash">how to obtain it</see><br/>Access hash</summary>
public long access_hash;
/// <summary>File reference</summary>
public byte[] file_reference;
@ -4758,7 +4758,7 @@ namespace TL
{
/// <summary>Chat ID</summary>
public int chat_id;
/// <summary>Checking sum from constructor <see cref="EncryptedChat"/>, <see cref="EncryptedChatWaiting"/> or <see cref="EncryptedChatRequested"/></summary>
/// <summary>⚠ <b>REQUIRED FIELD</b>. See <see href="https://github.com/wiz0u/WTelegramClient/blob/master/FAQ.md#access-hash">how to obtain it</see><br/>Checking sum from constructor <see cref="EncryptedChat"/>, <see cref="EncryptedChatWaiting"/> or <see cref="EncryptedChatRequested"/></summary>
public long access_hash;
}
@ -4808,7 +4808,7 @@ namespace TL
{
/// <summary>File ID, value of <strong>id</strong> parameter from <see cref="EncryptedFile"/></summary>
public long id;
/// <summary>Checking sum, value of <strong>access_hash</strong> parameter from <see cref="EncryptedFile"/></summary>
/// <summary>⚠ <b>REQUIRED FIELD</b>. See <see href="https://github.com/wiz0u/WTelegramClient/blob/master/FAQ.md#access-hash">how to obtain it</see><br/>Checking sum, value of <strong>access_hash</strong> parameter from <see cref="EncryptedFile"/></summary>
public long access_hash;
/// <summary>File ID, value of <strong>id</strong> parameter from <see cref="EncryptedFile"/></summary>
@ -4933,7 +4933,7 @@ namespace TL
{
/// <summary>Document ID</summary>
public long id;
/// <summary><strong>access_hash</strong> parameter from the <see cref="Document"/> constructor</summary>
/// <summary>⚠ <b>REQUIRED FIELD</b>. See <see href="https://github.com/wiz0u/WTelegramClient/blob/master/FAQ.md#access-hash">how to obtain it</see><br/><strong>access_hash</strong> parameter from the <see cref="Document"/> constructor</summary>
public long access_hash;
/// <summary><a href="https://corefork.telegram.org/api/file_reference">File reference</a></summary>
public byte[] file_reference;
@ -5797,7 +5797,7 @@ namespace TL
{
/// <summary>ID</summary>
public long id;
/// <summary>Access hash</summary>
/// <summary>⚠ <b>REQUIRED FIELD</b>. See <see href="https://github.com/wiz0u/WTelegramClient/blob/master/FAQ.md#access-hash">how to obtain it</see><br/>Access hash</summary>
public long access_hash;
}
/// <summary>Stickerset by short name, from <c>tg://addstickers?set=short_name</c> <para>See <a href="https://corefork.telegram.org/constructor/inputStickerSetShortName"/></para></summary>
@ -6232,7 +6232,7 @@ namespace TL
{
/// <summary>Channel ID</summary>
public long channel_id;
/// <summary>Access hash taken from the <see cref="Channel"/> constructor</summary>
/// <summary>⚠ <b>REQUIRED FIELD</b>. See <see href="https://github.com/wiz0u/WTelegramClient/blob/master/FAQ.md#access-hash">how to obtain it</see><br/>Access hash taken from the <see cref="Channel"/> constructor</summary>
public long access_hash;
/// <summary>Channel ID</summary>
@ -7333,7 +7333,7 @@ namespace TL
public int dc_id;
/// <summary>ID of message, contains both the (32-bit, legacy) owner ID and the message ID, used only for Bot API backwards compatibility with 32-bit user ID.</summary>
public long id;
/// <summary>Access hash of message</summary>
/// <summary>⚠ <b>REQUIRED FIELD</b>. See <see href="https://github.com/wiz0u/WTelegramClient/blob/master/FAQ.md#access-hash">how to obtain it</see><br/>Access hash of message</summary>
public long access_hash;
/// <summary>DC ID to use when working with this inline message</summary>
@ -7351,7 +7351,7 @@ namespace TL
public long owner_id;
/// <summary>ID of message</summary>
public int id;
/// <summary>Access hash of message</summary>
/// <summary>⚠ <b>REQUIRED FIELD</b>. See <see href="https://github.com/wiz0u/WTelegramClient/blob/master/FAQ.md#access-hash">how to obtain it</see><br/>Access hash of message</summary>
public long access_hash;
/// <summary>DC ID to use when working with this inline message</summary>
@ -7653,7 +7653,7 @@ namespace TL
{
/// <summary>game ID from <see cref="Game"/> constructor</summary>
public long id;
/// <summary>access hash from <see cref="Game"/> constructor</summary>
/// <summary>⚠ <b>REQUIRED FIELD</b>. See <see href="https://github.com/wiz0u/WTelegramClient/blob/master/FAQ.md#access-hash">how to obtain it</see><br/>access hash from <see cref="Game"/> constructor</summary>
public long access_hash;
}
/// <summary>Game by short name <para>See <a href="https://corefork.telegram.org/constructor/inputGameShortName"/></para></summary>
@ -8343,7 +8343,7 @@ namespace TL
{
/// <summary>HTTP URL of file</summary>
public string url;
/// <summary>Access hash</summary>
/// <summary>⚠ <b>REQUIRED FIELD</b>. See <see href="https://github.com/wiz0u/WTelegramClient/blob/master/FAQ.md#access-hash">how to obtain it</see><br/>Access hash</summary>
public long access_hash;
/// <summary>Access hash</summary>
@ -8355,7 +8355,7 @@ namespace TL
{
/// <summary>Geolocation</summary>
public InputGeoPoint geo_point;
/// <summary>Access hash</summary>
/// <summary>⚠ <b>REQUIRED FIELD</b>. See <see href="https://github.com/wiz0u/WTelegramClient/blob/master/FAQ.md#access-hash">how to obtain it</see><br/>Access hash</summary>
public long access_hash;
/// <summary>Map width in pixels before applying scale; 16-1024</summary>
public int w;
@ -8620,7 +8620,7 @@ namespace TL
{
/// <summary>Call ID</summary>
public long id;
/// <summary>Access hash</summary>
/// <summary>⚠ <b>REQUIRED FIELD</b>. See <see href="https://github.com/wiz0u/WTelegramClient/blob/master/FAQ.md#access-hash">how to obtain it</see><br/>Access hash</summary>
public long access_hash;
}
@ -9673,7 +9673,7 @@ namespace TL
{
/// <summary>Secure file ID</summary>
public long id;
/// <summary>Secure file access hash</summary>
/// <summary>⚠ <b>REQUIRED FIELD</b>. See <see href="https://github.com/wiz0u/WTelegramClient/blob/master/FAQ.md#access-hash">how to obtain it</see><br/>Secure file access hash</summary>
public long access_hash;
/// <summary>Secure file ID</summary>
@ -10613,7 +10613,7 @@ namespace TL
{
/// <summary>Wallpaper ID</summary>
public long id;
/// <summary>Access hash</summary>
/// <summary>⚠ <b>REQUIRED FIELD</b>. See <see href="https://github.com/wiz0u/WTelegramClient/blob/master/FAQ.md#access-hash">how to obtain it</see><br/>Access hash</summary>
public long access_hash;
}
/// <summary>Wallpaper by slug (a unique ID) <para>See <a href="https://corefork.telegram.org/constructor/inputWallPaperSlug"/></para></summary>
@ -10941,7 +10941,7 @@ namespace TL
{
/// <summary>ID</summary>
public long id;
/// <summary>Access hash</summary>
/// <summary>⚠ <b>REQUIRED FIELD</b>. See <see href="https://github.com/wiz0u/WTelegramClient/blob/master/FAQ.md#access-hash">how to obtain it</see><br/>Access hash</summary>
public long access_hash;
}
/// <summary>Theme by theme ID <para>See <a href="https://corefork.telegram.org/constructor/inputThemeSlug"/></para></summary>
@ -11869,7 +11869,7 @@ namespace TL
{
/// <summary>Group call ID</summary>
public long id;
/// <summary>Group call access hash</summary>
/// <summary>⚠ <b>REQUIRED FIELD</b>. See <see href="https://github.com/wiz0u/WTelegramClient/blob/master/FAQ.md#access-hash">how to obtain it</see><br/>Group call access hash</summary>
public long access_hash;
}
@ -13694,14 +13694,14 @@ namespace TL
{
id = id,
});
/// <summary>Returns full chat info according to its ID. <para>See <a href="https://corefork.telegram.org/method/messages.getFullChat"/> [bots: ✓]</para> <para>Possible <see cref="RpcException"/> codes: 400 (<a href="https://corefork.telegram.org/method/messages.getFullChat#possible-errors">details</a>)</para></summary>
/// <summary><para>⚠ <b>This method is only for small private Chat</b>. See <see href="https://github.com/wiz0u/WTelegramClient/blob/master/README.md#terminology">Terminology</see> to understand what this means<br/>Search for a similar method name starting with <c>Channels_</c> if you're dealing with a <see cref="Channel"/></para> Returns full chat info according to its ID. <para>See <a href="https://corefork.telegram.org/method/messages.getFullChat"/> [bots: ✓]</para> <para>Possible <see cref="RpcException"/> codes: 400 (<a href="https://corefork.telegram.org/method/messages.getFullChat#possible-errors">details</a>)</para></summary>
/// <param name="chat_id">Chat ID</param>
public static Task<Messages_ChatFull> Messages_GetFullChat(this Client client, long chat_id)
=> client.Invoke(new Messages_GetFullChat
{
chat_id = chat_id,
});
/// <summary>Chanages chat name and sends a service message on it. <para>See <a href="https://corefork.telegram.org/method/messages.editChatTitle"/> [bots: ✓]</para> <para>Possible <see cref="RpcException"/> codes: 400 (<a href="https://corefork.telegram.org/method/messages.editChatTitle#possible-errors">details</a>)</para></summary>
/// <summary><para>⚠ <b>This method is only for small private Chat</b>. See <see href="https://github.com/wiz0u/WTelegramClient/blob/master/README.md#terminology">Terminology</see> to understand what this means<br/>Search for a similar method name starting with <c>Channels_</c> if you're dealing with a <see cref="Channel"/></para> Chanages chat name and sends a service message on it. <para>See <a href="https://corefork.telegram.org/method/messages.editChatTitle"/> [bots: ✓]</para> <para>Possible <see cref="RpcException"/> codes: 400 (<a href="https://corefork.telegram.org/method/messages.editChatTitle#possible-errors">details</a>)</para></summary>
/// <param name="chat_id">Chat ID</param>
/// <param name="title">New chat name, different from the old one</param>
public static Task<UpdatesBase> Messages_EditChatTitle(this Client client, long chat_id, string title)
@ -13710,7 +13710,7 @@ namespace TL
chat_id = chat_id,
title = title,
});
/// <summary>Changes chat photo and sends a service message on it <para>See <a href="https://corefork.telegram.org/method/messages.editChatPhoto"/> [bots: ✓]</para> <para>Possible <see cref="RpcException"/> codes: 400 (<a href="https://corefork.telegram.org/method/messages.editChatPhoto#possible-errors">details</a>)</para></summary>
/// <summary><para>⚠ <b>This method is only for small private Chat</b>. See <see href="https://github.com/wiz0u/WTelegramClient/blob/master/README.md#terminology">Terminology</see> to understand what this means<br/>Search for a similar method name starting with <c>Channels_</c> if you're dealing with a <see cref="Channel"/></para> Changes chat photo and sends a service message on it <para>See <a href="https://corefork.telegram.org/method/messages.editChatPhoto"/> [bots: ✓]</para> <para>Possible <see cref="RpcException"/> codes: 400 (<a href="https://corefork.telegram.org/method/messages.editChatPhoto#possible-errors">details</a>)</para></summary>
/// <param name="chat_id">Chat ID</param>
/// <param name="photo">Photo to be set</param>
public static Task<UpdatesBase> Messages_EditChatPhoto(this Client client, long chat_id, InputChatPhotoBase photo)
@ -13719,7 +13719,7 @@ namespace TL
chat_id = chat_id,
photo = photo,
});
/// <summary>Adds a user to a chat and sends a service message on it. <para>See <a href="https://corefork.telegram.org/method/messages.addChatUser"/></para> <para>Possible <see cref="RpcException"/> codes: 400,403 (<a href="https://corefork.telegram.org/method/messages.addChatUser#possible-errors">details</a>)</para></summary>
/// <summary><para>⚠ <b>This method is only for small private Chat</b>. See <see href="https://github.com/wiz0u/WTelegramClient/blob/master/README.md#terminology">Terminology</see> to understand what this means<br/>Search for a similar method name starting with <c>Channels_</c> if you're dealing with a <see cref="Channel"/></para> Adds a user to a chat and sends a service message on it. <para>See <a href="https://corefork.telegram.org/method/messages.addChatUser"/></para> <para>Possible <see cref="RpcException"/> codes: 400,403 (<a href="https://corefork.telegram.org/method/messages.addChatUser#possible-errors">details</a>)</para></summary>
/// <param name="chat_id">Chat ID</param>
/// <param name="user_id">User ID to be added</param>
/// <param name="fwd_limit">Number of last messages to be forwarded</param>
@ -13730,7 +13730,7 @@ namespace TL
user_id = user_id,
fwd_limit = fwd_limit,
});
/// <summary>Deletes a user from a chat and sends a service message on it. <para>See <a href="https://corefork.telegram.org/method/messages.deleteChatUser"/> [bots: ✓]</para> <para>Possible <see cref="RpcException"/> codes: 400 (<a href="https://corefork.telegram.org/method/messages.deleteChatUser#possible-errors">details</a>)</para></summary>
/// <summary><para>⚠ <b>This method is only for small private Chat</b>. See <see href="https://github.com/wiz0u/WTelegramClient/blob/master/README.md#terminology">Terminology</see> to understand what this means<br/>Search for a similar method name starting with <c>Channels_</c> if you're dealing with a <see cref="Channel"/></para> Deletes a user from a chat and sends a service message on it. <para>See <a href="https://corefork.telegram.org/method/messages.deleteChatUser"/> [bots: ✓]</para> <para>Possible <see cref="RpcException"/> codes: 400 (<a href="https://corefork.telegram.org/method/messages.deleteChatUser#possible-errors">details</a>)</para></summary>
/// <param name="revoke_history">Remove the entire chat history of the specified user in this chat.</param>
/// <param name="chat_id">Chat ID</param>
/// <param name="user_id">User ID to be deleted</param>
@ -13974,7 +13974,7 @@ namespace TL
id = id,
increment = increment,
});
/// <summary>Make a user admin in a <a href="https://corefork.telegram.org/api/channel">legacy group</a>. <para>See <a href="https://corefork.telegram.org/method/messages.editChatAdmin"/></para> <para>Possible <see cref="RpcException"/> codes: 400 (<a href="https://corefork.telegram.org/method/messages.editChatAdmin#possible-errors">details</a>)</para></summary>
/// <summary><para>⚠ <b>This method is only for small private Chat</b>. See <see href="https://github.com/wiz0u/WTelegramClient/blob/master/README.md#terminology">Terminology</see> to understand what this means<br/>Search for a similar method name starting with <c>Channels_</c> if you're dealing with a <see cref="Channel"/></para> Make a user admin in a <a href="https://corefork.telegram.org/api/channel">legacy group</a>. <para>See <a href="https://corefork.telegram.org/method/messages.editChatAdmin"/></para> <para>Possible <see cref="RpcException"/> codes: 400 (<a href="https://corefork.telegram.org/method/messages.editChatAdmin#possible-errors">details</a>)</para></summary>
/// <param name="chat_id">The ID of the group</param>
/// <param name="user_id">The user to make admin</param>
/// <param name="is_admin">Whether to make him admin</param>
@ -13985,7 +13985,7 @@ namespace TL
user_id = user_id,
is_admin = is_admin,
});
/// <summary>Turn a <a href="https://corefork.telegram.org/api/channel">legacy group into a supergroup</a> <para>See <a href="https://corefork.telegram.org/method/messages.migrateChat"/></para> <para>Possible <see cref="RpcException"/> codes: 400,403 (<a href="https://corefork.telegram.org/method/messages.migrateChat#possible-errors">details</a>)</para></summary>
/// <summary><para>⚠ <b>This method is only for small private Chat</b>. See <see href="https://github.com/wiz0u/WTelegramClient/blob/master/README.md#terminology">Terminology</see> to understand what this means<br/>Search for a similar method name starting with <c>Channels_</c> if you're dealing with a <see cref="Channel"/></para> Turn a <a href="https://corefork.telegram.org/api/channel">legacy group into a supergroup</a> <para>See <a href="https://corefork.telegram.org/method/messages.migrateChat"/></para> <para>Possible <see cref="RpcException"/> codes: 400,403 (<a href="https://corefork.telegram.org/method/messages.migrateChat#possible-errors">details</a>)</para></summary>
/// <param name="chat_id">Legacy group to migrate</param>
public static Task<UpdatesBase> Messages_MigrateChat(this Client client, long chat_id)
=> client.Invoke(new Messages_MigrateChat
@ -14830,7 +14830,7 @@ namespace TL
{
peer = peer,
});
/// <summary>Delete a <a href="https://corefork.telegram.org/api/channel">chat</a> <para>See <a href="https://corefork.telegram.org/method/messages.deleteChat"/></para> <para>Possible <see cref="RpcException"/> codes: 400 (<a href="https://corefork.telegram.org/method/messages.deleteChat#possible-errors">details</a>)</para></summary>
/// <summary><para>⚠ <b>This method is only for small private Chat</b>. See <see href="https://github.com/wiz0u/WTelegramClient/blob/master/README.md#terminology">Terminology</see> to understand what this means<br/>Search for a similar method name starting with <c>Channels_</c> if you're dealing with a <see cref="Channel"/></para> Delete a <a href="https://corefork.telegram.org/api/channel">chat</a> <para>See <a href="https://corefork.telegram.org/method/messages.deleteChat"/></para> <para>Possible <see cref="RpcException"/> codes: 400 (<a href="https://corefork.telegram.org/method/messages.deleteChat#possible-errors">details</a>)</para></summary>
/// <param name="chat_id">Chat ID</param>
public static Task<bool> Messages_DeleteChat(this Client client, long chat_id)
=> client.Invoke(new Messages_DeleteChat

View file

@ -6,7 +6,7 @@ namespace TL
{
public static class Layer
{
public const int Version = 135; // fetched 08/12/2021 14:03:48
public const int Version = 135; // fetched 27/11/2021 01:12:30
internal const uint VectorCtor = 0x1CB5C415;
internal const uint NullCtor = 0x56730BCC;
internal const uint RpcResultCtor = 0xF35C6D01;