Bug Description
onSlashCommand handlers registered via bot.onSlashCommand(...) are never invoked
when slash commands arrive through Discord's HTTP Interactions (webhook).
The handleWebhook method correctly returns DeferredChannelMessageWithSource to
acknowledge the interaction, but never calls this.chat.processSlashCommand().
As a result, Discord shows "The application did not respond" after the timeout.
Steps to Reproduce
- Register a slash command handler:
bot.onSlashCommand("help", async (event) => {
await event.channel.post("Hello!");
});
- Set Interactions Endpoint URL in the Discord Developer Portal
- Invoke
/help in Discord
- Discord shows "The application did not respond"
Root Cause
In handleWebhook, MessageComponent (button clicks) correctly calls
handleComponentInteraction() which invokes this.chat.processAction().
However, the ApplicationCommand branch only returns a deferred response
without processing:
// ✅ MessageComponent — handler is invoked
if (interaction.type === InteractionType.MessageComponent) {
this.handleComponentInteraction(interaction, options); // calls processAction()
return this.respondToInteraction({ type: InteractionResponseType.DeferredUpdateMessage });
}
// ❌ ApplicationCommand — handler is never invoked
if (interaction.type === InteractionType.ApplicationCommand) {
return this.respondToInteraction({
type: InteractionResponseType.DeferredChannelMessageWithSource,
});
// Missing: this.handleSlashCommandInteraction(interaction, options)
}
There is no handleSlashCommandInteraction method in DiscordAdapter,
and this.chat.processSlashCommand() is never called anywhere in the adapter.
Expected Behavior
onSlashCommand handlers are invoked and their response is sent back to Discord
via the interaction follow-up API.
Actual Behavior
The deferred response is sent but the handler is never called, resulting in
"The application did not respond" in the Discord client.
Chat SDK Version
4.15.0
Platform Adapter
Discord
Bug Description
onSlashCommandhandlers registered viabot.onSlashCommand(...)are never invokedwhen slash commands arrive through Discord's HTTP Interactions (webhook).
The
handleWebhookmethod correctly returnsDeferredChannelMessageWithSourcetoacknowledge the interaction, but never calls
this.chat.processSlashCommand().As a result, Discord shows "The application did not respond" after the timeout.
Steps to Reproduce
/helpin DiscordRoot Cause
In
handleWebhook,MessageComponent(button clicks) correctly callshandleComponentInteraction()which invokesthis.chat.processAction().However, the
ApplicationCommandbranch only returns a deferred responsewithout processing:
There is no
handleSlashCommandInteractionmethod inDiscordAdapter,and
this.chat.processSlashCommand()is never called anywhere in the adapter.Expected Behavior
onSlashCommandhandlers are invoked and their response is sent back to Discordvia the interaction follow-up API.
Actual Behavior
The deferred response is sent but the handler is never called, resulting in
"The application did not respond" in the Discord client.
Chat SDK Version
4.15.0
Platform Adapter
Discord