skip to Main Content

I just started to play with Telegram Bot API. Everything is work fine except for console apps..`

        var bot = new TelegramBotClient("token");
        bot.SendTextMessageAsync("group_id", "1" + ":Something not right!", false, false);

I use above code to implement Telegram Bot on window service and winforms. So can anyone guide me to make this work on console apps?

2

Answers


  1. Take a look at this examples.

    Login or Signup to reply.
  2. In my tests, it didn’t work until a put a Console.Read() at the end of my app.

    Trying to figure out why this happen, but it should be something with the app has to wait for the async answer.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search