OpenClaw Discord components and approvals
Components v2 containers, buttons, selects, modals and file blocks, callback lifetimes, the model picker, and button-based exec approvals
A yes-or-no from a human should be a button, not a typed reply. OpenClaw supports Discord components v2 containers for agent messages through the message tool’s components payload, and interaction results route back to the agent as ordinary inbound messages under the existing reply-to settings. The same machinery carries exec approvals into Discord as buttons. Here are the supported blocks and their limits, callback lifetimes and access, files and modals, the model picker, the components v2 rules, and the approval configuration.
Components
- Components are a Discord-specific extension of the shared message tool, exposed whenever Discord is configured, even when another channel is current; for a rich message that must work across channels, the presentation payload is the portable form OpenClaw adapts to each target.
- Supported blocks: text, section, separator, actions, media gallery and file; an action row holds up to five buttons or a single select, buttons support emoji including link buttons, and select types are string, user, role, mentionable and channel.
- Components are single use by default, and a reusable flag lets buttons, selects and forms be used repeatedly until they expire; sends, edits and native command replies wait for callback registration to finish, consuming a single-use choice removes its sibling callbacks before another interaction can resolve them, and if persistence is unavailable OpenClaw reports it and keeps an in-memory fallback for the process. A per-button allowed-users list of ids, tags or a wildcard restricts who can click, with an ephemeral denial for everyone else.
- Callbacks expire after thirty minutes by default, adjustable per default account or per named account in milliseconds up to twenty-four hours; longer lifetimes suit review workflows but widen the window in which an old message can still trigger an action, so the docs recommend the shortest lifetime that fits.
Approval prompts include the command text, so only enable channel delivery in trusted channels.
Files, modals, the picker
File blocks must point to an attachment reference and the attachment itself is supplied through the media or path fields for a single file, with the media gallery for several, a filename override when the upload name should match the reference, and captions that preserve text-block order. A modal form is declared with up to five fields of type text, checkbox, radio, select, role select or user select, and OpenClaw adds the trigger button automatically; the docs’ example combines a reusable container with an approve button limited to one user, a decline button, a string select and a details modal. The model and models commands open an interactive picker with provider, model and runtime dropdowns and a submit step, ephemeral and usable only by the invoking user; Discord limits select menus to twenty-five options, so dynamically discovered models are shown only for providers added to the model policy allow list, and the old add-from-chat command is deprecated. OpenClaw uses components v2 for exec approvals and cross-context markers, embeds are ignored when components v2 are present and are not recommended, and plain URL previews are suppressed by default with a per-message flag to let a single outbound link expand.
Approvals
- Discord supports button-based approval handling in DMs and can optionally post prompts in the originating channel; the config has an enabled flag that must be true or auto, an optional approvers list that falls back to the command owners, a target of DM, channel or both defaulting to DM, agent and session filters, and a cleanup-after-resolve option. Native approvals require at least one resolved approver, and Discord never infers approvers from channel or DM allowlists.
- For sensitive owner-only group commands such as diagnostics and trajectory export, prompts and results go privately, Discord DM first when the invoking owner has a Discord owner route and otherwise the first owner route on another channel. With channel or both as target the prompt is visible in the channel, only resolved approvers can use the buttons, others get an ephemeral denial, and a channel id that cannot be derived from the session key falls back to DM.
- Discord renders the shared approval buttons used by other channels, adding approver DM routing and channel fan-out; when buttons are present they are the primary path, a manual approve command is offered only when chat approvals are unavailable, an inactive native runtime keeps the deterministic approve prompt visible, and an active runtime that cannot deliver a card sends a same-chat notice with the exact command. Approvals resolve through the shared Gateway client contract and expire after thirty minutes by default.
OpenClaw on Discord is the channel these surfaces belong to, and OpenClaw exec approvals the exec approval flow the buttons front.
Two rules to remember
Restrict clickable buttons with allowed users and keep callback lifetimes short; a button that anyone can press for a day is a footgun even in a private server. OpenClaw models and providers covers the providers the picker chooses from, and OpenClaw slash commands the native commands the picker and approvals hang off.
On Diali
On Diali exec approvals reach you on Discord as the same shared buttons, in DM by default, and components are available to the assistant whenever the Discord bot is connected; the callback lifetime and approver rules are the upstream defaults. Hosted OpenClaw on Diali is the assistant and Diali security describes the boundary an approval protects.
- Five buttons or one select per row, single use by default.
- Thirty-minute callbacks, capped at a day.
- Approvers are explicit; DM is the default target.
Stop reading about it, build one
Set up an agent, pick a channel, and have it working inside the app you already keep open.
