- Install-Package Telegram.Bot
- Create a bot using the botfather
- get the api key using the /token command (still in botfather)
- use this code:
var bot = new Api("your api key here");
var t = await bot.SendTextMessage("@channelname or chat_id", "text message");
You can now pass a channel username (in the format @channelusername)
in the place of chat_id in all methods (and instead of from_chat_id in
forwardMessage). For this to work, the bot must be an administrator in
the channel.
https://core.telegram.org/bots/api