Telegrator.Hosting.Web 1.15.9

dotnet add package Telegrator.Hosting.Web --version 1.15.9
                    
NuGet\Install-Package Telegrator.Hosting.Web -Version 1.15.9
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Telegrator.Hosting.Web" Version="1.15.9" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Telegrator.Hosting.Web" Version="1.15.9" />
                    
Directory.Packages.props
<PackageReference Include="Telegrator.Hosting.Web" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Telegrator.Hosting.Web --version 1.15.9
                    
#r "nuget: Telegrator.Hosting.Web, 1.15.9"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Telegrator.Hosting.Web@1.15.9
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Telegrator.Hosting.Web&version=1.15.9
                    
Install as a Cake Addin
#tool nuget:?package=Telegrator.Hosting.Web&version=1.15.9
                    
Install as a Cake Tool

Telegrator.Hosting.Web

Telegrator.Hosting.Web is an extension for the Telegrator framework that enables seamless integration with ASP.NET Core and webhook-based Telegram bots. It is designed for scalable, production-ready web applications.


Features

  • ASP.NET Core integration for webhook-based bots
  • Automatic handler discovery and registration
  • Strongly-typed configuration via appsettings.json and environment variables
  • Dependency injection and middleware support
  • Graceful startup/shutdown and lifecycle management
  • Advanced error handling and logging
  • Supports all Telegrator handler/filter/state features

Requirements

  • .NET 8.0 or later
  • ASP.NET Core

Installation

dotnet add package Telegrator.Hosting.Web

Quick Start Example

Program.cs (ASP.NET Core):

using Telegrator.Hosting;
using Telegrator.Hosting.Web;

// Creating builder
TelegramBotWebHostBuilder builder = TelegramBotWebHost.CreateBuilder(new TelegramBotWebOptions()
{
    Args = args,
    ExceptIntersectingCommandAliases = true
});

// Register handlers
builder.Handlers.CollectHandlersAssemblyWide();

// Register your services
builder.Services.AddSingleton<IMyService, MyService>();

// Building and running application
TelegramBotWebHost telegramBot = builder.Build();
telegramBot.SetBotCommands();
telegramBot.Run();

Configuration (appsettings.json)

{
  "TelegramBotClientOptions": {
    "Token": "YOUR_BOT_TOKEN"
  }

  "TelegratorWebOptions": {
    "WebhookUri" = "https://you-public-host.ru/bot",
    "DropPendingUpdates": true
  }
}
  • TelegramBotClientOptions: Bot token and client settings

Documentation


License

GPLv3

Product 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.15.9 279 8/24/2025
1.15.8 256 8/24/2025
1.15.7 122 8/23/2025
1.15.6 192 8/21/2025
1.15.5 187 8/19/2025
1.15.4 193 8/19/2025
1.15.3 197 8/19/2025
1.15.2 234 8/18/2025
1.15.1 190 8/18/2025
1.15.0 187 8/18/2025
1.0.13 184 8/11/2025
1.0.12 224 8/8/2025
1.0.11 164 8/4/2025
1.0.10 112 8/2/2025
1.0.9 76 8/1/2025
1.0.8.1 109 8/1/2025
1.0.8 112 8/1/2025
1.0.7 161 7/28/2025