Skip to content
Functiondiscord-component-embedv1.0.0

componentEmbedResponse

Builds the Response for a URL that a <link rel="discord:component-embed"> tag points at. Return it from that route.

Throws:

  • a ComponentEmbedError when the tree breaks a rule of the format, or when your own code throws while the package reads it.

componentEmbedResponse(root: EmbedElement): Response