File tree 1 file changed +19
-2
lines changed
packages/discord.js/src/structures
1 file changed +19
-2
lines changed Original file line number Diff line number Diff line change @@ -211,9 +211,26 @@ class Embed {
211
211
*/
212
212
equals ( other ) {
213
213
if ( other instanceof Embed ) {
214
- return isEqual ( other . data , this . data ) ;
214
+ return isEqual ( this . data , other . data ) ;
215
215
}
216
- return isEqual ( other , this . data ) ;
216
+
217
+ return (
218
+ this . author ?. iconURL === other . author ?. icon_url &&
219
+ this . author ?. name === other . author ?. name &&
220
+ this . author ?. url === other . author ?. url &&
221
+ this . color === ( other . color ?? null ) &&
222
+ this . description === ( other . description ?? null ) &&
223
+ this . footer ?. iconURL === other . footer ?. icon_url &&
224
+ this . footer ?. text === other . footer ?. text &&
225
+ this . image ?. url === other . image ?. url &&
226
+ this . thumbnail ?. url === other . thumbnail ?. url &&
227
+ ( this . timestamp && Date . parse ( this . timestamp ) ) === ( other . timestamp ? Date . parse ( other . timestamp ) : null ) &&
228
+ this . title === ( other . title ?? null ) &&
229
+ this . url === ( other . url ?? null ) &&
230
+ this . video ?. url === other . video ?. url &&
231
+ isEqual ( this . fields , other . fields ?. map ( field => ( { ...field , inline : field . inline ?? false } ) ) ?? [ ] ) &&
232
+ isEqual ( this . provider , other . provider ?? null )
233
+ ) ;
217
234
}
218
235
}
219
236
You can’t perform that action at this time.
0 commit comments