diff --git a/src/structures/MessageEmbed.js b/src/structures/MessageEmbed.js index 82d930eda..5f84563bc 100644 --- a/src/structures/MessageEmbed.js +++ b/src/structures/MessageEmbed.js @@ -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', diff --git a/src/structures/shared/CreateMessage.js b/src/structures/shared/CreateMessage.js index 55d779cf5..ea83618ac 100644 --- a/src/structures/shared/CreateMessage.js +++ b/src/structures/shared/CreateMessage.js @@ -71,9 +71,9 @@ module.exports = async function createMessage(channel, options) { else options.files = options.embed.files; } - if (options.embed && webhook) options.embeds = [new Embed(options.embed)._apiTransform()]; - else if (options.embed) options.embed = new Embed(options.embed)._apiTransform(); - else if (options.embeds) options.embeds = options.embeds.map(e => new Embed(e)._apiTransform()); + if (options.embed && webhook) options.embeds = [new Embed(options.embed)]; + else if (options.embed) options.embed = new Embed(options.embed); + else if (options.embeds) options.embeds = options.embeds.map(e => new Embed(e)); let files;