Skip to content

Commit

Permalink
feat(MessageEmbed): add missing proxyURL property to video (discordjs…
Browse files Browse the repository at this point in the history
…#3109)

* Added missing property to MessageEmbed.video

* Updated typings for MessageEmbed.video
  • Loading branch information
Linn Dahlgren authored and SpaceEEC committed Feb 24, 2019
1 parent bc0a761 commit 7006f00
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
8 changes: 7 additions & 1 deletion src/structures/MessageEmbed.js
Original file line number Diff line number Diff line change
Expand Up @@ -100,11 +100,17 @@ class MessageEmbed {
* The video of this embed (if there is one)
* @type {?Object}
* @property {string} url URL of this video
* @property {string} proxyURL ProxyURL for this video
* @property {number} height Height of this video
* @property {number} width Width of this video
* @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)
Expand Down
2 changes: 1 addition & 1 deletion typings/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -713,7 +713,7 @@ declare module 'discord.js' {
public title: string;
public type: 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 addField(name: StringResolvable, value: StringResolvable, inline?: boolean): this;
public attachFiles(file: (MessageAttachment | FileOptions | string)[]): this;
Expand Down

0 comments on commit 7006f00

Please sign in to comment.