diff --git a/packages/discord.js/src/structures/Embed.js b/packages/discord.js/src/structures/Embed.js index dd68120d955b..8c5f20bb7ef3 100644 --- a/packages/discord.js/src/structures/Embed.js +++ b/packages/discord.js/src/structures/Embed.js @@ -211,9 +211,26 @@ class Embed { */ equals(other) { if (other instanceof Embed) { - return isEqual(other.data, this.data); + return isEqual(this.data, other.data); } - return isEqual(other, this.data); + + return ( + this.author?.iconURL === other.author?.icon_url && + this.author?.name === other.author?.name && + this.author?.url === other.author?.url && + this.color === (other.color ?? null) && + this.description === (other.description ?? null) && + this.footer?.iconURL === other.footer?.icon_url && + this.footer?.text === other.footer?.text && + this.image?.url === other.image?.url && + this.thumbnail?.url === other.thumbnail?.url && + (this.timestamp && Date.parse(this.timestamp)) === (other.timestamp ? Date.parse(other.timestamp) : null) && + this.title === (other.title ?? null) && + this.url === (other.url ?? null) && + this.video?.url === other.video?.url && + isEqual(this.fields, other.fields?.map(field => ({ ...field, inline: field.inline ?? false })) ?? []) && + isEqual(this.provider, other.provider ?? null) + ); } }