Bug Description
When running the Discord adapter in gateway-only mode (without an interaction endpoint), interaction events such as slash commands are never handled. The InteractionCreate event is not listened for inside the setupLegacyGatewayHandlers method, making it impossible to respond to slash commands in long-running (resident) bot applications that do not use an HTTP interaction endpoint.
Steps to Reproduce
- Set up a Discord bot using the Chat SDK's Discord adapter in gateway-only mode (no interaction endpoint configured).
- Register a slash command with the Discord API.
- Invoke the slash command in Discord.
- Observe that no handler is triggered and the interaction goes unhandled.
Expected Behavior
The InteractionCreate event should be received and dispatched to the appropriate handler when the Discord adapter is running in gateway mode, allowing slash commands and other interactions to be handled without requiring an HTTP interaction endpoint.
Actual Behavior
The InteractionCreate event is never emitted or handled because setupLegacyGatewayHandlers does not register a listener for it. As a result, slash commands silently fail with no response.
Code Sample
Chat SDK Version
4.24.0
Node.js Version
22.21.1
Platform Adapter
Discord
Operating System
Linux
Additional Context
No response
Bug Description
When running the Discord adapter in gateway-only mode (without an interaction endpoint), interaction events such as slash commands are never handled. The InteractionCreate event is not listened for inside the setupLegacyGatewayHandlers method, making it impossible to respond to slash commands in long-running (resident) bot applications that do not use an HTTP interaction endpoint.
Steps to Reproduce
Expected Behavior
The InteractionCreate event should be received and dispatched to the appropriate handler when the Discord adapter is running in gateway mode, allowing slash commands and other interactions to be handled without requiring an HTTP interaction endpoint.
Actual Behavior
The InteractionCreate event is never emitted or handled because setupLegacyGatewayHandlers does not register a listener for it. As a result, slash commands silently fail with no response.
Code Sample
Chat SDK Version
4.24.0
Node.js Version
22.21.1
Platform Adapter
Discord
Operating System
Linux
Additional Context
No response