mirror of
https://github.com/danbulant/discord.js
synced 2026-06-08 01:01:30 +00:00
feat(MessageEmbed): add missing proxyURL property to video (#3109)
* Added missing property to MessageEmbed.video * Updated typings for MessageEmbed.video
This commit is contained in:
parent
bc0a761e22
commit
7006f00ae4
2 changed files with 8 additions and 2 deletions
|
|
@ -100,11 +100,17 @@ class MessageEmbed {
|
||||||
* The video of this embed (if there is one)
|
* The video of this embed (if there is one)
|
||||||
* @type {?Object}
|
* @type {?Object}
|
||||||
* @property {string} url URL of this video
|
* @property {string} url URL of this video
|
||||||
|
* @property {string} proxyURL ProxyURL for this video
|
||||||
* @property {number} height Height of this video
|
* @property {number} height Height of this video
|
||||||
* @property {number} width Width of this video
|
* @property {number} width Width of this video
|
||||||
* @readonly
|
* @readonly
|
||||||
*/
|
*/
|
||||||
this.video = data.video;
|
this.video = data.video ? {
|
||||||
|
url: data.video.url,
|
||||||
|
proxyURL: data.video.proxy_url,
|
||||||
|
height: data.video.height,
|
||||||
|
width: data.video.width,
|
||||||
|
} : null;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The author of this embed (if there is one)
|
* The author of this embed (if there is one)
|
||||||
|
|
|
||||||
2
typings/index.d.ts
vendored
2
typings/index.d.ts
vendored
|
|
@ -713,7 +713,7 @@ declare module 'discord.js' {
|
||||||
public title: string;
|
public title: string;
|
||||||
public type: string;
|
public type: string;
|
||||||
public url: string;
|
public url: string;
|
||||||
public readonly video: { url?: string; height?: number; width?: number };
|
public readonly video: { url?: string; proxyURL?: string; height?: number; width?: number };
|
||||||
public addBlankField(inline?: boolean): this;
|
public addBlankField(inline?: boolean): this;
|
||||||
public addField(name: StringResolvable, value: StringResolvable, inline?: boolean): this;
|
public addField(name: StringResolvable, value: StringResolvable, inline?: boolean): this;
|
||||||
public attachFiles(file: (MessageAttachment | FileOptions | string)[]): this;
|
public attachFiles(file: (MessageAttachment | FileOptions | string)[]): this;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue