Merge pull request #1645 from marioparaschiv/patch-1

feat(embeds): toJSON: add missing attributes
This commit is contained in:
Elysia
2025-06-21 11:20:28 +07:00
committed by GitHub

View File

@@ -522,7 +522,7 @@ class MessageEmbed {
toJSON() { toJSON() {
return { return {
title: this.title, title: this.title,
type: 'rich', type: this.type,
description: this.description, description: this.description,
url: this.url, url: this.url,
timestamp: this.timestamp && new Date(this.timestamp), timestamp: this.timestamp && new Date(this.timestamp),
@@ -535,6 +535,16 @@ class MessageEmbed {
url: this.author.url, url: this.author.url,
icon_url: this.author.iconURL, icon_url: this.author.iconURL,
}, },
video: this.video && {
url: this.video.url,
proxyURL: this.video.proxyURL,
height: this.video.height,
width: this.video.width,
},
provider: this.provider && {
name: this.provider.name,
url: this.provider.url,
},
footer: this.footer && { footer: this.footer && {
text: this.footer.text, text: this.footer.text,
icon_url: this.footer.iconURL, icon_url: this.footer.iconURL,