Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1,067 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Build Documentation CodeQL

GitHub last commit GitHub commit activity GitHub pull requests GitHub code size in bytes

LTS Latest


DisCatSharp

A Discord app library written in C# for .NET


Why DisCatSharp?

If you:

  • want a library where you get kind and efficient help
  • would like to have and use the most recent features of the Discord API
  • are ready to build great things

Then this is the right place for you!

History

We squashed DisCatSharp's Git history because of its clone size and accumulated clutter. The original history remains available through the releases, tags, and the archived pre-squash repository.

Install

Install the latest stable release from NuGet:

dotnet add package DisCatSharp

To use the latest nightly release instead:

dotnet add package DisCatSharp --prerelease

Packages are also available from GitHub Packages.

Quick start

Create a Discord bot account, store its token in the DISCORD_TOKEN environment variable, and connect the client:

using DisCatSharp;
using DisCatSharp.Enums;

string token = Environment.GetEnvironmentVariable("DISCORD_TOKEN")
    ?? throw new InvalidOperationException("Set the DISCORD_TOKEN environment variable.");

var discord = new DiscordClient(new DiscordConfiguration
{
    Token = token,
    TokenType = TokenType.Bot,
    Intents = DiscordIntents.AllUnprivileged
});

await discord.ConnectAsync();
await Task.Delay(Timeout.InfiniteTimeSpan);

Continue with the complete first bot guide.

Documentation

The documentation is available at docs.dcs.aitsys.dev. A backup is available at backup-docs.dcs.aitsys.dev.

AI coding assistants

Install the consumer skill globally for Codex:

gh skill install Aiko-IT-Systems/DisCatSharp use-discatsharp --agent codex --scope user --pin main

Then add the public, stateless documentation MCP as a Streamable HTTP server named discatsharp:

[mcp_servers.discatsharp]
url = "https://docs.dcs.aitsys.dev/mcp"

The MCP provides live documentation search, symbol lookup, full-page retrieval, and indexed source access. See the Agent Skills and MCP setup guide for GitHub Copilot, Claude Code, Gemini CLI, other Agent Skills clients, version pinning, and maintainer guidance.

Bugs and feature requests

Join our official support guild, open an issue, or email bugs@aitsys.dev.

Tutorials and examples

Visual Studio tools


NuGet Packages

Main

Package Purpose LTS Latest
DisCatSharp Core Discord API client with Gateway, REST, entities, and events. NuGet NuGet
DisCatSharp.ApplicationCommands Slash commands, context menus, autocomplete, and command groups. NuGet NuGet
DisCatSharp.CommandsNext Prefix and text command framework. NuGet NuGet
DisCatSharp.Interactivity Interactive waits, pagination, components, modals, and response helpers. NuGet NuGet

Voice

Package Purpose LTS Latest
DisCatSharp.Lavalink Lavalink v4 client for remote audio playback. NuGet NuGet
DisCatSharp.Voice Direct Discord voice connections with audio send, receive, and DAVE support. NuGet NuGet
DisCatSharp.Voice.Natives Native runtime libraries used by DisCatSharp.Voice. NuGet NuGet

Hosting

Package Purpose LTS Latest
DisCatSharp.Configuration Configuration models and binding for hosted bots. NuGet NuGet
DisCatSharp.Hosting .NET Generic Host integration and bot lifetime management. NuGet NuGet
DisCatSharp.Hosting.AspNetCore ASP.NET Core ingress for interactions, webhooks, OAuth callbacks, and linked roles. NuGet NuGet
DisCatSharp.Hosting.DependencyInjection Dependency-injection helpers for clients and hosted bots. NuGet NuGet

Templates

Package Purpose LTS Latest
DisCatSharp.ProjectTemplates Project templates for creating hosted DisCatSharp bots. NuGet NuGet

Development / Commons

Package Purpose LTS Latest
DisCatSharp.Attributes Shared annotations used by DisCatSharp packages and tooling. NuGet NuGet
DisCatSharp.Common Shared utilities, regular expressions, and converters. NuGet NuGet
DisCatSharp.Experimental Experimental and unsupported Discord features that may change without notice. NuGet NuGet
DisCatSharp.Analyzer Recommended analyzers and code fixes for DisCatSharp applications. NuGet NuGet
Package Purpose LTS Latest
DisCatSharp.Extensions.TwoFactorCommands Require two-factor authentication for selected commands. NuGet NuGet
DisCatSharp.Extensions.OAuth2Web Deprecated. Legacy OAuth web server; migrate to DisCatSharp.Hosting.AspNetCore. NuGet NuGet
DisCatSharp.Extensions.SimpleMusicCommands Ready-to-use commands for building a simple music bot. NuGet NuGet

Sponsors (Current & Past)

Thanks

Big thanks goes to the following people who helped us without being part of the core team ♥️

Special Thanks

The special thanks goes to Nagisa. Make sure to check out her Instagram ♥️♥️

The second special thanks goes to Sentry (GitHub) for sponsoring us with a business account on Sentry for error tracking. You guys are the best 💕⭐

Releases

Sponsor this project

Packages

Used by

Contributors

Languages