using Telegram.Bot;
namespace TelegramBot
{
class Program
{
static TelegramBotClient Bot;
static void Main(string[] args)
{
Bot = new TelegramBotClient("...");
Bot.OnMessage += Bot_OnMessage;
var me = Bot.GetMeAsync().Result;
Console.WriteLine(me.FirstName);
Bot.StartReceiving();
Console.ReadLine();
Bot.StopReceiving();
}
private static void Bot_OnMessage(object sender, Telegram.Bot.Args.MessageEventArgs e)
{
var massege = e.Message;
Console.WriteLine(massege.Text);
}
}
}