fix: add discord exec approval channel targeting (#16051) (thanks @leonnardo)

This commit is contained in:
Shadow
2026-02-14 12:04:01 -06:00
committed by Shadow
parent 4b9cb46c6e
commit 5ba72bd9bf
6 changed files with 631 additions and 91 deletions

View File

@@ -442,14 +442,17 @@ See [Slash commands](/tools/slash-commands) for command catalog and behavior.
</Accordion>
<Accordion title="Exec approvals in Discord">
Discord supports button-based exec approvals in DMs.
Discord supports button-based exec approvals in DMs and can optionally post approval prompts in the originating channel.
Config path:
- `channels.discord.execApprovals.enabled`
- `channels.discord.execApprovals.approvers`
- `channels.discord.execApprovals.target` (`dm` | `channel` | `both`, default: `dm`)
- `agentFilter`, `sessionFilter`, `cleanupAfterResolve`
When `target` is `channel` or `both`, the approval prompt is visible in the channel. Only configured approvers can use the buttons; other users receive an ephemeral denial. Approval prompts include the command text, so only enable channel delivery in trusted channels. If the channel ID cannot be derived from the session key, OpenClaw falls back to DM delivery.
If approvals fail with unknown approval IDs, verify approver list and feature enablement.
Related docs: [Exec approvals](/tools/exec-approvals)