mirror of
https://github.com/wiz0u/WTelegramClient.git
synced 2026-04-05 22:45:38 +00:00
updated example Programs.cs
This commit is contained in:
parent
34f05f5947
commit
0667d36ed8
5 changed files with 4 additions and 8 deletions
|
|
@ -26,11 +26,10 @@ namespace WTelegramClientTest
|
|||
static async Task Main(string[] _)
|
||||
{
|
||||
using var client = new WTelegram.Client(Config);
|
||||
await client.ConnectAsync();
|
||||
var user = await client.LoginUserIfNeeded();
|
||||
Console.WriteLine($"We are logged-in as {user.username ?? user.first_name + " " + user.last_name} (id {user.id})");
|
||||
|
||||
var chats = await client.Messages_GetAllChats(null); // chats = groups/channels (does not include users dialogs)
|
||||
var chats = await client.Messages_GetAllChats(); // chats = groups/channels (does not include users dialogs)
|
||||
Console.WriteLine("This user has joined the following:");
|
||||
foreach (var (id, chat) in chats.chats)
|
||||
switch (chat)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue