Skip to content

feat: support for pre-generated component json, in the same way we support pre-generated embed json #1427

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Apr 26, 2025

Conversation

braindigitalis
Copy link
Contributor

This adds a new method to dpp::message that accepts a string containing json, which can be used to pre-generate component designs at sites such as https://discord.builders in a library agnostic way.

We have had ways to do this with embeds since version 1.0 and earlier, and this is used quite effectively in production bots. As such providing a facility to do the same for components makes a lot of sense, as it allows for component designs to be stored in external json files, which can be localised etc.

The new method does not parse into the object, but attaches the array as-is to the components member of the json sent, so that if there are features the lib does not support for some reason, this can be done via this new method.

Code change checklist

  • I have ensured that all methods and functions are fully documented using doxygen style comments.
  • My code follows the coding style guide.
  • I tested that my change works before raising the PR.
  • I have ensured that I did not break any existing API calls.
  • I have not built my pull request using AI, a static analysis tool or similar without any human oversight.

@braindigitalis braindigitalis self-assigned this Apr 26, 2025
Copy link

netlify bot commented Apr 26, 2025

Deploy Preview for dpp-dev ready!

Name Link
🔨 Latest commit 5abd71c
🔍 Latest deploy log https://app.netlify.com/sites/dpp-dev/deploys/680d1a711c812500083d7b84
😎 Deploy Preview https://deploy-preview-1427--dpp-dev.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@github-actions github-actions bot added documentation Improvements or additions to documentation code Improvements or additions to code. labels Apr 26, 2025
@braindigitalis braindigitalis merged commit 9ef17d4 into dev Apr 26, 2025
5 of 6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
code Improvements or additions to code. documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants