Functiondiscord-component-embedv1.1.1
Throws:
A
ComponentEmbedErrorwhen the tree breaks a rule of the format.A
ComponentEmbedErrorwhen your own code throws while the package reads it.
toComponentEmbedJson(root: EmbedElement): string// a SolidStart route. the script needs the id discord:component-embed
<script id="discord:component-embed" type="application/vnd.discord.component-embed+json" innerHTML={toComponentEmbedJson(buildPostCard(post))} />root
root: EmbedElement