mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-09 16:13:31 +01:00
fix message embed json serialization (#2420)
* fix message embed json serialization remove the toJSON method on message embeds so the raw data is exposed for JSON seralization. this removes the hexColor property, but it probably should not have been there in the first place. fixes #2419 * change api transform to tojson
This commit is contained in:
@@ -302,16 +302,11 @@ class MessageEmbed {
|
||||
return this;
|
||||
}
|
||||
|
||||
toJSON() {
|
||||
return Util.flatten(this, { hexColor: true });
|
||||
}
|
||||
|
||||
/**
|
||||
* Transforms the embed object to be processed.
|
||||
* @returns {Object} The raw data of this embed
|
||||
* @private
|
||||
*/
|
||||
_apiTransform() {
|
||||
toJSON() {
|
||||
return {
|
||||
title: this.title,
|
||||
type: 'rich',
|
||||
|
||||
Reference in New Issue
Block a user