mirror of
https://github.com/wiz0u/WTelegramClient.git
synced 2026-04-05 22:45:38 +00:00
Renamed OnUpdate => OnUpdates (with temporary compatibility shim)
This commit is contained in:
parent
270a7d89e6
commit
3d224afb23
12 changed files with 49 additions and 52 deletions
|
|
@ -1,6 +1,5 @@
|
|||
using System;
|
||||
using System.Threading.Tasks;
|
||||
using Telegram.Bot.Types;
|
||||
using TL;
|
||||
|
||||
namespace WTelegramClientTest
|
||||
|
|
@ -28,7 +27,7 @@ namespace WTelegramClientTest
|
|||
private static async Task CreateAndConnect()
|
||||
{
|
||||
Client = new WTelegram.Client(Environment.GetEnvironmentVariable);
|
||||
Client.OnUpdate += Client_OnUpdate;
|
||||
Client.OnUpdates += Client_OnUpdates;
|
||||
Client.OnOther += Client_OnOther;
|
||||
var my = await Client.LoginUserIfNeeded();
|
||||
Console.WriteLine($"We are logged-in as " + my);
|
||||
|
|
@ -61,7 +60,7 @@ namespace WTelegramClientTest
|
|||
Console.WriteLine("Other: " + arg.GetType().Name);
|
||||
}
|
||||
|
||||
private static Task Client_OnUpdate(UpdatesBase updates)
|
||||
private static Task Client_OnUpdates(UpdatesBase updates)
|
||||
{
|
||||
foreach (var update in updates.UpdateList)
|
||||
Console.WriteLine(update.GetType().Name);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue