BotForge.Modules
0.5.0
dotnet add package BotForge.Modules --version 0.5.0
NuGet\Install-Package BotForge.Modules -Version 0.5.0
<PackageReference Include="BotForge.Modules" Version="0.5.0" />
<PackageVersion Include="BotForge.Modules" Version="0.5.0" />
<PackageReference Include="BotForge.Modules" />
paket add BotForge.Modules --version 0.5.0
#r "nuget: BotForge.Modules, 0.5.0"
#:package BotForge.Modules@0.5.0
#addin nuget:?package=BotForge.Modules&version=0.5.0
#tool nuget:?package=BotForge.Modules&version=0.5.0
BotForge.Modules
Package that adds a modules system for automatic state generation for the BotForge framework. It also adds a role model to authenticate users.
Installation
- .NET target: net10.0
- Install:
dotnet add package BotForge.Modules
Configure modules
using BotForge.Modules;
using BotForge.Modules.Roles;
using BotForge;
using Microsoft.Extensions.Hosting;
var builder = Host.CreateApplicationBuilder(args);
builder.Services
.AddDefaultStorages()
.AddDefaultUpdateHandlers()
.ConfigureUpdatePipeline(_ => { })
.ConfigureModules<IModuleRegistryBuilder>(b =>
{
// Register modules, e.g. scanning assemblies
// b.UseAssembly(typeof(Program).Assembly);
})
.ConfigureRoles<IRoleCatalogBuilder>(roles =>
{
roles.AddRole(Role.Unknown, "Welcome"); // default role
// roles.AddRole("admin", "Admin");
});
// or use fallbacks:
// builder.Services.AddFallbackModuleConfiguration();
// builder.Services.AddDefaultRolesStorage();
var app = builder.Build();
await app.RunAsync();
Notes
- Use attributes like
[Menu],[Prompt<T>],[ModelPrompt<T>], and[CustomState]to describe states. - Default main menu can be simplified if your app has a single module (see Hosting:
SkipModuleSelection). - You can simplify configuration by using
BotForge.Hostingpackage: it configures all fallback services for you.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | 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
- BotForge.Analyzers (>= 1.0.0)
- BotForge.Core (>= 0.5.0)
NuGet packages (3)
Showing the top 3 NuGet packages that depend on BotForge.Modules:
| Package | Downloads |
|---|---|
|
BotForge.Hosting
Package that adds extensions for setting up a hosted application with BotForge framework. It contains some middlewares for debugging and provides the simplest way to create a new bot app. |
|
|
BotForge.Persistence
Package that adds database persistence for bots created with BotForge framework. It contains a basic DbContext for storing user states and identification info. |
|
|
BotForge.Telegram
An infrastructure package that allows you to simply create Telegram bots using BotForge framework. It includes the most common BotForge packages set to begin making bot apps. |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 0.5.0 | 119 | 12/29/2025 |
Initial pre-release