Answer the question
In order to leave comments, you need to log in
How to send a text message using Telegram.Bot?
Hello
Library - Telegram.bot
.net framework
How to make the bot send a message when running the script.
That is, the bot did not wait for any command, but simply immediately sent the text.
I can send the first message, but the bot must act without outside interference.
I ran the script, a message was sent
How to do this? Please post a piece of code if possible. Or anything at all to write it
Answer the question
In order to leave comments, you need to log in
Something like this:
var bot = new Telegram.Bot.TelegramBotClient("token");
await bot.SendTextMessageAsync(new ChatId("username"), "Hello world");
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question