Discord: add per-button component allowlist

This commit is contained in:
Shadow
2026-02-16 15:14:36 -06:00
parent fc8290af42
commit c593709d25
6 changed files with 126 additions and 3 deletions

View File

@@ -99,6 +99,8 @@ Supported blocks:
By default, components are single use. Set `components.reusable=true` to allow buttons, selects, and forms to be used multiple times until they expire.
To restrict who can click a button, set `allowedUsers` on that button (Discord user IDs, tags, or `*`). When configured, unmatched users receive an ephemeral denial.
File attachments:
- `file` blocks must point to an attachment reference (`attachment://<filename>`)
@@ -126,7 +128,11 @@ Example:
{
type: "actions",
buttons: [
{ label: "Approve", style: "success" },
{
label: "Approve",
style: "success",
allowedUsers: ["123456789012345678"],
},
{ label: "Decline", style: "danger" },
],
},