A simple Telegram Bot API client for .NET, built as a learning project for practicing C# and HTTP-based APIs.
using Telebot;
var tg = new Telegram("<YOUR_BOT_TOKEN>");
// Get bot info
var me = await tg.GetMeAsync(new GetMeRequestParams());
Console.WriteLine(me);
// Long polling
var updates = await tg.GetUpdatesAsync(
new GetUpdatesRequestParams(Timeout: 10)
);
foreach (var update in updates)
{
if (update.Message?.Text is not null)
{
Console.WriteLine("Echoing: " + update.Message.Text);
await tg.SendMessageAync(
new SendMessageRequestParams(
update.Message.Chat.Id,
update.Message.Text
)
);
}
}This is a learning-oriented project.
Contributions are organized via Notion using small, atomic tasks.
To contribute:
- ask for Notion access [email protected]
- pick an atomic task
- submit a PR or discuss the solution