discord.js icon indicating copy to clipboard operation
discord.js copied to clipboard

refactor: builders

Open didinele opened this issue 6 months ago • 2 comments

Please describe the changes this PR makes and why it should be merged: Closes #8015

Change list/resolution points:

  • [x] remove @discordjs/formatters re-export (deprecated currently)
  • [x] remove SelectMenuBuilder and SelectMenuOptionBuilder aliases (deprecated currently, left-over from before we had different types of select menus)
  • [ ] all builders now store data inside of a data field
  • [x] EmbedBuilder no longer takes in camalCase options
  • [x] EmbedBuilder now has "nested builders" implemented for things like the author and footer
  • [x] removed API-deprecated features such as .setDMPermission
  • [ ] ActionRowBuilder now has specialized [add/set]X methods as opposed to the current [add/set]Components
  • [ ] validation no longer occurs during the actual "build process", but only during conversion to API data (done strictly with toJSON())
  • [ ] all builders now use structuredClone
  • [ ] introduced explicit clearX() methods as opposed to taking previously inconsistent null or undefined to clear

Note that this list is not final and will continue to grow.

didinele avatar Aug 15 '24 20:08 didinele