feat(embeds): jsonify gif type such as gifv along with video & provider attributes

This commit is contained in:
Mario P.
2025-06-21 05:15:03 +01:00
committed by GitHub
parent 262f852b5a
commit 462e0ddcec

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,