Skip to content

Commit

Permalink
typings(Embed): add missing getters and add video to EmbedData (#7728)
Browse files Browse the repository at this point in the history
* typings(Embed): add missing author getter

* typings(Embed): add hexColor, provider, and length getters

* typings: EmbedVideoData + video fields in Embed[Data]
  • Loading branch information
BaumianerNiklas committed Apr 12, 2022
1 parent 29f8807 commit fd1dc72
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions packages/discord.js/typings/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ import {
APIEmbedAuthor,
APIEmbedFooter,
APIEmbedImage,
APIEmbedVideo,
VideoQualityMode,
} from 'discord-api-types/v10';
import { ChildProcess } from 'node:child_process';
Expand Down Expand Up @@ -603,6 +604,7 @@ export interface EmbedData {
provider?: EmbedProviderData;
author?: EmbedAuthorData;
fields?: EmbedFieldData[];
video?: EmbedVideoData;
}

export interface IconData {
Expand All @@ -623,6 +625,10 @@ export interface EmbedImageData extends Omit<APIEmbedImage, 'proxy_url'> {
proxyURL?: string;
}

export interface EmbedVideoData extends Omit<APIEmbedVideo, 'proxy_url'> {
proxyURL?: string;
}

export class EmbedBuilder extends BuildersEmbed {
public constructor(data?: EmbedData | APIEmbed);
public override setColor(color: ColorResolvable | null): this;
Expand All @@ -638,9 +644,14 @@ export class Embed {
public get description(): string | null;
public get url(): string | null;
public get color(): number | null;
public get hexColor(): string | null;
public get timestamp(): string | null;
public get thumbnail(): EmbedImageData | null;
public get image(): EmbedImageData | null;
public get author(): EmbedAuthorData | null;
public get provider(): EmbedProviderData | null;
public get video(): EmbedVideoData | null;
public get length(): number;
public equals(other: Embed | APIEmbed): boolean;
public toJSON(): APIEmbed;
}
Expand Down

0 comments on commit fd1dc72

Please sign in to comment.