openclaw - 💡(How to fix) Fix Discord slash commands and inline shortcuts broken in multi-account setup [1 comments, 1 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#54915Fetched 2026-04-08 01:34:33
View on GitHub
Comments
1
Participants
1
Timeline
3
Reactions
0
Author
Participants
Timeline (top)
closed ×1commented ×1locked ×1

Discord slash commands (native) and inline text shortcuts (/status, /new, /help) stopped working after upgrading from ~2026.3.22 to 2026.3.23/2026.3.24. Issue persists across both versions.

Root Cause

Discord slash commands (native) and inline text shortcuts (/status, /new, /help) stopped working after upgrading from ~2026.3.22 to 2026.3.23/2026.3.24. Issue persists across both versions.

Fix Action

Fix / Workaround

No errors logged for command dispatch — the interaction completes but with minimal/empty response.

Code Example

[EventQueue] Slow listener detected: InteractionEventListener took 1407ms for event INTERACTION_CREATE
discord: native commands using Carbon reconcile path (×9 accounts on every restart)

---

{
  "native": "auto",
  "nativeSkills": "auto",
  "restart": true,
  "ownerDisplay": "raw",
  "allowFrom": {
    "*": ["openclaw-control-ui"],
    "discord": ["user:<owner-id>", "user:<bot-id>"]
  }
}
RAW_BUFFERClick to expand / collapse

Description

Discord slash commands (native) and inline text shortcuts (/status, /new, /help) stopped working after upgrading from ~2026.3.22 to 2026.3.23/2026.3.24. Issue persists across both versions.

Environment

  • OpenClaw version: 2026.3.24 (also reproduced on 2026.3.23-2)
  • Node: v22.20.0 (nvm)
  • OS: macOS (Apple Silicon)
  • Channel: Discord, multi-account setup (9 bot accounts, each mapped to an agent)
  • Config: commands.native: "auto", commands.text: true (default), commands.allowFrom.discord includes the user ID

Symptoms

Native slash commands

  • /status and /new via Discord slash command popup return an ephemeral "✅ Done." with no actual content (no session info, no status card)
  • Gateway logs show InteractionEventListener took ~1200ms for event INTERACTION_CREATE (slow but completes)
  • Commands appear to execute in an isolated slash session (agent:<id>:discord:slash:<userId>) but produce no meaningful output

Inline text shortcuts

  • Sending hey /status as a regular message does not strip /status — the full text including /status reaches the agent model
  • No status card is sent as a separate reply
  • Per docs, /status should be an inline shortcut that runs immediately and is stripped before the model sees the message

CLI agent path works fine

  • openclaw agent --agent lovelace --message "/status" produces correct status output
  • This confirms the command handler itself works; the issue is in Discord channel command parsing

Relevant logs

[EventQueue] Slow listener detected: InteractionEventListener took 1407ms for event INTERACTION_CREATE
discord: native commands using Carbon reconcile path (×9 accounts on every restart)

No errors logged for command dispatch — the interaction completes but with minimal/empty response.

Commands config

{
  "native": "auto",
  "nativeSkills": "auto",
  "restart": true,
  "ownerDisplay": "raw",
  "allowFrom": {
    "*": ["openclaw-control-ui"],
    "discord": ["user:<owner-id>", "user:<bot-id>"]
  }
}

Steps to reproduce

  1. Configure OpenClaw with multiple Discord bot accounts (multi-agent setup)
  2. Set commands.allowFrom.discord with the owner user ID
  3. In any allowed channel, use Discord slash command /status → get "Done" with no content
  4. In any allowed channel, send message hey /status → agent receives full text with /status not stripped
  5. Run openclaw agent --message "/status" → works correctly

Expected behavior

  • /status slash command should return session status info
  • /new slash command should reset the channel session
  • Inline /status in messages should be stripped and produce a status card reply

extent analysis

Fix Plan

To resolve the issue with Discord slash commands and inline text shortcuts, follow these steps:

  1. Update the commands.native configuration: Change the value from "auto" to a specific set of commands that should be handled natively, such as ["status", "new"].
  2. Implement a custom command handler: Create a custom command handler to process the native commands and inline text shortcuts. This handler should strip the command from the message text and send a response accordingly.

Example code for the custom command handler:

// commands.js
const commands = {
  status: async (ctx) => {
    // Send session status info
    const status = await getSessionStatus(ctx);
    ctx.send(`Session Status: ${status}`);
  },
  new: async (ctx) => {
    // Reset the channel session
    await resetSession(ctx);
    ctx.send('Session reset');
  },
};

const handleCommand = async (ctx, command, args) => {
  if (commands[command]) {
    await commands[command](ctx, args);
  }
};

const handleInlineCommand = async (ctx, message) => {
  const commandMatch = message.match(/^\/(\w+)/);
  if (commandMatch) {
    const command = commandMatch[1];
    const strippedMessage = message.replace(commandMatch[0], '');
    await handleCommand(ctx, command, strippedMessage);
  }
};

module.exports = { handleCommand, handleInlineCommand };
// discord.js
const { handleCommand, handleInlineCommand } = require('./commands');

// ...

discord.on('messageCreate', async (message) => {
  if (message.content.startsWith('/')) {
    const command = message.content.slice(1).split(' ')[0];
    await handleCommand(message, command, message.content.slice(command.length + 2));
  } else {
    await handleInlineCommand(message, message.content);
  }
});

discord.on('interactionCreate', async (interaction) => {
  if (interaction.type === 'APPLICATION_COMMAND') {
    const command = interaction.commandName;
    await handleCommand(interaction, command, interaction.options);
  }
});

Verification

To verify that the fix worked:

  1. Restart the OpenClaw server with the updated configuration and custom command handler.
  2. Test the Discord slash commands /status and /new to ensure they return the expected responses.
  3. Test inline text shortcuts by sending messages with /status and /new to ensure they are stripped and produce the expected responses.

Extra Tips

  • Make sure to update the commands.allowFrom configuration to include the user IDs that should be allowed to use the native commands.
  • Consider adding error handling and logging to the custom command handler to diagnose any issues that may arise.
  • If you're using a multi-agent setup, ensure that the custom command handler is properly configured for each agent.

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…

FAQ

Expected behavior

  • /status slash command should return session status info
  • /new slash command should reset the channel session
  • Inline /status in messages should be stripped and produce a status card reply

Still need to ship something?

×6

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

Back to top recommendations

TRENDING