mirror of
https://github.com/wiz0u/WTelegramClient.git
synced 2026-04-18 04:43:55 +00:00
Added Examples/Program_GetAllChats
This commit is contained in:
parent
609e8a6a2d
commit
f296e6b36d
4 changed files with 63 additions and 3 deletions
|
|
@ -92,7 +92,8 @@ foreach (var chat in chats.chats)
|
|||
}
|
||||
Console.Write("Type a chat ID to send a message: ");
|
||||
long id = long.Parse(Console.ReadLine());
|
||||
var target = chats.First(chat => chat.ID == id);
|
||||
var target = chats.chats.First(chat => chat.ID == id);
|
||||
Console.WriteLine($"Sending a message in chat {target.ID}: {target.Title}");
|
||||
await client.SendMessageAsync(target, "Hello, World");
|
||||
```
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue