ZiziBot.TelegramBot.Framework
226.5.9641.27947-beta
See the version list below for details.
dotnet add package ZiziBot.TelegramBot.Framework --version 226.5.9641.27947-beta
NuGet\Install-Package ZiziBot.TelegramBot.Framework -Version 226.5.9641.27947-beta
<PackageReference Include="ZiziBot.TelegramBot.Framework" Version="226.5.9641.27947-beta" />
<PackageVersion Include="ZiziBot.TelegramBot.Framework" Version="226.5.9641.27947-beta" />
<PackageReference Include="ZiziBot.TelegramBot.Framework" />
paket add ZiziBot.TelegramBot.Framework --version 226.5.9641.27947-beta
#r "nuget: ZiziBot.TelegramBot.Framework, 226.5.9641.27947-beta"
#:package ZiziBot.TelegramBot.Framework@226.5.9641.27947-beta
#addin nuget:?package=ZiziBot.TelegramBot.Framework&version=226.5.9641.27947-beta&prerelease
#tool nuget:?package=ZiziBot.TelegramBot.Framework&version=226.5.9641.27947-beta&prerelease
ZiziBot.TelegramBot
ZiziBot.TelegramBot is a bot framework designed to help with command-based bot development. Some samples can be found in the Sample project.
This framework supports both Polling and Webhook modes.
You can specify the mode in appsettings.json using the EngineMode property.
Auto Mode
By default, EngineMode is set to Auto.
This means that during local development, it runs using Polling, and after deployment, it automatically switches to Webhook mode.
Simply fill in the required configuration in appsettings.json to get started.
Please note that this is a very early-stage project, so there are no guarantees against breaking changes in the future.
This project is inspired by VodemSharp/Allowed.Telegram.Bot.
Framework Architecture
All bot commands are inherited from the BotCommandController class. This class provides a Context property that allows you to access the current request and send a response. To better understand how to create a command, please refer to the sample project.
Structure
The solution (ZiziBot.TelegramBot.sln) contains two main projects:
ZiziBot.TelegramBot.Framework: A .NET library that provides the core framework for building command-based Telegram bots. It targetsnet8.0,net9.0, andnet10.0.ZiziBot.TelegramBot.Sample: A .NET web project that serves as a sample implementation of the framework. It references the framework project and runs onnet10.0.
Dependencies
- The Framework project uses
JetBrains.Annotations,Scrutor,UUIDNext, andWTelegramBot. - The Sample project uses
Microsoft.AspNetCore.OpenApiandSerilog.AspNetCore.
Initialization
The bot is initialized in the Program.cs file of the sample project. Here's a breakdown of the key steps:
AddZiziBotTelegramBot(): This extension method registers all the necessary services for the bot to run.UseZiziBotTelegramBot(): This extension method configures the bot and starts the engine.
Adding a New Command
To add a new command, you can create a new class that inherits from BotCommandController and add methods with the [Command] attribute. For example:
public class SampleCommands : BotCommandController
{
[Command("ping")]
public async Task Ping()
{
await SendMessageText("Pong!");
}
}
Build & Run
- Build: The entire solution can be built using the
dotnet buildcommand from the root directory. - Run: The sample application can be run with the command
dotnet runfrom theZiziBot.TelegramBot.Sampledirectory. - URL: When running, the sample application is accessible at
http://localhost:5157.
Demo project
Thanks
Thanks to JetBrains for providing us with <a href="https://www.jetbrains.com/?from=zizibot" target="_blank">dotUltimate</a> licenses.
<a href="https://www.jetbrains.com/?from=zizibot" target="_blank"> <img src="https://resources.jetbrains.com/storage/products/company/brand/logos/jb_beam.svg" alt="JetBrains logo." width="200"> </a>
| 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 is compatible. 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 is compatible. 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. |
-
net10.0
- JetBrains.Annotations (>= 2025.2.4)
- Scrutor (>= 7.0.0)
- UUIDNext (>= 4.2.4)
- WTelegramBot (>= 9.6.0)
-
net8.0
- JetBrains.Annotations (>= 2025.2.4)
- Scrutor (>= 7.0.0)
- UUIDNext (>= 4.2.4)
- WTelegramBot (>= 9.6.0)
-
net9.0
- JetBrains.Annotations (>= 2025.2.4)
- Scrutor (>= 7.0.0)
- UUIDNext (>= 4.2.4)
- WTelegramBot (>= 9.6.0)
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 |
|---|---|---|
| 226.7.9677.28345-beta | 109 | 7/1/2026 |
| 226.6.9673.26693-beta | 103 | 6/27/2026 |
| 226.6.9673.26277-beta | 105 | 6/27/2026 |
| 226.6.9673.25181-beta | 110 | 6/27/2026 |
| 226.6.9653.27790-beta | 102 | 6/7/2026 |
| 226.6.9652.20707-beta | 119 | 6/6/2026 |
| 226.6.9651.42537-beta | 113 | 6/5/2026 |
| 226.5.9643.29552-beta | 107 | 5/28/2026 |
| 226.5.9642.28888-beta | 99 | 5/27/2026 |
| 226.5.9641.29477-beta | 104 | 5/26/2026 |
| 226.5.9641.27947-beta | 100 | 5/26/2026 |
| 226.5.9640.26309-beta | 99 | 5/25/2026 |
| 226.5.9629.7382-beta | 111 | 5/14/2026 |
| 226.5.9629.6978-beta | 101 | 5/14/2026 |
| 226.5.9629.852-beta | 104 | 5/14/2026 |
| 226.5.9628.56502 | 123 | 5/13/2026 |
| 226.5.133.928 | 102 | 5/13/2026 |
| 226.5.133.926 | 103 | 5/13/2026 |
| 225.9.9391.28146 | 360 | 9/17/2025 |
| 1.0.0 | 113 | 5/13/2026 |