Answer the question
In order to leave comments, you need to log in
Telegram bot not responding to messages. Nothing is output to the console. How to fix this problem?
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);
}
}
}
Answer the question
In order to leave comments, you need to log in
Is it hard to google?
https://stackoverflow.com/questions/44847614/onmes...
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question