OmniChat 2.0.4

dotnet add package OmniChat --version 2.0.4
                    
NuGet\Install-Package OmniChat -Version 2.0.4
                    
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="OmniChat" Version="2.0.4" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="OmniChat" Version="2.0.4" />
                    
Directory.Packages.props
<PackageReference Include="OmniChat" />
                    
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 OmniChat --version 2.0.4
                    
#r "nuget: OmniChat, 2.0.4"
                    
#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 OmniChat@2.0.4
                    
#: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=OmniChat&version=2.0.4
                    
Install as a Cake Addin
#tool nuget:?package=OmniChat&version=2.0.4
                    
Install as a Cake Tool

OmniChat

Omnichannel chat SDK for .NET. Connect Telegram, Slack, Google Chat and Microsoft Teams with a single package — no server deployment needed.

Install

dotnet add package OmniChat

Usage

using OmniChat;

var sdk = new OmniChatBot();

sdk.UseTelegram("your-bot-token");
// sdk.UseSlack("xoxb-bot-token", "xapp-app-token");
// sdk.UseGChat(serviceAccountKey: "/path/to/service-account.json");
// sdk.UseTeams("your-app-id", "your-app-password");

sdk.OnMessage(async (thread, msg) =>
{
    Console.WriteLine($"[{msg.Platform}] {msg.Author.UserName}: {msg.Text}");
    await thread.ReplyAsync($"You said: {msg.Text}");
});

sdk.OnMention(async (thread, msg) =>
{
    await thread.ReplyAsync($"Hey {msg.Author.UserName}! You mentioned me.");
});

using var cts = new CancellationTokenSource();
Console.CancelKeyPress += (_, e) => { e.Cancel = true; cts.Cancel(); };

await sdk.StartAsync(cts.Token);

Live-updating replies (tracked messages)

For streaming AI output, don't wait for the full response before showing anything — send once, then rewrite that same message in place as more text arrives:

var handle = await thread.ReplyTrackedAsync("Thinking");     // appears immediately
await thread.UpdateReplyAsync(handle, "Thinking about it..."); // rewrites the same message
await thread.UpdateReplyAsync(handle, "Here's the full answer.");

This avoids a chat platform showing "not responding" during long generations, and avoids leaving a stray "Thinking..." message behind — there's only ever one message, and it's rewritten as it grows.

Support varies by platform:

Platform ReplyTrackedAsync UpdateReplyAsync
Google Chat ✅ — PATCH messages.update
Slack ✅ — chat.update
Telegram ✅ — editMessageText
Microsoft Teams ✅ — Bot Framework activity update
WhatsApp ✅ (returns a real message id) ❌ throws NotSupportedException — the Cloud API has no endpoint to edit a sent message

Supported Platforms

Platform Method How it works
Telegram UseTelegram(botToken) Long polling — no public URL needed
Slack UseSlack(botToken, appToken) Socket Mode — no public URL needed
Google Chat UseGChat(serviceAccountKey, port, path, uploadAsUser) HTTP webhook + service-account app auth
Microsoft Teams UseTeams(appId, appPassword) HTTP webhook + Azure OAuth2

Credentials

Platform What you need Where to get it
Telegram Bot Token Talk to @BotFather on Telegram
Slack Bot Token + App Token api.slack.com — enable Socket Mode
Google Chat Service account JSON key (+ HTTPS endpoint registered in the Chat API config) console.cloud.google.com — enable the Chat API, configure the app, create a service account
Microsoft Teams App ID + App Password portal.azure.com — Register a Bot

Google Chat file attachments (SendFileAsync) additionally need uploadAsUser set to a Workspace user your service account has domain-wide delegation for — the Chat API's attachment upload endpoint only accepts user authentication, not the app (service-account) authentication used for text messages.

Requirements

  • .NET 8, 9 or 10
  • No server deployment needed
  • No database needed
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 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • net10.0

    • No dependencies.
  • net8.0

    • No dependencies.
  • net9.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
2.0.4 104 7/16/2026
2.0.3 87 7/15/2026
2.0.2 98 7/15/2026
2.0.1 91 7/15/2026
2.0.0 93 7/14/2026
1.0.0 119 6/18/2026