private static void WWAPI_OnUpdate(object sender, Telegram.Bot.Args.UpdateEventArgs e) { total++; if ((e.Update.Message?.Text ?? "").StartsWith("/")) { mQueue.Enqueue(e.Update.Message); } }
private static async void Bot_OnUpdate(object sender, Telegram.Bot.Args.UpdateEventArgs e) { switch (e.Update.Type) { case Telegram.Bot.Types.Enums.UpdateType.PreCheckoutQuery: try { await _bot.AnswerPreCheckoutQueryAsync(e.Update.PreCheckoutQuery.Id); } catch (Exception ex) { Console.WriteLine(ex.Message); } break; } }