Skip to content

Repository files navigation

.NET Client for Telegram Bot API

package telegram chat

downloads

🚧 Supported Platforms

Project targets .NET Standard 2.

🔨 Getting Started

Create the bot on telegram first

bot-creating-in-telegram

SB.TelegramBot is available on [NuGet]. You can install the package using:

PM> Install-Package SB.TelegramBot

Namespace

using SB.TelegramBot;

Run telegram bot application

public static void Main()
{
    TelegramBotApplication.Run("teleram bot token here");

    Console.WriteLine("Telegram bot started!");
    Console.WriteLine("Press enter to close!");
    Console.ReadLine();
}

Now go to your bot

bot-creating-in-telegram

Create first command

using SB.TelegramBot;

[TelegramBotCommandName("/hello")]
public class HelloCommand : TelegramBotPublicCommand
{
   public override void Execute()
   {
      MessageService.SendMessage("Hello Telegram Bot");
   }
}

About

No description, website, or topics provided.

Resources

Stars

3 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages