You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(MessageEmbed): skip validation of fields when inside a message (#3894)
* fix(MessageEmbed): Add skipValidation flag to MessageEmbed
* fix(MessageEmbed): Use skipValidation flag in Message
* fix(MessageEmbed): Restore static normalizeField(s) methods
* fix(MessageEmbed): Update typings for constructor
* fix(MessageEmbed): Remove private docstrings/typings
* fix(MessageEmbed): Use skipValidation without storing in instance
* fix(MessageEmbed): skipValidation without modifying normalizeFields
* fix(MessageEmbed): Revert indentation change in typings
* fix(MessageEmbed): Clone logic from normalizeFields (duplicated code ftw)
* revert(MessageEmbed): remove dead code / breaking change
- dead code
discord.js does not use those methods interally and won't in the future, as Discord
does not emit any partial embed updates and doing so in the future seems unlikely.
- a breaking change (an incompatible api change)
Although it's not recommended to do, users can modify
received embeds without cloning them, e.g.:
const embed = message.embeds[0].addField('some title', '');
(replace '' with some function call; this is just an example)
This would no longer throw a synchronous error (breaking change),
but at a later point when actually sending it. (poorer to debug)
Co-authored-by: SpaceEEC <spaceeec@yahoo.com>
0 commit comments