123456789101112131415161718 |
- using System;
- using System.Threading;
- using Telegram.Bot;
- using Telegram.Bot.Extensions.Polling;
- namespace MafiaTelegramBot
- {
- public static class MainClass
- {
- public static void Main()
- {
- var cts = new CancellationTokenSource();
- Bot.Get().StartReceiving(new DefaultUpdateHandler(MessageController.HandleUpdateAsync, MessageController.HandleErrorAsync), cts.Token);
- Console.ReadLine();
- cts.Cancel();
- }
- }
- }
|