Skip to content

svetlitsky/TeleBotDotNet

 
 

Repository files navigation

TeleBotDotNet Build Status

TeleBotDotNet is a Telegram Bot API for the .NET Framework. It is written in C# and is fully object-oriented.

Example

To send a message:

var teleBot = new TeleBot("YOUR_API_KEY_HERE", false);

teleBot.SendMessage(new SendMessageRequest
{
    ChatId = updateResponse.Message?.Chat?.Id,
    Text = "This is a test.",
    ReplyToMessageId = updateResponse.Message.MessageId
});

For an example project, see Naxiz/TeleBotTicTacToe.

Documentation

The documentation is not included in the library. Please see the official documentation (for example getMe in the documentation becomes GetMe in the library).

API extensions

TeleBotDotNet has some API extensions. These extensions are methods which are not part of the official API but can be useful.

To use these, please add the following using statement:

using TeleBotDotNet.Extensions;

Currently, the following methods are available:

  • DownloadFile(GetFileResponse)

    Download a file as a byte array using a GetFileResponse

  • DownloadFileAsync(GetFileResponse)

    Download a file as a byte array async using a GetFileResponse

NuGet

To use this library in your project, you can use NuGet:

Install-Package TeleBotDotNet

More information on NuGet.

Contributing

Contributions are always welcome!

If you want to be sure that your contribution will be merged, please open an issue to discuss your addition first.

About

Telegram Bot API wrapper for .NET

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C# 100.0%