-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathProgram.cs
More file actions
35 lines (32 loc) · 1.04 KB
/
Program.cs
File metadata and controls
35 lines (32 loc) · 1.04 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
using System;
using System.Threading;
using System.Threading.Tasks;
using Telegram.Bot;
using Telegram.Bot.Extensions.Polling;
using Telegram.Bot.Types;
using Telegram.Bot.Exceptions;
namespace TelegramBotExperiments
{
class Program
{
static ITelegramBotClient bot = new TelegramBotClient("TOKEN");
static void Main(string[] args)
{
TelegramBot.SaveImage.TestConnection();
//Console.WriteLine("Запущен бот " + bot.GetMeAsync().Result.FirstName);
//var cts = new CancellationTokenSource();
//var cancellationToken = cts.Token;
//var receiverOptions = new ReceiverOptions
//{
// AllowedUpdates = { }, // receive all update types
//};
//bot.StartReceiving(
// TelegramBot.WorkerBot.HandleUpdateAsync,
// TelegramBot.WorkerBot.HandleErrorAsync,
// receiverOptions,
// cancellationToken
//);
Console.ReadLine();
}
}
}