Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Changes Made:
This Pull Request introduces a new feature to the EmbedBuilder in the Discord.js library. A setId method has been added, enabling the assignment of a unique identification ID to an embed. This feature is particularly useful for identifying and managing embeds more effectively in complex applications.
Reason for Merging:
The inclusion of the setId method enhances the capabilities of EmbedBuilder, providing developers with greater flexibility and control over the creation and management of embeds. This can be particularly beneficial in scenarios where multiple embeds are used and require individual identification.
Status and Versioning Classification:
Code changes have been tested against the Discord API.
Typings do not need updating or have been updated.This PR includes changes to the library's interface (methods or parameters added).
There are no significant breaking changes (methods removed or renamed, parameters moved or removed).
Technical Details:
The main modification is in the setID method, which stores a user-provided ID within the EmbedBuilder object. This ID can later be used for referencing or manipulating the embed. Additionally, the toJSON method has been updated to include this new ID field when an embed is converted to JSON. This functionality does not alter the existing functionality of EmbedBuilder but adds a new capability.