Haven.DotNet
0.2.8
dotnet add package Haven.DotNet --version 0.2.8
NuGet\Install-Package Haven.DotNet -Version 0.2.8
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="Haven.DotNet" Version="0.2.8" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Haven.DotNet" Version="0.2.8" />
<PackageReference Include="Haven.DotNet" />
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 Haven.DotNet --version 0.2.8
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Haven.DotNet, 0.2.8"
#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 Haven.DotNet@0.2.8
#: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=Haven.DotNet&version=0.2.8
#tool nuget:?package=Haven.DotNet&version=0.2.8
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
Haven.DotNet
Haven bot library for .NET developers.
Haven bot developer guide used for reference. Haven.DotNet was created to enable using Haven bots in .NET 10 and is written per the Haven documentation.
Nuget Package
Install Haven.DotNet via NuGet
Library Usage Steps
- Install
Haven.DotNetvia NuGet - Implement the
IHavenDotNetHandlerclass andHandlemethod - If you want to use subcommands also, add each subcommand as a separate method in your
IHavenDotNetHandlerimplementation class and have yourHandlemethod choose which method to call based on receivedargs- Each subcommand method must have an attribute with the subcommand name and description. Example:
[SubSlashCommand("list", "lists the things")] public async Task<string> List() { // Do work here where your return is the message to show in the Haven channel } - Add Haven.DotNet support to your application. Example:
var builder = WebApplication.CreateBuilder(args); builder.Services.AddHavenDotNet<HavenChatbot>(baseUrl, token); - Add Haven callback url support. Example:
var host = builder.Build(); host.UseHavenDotNetCallback(); - Register your slash command. Example:
await host.RegisterHavenSlashCommand<HavenChatbot>("containr", "Control containers"); - Start your application
Example Application Where Haven.DotNet Is Used
For an example application using Haven.DotNet, see ContainrBot: an extensible container management chat bot with flexible chat service and container orchestration support.
Haven Bot Setup
- Create a bot in Haven
- Right-click a channel → Webhooks → [Bot Name] → Create → Copy the URL
- If you're the Haven server admin, you can also retrieve the token later in Settings → Admin → Bots → Manage Bots → Click Bot → [End of Webhook URL, after the /api/webhooks/]
- Add the callback url to your bot
- Settings → Admin → Bots → Manage Bots → Click Bot → Callback URL.
Haven.DotNetassumes a callback URL endpoint of/callback - NOTE: Private/internal URLs are not supported by Haven, see SSRF callback safety check for details
- If you use a local IP or standard local address, you will see errors in the Haven logs like
Bot command /containr: callback URL blocked by SSRF guardand the callback url will not be reached
- If you use a local IP or standard local address, you will see errors in the Haven logs like
- Settings → Admin → Bots → Manage Bots → Click Bot → Callback URL.
| 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. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
net10.0
- No dependencies.
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 |
|---|---|---|
| 0.2.8 | 101 | 9/11/2026 |
| 0.2.7 | 91 | 9/2/2026 |
| 0.2.6 | 113 | 8/17/2026 |
| 0.2.5 | 108 | 8/17/2026 |
| 0.2.4 | 113 | 8/16/2026 |
| 0.2.3 | 104 | 8/16/2026 |
| 0.2.2 | 100 | 8/16/2026 |
| 0.2.1 | 99 | 8/16/2026 |
| 0.2.0 | 100 | 8/15/2026 |
| 0.1.1 | 101 | 8/10/2026 |
| 0.1.0 | 96 | 8/10/2026 |
| 0.0.14 | 98 | 8/9/2026 |
| 0.0.13 | 99 | 8/9/2026 |
| 0.0.12 | 98 | 8/9/2026 |
| 0.0.11 | 101 | 8/9/2026 |