mirror of
https://github.com/wiz0u/WTelegramClient.git
synced 2025-12-06 06:52:01 +01:00
minor doc
This commit is contained in:
parent
6bdb0b9cc7
commit
16258cb5ba
|
|
@ -224,8 +224,7 @@ var participants = await client.Channels_GetAllParticipants(channel);
|
||||||
using var client = new WTelegram.Client(Environment.GetEnvironmentVariable);
|
using var client = new WTelegram.Client(Environment.GetEnvironmentVariable);
|
||||||
await client.LoginUserIfNeeded();
|
await client.LoginUserIfNeeded();
|
||||||
var chats = await client.Messages_GetAllChats(null);
|
var chats = await client.Messages_GetAllChats(null);
|
||||||
const long ChatId = 1234567890; // the target chat
|
var chat = chats.chats[1234567890]; // the target chat
|
||||||
var chat = chats.chats[ChatId];
|
|
||||||
```
|
```
|
||||||
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:
|
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
|
```csharp
|
||||||
|
|
@ -247,7 +246,7 @@ await client.Messages_EditExportedChatInvite(chat, invite.link, revoked: true);
|
||||||
await client.Messages_DeleteExportedChatInvite(chat, invite.link);
|
await client.Messages_DeleteExportedChatInvite(chat, invite.link);
|
||||||
|
|
||||||
// • Remove the user from a Chat/Channel/Group:
|
// • Remove the user from a Chat/Channel/Group:
|
||||||
await client.DeleteChatUser(ChatId, user);
|
await client.DeleteChatUser(chat, user);
|
||||||
```
|
```
|
||||||
|
|
||||||
<a name="history"></a>
|
<a name="history"></a>
|
||||||
|
|
|
||||||
|
|
@ -23,9 +23,9 @@ static async Task Main(string[] _)
|
||||||
```
|
```
|
||||||
When run, this will prompt you interactively for your App **api_id** and **api_hash** (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_id** and **api_hash** (that you obtain through Telegram's [API development tools](https://my.telegram.org/apps) page) and try to connect to Telegram servers.
|
||||||
|
|
||||||
Then it will attempt to sign-in 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 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 (accepting the Terms of Service) and enter their **first_name** and **last_name**.
|
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**.
|
||||||
|
|
||||||
And that's it, you now have access to the **[full range of Telegram Client APIs](https://corefork.telegram.org/methods)**.
|
And that's it, you now have access to the **[full range of Telegram Client APIs](https://corefork.telegram.org/methods)**.
|
||||||
All those API methods are available *(with an underscore in the method name, instead of a dot)*, like this: `await client.Method_Name(...)`
|
All those API methods are available *(with an underscore in the method name, instead of a dot)*, like this: `await client.Method_Name(...)`
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue