openclaw - 💡(How to fix) Fix Discord native slash commands respond 'Done' instead of executing (routed through plugin commands) [12 comments, 8 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
openclaw/openclaw#50111Fetched 2026-04-08 00:59:02
View on GitHub
Comments
12
Participants
8
Timeline
18
Reactions
7
Author
Timeline (top)
commented ×12cross-referenced ×2closed ×1locked ×1

Root Cause

In dispatchDiscordCommandInteraction (src/discord/commands.ts), the function builds a prompt string (e.g. "/status") from the native command and passes it to matchPluginCommand(prompt). If a plugin command matches, executePluginCommand() runs and returns a reply. When !hasRenderableReplyPayload(pluginReply), the bot responds with "Done.".

The problem: plugin commands are designed for text-based chat messages, not Discord interactions. When a slash command like /status, /help, /commands, etc. matches a plugin command, the plugin handler executes in a context where it can't properly render output to the interaction, resulting in the silent "Done." response.

Fix Action

Fix / Workaround

In dispatchDiscordCommandInteraction (src/discord/commands.ts), the function builds a prompt string (e.g. "/status") from the native command and passes it to matchPluginCommand(prompt). If a plugin command matches, executePluginCommand() runs and returns a reply. When !hasRenderableReplyPayload(pluginReply), the bot responds with "Done.".

Native interaction commands should skip matchPluginCommand(), or fall through to the full command dispatch when a plugin returns empty/unrenderable content. The plugin command path should only apply to text-based /command messages in chat, not to Discord interaction events.

RAW_BUFFERClick to expand / collapse

Bug

Most Discord native slash commands respond with just "✅ Done" instead of their actual output. Commands with interactive pickers (e.g. /model, /models) work correctly.

Root Cause

In dispatchDiscordCommandInteraction (src/discord/commands.ts), the function builds a prompt string (e.g. "/status") from the native command and passes it to matchPluginCommand(prompt). If a plugin command matches, executePluginCommand() runs and returns a reply. When !hasRenderableReplyPayload(pluginReply), the bot responds with "Done.".

The problem: plugin commands are designed for text-based chat messages, not Discord interactions. When a slash command like /status, /help, /commands, etc. matches a plugin command, the plugin handler executes in a context where it can't properly render output to the interaction, resulting in the silent "Done." response.

Steps to Reproduce

  1. Configure OpenClaw with Discord bot, enable `commands.native"
  2. Bot deploys 61 commands via REST API successfully
  3. Use any non-picker slash command (e.g. /status, /help, /commands)
  4. Bot responds with "Done." (shown as ✅ Done in Discord UI)

Expected Behavior

Native slash commands should execute their native command handler and return the proper response (status info, help text, command list, etc.).

Environment

  • OpenClaw v2026.3.13
  • @buape/carbon v0.0.0-beta-20260216184201
  • autoInteractions: true is set on GatewayPlugin
  • Commands ARE deployed to Discord (61 commands via REST)
  • Gateway logs show no interaction-related errors — the handler fires successfully but produces empty output
  • Discord bot has applications.commands scope
  • Bot correctly has GuildMessages, MessageContent, Guilds, GuildMessageReactions, DirectMessages, DirectMessageReactions, GuildVoiceStates, GuildPresences, GuildMembers intents

Suggested Fix

Native interaction commands should skip matchPluginCommand(), or fall through to the full command dispatch when a plugin returns empty/unrenderable content. The plugin command path should only apply to text-based /command messages in chat, not to Discord interaction events.

extent analysis

Fix Plan

To resolve the issue, we need to modify the dispatchDiscordCommandInteraction function to handle native slash commands differently. Here are the steps:

  • Modify the dispatchDiscordCommandInteraction function to check if the interaction is a native slash command.
  • If it is, skip the matchPluginCommand function and execute the native command handler directly.
  • If the interaction is not a native slash command, proceed with the current logic and call matchPluginCommand.

Example code:

// src/discord/commands.ts
async function dispatchDiscordCommandInteraction(interaction: Interaction) {
  const commandName = interaction.data.name;
  const isNativeCommand = nativeCommands.includes(commandName);

  if (isNativeCommand) {
    // Execute native command handler directly
    const nativeCommandHandler = getNativeCommandHandler(commandName);
    const response = await nativeCommandHandler(interaction);
    return response;
  } else {
    // Proceed with current logic
    const pluginReply = await matchPluginCommand(interaction);
    if (pluginReply) {
      return pluginReply;
    }
  }
}
  • Update the getNativeCommandHandler function to return the correct handler for each native command.
// src/discord/commands.ts
function getNativeCommandHandler(commandName: string) {
  switch (commandName) {
    case 'status':
      return handleStatusCommand;
    case 'help':
      return handleHelpCommand;
    case 'commands':
      return handleCommandsCommand;
    // Add more cases for other native commands
    default:
      return null;
  }
}

Verification

To verify that the fix worked, test the native slash commands again and check that they return the expected responses. For example, try using the /status, /help, and /commands slash commands and verify that they return the correct output.

Extra Tips

  • Make sure to update the nativeCommands array to include all native command names.
  • Consider adding logging or debugging statements to help diagnose any issues that may arise during the execution of native command handlers.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

openclaw - 💡(How to fix) Fix Discord native slash commands respond 'Done' instead of executing (routed through plugin commands) [12 comments, 8 participants]