SimpleDiscordDotNet 1.2.0

There is a newer version of this package available.
See the version list below for details.
dotnet add package SimpleDiscordDotNet --version 1.2.0
                    
NuGet\Install-Package SimpleDiscordDotNet -Version 1.2.0
                    
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="SimpleDiscordDotNet" Version="1.2.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="SimpleDiscordDotNet" Version="1.2.0" />
                    
Directory.Packages.props
<PackageReference Include="SimpleDiscordDotNet" />
                    
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 SimpleDiscordDotNet --version 1.2.0
                    
#r "nuget: SimpleDiscordDotNet, 1.2.0"
                    
#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 SimpleDiscordDotNet@1.2.0
                    
#: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=SimpleDiscordDotNet&version=1.2.0
                    
Install as a Cake Addin
#tool nuget:?package=SimpleDiscordDotNet&version=1.2.0
                    
Install as a Cake Tool

SimpleDiscordNet

A lightweight, dependency-free Discord bot SDK for .NET 10 that provides direct access to Discord API v10 (REST + Gateway).

Purpose

SimpleDiscordNet is designed for developers who want:

  • Zero dependencies - BCL only, no external packages
  • Performance - Minimal memory usage and efficient API calls
  • Simplicity - Clean, approachable API with builder patterns
  • Modern C# - Built for .NET 10 with C# 14 features
  • Production-ready - Advanced rate limiting, comprehensive error handling, and extensive API coverage

Key Features

  • ✅ Slash commands, components, and modals with attribute-based handlers
  • ✅ Source generator for zero-reflection command/component discovery
  • ✅ Ambient context for accessing cached guilds, channels, members, roles
  • ✅ Comprehensive gateway events for all entity changes
  • ✅ Advanced rate limiting with bucket management and monitoring
  • ✅ Full Discord API v10 support (messages, reactions, permissions, roles, channels, threads, etc.)
  • ✅ Native AOT and trimming compatible

Quick Example

using SimpleDiscordNet;
using SimpleDiscordNet.Commands;
using SimpleDiscordNet.Primitives;

public sealed class AppCommands
{
    [SlashCommand("hello", "Say hello")]
    public async Task HelloAsync(InteractionContext ctx)
        => await ctx.RespondAsync("Hello from SimpleDiscordNet!");
}

var bot = DiscordBot.NewBuilder()
    .WithToken(Environment.GetEnvironmentVariable("DISCORD_TOKEN")!)
    .WithIntents(DiscordIntents.Guilds)
    .Build();

await bot.StartAsync();
await Task.Delay(Timeout.Infinite);

Documentation

📖 Full documentation is available in the Wiki

Installation

Install from NuGet:

dotnet add package SimpleDiscordDotNet

Or via Package Manager:

Install-Package SimpleDiscordDotNet

Requirements

Contributing

Issues and pull requests are welcome! Please keep the code dependency-free and aligned with the existing style.

License

Licensed under the Apache License, Version 2.0. See LICENSE and NOTICE for details.


Ready to build your Discord bot? Head to the Wiki to get started!

Product 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
1.4.4 97 12/20/2025
1.4.3 99 12/20/2025
1.4.2 124 12/20/2025
1.4.1 145 12/19/2025
1.4.0 145 12/19/2025
1.3.0 175 12/19/2025
1.2.1 182 12/19/2025
1.2.0 225 12/19/2025
1.1.2 230 12/18/2025
1.1.1 233 12/18/2025
1.1.0 235 12/18/2025
1.0.3 227 12/17/2025
1.0.2 230 12/17/2025
1.0.1 231 12/17/2025
1.0.0 229 12/17/2025

Enterprise-grade rate limiting with monitoring, bucket tracking, and zero message loss guarantee. Added comprehensive JSON serialization support for AOT/trimming.