Skip to content
This repository was archived by the owner on Oct 11, 2025. It is now read-only.

Commit 4cd6390

Browse files
authored
Merge pull request #1645 from marioparaschiv/patch-1
feat(embeds): toJSON: add missing attributes
2 parents 262f852 + 462e0dd commit 4cd6390

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

src/structures/MessageEmbed.js

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -522,7 +522,7 @@ class MessageEmbed {
522522
toJSON() {
523523
return {
524524
title: this.title,
525-
type: 'rich',
525+
type: this.type,
526526
description: this.description,
527527
url: this.url,
528528
timestamp: this.timestamp && new Date(this.timestamp),
@@ -535,6 +535,16 @@ class MessageEmbed {
535535
url: this.author.url,
536536
icon_url: this.author.iconURL,
537537
},
538+
video: this.video && {
539+
url: this.video.url,
540+
proxyURL: this.video.proxyURL,
541+
height: this.video.height,
542+
width: this.video.width,
543+
},
544+
provider: this.provider && {
545+
name: this.provider.name,
546+
url: this.provider.url,
547+
},
538548
footer: this.footer && {
539549
text: this.footer.text,
540550
icon_url: this.footer.iconURL,

0 commit comments

Comments
 (0)