feat(MessageEmbed): change toJSON method to return an api-compatible object (#3813)

This commit is contained in:
SpaceEEC
2020-02-23 20:42:47 +01:00
committed by GitHub
parent b727f6c1b9
commit 4ec01ddef5
3 changed files with 3 additions and 10 deletions

View File

@@ -317,16 +317,11 @@ class MessageEmbed {
return this;
}
toJSON() {
return Util.flatten(this, { hexColor: true });
}
/**
* Transforms the embed object to be processed.
* Transforms the embed to a plain object.
* @returns {Object} The raw data of this embed
* @private
*/
_apiTransform() {
toJSON() {
return {
title: this.title,
type: 'rich',