openclaw - ✅(Solved) Fix [Bug]: Discord message tool fails with 'buttons: must have required property buttons' schema validation [4 pull requests, 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#67852Fetched 2026-04-17 08:29:17
View on GitHub
Comments
1
Participants
1
Timeline
6
Reactions
0
Participants
Timeline (top)
cross-referenced ×4closed ×1commented ×1

Error Message

The OpenClaw message tool fails when sending messages through Discord with a schema validation error: This makes the native Discord integration completely unusable — any inbound Discord message that triggers a reply results in the error "Something went wrong while processing your request. Please try again, or use /new to start a fresh session." 5. Reply fails with the schema validation error

Fix Action

Workaround

Using the Discord REST API directly via curl works fine:

curl -s -X POST \
  -H "Authorization: Bot <TOKEN>" \
  -H "Content-Type: application/json" \
  -d '{"content":"message"}' \
  "https://discord.com/api/v10/channels/<CHANNEL_ID>/messages"

PR fix notes

PR #66696: fix(pre-commit): support corepack-managed pnpm in pre-commit tooling

Description (problem / solution / changelog)

Summary

  • support Corepack-managed pnpm in pre-commit tooling
  • restore run-node-tool Corepack support in the hook path
  • preserve npm fallback behavior when pnpm is unavailable

Testing

  • existing branch validation from the original PR

Changed files

  • extensions/discord/src/message-tool-schema.test.ts (added, +39/-0)
  • extensions/discord/src/message-tool-schema.ts (modified, +39/-11)
  • git-hooks/pre-commit (modified, +3/-0)
  • scripts/pre-commit/run-node-tool.sh (modified, +11/-3)

PR #67863: fix(discord): narrow message tool component block schema

Description (problem / solution / changelog)

Summary

  • narrow the Discord message tool component block schema into explicit block-type unions
  • stop plain text and non-button blocks from tripping buttons validation errors
  • add regression tests for text-only, button, and select component payloads

Closes #67852.

Testing

  • node scripts/run-vitest.mjs run --config test/vitest/vitest.extensions.config.ts extensions/discord/src/message-tool-schema.test.ts extensions/discord/src/send.components.test.ts

Changed files

  • extensions/discord/src/message-tool-schema.test.ts (added, +39/-0)
  • extensions/discord/src/message-tool-schema.ts (modified, +39/-11)
  • git-hooks/pre-commit (modified, +3/-0)
  • scripts/pre-commit/run-node-tool.sh (modified, +11/-3)

PR #67865: fix(discord): narrow message tool component block schema

Description (problem / solution / changelog)

Summary

  • narrow the Discord message tool component block schema into explicit block-type unions
  • stop plain text and non-button blocks from tripping buttons validation errors
  • add regression tests for text-only, button, and select component payloads

Closes #67852.

Testing

  • node scripts/run-vitest.mjs run --config test/vitest/vitest.extensions.config.ts extensions/discord/src/message-tool-schema.test.ts extensions/discord/src/send.components.test.ts

Changed files

  • extensions/discord/src/message-tool-schema.test.ts (added, +39/-0)
  • extensions/discord/src/message-tool-schema.ts (modified, +1/-1)

PR #67871: fix(discord): narrow message tool component block schema

Description (problem / solution / changelog)

Summary

  • narrow the Discord message tool component block schema into an explicit known-type block shape
  • stop plain text and non-button blocks from tripping buttons validation errors
  • avoid anyOf in the tool schema while keeping the validation fix
  • add regression tests for text-only, button, and select component payloads

Closes #67852.

Testing

  • node scripts/run-vitest.mjs run --config test/vitest/vitest.extensions.config.ts extensions/discord/src/message-tool-schema.test.ts extensions/discord/src/send.components.test.ts

Changed files

  • extensions/discord/src/message-tool-schema.test.ts (added, +36/-0)
  • extensions/discord/src/message-tool-schema.ts (modified, +1/-1)

Code Example

Validation failed for tool "message": - buttons: must have required property 'buttons'

---

curl -s -X POST \
  -H "Authorization: Bot <TOKEN>" \
  -H "Content-Type: application/json" \
  -d '{"content":"message"}' \
  "https://discord.com/api/v10/channels/<CHANNEL_ID>/messages"
RAW_BUFFERClick to expand / collapse

Bug Description

The OpenClaw message tool fails when sending messages through Discord with a schema validation error:

Validation failed for tool "message": - buttons: must have required property 'buttons'

This makes the native Discord integration completely unusable — any inbound Discord message that triggers a reply results in the error "Something went wrong while processing your request. Please try again, or use /new to start a fresh session."

Environment

  • OpenClaw version: 2026.4.12 (1c0672b)
  • OS: Ubuntu Linux (kernel 6.8.0-107-generic, x64)
  • Node: v22.22.0
  • Discord channel: enabled via bot token
  • Model: Any (reproduces regardless of model)

Reproduction Steps

  1. Configure Discord channel with bot token in openclaw.json
  2. Enable Discord guild and channel(s)
  3. Send any message in a configured Discord channel
  4. OpenClaw receives the message and attempts to reply via the message tool
  5. Reply fails with the schema validation error

Workaround

Using the Discord REST API directly via curl works fine:

curl -s -X POST \
  -H "Authorization: Bot <TOKEN>" \
  -H "Content-Type: application/json" \
  -d '{"content":"message"}' \
  "https://discord.com/api/v10/channels/<CHANNEL_ID>/messages"

Related Issues

  • #51447 — Discord asVoice conflicts with required components schema
  • #53269 — Discord components v2 schema issues
  • #54233 — Discord interactive components broken

Expected Behavior

The message tool should send a plain text reply to Discord without requiring a buttons property when no interactive components are included.

extent analysis

TL;DR

The OpenClaw message tool likely needs an update to handle Discord schema validation for messages without interactive components.

Guidance

  • Review the OpenClaw message tool configuration to ensure it aligns with the expected Discord API schema for plain text messages.
  • Verify that the openclaw.json configuration file correctly sets up the Discord channel and bot token.
  • Check if the issue is related to the known problems in #51447, #53269, or #54233, which involve Discord components and schema issues.
  • Consider using the provided curl command as a temporary workaround to send messages via the Discord REST API directly.

Example

No code snippet is provided as the issue seems to be related to configuration and schema validation rather than code implementation.

Notes

The issue might be specific to the OpenClaw version (2026.4.12) and Discord API interactions. Further investigation into the related issues (#51447, #53269, #54233) may provide more insight.

Recommendation

Apply workaround: Use the curl command or a similar direct API call as a temporary solution until the OpenClaw message tool is updated to handle Discord schema validation correctly.

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 - ✅(Solved) Fix [Bug]: Discord message tool fails with 'buttons: must have required property buttons' schema validation [4 pull requests, 1 comments, 1 participants]