Template
Docs Discord card template
A docs card beats a raw URL because the preview names the page and offers the two destinations people actually want: the guide, and the reference.
Component embed spec, in English
What Discordbot reads, which component types are legal, and why your WAF is eating the preview.
Who this is for
- Maintainers answering the same question in a support channel every day
- Developer-tools teams whose docs get pasted more often than their homepage
Reach for it when: Sharing a spec, a migration guide, or an API reference in a developer Discord.
Why not a support bot
The reflex in a developer server is to build a bot with a /docs command. Then you are running an application, managing privileged intents, and keeping a process online so people can get a link.
A component embed rides on the URL you were going to paste anyway. Anyone can post it in any server where links preview, including servers you do not moderate.
The shape that works
Two buttons, named for the destination rather than the action: “Open docs” and “API reference”. These are link buttons — type 2, style 5 — so there is no custom_id and no interaction handler.
If you already server-render your docs site, copy the script tag from the publish screen into that HTML and paste your own URL. Discordbot reads the first HTML response, so the payload cannot be injected by client-side JavaScript.
Common questions
- Can buttons run a command or open a modal?
- No. Link-preview buttons only navigate to an https URL. Anything interactive needs custom_id, which requires a real Discord application — a different product from a link preview.
- Do I need this if my docs already have Open Graph tags?
- Keep the Open Graph tags either way; they are the fallback. The component embed adds the buttons, which Open Graph cannot express.
Start from Docs
Swap in your links and publish a hosted Discord card.