mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-09 16:13:31 +01:00
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:
11
packages/discord.js/typings/index.d.ts
vendored
11
packages/discord.js/typings/index.d.ts
vendored
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user