NetTelegramBotApi 7.0.0-alpha.3
See the version list below for details.
dotnet add package NetTelegramBotApi --version 7.0.0-alpha.3
NuGet\Install-Package NetTelegramBotApi -Version 7.0.0-alpha.3
<PackageReference Include="NetTelegramBotApi" Version="7.0.0-alpha.3" />
<PackageVersion Include="NetTelegramBotApi" Version="7.0.0-alpha.3" />
<PackageReference Include="NetTelegramBotApi" />
paket add NetTelegramBotApi --version 7.0.0-alpha.3
#r "nuget: NetTelegramBotApi, 7.0.0-alpha.3"
#:package NetTelegramBotApi@7.0.0-alpha.3
#addin nuget:?package=NetTelegramBotApi&version=7.0.0-alpha.3&prerelease
#tool nuget:?package=NetTelegramBotApi&version=7.0.0-alpha.3&prerelease
NetTelegramBotApi
C# client library for building Telegram bot (https://core.telegram.org/bots/api)
Contains strongly-types request and response classes, and transport class for sending requests and receiving results.
Usage
var bot = new TelegramBot(accessToken);
var me = await bot.MakeRequestAsync(new GetMe());
if (me != null)
{
Console.WriteLine("Me: {0} (@{1})", me.FirstName, me.Username);
}
See TelegramBotDemo project for more samples.
Version history
5.4 - net8.0
- Target framworks changed:
net8.0only
5.3
- Add ParseMode.MarkdownV2
- Add SendChatAction.ChatActionEnum
- Add MessageThreadId
5.2
- User and Chat updated to actual Bot API
5.1 - net6.0
- Target framworks changed:
net6.0only
5.0.0 - net5.0
- Target framworks changed:
net5.0only System.Text.JsonreplacesNewtosoft.Json
4.0.0 - Big update
Telegram API updated up to v2.3 (November 21, 2016). Message editing, games - everything should work except inline mode (see below).
Breaking changes (compared to 3.8.1):
MakeRequestAsyncnow throwsBotRequestExceptionif non-Ok response is received from server.- Typo fixed on
Contacttype:PhoneNumberwasPhoneNumbet ReplyKeyboardHiderenamed toReplyKeyboardRemove(when it had been renamed in API???)- Breaking changes in API 2.3:
- Parameter
EditMessagereplaced withDisableEditMessageinSetGameScore - In
ReplyKeyboardRemove:HideKeyboardrenamed toRemoveKeyboard
- Parameter
Inline mode
Inline mode needs a lot of new classes to be created. Please make PR if you wish to help.
3.8.1 - .NET Core RTM, netstandard1.3
- Upgraded to .NET Core 1.0.0 and
netstandard1.3
3.7.50926 - API updates, proxy support
- Changes in Telegram API defined as August 29, 2015 implemented (issue #19):
- Added support for uploading certificates in
SetWebhook - Changes in Telegram API defined as September 7, 2015 implemented (issue #20):
- Added
ParseModefield toSendMessagerequest for simple markdown markup (see FAQ for details) - Changes in Telegram API defined as September 18, 2015 implemented (issue #21):
- Bots can now download files and media sent by users, use
GetFilerequest andFileobject (run demo project and send him a picture!) - Proxy support added:
- Use
WebProxyproperty when creating bot (see issue #22 for sample)
3.6.50925 - Upgrade to vNext
Project converted to Visual Studio 2015 and new project type (xproj).
NuGet package now targets multiple runtimes: net45, dnx45, dnx50 and dnxcore50.
New demo console app added (TelegramBotDemo-vNext) for testing under dnx451 runtime. Old demo app ('classic' console project) also available, but Attention! Now it grabs package from nuget! (because old-style .csproj can't reference new .xproj assemblies directly).
3.5.50818 - API changes 'August 15, 2015'
Changes in Telegram API defined as August 15, 2015 implemented (issue #13).
All real changes were already implemented in 3.5.50816, only some documenation/comments are updated in this version.
3.5.50816 - API changes
- Changes in Telegram API defined as July 2015 implemented (issue #7):
- The
Captionfield has been removed from theVideoobject and added to theMessageobject instead. CaptionandDurationoptional fields have been added to theSendVideorequest.UserIdtype in theContactobject changed to Long (was String - typo in API docs)- Changes, not [yet?] announced in Telegram API changlog:
PerformerandTitleoptional fields have been added toAudioobjectDuration,PerformerandTitleoptional fields have been added to theSendAudiorequest- Object
Voiceadded (toMessageclass) SendVoicerequest added
3.4.50815 - Webhooks support, bugfixes
Improvements for working via webhooks:
SetWebhookrequest added (Issue #3)DeserializeUpdatemethod added to convert webhook POST json value toUpdateobject
Fixed issue #6 with sending files with non-latin characters in name.
3.3.50701 - DateTimeOffset instead of long
Message properties Date and ForwardDate are now DateTimeOffset (converted to local time).
3.2.50628 - With sending files
Methods for sending files (SendPhoto, SendVideo, etc) implemented.
3.1.50627 - Using HttpClient
Switched to HttpClient (instead of HttpRequest):
- no more
System.Webdependency; MakeRequestmethod is now async only, use.Resultor.Wait()for synchronous calls
2.1.50626 - Requests hierarchy
Refactored to new request model - base RequestBase class and one (and one async) MakeRequest method.
Major version increased to "2", patch version set to current date.
1.0.1 - Initial release
Response class hierarchy (Types), first requests. It works!
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net8.0
- System.Text.Json (>= 8.0.5)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on NetTelegramBotApi:
| Package | Downloads |
|---|---|
|
NetTelegramBot.Framework
Simple framework for building Telegram bots. |
GitHub repositories (1)
Showing the top 1 popular GitHub repositories that depend on NetTelegramBotApi:
| Repository | Stars |
|---|---|
|
Lunat1q/Catchem-PoGo
Project is DEAD, Discord server: https://discord.me/Catchem
|
| Version | Downloads | Last Updated |
|---|---|---|
| 7.1.0 | 207 | 10/28/2025 |
| 7.0.0 | 272 | 8/19/2025 |
| 7.0.0-alpha.3 | 225 | 10/25/2024 |
| 7.0.0-alpha.2 | 107 | 10/25/2024 |
| 7.0.0-alpha.1 | 105 | 10/25/2024 |
| 6.0.1 | 542 | 10/23/2024 |
| 5.4.1 | 563 | 7/8/2024 |
| 5.4.0 | 220 | 7/8/2024 |
| 5.3.0 | 2,719 | 7/26/2023 |
| 5.2.0 | 2,010 | 2/14/2023 |
| 5.1.0 | 758 | 2/3/2023 |
| 5.0.0 | 3,187 | 5/26/2021 |
| 4.2.0 | 9,032 | 12/15/2017 |
| 4.1.0 | 5,644 | 3/14/2017 |
| 4.0.0 | 3,481 | 11/25/2016 |
| 3.8.1 | 4,207 | 7/17/2016 |
| 3.7.50926 | 3,568 | 9/25/2015 |
| 3.6.50925 | 3,008 | 9/25/2015 |
| 3.5.50818 | 2,108 | 8/18/2015 |
| 3.5.50816 | 1,549 | 8/15/2015 |
| 3.4.50815 | 1,522 | 8/15/2015 |
| 3.3.50701 | 1,641 | 7/1/2015 |
| 3.2.50628 | 1,574 | 6/28/2015 |
| 2.1.50626 | 1,578 | 6/26/2015 |
See GitHub releases.