SimpleDiscordDotNet 1.10.17
dotnet add package SimpleDiscordDotNet --version 1.10.17
NuGet\Install-Package SimpleDiscordDotNet -Version 1.10.17
<PackageReference Include="SimpleDiscordDotNet" Version="1.10.17" />
<PackageVersion Include="SimpleDiscordDotNet" Version="1.10.17" />
<PackageReference Include="SimpleDiscordDotNet" />
paket add SimpleDiscordDotNet --version 1.10.17
#r "nuget: SimpleDiscordDotNet, 1.10.17"
#:package SimpleDiscordDotNet@1.10.17
#addin nuget:?package=SimpleDiscordDotNet&version=1.10.17
#tool nuget:?package=SimpleDiscordDotNet&version=1.10.17
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
- ✅ Live observable collections - Thread-safe
INotifyCollectionChangedfor WPF/MAUI/Avalonia UI binding - ✅ 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)
{
var embed = new EmbedBuilder()
.WithTitle("Hello!")
.WithDescription("Welcome to SimpleDiscordDotNet")
.WithColor(0x00FF00);
await ctx.RespondAsync(embed: embed);
}
[SlashCommand("chart", "Send a chart image")]
public async Task ChartAsync(InteractionContext ctx)
{
byte[] chartBytes = GenerateChart();
// Auto-defers and sends file — no manual defer needed
await ctx.RespondAsync("Here's the latest chart:",
fileName: "chart.png",
fileData: chartBytes);
}
[SlashCommand("userinfo", "Get user information")]
public async Task UserInfoAsync(InteractionContext ctx)
{
var user = ctx.User;
var member = ctx.Member;
await ctx.RespondAsync($"Hello {user?.Username}! You joined this server on {member?.Joined_At}");
}
}
var bot = DiscordBot.NewBuilder()
.WithToken(Environment.GetEnvironmentVariable("DISCORD_TOKEN")!)
.WithIntents(DiscordIntents.Guilds | DiscordIntents.GuildMessages)
.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
- Beginner's Guide - NEW! Step-by-step guide for Discord bot beginners
- Configuration - Builder patterns, DI, intents
- Commands - Slash commands, components, modals
- Permissions - NEW v1.8.0! Dual-layer command permissions
- Moderation - NEW v1.8.0! Bans, kicks, timeouts, voice control, audit logs
- Working with Entities - Channels, guilds, members, messages, and roles
- Events - Gateway events and logging
- Sharding - 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.
Community
Join our Discord community for support, discussions, and updates: https://discord.gg/2KrUPCgh
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.10.17 - Connected Event Reliability Fix
- Connected Event Fix —
Connectedevent now fires after every full gateway reconnection (IDENTIFY), not just the initial one. Previously,Disconnectedwould fire on transient network issues, butConnectedonly fired once on the firstREADYdue to an_isReadyflag that was never reset. When a session expired during reconnect, the subsequent fresh IDENTIFY/READY cycle would silently skip firingConnected, leaving consumers trackingIsConnectedpermanently stuck at "Disconnected". - _isReady is now reset to 0 in two code paths:
ResumeAsyncfallback-to-identify (when_sessionIdis empty), and op=9 INVALID_SESSION handler (when resume isn't possible). This guarantees thatConnectedfires on every full reconnect, matching consumer expectations. - ✅ 0 breaking changes — All existing API and event types unchanged.
v1.10.16 - Disconnected Event Reliability Fix
- Disconnected Event Fix —
Disconnectednow fires reliably before every silent reconnect attempt, not just on WebSocket close frames. Added to four code paths: missed heartbeat ACKs, receive loop exceptions, socket state loss (half-close without close frame), and op=7 RECONNECT requests. Upstream consumers trackingIsConnectedvia events will no longer show stale "Connected" state after silent connection loss. - ✅ 0 breaking changes — All existing API and event types unchanged.
v1.10.15 - Session Resumed Event
- New
SessionResumedEvent — Added toGatewayClient,DiscordEvents, andShardinfrastructure. Fires when the gateway successfully resumes an existing session after a WebSocket disconnect (t="RESUMED"), distinct fromConnectedwhich only fires on initial or newREADY. - Shard Status Fix —
Shard._statusnow correctly transitions fromReconnectingback toConnectedon successful resume, rather than staying stuck inReconnectingpermanently. WireShardEventsUpdated — Now accepts anonSessionResumedparameter so sharded consumers can subscribe to resume events through the wiring helper.- ✅ 0 breaking changes — All existing API and event types unchanged.
SessionResumedis a new event; existingConnectedbehavior is preserved.
v1.10.14 - Gateway Reconnect & Session Resume Fix
- 30-Minute Disconnect Fixed — Close code 4003 (Not authenticated) no longer waits 30 minutes before retrying. Reduced to 30-second delay.
- Session Resume Attempt — On 4003, the gateway first attempts to resume the existing session. If resume fails, it clears all cached entities (guilds, channels, members, users, roles) and performs a fresh identify to guarantee a clean state.
- Fatal Codes Stop Retrying — Close codes 4004, 4010, 4011, 4012 are now treated as fatal configuration errors and stop the reconnect loop immediately.
- ✅ 0 breaking changes — All existing API and event types unchanged.
v1.10.13 - Anonymous Type Serialization Fix
- Anonymous Type Serialization Crash — 6 REST methods (
CreateRoleAsync,ModifyRoleAsync,CreateChannelAsync,ModifyChannelAsync,EditMessageAsync,ModifyGuildAsync) used anonymous types as request payloads, causingNotSupportedExceptionwhen serialized via source-generatedDiscordJsonContext. Replaced all anonymous types with named request classes (CreateGuildRoleRequest,CreateGuildChannelRequest,ModifyChannelRequest,EditMessageRequest,ModifyGuildRequest) and registered them with[JsonSerializable]. - ✅ 0 breaking changes — All method signatures and public API unchanged.
v1.10.12 - Gateway Reconnect Hardening & Invite Event Fixes
- Non-Recoverable Close Code Protection — Gateway now detects non-recoverable Discord close codes (4003, 4004, 4010, 4011, 4012) and applies a 30-minute delay before retrying instead of entering an infinite reconnect loop. On successful reconnection, the normal backoff timer resets immediately.
- Auth Failure Diagnostics —
Disconnectedevent now logs a clear error when authentication is rejected, directing users to verify their bot token. - Invite Event Crash Fix —
TryEmitInviteCreateEventandTryEmitInviteDeleteEventnow useTryGetPropertyfor optional fields (guild_id,inviter,code,created_at), preventingKeyNotFoundExceptioncrashes when Discord omits these fields (e.g. DM invites, vanity URL invites). - ✅ 0 breaking changes — All existing API and event types unchanged.
v1.10.11 - Kick & Ban via DiscordContext.Operations
- Moderation API Completeness —
KickMemberAsyncandBanMemberAsyncare now exposed onDiscordContext.Operations, completing moderation coverage alongside existing timeout, role, and voice operations.KickMemberAsyncalso added to theIDiscordBotinterface. - ✅ 0 breaking changes — New methods only, all existing API unchanged.
v1.10.10 - DM Channel Deserialization Fix
- DM Channel Fix —
DiscordChannel.Nameis no longer markedrequired, defaulting tostring.Empty. DM/GroupDM channels omitnamefrom API responses, which previously caused deserialization crashes inSendDMAsync,GetChannelAsync, and interaction resolved channel data. - ✅ 0 breaking changes —
Namestill returnsstring(non-nullable). Existing code settingNamecontinues to work unchanged.
v1.10.9 - File Attachments on Interaction Responses & Followups
- File Attachments on Responses —
RespondAsync,FollowupAsync,EditFollowupAsync, andUpdateMessageAsyncnow support file attachments viaMessageBuilder.AddFile()or directfileName/fileDataparameters. The SDK automatically defers then sends files as followups when used on initial interaction responses (Discord does not support files on type 4/7 callbacks). - File Attachments on Followups & Edits —
FollowupAsync(MessageBuilder),EditFollowupAsync(string, MessageBuilder), andEditOriginalResponseAsync(MessageBuilder)new overloads support multipart file uploads via webhook endpoints, including PATCH multipart for editing messages with attachments. allowed_mentionsPropagation —InteractionResponseDataandWebhookMessageRequestnow includeallowed_mentionsfromMessagePayload, fixing silent data loss when usingMessageBuilder.WithMention()on interaction responses.- Auto-Defer Detection —
RespondAsyncandUpdateMessageAsyncnow automatically defer (type 5/type 6) when file attachments are present on the initial response path. The user never needs to manually defer just to send files.RestClient.SendMultipartAsyncrefactored to acceptHttpMethodfor PATCH multipart support. [Ephemeral]Propagation — The[Ephemeral]attribute now properly propagates to followup messages. When a handler has[Ephemeral], followups sent viaFollowupAsync/RespondAsyncdefault to ephemeral without requiring explicitephemeral: trueon every call. Useephemeral: falseto override per-message.FollowupAsyncnow acceptsbool? ephemeralfor nullable semantics.- AOT Serialization Fixes — Added missing
[JsonSerializable]registrations:DiscordMessage[],IEnumerable<DiscordBan>,int?. New typed entities replaceobject/object[]deserialization:DiscordWebhook,DiscordSticker,DiscordInvitewith array variants. Webhook/Sticker/Invite API methods now return strongly-typed entities instead ofIEnumerable<object>orTask<object?>. - ✅ 0 breaking changes — All new parameters are optional with defaults.
Taskreturn types unchanged.bool→bool?implicit conversion compatible.
v1.10.8 - Component Serialization Fix for .NET 10
- Polymorphic Serialization Fix —
IComponentimplementations (ActionRow,Button,StringSelect,TextInput,UserSelect,RoleSelect,MentionableSelect,ChannelSelect) now use[JsonIgnore]on thetypeproperty, resolving anInvalidOperationExceptioncrash caused by a metadata name conflict with the[JsonPolymorphic(TypeDiscriminatorPropertyName = "type")]discriminator in .NET 10.
v1.10.7 - Gateway Hardening, Missing Event Wiring & Presence Fix
- Gateway Reliability — WebSocket write serialization via
SemaphoreSlimprevents concurrentSendAsyncrace causing disconnects._wsfield madevolatile; all send/receive methods capture_wslocally eliminating TOCTOU races.ConnectSocketAsyncdefers_wsassignment until connection succeeds. State checks moved inside write lock. - Missing Events Wired — 26 dispatch cases added to
HandleDispatchfor previously-dead gateway events:VoiceStateUpdate,PresenceUpdate,TypingStart,WebhooksUpdate,InviteCreate,InviteDelete,GuildIntegrationsUpdate,AutoModeration*,StageInstance*,GuildScheduledEvent*,Integration*,VoiceServerUpdate,GuildJoinRequest*,PollVote*. 7 newTryEmit*helpers + 20 handler methods wired throughDiscordBot,ShardManager, andDiscordEvents. - Presence Fix —
UpdatePresencePayload.sinceuses[JsonIgnore(Condition = Never)]— Discord requires this field present even whennull.BotActivity.urluses[JsonIgnore(Condition = WhenWritingNull)]to omitnullfor non-streaming activities.DefaultIgnoreCondition = WhenWritingNulladded to source-gen options. - AOT Serialization —
ApplicationCommandDefinition[]no longer boxed toobject[](caused 4002 errors). All command sync paths use strongly-typed arrays registered in source-gen context. - Diagnostics — Close frame reason now logged via
Errorevent.Disconnectedevent fires before auto-reconnect. AddedWithGatewayDebug()opt-in diagnostic logging for all outgoing gateway payloads.EnableGatewayDebugadded toDiscordBotOptions. - API Enhancements — Optional
statusparameter added toSetGameAsync,SetWatchingAsync,SetListeningAsync,SetStreamingAsync,SetCompetingAsync.UpdatePresenceAsyncandRequestGuildMembersAsyncnow fireErrorinstead of silently returning.ActivityTypeenum gap at value 4 documented.
v1.10.0 - Comprehensive Bug Fixes & Hardening Pass
- Rate Limiter — Route-to-bucketId mapping fixed (rate limiting was non-functional). Semaphore deadlock eliminated. Sync-over-async removed.
Handle429AsyncusesMax(existing, new)for reset time. - Gateway Reliability —
async voidheartbeat →async Taskloop.ReceiveLoopuses while-loop instead of recursion; no longer dies on reconnect contention._ctsHeartbeatprotected by lock. Author parsing handles webhook messages.Disposesets_autoReconnect=false. - AOT Compatibility — Zero anonymous types in any serialization path.
IComponentgets[JsonPolymorphic]+[JsonDerivedType]for all 8 implementations. 30+ new[JsonSerializable]registrations. Allobject/object[]payload properties replaced with typed alternatives.[UnconditionalSuppressMessage]checkIds fixed. - Memory Safety —
_usersLRU eviction with stale-entry drain (max 100k). Event handler leaks closed inShard,DiscordBot.ObservableConcurrentListnow disposesReaderWriterLockSlimon replacement. - Thread Safety — Dozens of race conditions fixed:
_ctsHeartbeatTOCTOU,PeerNode.AssignedShardsconcurrent reads viaGetShardsSnapshot(),EntityCacherole array writes under lock,RemoveChannel/RemoveMemberuse atomicRemove(),_startedatomic gate,DisposeAsyncre-entrancy guard. - Autocomplete —
InteractionOption.Focusedparsed from gateway. Handler key includes subcommand group/command path.AutocompleteHandleruses primary constructor. Generator respectsHasContextflag, emits per-subcommand permissions, SDN003 duplicate diagnostic. - InteractionContext — Double-acknowledge guard via
_responded._deferred/_deferredUpdatemade volatile.UpdateMessageAsyncroutes to edit-original when type-5 deferred._respondedreset on defer failure. - Performance — ChannelId ulong cached; O(1) option lookup dictionary.
EntityCacheO(1) channel/role secondary indices.SnapshotUsersO(N*M)→O(N). Prefix matching prefers longest match. - Cleanup — Dead fields/classes removed (
_heartbeatTimer,PendingRequest,RequestMetricstimer).DiscordEvents.UnsubscribeAll()helper.SendMessageWithButtonsAsyncacceptsCancellationToken. - Sharding —
ShardCoordinator.HandleResumptionAsynccallsStopAsyncafter handoff. Timer disposal usesDispose(WaitHandle). Assignment operations protected by_assignmentLock.
v1.9.0 - Context Menus, Autocomplete, Presence & Full API Coverage
- Presence/Status API —
SetGameAsync("Minecraft"),SetWatchingAsync("YouTube"),SetListeningAsync("Spotify"),SetStreamingAsync("Live!", url),SetCompetingAsync("tournament"),SetStatusAsync(PresenceStatus.DoNotDisturb) - Context Menu Commands —
[UserContextMenu("Info")]and[MessageContextMenu("Report")]attributes - Autocomplete Handlers —
[Autocomplete("command_name", "option_name")]with full interaction routing - Global Command Sync —
bot.SyncGlobalCommandsAsync() - Guild Management —
ModifyGuildAsync,LeaveGuildAsync,PruneMembersAsync,GetPruneCountAsync - Webhook Management —
CreateWebhookAsync,GetChannelWebhooksAsync,ModifyWebhookAsync,DeleteWebhookAsync - Emoji & Sticker Management —
CreateEmojiAsync,ModifyEmojiAsync,DeleteEmojiAsync,GetGuildStickersAsync, sticker CRUD - Invite Management —
CreateInviteAsync,GetChannelInvitesAsync,GetGuildInvitesAsync - Message Replies & Forum Posts —
builder.WithReply(messageId),builder.WithForumPost(title, tags),channel.ReplyAsync() - Bot User Modify —
bot.ModifyCurrentUserAsync(username:, avatarBase64:) - Interaction Followup Editing —
GetOriginalResponseAsync,EditOriginalResponseAsync,DeleteOriginalResponseAsync,EditFollowupAsync,DeleteFollowupAsync - ulong Overloads — All ID-accepting methods now support both
stringandulong - Stage Instances, Scheduled Events, Auto-Mod Rules — Full CRUD for all remaining Discord REST endpoints
- Bug Fix —
LoadCompleteGuildDataAsyncNRE in sharded modes (SingleProcess + Distributed worker) - Source Generator — Extended to handle context menu commands and autocomplete handlers
- ✅ Voice control operations - Deafen/undeafen members, move between channels, disconnect from voice
bot.DeafenMemberAsync(),bot.UndeafenMemberAsync()bot.MoveMemberToVoiceChannelAsync(),bot.DisconnectMemberFromVoiceAsync()
- ✅ Ban management - Retrieve guild bans with reasons
bot.GetGuildBansAsync()- Get all bansbot.GetGuildBanAsync()- Get specific ban- New
DiscordBanentity with user and reason
- ✅ Audit log access - Complete audit log with advanced filtering
bot.GetAuditLogAsync()with filters: userId, actionType, before, after, limit- Enhanced
DiscordAuditLogentity with audit_log_entries, users, threads - Full
AuditLogActionenum for all Discord actions
- ✅ Bug fixes - Resolved 3 nullable reference warnings (CS8602, CS8601)
- ✅ API compatibility - All methods support both string and ulong overloads
- 📖 New Moderation Guide with comprehensive examples
v1.6.8 - Dual-Layer Command Permissions (2025-01-15)
- ✅ Discord-level permissions -
[RequirePermissions]attribute for default visibility- Sets
default_member_permissionsduring command registration - Integrated with source generator for zero-reflection operation
- Sets
- ✅ Runtime per-guild rules -
bot.PermissionsAPI for dynamic restrictionsRegisterGuildRule()for custom permission checksCheckPermission()evaluates rules before command execution- Thread-safe with ConcurrentDictionary storage
- ✅ 100% AOT compatible - Delegate-based, no reflection
- ✅ Shard-safe - Works across all sharding modes
- ✅ Beginner-friendly - Simple attribute + delegate API
- 📖 New Permissions Guide with database integration examples
v1.6.0 - Cache-First Entity Retrieval & Live Collections (2025-01-11)
- ✅ Cache-first entity retrieval - Optional
useCacheparameter (default: true)GetUserAsync(),GetGuildMemberAsync(),GetGuildAsync(),GetChannelAsync()- Reduces unnecessary API calls while maintaining backward compatibility
- ✅ Live observable collections - Thread-safe
INotifyCollectionChangedfor UI bindingbot.GetLiveGuilds(),guild.GetLiveChannels(),guild.GetLiveMembers()- WPF/MAUI/Avalonia support with
SynchronizationContext - Real-time updates from gateway events
- ✅ API completeness - Added missing methods:
GetGuildChannelsAsync(),GetGuildRolesAsync()
v1.5.0 - Complete Gateway Events (2024-12-24)
- ✅ Added missing Discord gateway events - All previously unwired events are now fully exposed:
InteractionCreated– raised for every interaction (slash commands, components, modals)GuildEmojisUpdated– emoji updates within a guildVoiceStateUpdated– voice state changesPresenceUpdated– presence updatesTypingStarted– typing indicatorsWebhooksUpdated– webhook changesInviteCreated– new invitesInviteDeleted– invite deletionsGuildIntegrationsUpdated– integration updates
- ✅ Event wiring – Events are now wired in both single‑gateway and sharded modes.
- ✅ Modern C# 14 patterns – Explicit type names and collection expressions where applicable.
- ✅ Backward compatible – No breaking changes; existing code continues to work unchanged.
v1.4.4 - Advanced Components & Collection Improvements (2025-12-20)
- ✅ Advanced select menu features - Default values, resolved entity data, emoji support
- Pre-populate select menus:
new UserSelect("id", defaultValues: new[] { SelectDefaultValue.User(userId) }) - Access resolved entities:
ctx.GetResolvedUsers(),ctx.GetResolvedRoles(),ctx.GetResolvedChannels() - Emoji support in SelectOption:
new SelectOption("Label", "value", emojiName: "🎉")
- Pre-populate select menus:
- ✅ Specialized component handler attributes - Type-safe handler registration
[ButtonHandler("id")],[UserSelectHandler("id")],[RoleSelectHandler("id")][ChannelSelectHandler("id")],[MentionableSelectHandler("id")]
- ✅ File attachments in MessageBuilder - Send files with messages
builder.AddFile("file.pdf", bytes),builder.AddFile("image.png", stream)- Multiple overloads: byte[], ReadOnlyMemory, Stream, MemoryStream, async support
- ✅ Message collection methods - Fetch and manage message history
channel.GetMessagesAsync(limit)- Fetch up to 100 messageschannel.BulkDeleteMessagesAsync(count)- Delete 2-100 recent messages
- ✅ IEnumerable returns - All collection methods now return
IEnumerable<T>instead ofT[]- Better LINQ support:
foreach (var msg in await channel.GetMessagesAsync(50)) { } - Consistent API across all collection methods
- Better LINQ support:
- ✅ UpdateAsync aliases - Convenient update methods for component interactions
ctx.UpdateAsync("text")andctx.UpdateAsync(builder)overloads- Works with both string content and MessageBuilder
- ✅ ComponentType enum - Type-safe component type constants
- ✅ Source generator updates - Recognizes all new specialized handler attributes
v1.4.3 - Channel Permissions & Source Generator Fixes (2025-12-20)
- ✅ Channel permission management - Add, remove, deny, and modify permissions for roles and members
channel.AddPermissionAsync(roleId, PermissionFlags.AttachFiles)role.AddChannelPermissionAsync(channel, permission)member.AddChannelPermissionAsync(channel, permission)
- ✅ Source generator fixes -
[CommandOption]attribute now optional for backward compatibility - ✅ Added
ulongparameter support - Commands can now useulongparameters (Discord snowflake IDs) - ✅ Fixed mixed static/instance class handling - Classes with both static and instance methods now generate correctly
- 🔧 Type compatibility - Fixed
IReadOnlyList<InteractionOption>handling
v1.4.1 - Entity-First Architecture & Rich API (2025-12-20)
- ✅ Removed WithGuild wrappers - All entities (Channel, Member, Role, User) now have direct Guild/Guilds properties
- ✅ Rich entity methods - Entities can perform operations on themselves (channel.SendMessageAsync, member.AddRoleAsync, message.PinAsync)
- ✅ Enhanced channel management - SetTopicAsync, SetNameAsync, SetNsfwAsync, SetBitrateAsync, SetUserLimitAsync, SetSlowmodeAsync
- ✅ Message operations return entities - All SendMessageAsync/SendDMAsync methods return DiscordMessage for chaining
- ✅ Guild channel creation - CreateChannelAsync and CreateCategoryAsync directly on DiscordGuild
- ✅ DM channel caching - DM channels are now cached in EntityCache for performance
- ✅ Type consistency - Author.Id changed from string to ulong, InteractionContext.User now returns DiscordUser
- ✅ Optional parameters - RespondAsync content parameter defaults to empty string for embed-only responses
- 📖 Comprehensive documentation - New Beginners-Guide.md and Entities.md wiki pages with detailed examples
v1.4.0 - Enhanced InteractionContext & Security (2025-12-19)
- ✅ Member and Guild objects in InteractionContext - Direct access to member/guild without cache lookups
- ✅ HTTPS-only ShardCoordinator - Secure TLS communication for distributed sharding (upgraded from HTTP)
- ✅ 100% Zero Reflection - All anonymous objects replaced with strongly-typed classes for full AoT compatibility
- ✅ Enhanced type safety - MessagePayload, BulkDeleteMessagesRequest, BanMemberRequest, HttpErrorResponse
- ✅ Code quality improvements - Removed redundant type specifications and method overload warnings
- 🔒 Security hardened - TLS 1.3+ for shard coordination endpoints
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.10.17 | 37 | 6/4/2026 |
| 1.10.16 | 90 | 6/1/2026 |
| 1.10.15 | 90 | 5/30/2026 |
| 1.10.14 | 101 | 5/26/2026 |
| 1.10.13 | 88 | 5/25/2026 |
| 1.10.12 | 93 | 5/23/2026 |
| 1.10.11 | 96 | 5/21/2026 |
| 1.10.10 | 89 | 5/20/2026 |
| 1.10.9 | 99 | 5/14/2026 |
| 1.10.8 | 95 | 5/10/2026 |
| 1.10.7 | 90 | 5/10/2026 |
| 1.10.6-preview1 | 94 | 5/10/2026 |
| 1.10.5 | 91 | 5/10/2026 |
| 1.10.4 | 85 | 5/10/2026 |
| 1.10.3 | 92 | 5/10/2026 |
| 1.10.2 | 92 | 5/10/2026 |
| 1.10.1 | 89 | 5/10/2026 |
| 1.10.0 | 107 | 5/3/2026 |
| 1.9.0 | 113 | 4/29/2026 |
| 1.8.6 | 126 | 2/13/2026 |
v1.10.17: Fixed Connected event not firing after fresh gateway reconnections (session expiry). Consumers tracking IsConnected via DiscordEvents would permanently show "Disconnected" because Connected only fired once on the initial READY and never on subsequent reconnections. Added _isReady reset in ResumeAsync fallback-to-identify and op=9 INVALID_SESSION paths to guarantee Connected fires after every full reconnect.