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:
Will Nelson
2018-03-24 17:43:56 -07:00
committed by Isabella
parent 4e0e64d8a1
commit c40488eb54
2 changed files with 4 additions and 9 deletions

View File

@@ -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',