Conversation
Owner
Author
|
@copilot resolve the merge conflicts in this pull request |
Contributor
Resolved in commit |
Add IsComponentsV2 flag (1 << 15) for component v2 layout support. Reference: https://discord.com/developers/docs/resources/message#message-object-message-flags
Add CreateGuildExpressions (1UL << 43), CreateEvents (1UL << 44), SetVoiceChannelStatus (1UL << 47), SendPolls (1UL << 48), and UseExternalApps (1UL << 49) to Permissions enum. Reference: https://discord.com/developers/docs/topics/permissions#permissions-bitwise-permission-flags
Add GuildVoiceChannelStatusUpdates intent (1 << 28) for VOICE_CHANNEL_STATUS_UPDATE events. Include it in AllNonPrivileged composite flag. Reference: https://discord.com/developers/docs/topics/gateway#gateway-intents
Add Poll (CreatePollRequest) and Attachments (List<Attachment>) to InteractionCallbackData for interaction responses. Add Status property to ModifyChannelRequest for voice channel status. Reference: https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-response-object-interaction-callback-data-structure
Add GetVoiceChannelStatusAsync and SetVoiceChannelStatusAsync to
IDiscordRestClient interface and DiscordRestClient implementation.
GET /channels/{id}/voice-status returns current status string.
PATCH /channels/{id}/voice-status sets or clears the status.
Reference: https://discord.com/developers/docs/resources/channel#get-channel-status
Add AsDeferredChannelMessage() for type 5 (loading state) and AsDeferredUpdateMessage() for type 6 (silent ACK) responses. Fix Build() to exclude content/embeds/components from deferred responses to avoid Discord API rejection. Reference: https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-response-object-interaction-callback-type
Handle gateway close code 4015 (Voice server crashed) with appropriate logging and reconnect behavior. Add OnVoiceChannelStatusUpdate event dispatcher extensions for strongly-typed VOICE_CHANNEL_STATUS_UPDATE event subscription.
Fix DiscordApiException to inherit from DiscordException for unified exception hierarchy. Add structured logging to MemoryCacheProvider for cache operations, eviction, and health checks. Update DI registration to inject logger into cache provider. Replace all Debug.WriteLine calls in CommandsExtension with proper ILogger LogError/LogWarning calls.
Fix blocking sync-over-async patterns in Dispose and StopListening methods across WebSocketConnection, EventDispatchQueue, and RedisCacheDistributor. Replace all Debug.WriteLine calls with structured ILogger or remove from static extension methods where no logger is available (WebSocketConnection, ChannelExtensions, MessageExtensions, MLSGroupState). Add GatewayCloseCode enum and replace magic close code numbers in GatewayClient switch statement for Discord API contract compliance. Remove unnecessary null-forgiving operators in EventDispatcher. Inject logger into WebSocketConnection and MLSGroupState constructors.
Add .ConfigureAwait(false) to every await expression in WebSocketConnection, EventDispatchQueue, EventDispatcher, HeartbeatManager, and GatewayClient to prevent deadlock risk in UI-threaded or ASP.NET consumer contexts.
…Cache async paths Add .ConfigureAwait(false) to all await expressions in DiscordRestClient, RedisCacheProvider, CommandsExtension, and Interactivity extension methods to prevent deadlock risk in consumer contexts.
…nitions Fixed CS0111 build error caused by duplicate OnVoiceChannelStatusUpdate method definitions in EventDispatcherExtensions.cs. The methods were defined twice (lines 679-686 and 1013-1020). Removed the duplicate definitions at lines 1008-1020, keeping the original async and sync overloads.
- VoiceClient.ConnectAsync now accepts DM/GroupDM channels (guildId=0) - OnVoiceServerUpdate handles guild_id=0 by matching DM connections - UdpReceiveLoopAsync checks DAVE before transport decryption - KeepAliveLoopAsync is now started in ConnectInternalAsync - External sender package (op 31) wired into MLS commit validation (HKDF binding) - MLSState exposes MLS state for testing via internal property - Added InternalsVisibleTo for Voice.Tests assembly - Created DAVETestData helper generating valid MLS Welcome/Commit messages - Unskipped all 16 previously-skipped DAVE tests (now use real crypto)
…ly scanning, connection state tracking, docs overhaul This is a major development round following a comprehensive feature audit. See CHANGELOG.md for the full breakdown. Highlights: - IDiscordClient interface (38KB, 130+ methods) for full testability - Connection state tracking (ClientConnectionState enum, events, ReconnectAsync) - Global exception handler infrastructure (SetupGlobalExceptionHandlers) - Command module auto-discovery (UseCommandsWithAutoDiscovery, RegisterModulesInAssembly) - Convenience methods: SendDirectMessageAsync, TrySendMessageAsync, TryReplyAsync, etc. - Builder validation (token, intents, API version checks with actionable messages) - XML doc code examples on 30+ methods across all public APIs - Exception hierarchy consolidated (DiscordApiException unified, CacheException in tree) - Error handling hardened — 15 empty catch blocks fixed, 4 fire-and-forget tasks tracked - Gateway methods now propagate exceptions instead of silent swallowing - Example bots fixed (ModerationBot, MusicBot, DashboardBot — all compile-clean) - MIGRATION.md created, README.md rewritten, all docs updated and reconciled - Security: TLS 1.2+ enforcement, token security warning, Ed25519 constant-time note
…move obsolete DiscordApiException test
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.