Skip to content

Develop#20

Open
M1tsumi wants to merge 13 commits into
mainfrom
develop
Open

Develop#20
M1tsumi wants to merge 13 commits into
mainfrom
develop

Conversation

@M1tsumi
Copy link
Copy Markdown
Owner

@M1tsumi M1tsumi commented May 13, 2026

No description provided.

@M1tsumi
Copy link
Copy Markdown
Owner Author

M1tsumi commented May 14, 2026

@copilot resolve the merge conflicts in this pull request

Copy link
Copy Markdown
Contributor

Copilot AI commented May 14, 2026

@copilot resolve the merge conflicts in this pull request

Resolved in commit 83e63c5. I merged origin/main into develop, resolved all merge conflicts, and verified the updated gateway code builds/tests cleanly.

M1tsumi added 8 commits May 13, 2026 21:15
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.
M1tsumi added 5 commits May 13, 2026 21:54
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants