typings(Embed): add missing getters and add video to EmbedData (#7728)

* typings(Embed): add missing author getter

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

* typings: EmbedVideoData + video fields in Embed[Data]
This commit is contained in:
BaumianerNiklas
2022-04-12 17:18:15 +02:00
committed by GitHub
parent 29f8807955
commit fd1dc72c0a

View File

@@ -110,6 +110,7 @@ import {
APIEmbedAuthor,
APIEmbedFooter,
APIEmbedImage,
APIEmbedVideo,
VideoQualityMode,
} from 'discord-api-types/v10';
import { ChildProcess } from 'node:child_process';
@@ -603,6 +604,7 @@ export interface EmbedData {
provider?: EmbedProviderData;
author?: EmbedAuthorData;
fields?: EmbedFieldData[];
video?: EmbedVideoData;
}
export interface IconData {
@@ -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;
@@ -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;
}