SimpleDiscordDotNet 1.4.0
See the version list below for details.
dotnet add package SimpleDiscordDotNet --version 1.4.0
NuGet\Install-Package SimpleDiscordDotNet -Version 1.4.0
<PackageReference Include="SimpleDiscordDotNet" Version="1.4.0" />
<PackageVersion Include="SimpleDiscordDotNet" Version="1.4.0" />
<PackageReference Include="SimpleDiscordDotNet" />
paket add SimpleDiscordDotNet --version 1.4.0
#r "nuget: SimpleDiscordDotNet, 1.4.0"
#:package SimpleDiscordDotNet@1.4.0
#addin nuget:?package=SimpleDiscordDotNet&version=1.4.0
#tool nuget:?package=SimpleDiscordDotNet&version=1.4.0
SimpleDiscordDotNet
A lightweight, dependency-free Discord bot SDK for .NET 10 that provides direct access to Discord API v10 (REST + Gateway).
Purpose
SimpleDiscordDotNet is designed for developers who want:
- Zero dependencies - BCL only, no external packages
- Performance - Memory-optimized with Span<T> and modern .NET 10 APIs for 30-50% less GC pressure
- Simplicity - Clean, approachable API with builder patterns
- Modern C# - Built for .NET 10 with C# 14 features and span-based APIs
- 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
- ✅ Memory-optimized with
Span<T>,Memory<T>, and zero-allocation APIs - ✅ Horizontal sharding - 3 modes: single process, multi-shard, or distributed coordinator/worker
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 SimpleDiscordDotNet!");
}
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 - Get started with NuGet or source reference
- Getting Started - Your first bot in minutes
- Configuration - Builder patterns, DI, intents
- Commands - Slash commands, components, modals
- Events - Gateway events and logging
- Sharding - NEW! Horizontal scaling with distributed sharding
- API Reference - Complete API documentation
- Rate Limit Monitoring - Advanced monitoring and analytics
- FAQ - Common questions and troubleshooting
Installation
Install from NuGet:
dotnet add package SimpleDiscordDotNet
Or via Package Manager:
Install-Package SimpleDiscordDotNet
Requirements
- .NET SDK 10.0 or newer
- A Discord bot token from the Discord Developer Portal
- Gateway intents configured as needed
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!
Version History
v1.3.0 - Sharding Support (2025-12-19)
- ✅ Added 3-mode sharding system: single process, multi-shard, distributed
- ✅ Distributed coordinator/worker architecture with auto-discovery
- ✅ Health monitoring, load balancing, coordinator succession
- ✅ Cross-shard entity cache queries
- ✅ Shard-aware InteractionContext for commands
- ✅ Full AoT compliance with source-generated JSON serialization
- ✅ Zero reflection usage, ready for native compilation
- 📖 See SHARDING_IMPLEMENTATION.md and SHARDING_INTEGRATION_GUIDE.md
| 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
- 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 | 75 | 12/20/2025 |
| 1.4.3 | 79 | 12/20/2025 |
| 1.4.2 | 104 | 12/20/2025 |
| 1.4.1 | 124 | 12/19/2025 |
| 1.4.0 | 125 | 12/19/2025 |
| 1.3.0 | 154 | 12/19/2025 |
| 1.2.1 | 162 | 12/19/2025 |
| 1.2.0 | 203 | 12/19/2025 |
| 1.1.2 | 210 | 12/18/2025 |
| 1.1.1 | 213 | 12/18/2025 |
| 1.1.0 | 215 | 12/18/2025 |
| 1.0.3 | 206 | 12/17/2025 |
| 1.0.2 | 209 | 12/17/2025 |
| 1.0.1 | 210 | 12/17/2025 |
| 1.0.0 | 208 | 12/17/2025 |
Enterprise-grade rate limiting with monitoring, bucket tracking, and zero message loss guarantee. Added comprehensive JSON serialization support for AOT/trimming.